From 3f71b7f1f6db5fbe3c61dde0cfd43d1eb0088cb6 Mon Sep 17 00:00:00 2001 From: Zahary Karadjov Date: Fri, 24 Jan 2014 17:02:27 +0200 Subject: implements #766; expressions such as Type.field are now recognised by the compiler. This also fixes a bug, preventing the user-defined to check for the presence of regular fields in addition to procs --- compiler/semstmts.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/semstmts.nim') diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim index fc1706200..d28eaa779 100644 --- a/compiler/semstmts.nim +++ b/compiler/semstmts.nim @@ -1240,7 +1240,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 -- cgit 1.4.1-2-gfad0