Remove reference to error type constructor from unresolved annotation
This commit is contained in:
@@ -186,6 +186,11 @@ public class CallResolver {
|
||||
JetTypeReference typeReference = expression.getTypeReference();
|
||||
assert typeReference != null;
|
||||
JetType constructedType = typeResolver.resolveType(context.scope, typeReference, context.trace, true);
|
||||
|
||||
if (ErrorUtils.isErrorType(constructedType)) {
|
||||
return checkArgumentTypesAndFail(context);
|
||||
}
|
||||
|
||||
DeclarationDescriptor declarationDescriptor = constructedType.getConstructor().getDeclarationDescriptor();
|
||||
if (declarationDescriptor instanceof ClassDescriptor) {
|
||||
ClassDescriptor classDescriptor = (ClassDescriptor) declarationDescriptor;
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
`!null`first object Foo {}
|
||||
|
||||
`!null`second(`!null`aa, `!null`asdf) object More {
|
||||
}
|
||||
@@ -202,6 +202,12 @@ public abstract class ExpectedResolveData {
|
||||
renderReferenceInContext(referenceExpression) +
|
||||
" but was resolved to " + renderNullableDescriptor(referenceTarget),
|
||||
unresolvedReferences.contains(referenceExpression));
|
||||
|
||||
assertTrue(
|
||||
String.format("Reference =%s= has a reference target =%s= but expected to be unresolved",
|
||||
renderReferenceInContext(referenceExpression), renderNullableDescriptor(referenceTarget)),
|
||||
referenceTarget == null);
|
||||
|
||||
continue;
|
||||
}
|
||||
if ("!!".equals(name)) {
|
||||
|
||||
Reference in New Issue
Block a user