[NI] Complete call if return type has proper lower or equal constraints
There was a silly bug: equal constraint is actually a lower and an upper constraint, but we checked only presence of lower constraints. Test is important as here we have one equal constraint and should complete inner call `foo<Int>()` without propagating it to `bar` to avoid using `NoInfer` annotation multiple times
This commit is contained in:
+2
-1
@@ -210,7 +210,8 @@ class KotlinCallCompleter(
|
||||
val constraints = variableWithConstraints.constraints
|
||||
return constraints.isNotEmpty() && constraints.all {
|
||||
!it.type.typeConstructor(context).isIntegerLiteralTypeConstructor(context) &&
|
||||
it.kind.isLower() && csBuilder.isProperType(it.type)
|
||||
(it.kind.isLower() || it.kind.isEqual()) &&
|
||||
csBuilder.isProperType(it.type)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user