mt8.nim 495 B

123456789101112131415161718192021222324
  1. #[
  2. test multiple imports
  3. ]#
  4. {.warning[UnusedImport]: off.}
  5. import ./m1, m2 {.all.}, ./m3 {.all.}
  6. # make sure this keeps using `import ./m1` without as.
  7. # m1 is regularly imported
  8. doAssert declared(m1.foo0)
  9. doAssert declared(foo0)
  10. doAssert not declared(m1.foo1)
  11. # if we didn't call `createModuleAlias` even for `import f1 {.all.}`,
  12. # this would fail, see D20201209T194412.
  13. # m2
  14. doAssert declared(m2.bar2)
  15. doAssert declared(bar2)
  16. # m3
  17. doAssert declared(m3.m3h2)
  18. doAssert declared(m3h2)