Given the test case
import { SomeType } from "somewhere.60";
import { Blah } from "foo.60";
and foo.60 trying to use "SomeType":
export Blah := SomeType {}
then the lookup for "SomeType" in foo.60 should fail. Instead it leaked
through the populated type registry when processing the dependencies for
the outer file.
This is fixed by ensuring that the type registry for a file only has the
global type registry as parent. To ensure that the test reliably covers
this, the import dependencies are now processed in declaration order
(hence the switch to IndexMap that preserves insertion order).
This will allow us to break up the styles, so that one can have for example
button.60
checkbox.60
and finally widgets.60:
import { Button } from "button.60";
import { CheckBox } from "checkbox.60";
export { Button, CheckBox };
and then the users have to only import "widgets.60";
This is the counter part of the export statement and right now it's
implemented as a dumb recursive file loader. This can be extended in
thefuture to support cycles between files (but not types), if
theresolution of types is done lazily.