semanticServices.getErrorHandler().genericError(typeArgument.getNode(),"Projections are not allowed on type parameters for methods");// TODO : better positioning
semanticServices.getErrorHandler().genericError(argumentList.getNode(),"Cannot find an overload for these arguments");
}
constructorReturnedType=receiverType;
}
// If no upcast needed:
returnconstructorReturnedType;
// Automatic upcast:
// result = receiverType;
}
}
else{
semanticServices.getErrorHandler().genericError(((JetElement)call).getNode(),"Calling a constructor is only supported for ordinary classes");// TODO : review the message
}
}
else{
if(typeElement!=null){
semanticServices.getErrorHandler().genericError(typeElement.getNode(),"Calling a constructor is only supported for ordinary classes");// TODO : Better message
semanticServices.getErrorHandler().genericError(argumentList.getNode(),"Cannot find an overload for these arguments");
}
constructorReturnedType=receiverType;
}
// If no upcast needed:
result=constructorReturnedType;
// Automatic upcast:
// result = receiverType;
}
}
else{
semanticServices.getErrorHandler().genericError(expression.getNode(),"Calling a constructor is only supported for ordinary classes");// TODO : review the message
}
}
else{
if(typeElement!=null){
semanticServices.getErrorHandler().genericError(typeElement.getNode(),"Calling a constructor is only supported for ordinary classes");// TODO : Better message
semanticServices.getErrorHandler().genericError(typeArgument.getNode(),"Projections are not allowed on type parameters for methods");// TODO : better positioning