createTypeConstructors(context);// create type constructors for classes and generic parameters
createTypeConstructors();// create type constructors for classes and generic parameters
resolveTypesInClassHeaders(context);// Generic bounds and types in supertype lists (no expressions or constructor resolution)
resolveTypesInClassHeaders();// Generic bounds and types in supertype lists (no expressions or constructor resolution)
checkTypesInClassHeaders(context);// Generic bounds and supertype lists
checkTypesInClassHeaders();// Generic bounds and supertype lists
returncontext;
}
}
privatevoidcollectNamespacesAndClassifiers(
privatevoidcollectNamespacesAndClassifiers(
@NotNullfinalJetScopeouterScope,
@NotNullfinalJetScopeouterScope,
@NotNullfinalNamespaceLikeowner,
@NotNullfinalNamespaceLikeowner,
@NotNullCollection<JetDeclaration>declarations,
@NotNullCollection<JetDeclaration>declarations){
@NotNullfinalTopDownAnalysisContextcontext){
for(JetDeclarationdeclaration:declarations){
for(JetDeclarationdeclaration:declarations){
declaration.accept(newJetVisitorVoid(){
declaration.accept(newJetVisitorVoid(){
@Override
@Override
...
@@ -72,26 +52,26 @@ public class TypeHierarchyResolver {
...
@@ -72,26 +52,26 @@ public class TypeHierarchyResolver {
Collections.<AnnotationDescriptor>emptyList(),// TODO
Collections.<AnnotationDescriptor>emptyList(),// TODO
name
name
);
);
namespaceDescriptor.initialize(newWritableScopeImpl(JetScope.EMPTY,namespaceDescriptor,trace.getErrorHandler()).setDebugName("Namespace member scope"));
namespaceDescriptor.initialize(newWritableScopeImpl(JetScope.EMPTY,namespaceDescriptor,context.getTrace().getErrorHandler()).setDebugName("Namespace member scope"));
MutableClassDescriptormutableClassDescriptor=newMutableClassDescriptor(trace,classObjectDescriptor,outerScope,ClassKind.CLASS);// TODO : Special kind for enum entry classes?
MutableClassDescriptormutableClassDescriptor=newMutableClassDescriptor(context.getTrace(),classObjectDescriptor,outerScope,ClassKind.CLASS);// TODO : Special kind for enum entry classes?
visitClassOrObject(
visitClassOrObject(
enumEntry,
enumEntry,
(Map)context.getClasses(),
(Map)context.getClasses(),
...
@@ -134,7 +114,7 @@ public class TypeHierarchyResolver {
...
@@ -134,7 +114,7 @@ public class TypeHierarchyResolver {