[WIP] Early evaluation of mIs (#8723)

* Early evaluation of mIs

The `evalIs` implementation was just a broken copy of `isOpImpl` so
let's just avoid it alltogether: `mIs` nodes are either resolved during
the semantic phase or bust.

* Remove dead code and tidy it up
This commit is contained in:
LemonBoy 2018-10-14 08:53:41 +02:00 • committed by Andreas Rumpf
commit 4808ef72db
4 changed files with 14 additions and 47 deletions

View file

@ -403,10 +403,8 @@ proc semIs(c: PContext, n: PNode, flags: TExprFlags): PNode =
n[1] = makeTypeSymNode(c, lhsType, n[1].info)
lhsType = n[1].typ
else:
if lhsType.base.kind == tyNone:
# this is a typedesc variable, leave for evals
return
if lhsType.base.containsGenericType:
internalAssert c.config, lhsType.base.kind != tyNone
if c.inGenericContext > 0 and lhsType.base.containsGenericType:
# BUGFIX: don't evaluate this too early: ``T is void``
return