tests for obsolete tasks
#KT-2445 fixed #KT-2459 fixed
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
//KT-2445 Calling method with function with generic parameter causes compile-time exception
|
||||
package a
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
<!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>test<!> {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun test<R>(callback: (R) -> Unit):Unit = callback(null!!)
|
||||
@@ -0,0 +1,10 @@
|
||||
//KT-2459 Type inference error
|
||||
package b
|
||||
|
||||
import java.util.*
|
||||
|
||||
class B<T>(val x: List<T>)
|
||||
fun <T> f(x: T): B<T> = B(arrayList(x))
|
||||
|
||||
// from standard library
|
||||
fun arrayList<T>(vararg <!UNUSED_PARAMETER!>values<!>: T) : ArrayList<T> {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
||||
@@ -1380,6 +1380,16 @@ public class JetDiagnosticsTestGenerated extends AbstractDiagnosticsTestWithEage
|
||||
doTest("compiler/testData/diagnostics/tests/inference/regressions/kt2324.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt2445.kt")
|
||||
public void testKt2445() throws Exception {
|
||||
doTest("compiler/testData/diagnostics/tests/inference/regressions/kt2445.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt2459.kt")
|
||||
public void testKt2459() throws Exception {
|
||||
doTest("compiler/testData/diagnostics/tests/inference/regressions/kt2459.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt2484.kt")
|
||||
public void testKt2484() throws Exception {
|
||||
doTest("compiler/testData/diagnostics/tests/inference/regressions/kt2484.kt");
|
||||
|
||||
Reference in New Issue
Block a user