trace.getErrorHandler().genericError(overrideNode,"Method "+overridden.getName()+" in "+overridden.getContainingDeclaration().getName()+" is final and can not be overridden");
context.getTrace().getErrorHandler().genericError(overrideNode,"Method "+overridden.getName()+" in "+overridden.getContainingDeclaration().getName()+" is final and can not be overridden");
finalJetTypeInferrer.ServicestypeInferrer=semanticServices.getTypeInferrerServices(traceForConstructors,JetFlowInformationProvider.NONE);// TODO : flow
finalJetTypeInferrer.ServicestypeInferrer=context.getSemanticServices().getTypeInferrerServices(traceForConstructors,JetFlowInformationProvider.NONE);// TODO : flow
JetTypeInferrer.ServicestypeInferrer=semanticServices.getTypeInferrerServices(createFieldAssignTrackingTrace(),JetFlowInformationProvider.NONE);// TODO : flow
JetTypeInferrer.ServicestypeInferrer=context.getSemanticServices().getTypeInferrerServices(createFieldAssignTrackingTrace(),JetFlowInformationProvider.NONE);// TODO : flow
trace.getErrorHandler().genericError(anonymousInitializer.getNode(),"Anonymous initializers are only allowed in the presence of a primary constructor");
context.getTrace().getErrorHandler().genericError(anonymousInitializer.getNode(),"Anonymous initializers are only allowed in the presence of a primary constructor");
assertcontainingClass!=null:"This must be guaranteed by the parser";
assertcontainingClass!=null:"This must be guaranteed by the parser";
if(!containingClass.hasPrimaryConstructor()){
if(!containingClass.hasPrimaryConstructor()){
trace.getErrorHandler().genericError(declaration.getNameNode(),"A secondary constructor may appear only in a class that has a primary constructor");
context.getTrace().getErrorHandler().genericError(declaration.getNameNode(),"A secondary constructor may appear only in a class that has a primary constructor");
WritableScopeconstructorScope=newWritableScopeImpl(declaringScope,declaringScope.getContainingDeclaration(),trace.getErrorHandler()).setDebugName("Inner scope for constructor");
WritableScopeconstructorScope=newWritableScopeImpl(declaringScope,declaringScope.getContainingDeclaration(),context.getTrace().getErrorHandler()).setDebugName("Inner scope for constructor");
trace.getErrorHandler().genericError(initializer.getNode(),"Property initializers are not allowed when no primary constructor is present");
context.getTrace().getErrorHandler().genericError(initializer.getNode(),"Property initializers are not allowed when no primary constructor is present");
trace.getErrorHandler().genericError(abstractNode,"Abstract method "+function.getName()+" in non-abstract class "+classDescriptor.getName());
context.getTrace().getErrorHandler().genericError(abstractNode,"Abstract method "+function.getName()+" in non-abstract class "+classDescriptor.getName());
}
}
if(hasAbstractModifier&&inTrait){
if(hasAbstractModifier&&inTrait){
trace.getErrorHandler().genericWarning(abstractNode,"Abstract modifier is not necessary in traits");
context.getTrace().getErrorHandler().genericWarning(abstractNode,"Abstract modifier is not necessary in traits");
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 {