diff options
Diffstat (limited to 'compiler/semstmts.nim')
-rw-r--r-- | compiler/semstmts.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim index a26d89836..caa719c7e 100644 --- a/compiler/semstmts.nim +++ b/compiler/semstmts.nim @@ -1247,7 +1247,7 @@ proc semStmtList(c: PContext, n: PNode): PNode = if n.sons[i].typ == enforceVoidContext or usesResult(n.sons[i]): voidContext = true n.typ = enforceVoidContext - if i != last or voidContext: + if i != last or voidContext or c.inTypeClass > 0: discardCheck(c, n.sons[i]) else: n.typ = n.sons[i].typ |