Don't fail on star projections for error types

This commit is contained in:
Andrey Breslav
2013-10-23 15:47:39 +04:00
parent 78a4b6fff6
commit d79403d82c
2 changed files with 19 additions and 1 deletions
@@ -328,6 +328,18 @@ public class ErrorUtils {
return candidate instanceof ErrorClassDescriptor;
}
@NotNull
public static TypeParameterDescriptor createErrorTypeParameter(int index, @NotNull String debugMessage) {
return TypeParameterDescriptorImpl.createWithDefaultBound(
ERROR_CLASS,
Collections.<AnnotationDescriptor>emptyList(),
false,
Variance.INVARIANT,
Name.special("<ERROR: " + debugMessage + ">"),
index
);
}
private static class ErrorTypeImpl implements JetType {
private final TypeConstructor constructor;
private final JetScope memberScope;