This PR mainly introduces glob imports in import statements, e.g.:
import Foo.*;
import Foo.Bar.* as Baz;
et cetera.
Glob imports work similarly to other languages: Foo.* brings in everything from Foo, while Foo.* as Bar brings in all of Foo, but aliased under a namespace Bar. For example, if function F() : Unit {} exists in Foo, then after importing via Foo.* as Bar, it would be available as Bar.F().
Other incidental changes include:
Improving the Display impl for ImportOrExportItem, for easier-to-read tests
branched off of #1469
This PR mainly introduces glob imports in import statements, e.g.:
et cetera.
Glob imports work similarly to other languages:
Foo.*
brings in everything fromFoo
, whileFoo.* as Bar
brings in all ofFoo
, but aliased under a namespaceBar
. For example, iffunction F() : Unit {}
exists inFoo
, then after importing viaFoo.* as Bar
, it would be available asBar.F()
.Other incidental changes include:
Display
impl forImportOrExportItem
, for easier-to-read tests