Adds support for importing multiple elements/symbols in one import statement:
import emerge.std.io.{IOException, PrintStream}
It also adds a couple other improvements around imports:
- if the same element/symbol is imported multiple times, you get an
INFOdiagnostic - if multiple elements/symbols from different packages with identical simple name are imported, you get an
ERRORdiagnostic - if a type reference is ambiguous due to wildcard imports, you get an
ERRORdiagnostic (before it would just silently resolve to the first type imported) - if you declare two global variables with identical names in the same package (and they both have visibility beyond their file), then you get an
ERRORdiagnostic - the
ERRORdiagnostic around circular variable initialization is now much clearer
Also, some refactorings:
BoundBaseType.baseReferencegot replaced withgetBoundReferenceAssertNoTypeParameters(Span)andgetBoundReferenceWithNoneOrWildcardTypeArguments(Span). This makes a footgun more obvious and also makes sure these type references have a proper Span wherever possible- type inference in
BoundVariablewas refactored; the data and logic flow is now much more obvious from the code