infer static parameters even when more complicated arithmetic is involved
This commit is contained in:
parent
0b0a3e5f20
commit
0f2c4be129
10 changed files with 139 additions and 48 deletions
|
|
@ -1621,7 +1621,7 @@ proc semStmtList(c: PContext, n: PNode, flags: TExprFlags): PNode =
|
|||
elif expr[2].typ.isUnresolvedStatic:
|
||||
inferConceptStaticParam(c, expr[2].typ, expr[1])
|
||||
continue
|
||||
|
||||
|
||||
let verdict = semConstExpr(c, n[i])
|
||||
if verdict.intVal == 0:
|
||||
localError(result.info, "type class predicate failed")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue