added 'hasErrorInConstrainingTypes'
not to report type inference error in such cases
This commit is contained in:
+4
-2
@@ -45,10 +45,10 @@ public interface ConstraintsSystem {
|
|||||||
* @param constrainingType
|
* @param constrainingType
|
||||||
* @param constraintPosition
|
* @param constraintPosition
|
||||||
*/
|
*/
|
||||||
void addSubtypingConstraint(@NotNull JetType subjectType, @NotNull JetType constrainingType, @NotNull ConstraintPosition constraintPosition);
|
void addSubtypingConstraint(@NotNull JetType subjectType, @Nullable JetType constrainingType, @NotNull ConstraintPosition constraintPosition);
|
||||||
|
|
||||||
// only subject type might contain type variables
|
// only subject type might contain type variables
|
||||||
void addSupertypeConstraint(@NotNull JetType subjectType, @NotNull JetType constrainingType, @NotNull ConstraintPosition constraintPosition);
|
void addSupertypeConstraint(@NotNull JetType subjectType, @Nullable JetType constrainingType, @NotNull ConstraintPosition constraintPosition);
|
||||||
|
|
||||||
boolean isSuccessful();
|
boolean isSuccessful();
|
||||||
|
|
||||||
@@ -62,6 +62,8 @@ public interface ConstraintsSystem {
|
|||||||
|
|
||||||
boolean hasTypeConstructorMismatchAt(@NotNull ConstraintPosition constraintPosition);
|
boolean hasTypeConstructorMismatchAt(@NotNull ConstraintPosition constraintPosition);
|
||||||
|
|
||||||
|
boolean hasErrorInConstrainingTypes();
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
TypeConstraints getTypeConstraints(@NotNull TypeParameterDescriptor typeParameterDescriptor);
|
TypeConstraints getTypeConstraints(@NotNull TypeParameterDescriptor typeParameterDescriptor);
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package n
|
||||||
|
|
||||||
|
fun foo<T>(<!UNUSED_PARAMETER!>t<!>: T, <!UNUSED_PARAMETER!>t1<!>: T) {}
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
//no type inference error
|
||||||
|
foo(<!UNRESOLVED_REFERENCE!>aaab<!>, <!UNRESOLVED_REFERENCE!>bbb<!>)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user