Exclude functional types for the warning reporting about implicitly inferred a type parameter to Nothing
This commit is contained in:
+1
-1
@@ -52,7 +52,7 @@ fun testLoopLabelInReturn(xs: List<Int>) {
|
||||
|
||||
fun testValLabelInReturn() {
|
||||
<!REDUNDANT_LABEL_WARNING!>L@<!> val fn = { <!NOT_A_FUNCTION_LABEL!>return@L<!> }
|
||||
<!IMPLICIT_NOTHING_AS_TYPE_PARAMETER!>fn<!>()
|
||||
fn()
|
||||
}
|
||||
|
||||
fun testHighOrderFunctionCallLabelInReturn() {
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ fun testLoopLabelInReturn(xs: List<Int>) {
|
||||
|
||||
fun testValLabelInReturn() {
|
||||
<!REDUNDANT_LABEL_WARNING!>L@<!> val fn = { <!NOT_A_FUNCTION_LABEL_WARNING!>return@L<!> }
|
||||
<!IMPLICIT_NOTHING_AS_TYPE_PARAMETER!>fn<!>()
|
||||
fn()
|
||||
}
|
||||
|
||||
fun testHighOrderFunctionCallLabelInReturn() {
|
||||
|
||||
+12
@@ -89,3 +89,15 @@ fun <InputT, OutputT : Any, RenderingT> stateless(
|
||||
interface Worker<out T>
|
||||
|
||||
interface RenderContext<StateT, in OutputT : Any>
|
||||
|
||||
val emptyOrNull: List<Nothing>? = null
|
||||
val x = emptyOrNull?.<!OI;IMPLICIT_NOTHING_AS_TYPE_PARAMETER!>get<!>(0)
|
||||
|
||||
val errorCompletion = { <!OI;UNUSED_ANONYMOUS_PARAMETER!>e<!>: Throwable -> throw Exception() }
|
||||
|
||||
fun test1() {
|
||||
errorCompletion(Exception("fail"))
|
||||
}
|
||||
fun test2() {
|
||||
errorCompletion.invoke(Exception("fail"))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user