Minimal refactoring that eliminates importing Java's root namespace by default.
All tests pass. Some beautifying needed #KT-1477 Fixed
This commit is contained in:
@@ -84,6 +84,9 @@ public abstract class CodegenContext {
|
||||
while(true) {
|
||||
DeclarationDescriptor contextDescriptor = c.getContextDescriptor();
|
||||
if(!(contextDescriptor instanceof ClassDescriptor) && !(contextDescriptor instanceof NamespaceDescriptor)) {
|
||||
if (c.getParentContext() == null) {
|
||||
System.out.println();
|
||||
}
|
||||
c = c.getParentContext();
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -52,7 +52,7 @@ public class NamespaceCodegen {
|
||||
}
|
||||
|
||||
public void generate(JetFile file) {
|
||||
NamespaceDescriptor descriptor = state.getBindingContext().get(BindingContext.NAMESPACE, file);
|
||||
NamespaceDescriptor descriptor = state.getBindingContext().get(BindingContext.FILE_TO_NAMESPACE, file);
|
||||
final CodegenContext context = CodegenContext.STATIC.intoNamespace(descriptor);
|
||||
|
||||
final FunctionCodegen functionCodegen = new FunctionCodegen(context, v, state);
|
||||
|
||||
Reference in New Issue
Block a user