[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

@ -1,7 +1,7 @@
discard """
output: '''true true false yes
false
false
true
false
true
true
@ -68,8 +68,8 @@ type SeqOrSet[E] = seq[E] or set[E]
type SeqOfInt = seq[int]
type SeqOrSetOfInt = SeqOrSet[int]
# This prints "false", which seems less correct that (1) printing "true" or (2)
# raising a compiler error.
# This prints "true", as expected. Previously "false" was returned and that
# seemed less correct that (1) printing "true" or (2) raising a compiler error.
echo seq is SeqOrSet
# This prints "false", as expected.