Added more tests on incorporation
This commit is contained in:
@@ -10,4 +10,5 @@ interface Producer<out T>
|
||||
interface My<T>
|
||||
interface Successor<T> : My<T>
|
||||
|
||||
interface Two<T, P>
|
||||
interface Two<T, P>
|
||||
interface Fun<in T, out R>
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
VARIABLES T P
|
||||
|
||||
SUBTYPE T? P?
|
||||
SUBTYPE P Int
|
||||
|
||||
type parameter bounds:
|
||||
T <: P?*, <: P*, <: Int, <: Int?
|
||||
P >: T*, <: Int
|
||||
|
||||
status:
|
||||
-hasCannotCaptureTypesError: false
|
||||
-hasConflictingConstraints: false
|
||||
-hasContradiction: false
|
||||
-hasErrorInConstrainingTypes: false
|
||||
-hasTypeConstructorMismatch: false
|
||||
-hasTypeInferenceIncorporationError: false
|
||||
-hasUnknownParameters: false
|
||||
-hasViolatedUpperBound: false
|
||||
-isSuccessful: true
|
||||
|
||||
result:
|
||||
T=Int
|
||||
P=Int
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
VARIABLES T P
|
||||
|
||||
SUBTYPE T? P?
|
||||
SUBTYPE P Int
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
VARIABLES T P
|
||||
|
||||
SUBTYPE Int T
|
||||
EQUAL P Consumer<Consumer<T>>
|
||||
|
||||
type parameter bounds:
|
||||
T >: Int
|
||||
P := Consumer<Consumer<T>>*, >: Consumer<Consumer<Int>>
|
||||
|
||||
status:
|
||||
-hasCannotCaptureTypesError: false
|
||||
-hasConflictingConstraints: false
|
||||
-hasContradiction: false
|
||||
-hasErrorInConstrainingTypes: false
|
||||
-hasTypeConstructorMismatch: false
|
||||
-hasTypeInferenceIncorporationError: false
|
||||
-hasUnknownParameters: false
|
||||
-hasViolatedUpperBound: false
|
||||
-isSuccessful: true
|
||||
|
||||
result:
|
||||
T=Int
|
||||
P=Consumer<Consumer<Int>>
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
VARIABLES T P
|
||||
|
||||
SUBTYPE Int T
|
||||
EQUAL P Consumer<Consumer<T>>
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
VARIABLES T P
|
||||
|
||||
SUBTYPE Int T
|
||||
SUBTYPE P Consumer<Consumer<Consumer<T>>>
|
||||
|
||||
type parameter bounds:
|
||||
T >: Int
|
||||
P <: Consumer<Consumer<Consumer<T>>>*, <: Consumer<Consumer<Consumer<Int>>>
|
||||
|
||||
status:
|
||||
-hasCannotCaptureTypesError: false
|
||||
-hasConflictingConstraints: false
|
||||
-hasContradiction: false
|
||||
-hasErrorInConstrainingTypes: false
|
||||
-hasTypeConstructorMismatch: false
|
||||
-hasTypeInferenceIncorporationError: false
|
||||
-hasUnknownParameters: false
|
||||
-hasViolatedUpperBound: false
|
||||
-isSuccessful: true
|
||||
|
||||
result:
|
||||
T=Int
|
||||
P=Consumer<Consumer<Consumer<Int>>>
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
VARIABLES T P
|
||||
|
||||
SUBTYPE Int T
|
||||
SUBTYPE P Consumer<Consumer<Consumer<T>>>
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
VARIABLES T P
|
||||
|
||||
SUBTYPE Int T
|
||||
SUBTYPE P My<My<Consumer<T>>>
|
||||
|
||||
type parameter bounds:
|
||||
T >: Int
|
||||
P <: My<My<Consumer<T>>>*, <: My<out My<out Consumer<Int>>>
|
||||
|
||||
status:
|
||||
-hasCannotCaptureTypesError: false
|
||||
-hasConflictingConstraints: false
|
||||
-hasContradiction: true
|
||||
-hasErrorInConstrainingTypes: false
|
||||
-hasTypeConstructorMismatch: false
|
||||
-hasTypeInferenceIncorporationError: true
|
||||
-hasUnknownParameters: false
|
||||
-hasViolatedUpperBound: false
|
||||
-isSuccessful: false
|
||||
|
||||
result:
|
||||
T=Int
|
||||
P=My<out My<out Consumer<Int>>>
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
VARIABLES T P
|
||||
|
||||
SUBTYPE Int T
|
||||
SUBTYPE P My<My<Consumer<T>>>
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
VARIABLES T P
|
||||
|
||||
SUBTYPE T Int
|
||||
SUBTYPE P My<My<Producer<T>>>
|
||||
|
||||
type parameter bounds:
|
||||
T <: Int
|
||||
P <: My<My<Producer<T>>>*, <: My<out My<out Producer<Int>>>
|
||||
|
||||
status:
|
||||
-hasCannotCaptureTypesError: false
|
||||
-hasConflictingConstraints: false
|
||||
-hasContradiction: true
|
||||
-hasErrorInConstrainingTypes: false
|
||||
-hasTypeConstructorMismatch: false
|
||||
-hasTypeInferenceIncorporationError: true
|
||||
-hasUnknownParameters: false
|
||||
-hasViolatedUpperBound: false
|
||||
-isSuccessful: false
|
||||
|
||||
result:
|
||||
T=Int
|
||||
P=My<out My<out Producer<Int>>>
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
VARIABLES T P
|
||||
|
||||
SUBTYPE T Int
|
||||
SUBTYPE P My<My<Producer<T>>>
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
VARIABLES T P
|
||||
|
||||
SUBTYPE T Int
|
||||
SUBTYPE P Producer<Producer<Producer<T>>>
|
||||
|
||||
type parameter bounds:
|
||||
T <: Int
|
||||
P <: Producer<Producer<Producer<T>>>*, <: Producer<Producer<Producer<Int>>>
|
||||
|
||||
status:
|
||||
-hasCannotCaptureTypesError: false
|
||||
-hasConflictingConstraints: false
|
||||
-hasContradiction: false
|
||||
-hasErrorInConstrainingTypes: false
|
||||
-hasTypeConstructorMismatch: false
|
||||
-hasTypeInferenceIncorporationError: false
|
||||
-hasUnknownParameters: false
|
||||
-hasViolatedUpperBound: false
|
||||
-isSuccessful: true
|
||||
|
||||
result:
|
||||
T=Int
|
||||
P=Producer<Producer<Producer<Int>>>
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
VARIABLES T P
|
||||
|
||||
SUBTYPE T Int
|
||||
SUBTYPE P Producer<Producer<Producer<T>>>
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
VARIABLES T P
|
||||
|
||||
SUBTYPE Int T
|
||||
SUBTYPE P Producer<Consumer<Producer<T>>>
|
||||
|
||||
type parameter bounds:
|
||||
T >: Int
|
||||
P <: Producer<Consumer<Producer<T>>>*, <: Producer<Consumer<Producer<Int>>>
|
||||
|
||||
status:
|
||||
-hasCannotCaptureTypesError: false
|
||||
-hasConflictingConstraints: false
|
||||
-hasContradiction: false
|
||||
-hasErrorInConstrainingTypes: false
|
||||
-hasTypeConstructorMismatch: false
|
||||
-hasTypeInferenceIncorporationError: false
|
||||
-hasUnknownParameters: false
|
||||
-hasViolatedUpperBound: false
|
||||
-isSuccessful: true
|
||||
|
||||
result:
|
||||
T=Int
|
||||
P=Producer<Consumer<Producer<Int>>>
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
VARIABLES T P
|
||||
|
||||
SUBTYPE Int T
|
||||
SUBTYPE P Producer<Consumer<Producer<T>>>
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
VARIABLES T P
|
||||
|
||||
SUBTYPE T Int
|
||||
SUBTYPE P Fun<Consumer<T>,Producer<T>>
|
||||
|
||||
type parameter bounds:
|
||||
T <: Int
|
||||
P <: Fun<Consumer<T>, Producer<T>>*, <: Fun<Consumer<Int>, Producer<Int>>
|
||||
|
||||
status:
|
||||
-hasCannotCaptureTypesError: false
|
||||
-hasConflictingConstraints: false
|
||||
-hasContradiction: false
|
||||
-hasErrorInConstrainingTypes: false
|
||||
-hasTypeConstructorMismatch: false
|
||||
-hasTypeInferenceIncorporationError: false
|
||||
-hasUnknownParameters: false
|
||||
-hasViolatedUpperBound: false
|
||||
-isSuccessful: true
|
||||
|
||||
result:
|
||||
T=Int
|
||||
P=Fun<Consumer<Int>, Producer<Int>>
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
VARIABLES T P
|
||||
|
||||
SUBTYPE T Int
|
||||
SUBTYPE P Fun<Consumer<T>,Producer<T>>
|
||||
@@ -0,0 +1,26 @@
|
||||
VARIABLES T P E
|
||||
|
||||
SUBTYPE Int T
|
||||
SUBTYPE P String
|
||||
SUBTYPE E Fun<T, P>
|
||||
|
||||
type parameter bounds:
|
||||
T >: Int
|
||||
P <: String
|
||||
E <: Fun<T, [ERROR : No type element]>*, <: Fun<Int, [ERROR : No type element]>
|
||||
|
||||
status:
|
||||
-hasCannotCaptureTypesError: false
|
||||
-hasConflictingConstraints: false
|
||||
-hasContradiction: false
|
||||
-hasErrorInConstrainingTypes: false
|
||||
-hasTypeConstructorMismatch: false
|
||||
-hasTypeInferenceIncorporationError: false
|
||||
-hasUnknownParameters: false
|
||||
-hasViolatedUpperBound: false
|
||||
-isSuccessful: true
|
||||
|
||||
result:
|
||||
T=Int
|
||||
P=String
|
||||
E=Fun<Int, [ERROR : No type element]>
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
VARIABLES T P E
|
||||
|
||||
SUBTYPE Int T
|
||||
SUBTYPE P String
|
||||
SUBTYPE E Fun<T, P>
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
VARIABLES T P E
|
||||
|
||||
SUBTYPE T P
|
||||
SUBTYPE P E
|
||||
SUBTYPE E Int
|
||||
|
||||
type parameter bounds:
|
||||
T <: P*, <: E*, <: Int
|
||||
P >: T*, <: E*, <: Int
|
||||
E >: T*, >: P*, <: Int
|
||||
|
||||
status:
|
||||
-hasCannotCaptureTypesError: false
|
||||
-hasConflictingConstraints: false
|
||||
-hasContradiction: false
|
||||
-hasErrorInConstrainingTypes: false
|
||||
-hasTypeConstructorMismatch: false
|
||||
-hasTypeInferenceIncorporationError: false
|
||||
-hasUnknownParameters: false
|
||||
-hasViolatedUpperBound: false
|
||||
-isSuccessful: true
|
||||
|
||||
result:
|
||||
T=Int
|
||||
P=Int
|
||||
E=Int
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
VARIABLES T P E
|
||||
|
||||
SUBTYPE T P
|
||||
SUBTYPE P E
|
||||
SUBTYPE E Int
|
||||
Vendored
+26
@@ -0,0 +1,26 @@
|
||||
VARIABLES T P E
|
||||
|
||||
SUBTYPE T P
|
||||
SUBTYPE P E
|
||||
SUBTYPE Int E
|
||||
|
||||
type parameter bounds:
|
||||
T <: P*, <: E*
|
||||
P >: T*, <: E*
|
||||
E >: T*, >: P*, >: Int
|
||||
|
||||
status:
|
||||
-hasCannotCaptureTypesError: false
|
||||
-hasConflictingConstraints: false
|
||||
-hasContradiction: false
|
||||
-hasErrorInConstrainingTypes: false
|
||||
-hasTypeConstructorMismatch: false
|
||||
-hasTypeInferenceIncorporationError: false
|
||||
-hasUnknownParameters: true
|
||||
-hasViolatedUpperBound: false
|
||||
-isSuccessful: false
|
||||
|
||||
result:
|
||||
T=???
|
||||
P=???
|
||||
E=Int
|
||||
compiler/testData/constraintSystem/severalVariables/other/simpleThreeVarsNoIncorporation.constraints
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
VARIABLES T P E
|
||||
|
||||
SUBTYPE T P
|
||||
SUBTYPE P E
|
||||
SUBTYPE Int E
|
||||
compiler/testData/constraintSystem/severalVariables/other/simpleThreeVarsNoIncorporationFixed.bounds
Vendored
+27
@@ -0,0 +1,27 @@
|
||||
VARIABLES T P E
|
||||
FIX_VARIABLES
|
||||
|
||||
SUBTYPE T P
|
||||
SUBTYPE P E
|
||||
SUBTYPE Int E
|
||||
|
||||
type parameter bounds:
|
||||
T <: P*, <: E*, <: Int, := Int
|
||||
P >: T*, <: E*, <: Int, := Int, >: Int
|
||||
E >: T*, >: P*, >: Int, := Int
|
||||
|
||||
status:
|
||||
-hasCannotCaptureTypesError: false
|
||||
-hasConflictingConstraints: false
|
||||
-hasContradiction: false
|
||||
-hasErrorInConstrainingTypes: false
|
||||
-hasTypeConstructorMismatch: false
|
||||
-hasTypeInferenceIncorporationError: false
|
||||
-hasUnknownParameters: false
|
||||
-hasViolatedUpperBound: false
|
||||
-isSuccessful: true
|
||||
|
||||
result:
|
||||
T=Int
|
||||
P=Int
|
||||
E=Int
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
VARIABLES T P E
|
||||
FIX_VARIABLES
|
||||
|
||||
SUBTYPE T P
|
||||
SUBTYPE P E
|
||||
SUBTYPE Int E
|
||||
+81
@@ -631,6 +631,87 @@ public class ConstraintSystemTestGenerated extends AbstractConstraintSystemTest
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/constraintSystem/severalVariables/other")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Other extends AbstractConstraintSystemTest {
|
||||
public void testAllFilesPresentInOther() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/constraintSystem/severalVariables/other"), Pattern.compile("^(.+)\\.constraints$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("constraintForNullables.constraints")
|
||||
public void testConstraintForNullables() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/other/constraintForNullables.constraints");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("nestedConsumer.constraints")
|
||||
public void testNestedConsumer() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/other/nestedConsumer.constraints");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("nestedConsumer1.constraints")
|
||||
public void testNestedConsumer1() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/other/nestedConsumer1.constraints");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("nestedInvConsumer.constraints")
|
||||
public void testNestedInvConsumer() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/other/nestedInvConsumer.constraints");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("nestedInvProducer.constraints")
|
||||
public void testNestedInvProducer() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/other/nestedInvProducer.constraints");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("nestedProducer.constraints")
|
||||
public void testNestedProducer() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/other/nestedProducer.constraints");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("nestedProducerAndConsumer.constraints")
|
||||
public void testNestedProducerAndConsumer() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/other/nestedProducerAndConsumer.constraints");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("severalOccurrences.constraints")
|
||||
public void testSeveralOccurrences() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/other/severalOccurrences.constraints");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("simpleFun.constraints")
|
||||
public void testSimpleFun() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/other/simpleFun.constraints");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("simpleThreeVars.constraints")
|
||||
public void testSimpleThreeVars() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/other/simpleThreeVars.constraints");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("simpleThreeVarsNoIncorporation.constraints")
|
||||
public void testSimpleThreeVarsNoIncorporation() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/other/simpleThreeVarsNoIncorporation.constraints");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("simpleThreeVarsNoIncorporationFixed.constraints")
|
||||
public void testSimpleThreeVarsNoIncorporationFixed() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/other/simpleThreeVarsNoIncorporationFixed.constraints");
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/constraintSystem/severalVariables/recursive")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Reference in New Issue
Block a user