From 83ec7d9c681a5485d213ead7f7db9a8dedbec509 Mon Sep 17 00:00:00 2001 From: Svetlana Isakova Date: Tue, 3 Jul 2012 12:38:20 +0400 Subject: [PATCH] old constraint system is not removed for a while --- .../calls/inference/ConstraintSystemWithPriorities.java | 5 +---- .../jet/lang/types/checker/TypeCheckingProcedure.java | 2 +- compiler/tests/org/jetbrains/jet/codegen/StdlibTest.java | 6 ++++++ 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/inference/ConstraintSystemWithPriorities.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/inference/ConstraintSystemWithPriorities.java index 022b909c68f..5f35068bb80 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/inference/ConstraintSystemWithPriorities.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/inference/ConstraintSystemWithPriorities.java @@ -33,7 +33,7 @@ import static org.jetbrains.jet.lang.resolve.calls.inference.ConstraintType.PARA /** * @author abreslav */ -public class ConstraintSystemWithPriorities implements ConstraintSystem { +public class ConstraintSystemWithPriorities { public static final Comparator SUBTYPING_CONSTRAINT_ORDER = new Comparator() { @Override @@ -107,7 +107,6 @@ public class ConstraintSystemWithPriorities implements ConstraintSystem { return typeValue; } - @Override public void registerTypeVariable(@NotNull TypeParameterDescriptor typeParameterDescriptor, @NotNull Variance positionVariance) { assert !unknownTypes.containsKey(typeParameterDescriptor); TypeValue typeValue = new TypeValue(typeParameterDescriptor, positionVariance); @@ -124,7 +123,6 @@ public class ConstraintSystemWithPriorities implements ConstraintSystem { return unknownType; } - @Override public void addSubtypingConstraint(@NotNull SubtypingConstraint constraint) { constraintQueue.add(constraint); } @@ -258,7 +256,6 @@ public class ConstraintSystemWithPriorities implements ConstraintSystem { return true; } - @Override @NotNull public ConstraintSystemSolution solve() { Solution solution = new Solution(); diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/types/checker/TypeCheckingProcedure.java b/compiler/frontend/src/org/jetbrains/jet/lang/types/checker/TypeCheckingProcedure.java index e8442218265..709503f8973 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/types/checker/TypeCheckingProcedure.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/types/checker/TypeCheckingProcedure.java @@ -34,7 +34,7 @@ public class TypeCheckingProcedure { // 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 @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(); if (constructor.equals(supertype.getConstructor())) { return subtype; diff --git a/compiler/tests/org/jetbrains/jet/codegen/StdlibTest.java b/compiler/tests/org/jetbrains/jet/codegen/StdlibTest.java index c40273aa212..8199f93daa6 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/StdlibTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/StdlibTest.java @@ -324,4 +324,10 @@ public class StdlibTest extends CodegenTestCase { public void testInvokeAnnotationMethod() { blackBoxFile("regressions/kt1932.kt"); } + + + public void testKt1800() { + blackBoxFile("regressions/kt1800.kt"); + } + }