diff options
author | LemonBoy <LemonBoy@users.noreply.github.com> | 2018-10-14 08:53:41 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-10-14 08:53:41 +0200 |
commit | 4808ef72dbfb44634a1afe4d88e657abe17cbfd5 (patch) | |
tree | fda8956988fd4cb63d1420124350ac2b7c71314b /tests | |
parent | 9f8b93641efda5e20a76732e5d11165ac323f1e0 (diff) | |
download | Nim-4808ef72dbfb44634a1afe4d88e657abe17cbfd5.tar.gz |
[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
Diffstat (limited to 'tests')
-rw-r--r-- | tests/magics/t8693.nim | 6 | ||||
-rw-r--r-- | tests/types/tisopr.nim | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/tests/magics/t8693.nim b/tests/magics/t8693.nim index 554244de4..71468116b 100644 --- a/tests/magics/t8693.nim +++ b/tests/magics/t8693.nim @@ -9,6 +9,10 @@ true false true true +false +true +true +false ''' """ @@ -27,3 +31,5 @@ echo bar(4, Foo) echo bar(any, int) echo bar(int, any) echo bar(Foo, Foo) +echo bar(any, Foo) +echo bar(Foo, any) diff --git a/tests/types/tisopr.nim b/tests/types/tisopr.nim index f05f443de..636377301 100644 --- a/tests/types/tisopr.nim +++ b/tests/types/tisopr.nim @@ -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. |