[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
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue