Files
wren/test/module/cyclic_import/cyclic_import.wren
T
Bob Nystrom 0d3eae5269 feat: allow zero or multiple imported names in import statement
Make the `for` clause in import statements optional, and support comma-separated lists of imported names when present. This removes the previous restriction of exactly one imported variable per import statement.

- Refactor `import()` in compiler to handle optional `for` clause with loop over comma-separated names
- Update existing tests to use comma-separated imports and omit `for` clause where appropriate
- Add new tests: `inside_block`, `name_collision`, `no_variable`
2015-02-17 15:32:33 +00:00

11 lines
240 B
Plaintext

import "a"
// Shared module should only run once:
// expect: start a
// expect: a defined a value
// expect: start b
// expect: b defined b value
// expect: b imported a value
// expect: end b
// expect: a imported b value
// expect: end a