Reverted modification in TypeTransformingVisitor in "Renamed & moved AllInjectorsGenerator".
It was not relevant to that commit: it was squashed accidentally during interactive rebasing.
This commit is contained in:
+2
-6
@@ -124,9 +124,9 @@ class TypeTransformingVisitor extends JetVisitor<JetType, Void> {
|
||||
TypeProjection argument = arguments.get(i);
|
||||
JetType alternativeType = computeType(argumentAlternativeTypeElement, argument.getType(), originalToAltTypeParameters);
|
||||
Variance variance = argument.getProjectionKind();
|
||||
Variance altVariance;
|
||||
if (type instanceof JetUserType) {
|
||||
JetTypeProjection typeProjection = ((JetUserType) type).getTypeArguments().get(i);
|
||||
Variance altVariance = Variance.INVARIANT;
|
||||
switch (typeProjection.getProjectionKind()) {
|
||||
case IN:
|
||||
altVariance = Variance.IN_VARIANCE;
|
||||
@@ -137,16 +137,12 @@ class TypeTransformingVisitor extends JetVisitor<JetType, Void> {
|
||||
case STAR:
|
||||
throw new AlternativeSignatureMismatchException("Star projection is not available in alternative signatures");
|
||||
default:
|
||||
altVariance = Variance.INVARIANT;
|
||||
}
|
||||
if (altVariance != variance && variance != Variance.INVARIANT) {
|
||||
throw new AlternativeSignatureMismatchException("Variance mismatch, actual: %s, in alternative signature: %s", variance, altVariance);
|
||||
}
|
||||
}
|
||||
else {
|
||||
altVariance = variance;
|
||||
}
|
||||
altArguments.add(new TypeProjection(altVariance, alternativeType));
|
||||
altArguments.add(new TypeProjection(variance, alternativeType));
|
||||
}
|
||||
|
||||
TypeConstructor typeConstructor;
|
||||
|
||||
Reference in New Issue
Block a user