Static import
This commit is contained in:
+5
-4
@@ -38,6 +38,7 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import static org.jetbrains.jet.lang.resolve.java.TypeUsage.*;
|
||||
import static org.jetbrains.jet.lang.types.Variance.*;
|
||||
|
||||
public class JavaTypeTransformer {
|
||||
|
||||
@@ -73,7 +74,7 @@ public class JavaTypeTransformer {
|
||||
if (!wildcardType.isBounded()) {
|
||||
return SubstitutionUtils.makeStarProjection(typeParameterDescriptor);
|
||||
}
|
||||
Variance variance = wildcardType.isExtends() ? Variance.OUT_VARIANCE : Variance.IN_VARIANCE;
|
||||
Variance variance = wildcardType.isExtends() ? OUT_VARIANCE : IN_VARIANCE;
|
||||
|
||||
PsiType bound = wildcardType.getBound();
|
||||
assert bound != null;
|
||||
@@ -198,7 +199,7 @@ public class JavaTypeTransformer {
|
||||
|
||||
if (typeProjection.getProjectionKind() == typeParameterDescriptor.getVariance()) {
|
||||
// remove redundant 'out' and 'in'
|
||||
arguments.add(new TypeProjection(Variance.INVARIANT, typeProjection.getType()));
|
||||
arguments.add(new TypeProjection(INVARIANT, typeProjection.getType()));
|
||||
}
|
||||
else {
|
||||
arguments.add(typeProjection);
|
||||
@@ -245,10 +246,10 @@ public class JavaTypeTransformer {
|
||||
private Variance arrayElementTypeProjectionKind(boolean vararg) {
|
||||
Variance variance;
|
||||
if (howThisTypeIsUsed == MEMBER_SIGNATURE_CONTRAVARIANT && !vararg) {
|
||||
variance = Variance.OUT_VARIANCE;
|
||||
variance = OUT_VARIANCE;
|
||||
}
|
||||
else {
|
||||
variance = Variance.INVARIANT;
|
||||
variance = INVARIANT;
|
||||
}
|
||||
return variance;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user