FIR: Report INFERENCE_NO_INFORMATION_FOR_PARAMETER diagnostic
This commit is contained in:
committed by
TeamCityServer
parent
6e901e3785
commit
c420957eac
@@ -1,11 +0,0 @@
|
||||
// !DIAGNOSTICS: -UNREACHABLE_CODE
|
||||
//KT-2445 Calling method with function with generic parameter causes compile-time exception
|
||||
package a
|
||||
|
||||
fun main() {
|
||||
test {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun <R> test(callback: (R) -> Unit):Unit = callback(null!!)
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNREACHABLE_CODE
|
||||
//KT-2445 Calling method with function with generic parameter causes compile-time exception
|
||||
package a
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
//KT-832 Provide better diagnostics when type inference fails for an expression that returns a function
|
||||
package a
|
||||
|
||||
fun <T> fooT2() : (t : T) -> T {
|
||||
return {it}
|
||||
}
|
||||
|
||||
fun test() {
|
||||
fooT2()(1) // here 1 should not be marked with an error
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
//KT-832 Provide better diagnostics when type inference fails for an expression that returns a function
|
||||
package a
|
||||
|
||||
|
||||
Reference in New Issue
Block a user