K2: support ForbidInferringTypeVariablesIntoEmptyIntersection on/off
This commit is contained in:
committed by
Space Team
parent
f7544aff62
commit
b64cb67370
+1
-1
@@ -27,7 +27,7 @@ fun test3() = run {
|
||||
incompatibleI() // ? either uninferred T or error (Unit </: I)
|
||||
}
|
||||
|
||||
fun test4() = <!INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION!>run<!> {
|
||||
fun test4() = <!INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION_WARNING!>run<!> {
|
||||
if (p) return@run
|
||||
incompatibleC() // ? either uninferred T or error (Unit </: C)
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -47,7 +47,7 @@ fun test(i: Inv<Nothing>, iUnit: Inv<Unit>) {
|
||||
|
||||
if (iUnit is String) {
|
||||
launch {
|
||||
run(A.<!INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION!>flexible<!>(iUnit)) { 42 }
|
||||
run(A.<!INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION_WARNING!>flexible<!>(iUnit)) { 42 }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user