Added more tests on incorporation

This commit is contained in:
Svetlana Isakova
2015-07-02 19:56:36 +03:00
parent 4c1eedce3b
commit fc69cf1b5e
26 changed files with 425 additions and 1 deletions
@@ -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
@@ -0,0 +1,4 @@
VARIABLES T P
SUBTYPE T? P?
SUBTYPE P Int
@@ -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>>
@@ -0,0 +1,4 @@
VARIABLES T P
SUBTYPE Int T
EQUAL P Consumer<Consumer<T>>
@@ -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>>>
@@ -0,0 +1,4 @@
VARIABLES T P
SUBTYPE Int T
SUBTYPE P Consumer<Consumer<Consumer<T>>>
@@ -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>>>
@@ -0,0 +1,4 @@
VARIABLES T P
SUBTYPE Int T
SUBTYPE P My<My<Consumer<T>>>
@@ -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>>>
@@ -0,0 +1,4 @@
VARIABLES T P
SUBTYPE T Int
SUBTYPE P My<My<Producer<T>>>
@@ -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>>>
@@ -0,0 +1,4 @@
VARIABLES T P
SUBTYPE T Int
SUBTYPE P Producer<Producer<Producer<T>>>
@@ -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>>>
@@ -0,0 +1,4 @@
VARIABLES T P
SUBTYPE Int T
SUBTYPE P Producer<Consumer<Producer<T>>>
@@ -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>>
@@ -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]>
@@ -0,0 +1,5 @@
VARIABLES T P E
SUBTYPE Int T
SUBTYPE P String
SUBTYPE E Fun<T, P>
@@ -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
@@ -0,0 +1,5 @@
VARIABLES T P E
SUBTYPE T P
SUBTYPE P E
SUBTYPE E Int
@@ -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
@@ -0,0 +1,5 @@
VARIABLES T P E
SUBTYPE T P
SUBTYPE P E
SUBTYPE Int E
@@ -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
@@ -0,0 +1,6 @@
VARIABLES T P E
FIX_VARIABLES
SUBTYPE T P
SUBTYPE P E
SUBTYPE Int E