fixes destructor tuple regression #10940 (#10941)

* fixes #10940

* bug fixes

* fix spacing
This commit is contained in:
cooldome 2019-04-04 20:46:02 +01:00 • committed by GitHub
commit 795de374fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 56 additions and 3 deletions

View file

@ -2120,7 +2120,7 @@ proc semStmtList(c: PContext, n: PNode, flags: TExprFlags): PNode =
continue
let verdict = semConstExpr(c, n[i])
if verdict.intVal == 0:
if verdict == nil or verdict.kind != nkIntLit or verdict.intVal == 0:
localError(c.config, result.info, "concept predicate failed")
of tyUnknown: continue
else: discard