summary refs log tree commit diff stats
path: root/compiler/semstmts.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/semstmts.nim')
-rwxr-xr-xcompiler/semstmts.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim
index 2de496b9a..0449c5644 100755
--- a/compiler/semstmts.nim
+++ b/compiler/semstmts.nim
@@ -25,13 +25,13 @@ proc semWhen(c: PContext, n: PNode, semCheck = true): PNode =
   for i in countup(0, sonsLen(n) - 1): 
     var it = n.sons[i]
     case it.kind
-    of nkElifBranch: 
+    of nkElifBranch, nkElifExpr: 
       checkSonsLen(it, 2)
       var e = semAndEvalConstExpr(c, it.sons[0])
       if e.kind != nkIntLit: InternalError(n.info, "semWhen")
       if e.intVal != 0 and result == nil:
         setResult(it.sons[1]) 
-    of nkElse:
+    of nkElse, nkElseExpr:
       checkSonsLen(it, 1)
       if result == nil: 
         setResult(it.sons[0])