old constraint system is not removed for a while

This commit is contained in:
Svetlana Isakova
2012-07-03 12:38:20 +04:00
parent 2193a2f7c1
commit 83ec7d9c68
3 changed files with 8 additions and 5 deletions
@@ -33,7 +33,7 @@ import static org.jetbrains.jet.lang.resolve.calls.inference.ConstraintType.PARA
/** /**
* @author abreslav * @author abreslav
*/ */
public class ConstraintSystemWithPriorities implements ConstraintSystem { public class ConstraintSystemWithPriorities {
public static final Comparator<SubtypingConstraint> SUBTYPING_CONSTRAINT_ORDER = new Comparator<SubtypingConstraint>() { public static final Comparator<SubtypingConstraint> SUBTYPING_CONSTRAINT_ORDER = new Comparator<SubtypingConstraint>() {
@Override @Override
@@ -107,7 +107,6 @@ public class ConstraintSystemWithPriorities implements ConstraintSystem {
return typeValue; return typeValue;
} }
@Override
public void registerTypeVariable(@NotNull TypeParameterDescriptor typeParameterDescriptor, @NotNull Variance positionVariance) { public void registerTypeVariable(@NotNull TypeParameterDescriptor typeParameterDescriptor, @NotNull Variance positionVariance) {
assert !unknownTypes.containsKey(typeParameterDescriptor); assert !unknownTypes.containsKey(typeParameterDescriptor);
TypeValue typeValue = new TypeValue(typeParameterDescriptor, positionVariance); TypeValue typeValue = new TypeValue(typeParameterDescriptor, positionVariance);
@@ -124,7 +123,6 @@ public class ConstraintSystemWithPriorities implements ConstraintSystem {
return unknownType; return unknownType;
} }
@Override
public void addSubtypingConstraint(@NotNull SubtypingConstraint constraint) { public void addSubtypingConstraint(@NotNull SubtypingConstraint constraint) {
constraintQueue.add(constraint); constraintQueue.add(constraint);
} }
@@ -258,7 +256,6 @@ public class ConstraintSystemWithPriorities implements ConstraintSystem {
return true; return true;
} }
@Override
@NotNull @NotNull
public ConstraintSystemSolution solve() { public ConstraintSystemSolution solve() {
Solution solution = new Solution(); Solution solution = new Solution();
@@ -34,7 +34,7 @@ public class TypeCheckingProcedure {
// This method returns the supertype of the first parameter that has the same constructor // This method returns the supertype of the first parameter that has the same constructor
// as the second parameter, applying the substitution of type arguments to it // as the second parameter, applying the substitution of type arguments to it
@Nullable @Nullable
private static JetType findCorrespondingSupertype(@NotNull JetType subtype, @NotNull JetType supertype) { public static JetType findCorrespondingSupertype(@NotNull JetType subtype, @NotNull JetType supertype) {
TypeConstructor constructor = subtype.getConstructor(); TypeConstructor constructor = subtype.getConstructor();
if (constructor.equals(supertype.getConstructor())) { if (constructor.equals(supertype.getConstructor())) {
return subtype; return subtype;
@@ -324,4 +324,10 @@ public class StdlibTest extends CodegenTestCase {
public void testInvokeAnnotationMethod() { public void testInvokeAnnotationMethod() {
blackBoxFile("regressions/kt1932.kt"); blackBoxFile("regressions/kt1932.kt");
} }
public void testKt1800() {
blackBoxFile("regressions/kt1800.kt");
}
} }