[NI] Move ability to convert standalone SAM-argument under the feature
If new inference is enabled only for IDE analysis, then this feature will be disabled to reduce difference between new and old inference, but if new inference is enabled in the compiler, then this feature will be enabled too to preserve behavior of new inference for compilation #KT-32175 Fixed #KT-32143 Fixed #KT-32123 Fixed #KT-32230 Fixed
This commit is contained in:
+3
-3
@@ -1,4 +1,4 @@
|
||||
// !WITH_NEW_INFERENCE
|
||||
// !LANGUAGE: +SamConversionPerArgument +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
// FILE: A.java
|
||||
@@ -16,14 +16,14 @@ fun <T> bar(s: T) {}
|
||||
fun <T> complex(t: T, f: (T) -> Unit) {}
|
||||
|
||||
fun test1() {
|
||||
foo(1, <!NI;TYPE_MISMATCH!>A::invokeLater<!>) // KT-24507 SAM conversion accidentally applied to callable reference and incorrectly handled via BE
|
||||
foo(1, <!TYPE_MISMATCH!>A::invokeLater<!>) // KT-24507 SAM conversion accidentally applied to callable reference and incorrectly handled via BE
|
||||
foo(1, ::bar)
|
||||
|
||||
complex(1, ::bar)
|
||||
}
|
||||
|
||||
fun <R> test2(x: R) {
|
||||
foo(x, <!NI;TYPE_MISMATCH!>A::invokeLater<!>) // KT-24507 SAM conversion accidentally applied to callable reference and incorrectly handled via BE
|
||||
foo(x, <!TYPE_MISMATCH!>A::invokeLater<!>) // KT-24507 SAM conversion accidentally applied to callable reference and incorrectly handled via BE
|
||||
foo(x, ::bar)
|
||||
|
||||
complex(x, ::bar)
|
||||
|
||||
Reference in New Issue
Block a user