ceylon/ceylon-spec — Issue #90: Issues with Package
Author: FroMage
Created: 2011-12-07 13:07:34+00:00
State: open
Labels: improvement, refactoring

In the backend we have our own subclass of Package and it works well except for two situations:

#### Checking for duplicates

This is using the `Package.getDirectMember()` call, which we extended to be able to load things from .class files lazily, but because it's used by the `DeclarationVisitor` to check for duplicates we have to go through crazy hoops to be able to detect that usage and not load the class file if we're going to compile it.

Ideally we'd want another way of checking for duplicate, like `isAlreadyDefined(name)`.

#### Wildcard imports

This is using `Package.getMembers()` which we had to extend to load a package in full, when we don't think we need to, if the wildcard support in the typechecker was rewritten to probe packages for a missing decl in the case of wildcards. This would be cleaner and allow us to not load the full package.