import foo {.all.} reboot (#17706)

This commit is contained in:
Timothee Cour 2021-04-16 00:16:39 -07:00 • committed by GitHub
commit 8161b02897
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
38 changed files with 584 additions and 76 deletions

12
tests/importalls/mt3.nim Normal file
View file

@ -0,0 +1,12 @@
import ./m1 {.all.}
# D20201209T194412:here keep this as is, without `as`, so that mt8.nim test keeps
# checking that the original module symbol for `m1` isn't modified and that
# only the alias in `createModuleAlias` is affected.
doAssert declared(m1.foo1)
doAssert foo1 == 2
doAssert m1.foo1 == 2
doAssert not compiles(mt3.foo0) # foo0 is an imported symbol
doAssert not compiles(mt3.foo1) # ditto