[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:
parent
9f8b93641e
commit
4808ef72db
4 changed files with 14 additions and 47 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue