test for obsolete KT-2741
#KT-2741 obsolete
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
//KT-2741 Compiler can't infer a type of a function literal parameter when its body contains errors
|
||||
package a
|
||||
|
||||
fun <T, R: Comparable<R>> Iterable<T>._sortBy(<!UNUSED_PARAMETER!>f<!>: (T) -> R): List<T> = throw Exception()
|
||||
fun _arrayList<T>(vararg <!UNUSED_PARAMETER!>values<!>: T) : List<T> = throw Exception()
|
||||
|
||||
class _Pair<A>(val a: A)
|
||||
|
||||
fun test() {
|
||||
_arrayList(_Pair(1))._sortBy { it -> <!UNRESOLVED_REFERENCE!>xxx<!> }
|
||||
}
|
||||
@@ -2197,6 +2197,11 @@ public class JetDiagnosticsTestGenerated extends AbstractDiagnosticsTestWithEage
|
||||
doTest("compiler/testData/diagnostics/tests/inference/regressions/kt2514.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt2741.kt")
|
||||
public void testKt2741() throws Exception {
|
||||
doTest("compiler/testData/diagnostics/tests/inference/regressions/kt2741.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt2838.kt")
|
||||
public void testKt2838() throws Exception {
|
||||
doTest("compiler/testData/diagnostics/tests/inference/regressions/kt2838.kt");
|
||||
|
||||
Reference in New Issue
Block a user