[FIR] Add constraint to flexible type for declared argument for java parameter
This commit is contained in:
+1
-6
@@ -7,10 +7,5 @@ public class JavaClass<T> {
|
||||
|
||||
// FILE: main.kt
|
||||
fun main() {
|
||||
// See https://github.com/JetBrains/kotlin/commit/437a26684d3529ee2cfdbe54e59d50f4a6f0a611#diff-ba68311bbe28b71196c36a6246000382L176
|
||||
// In simplifyLowerConstraint, we add constraint Nothing? <: T!, approximating it with Nothing? <: T
|
||||
// But before it we already had T <: String from the explicit types
|
||||
// That lead us to constraint contradiction: Nothing? !<: String
|
||||
// We need to discuss the commit above at some point
|
||||
<!INAPPLICABLE_CANDIDATE!>JavaClass<!><String>(null).<!UNRESOLVED_REFERENCE!>foo<!>().<!UNRESOLVED_REFERENCE!>length<!>
|
||||
JavaClass<String>(null).foo().length
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
FILE: main.kt
|
||||
public final fun main(): R|kotlin/Unit| {
|
||||
<Inapplicable(INAPPLICABLE): [/JavaClass.JavaClass]>#<R|kotlin/String|>(Null(null)).<Unresolved name: foo>#().<Unresolved name: length>#
|
||||
R|/JavaClass.JavaClass|<R|ft<kotlin/String, kotlin/String?>!|>(Null(null)).R|FakeOverride</JavaClass.foo: R|ft<kotlin/String, kotlin/String?>!|>|().R|kotlin/String.length|
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user