[bugfix] fixes #11556

This commit is contained in:
Andreas Rumpf
2019-06-21 20:38:11 +02:00
parent 12eebf48b6
commit 35df59b3ce

View File

@@ -891,10 +891,12 @@ proc semCase(c: PContext, n: PNode; flags: TExprFlags): PNode =
of tyFloat..tyFloat128, tyString, tyError:
discard
else:
popCaseContext(c)
closeScope(c)
if caseStmtMacros in c.features:
result = handleCaseStmtMacro(c, n)
if result != nil: return result
if result != nil:
return result
localError(c.config, n.sons[0].info, errSelectorMustBeOfCertainTypes)
return
for i in 1 ..< sonsLen(n):