Type parameter is not an expression: no need to report 'unused expression' on it
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
== foo ==
|
||||
fun <T> foo() {
|
||||
T
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
<START> NEXT:[error(T, No resolved call)] PREV:[]
|
||||
error(T, No resolved call) NEXT:[<END>] PREV:[<START>]
|
||||
L1:
|
||||
<END> NEXT:[<SINK>] PREV:[error(T, No resolved call)]
|
||||
error:
|
||||
<ERROR> NEXT:[<SINK>] PREV:[]
|
||||
sink:
|
||||
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
@@ -0,0 +1,3 @@
|
||||
fun <T> foo() {
|
||||
T
|
||||
}
|
||||
@@ -2,7 +2,7 @@ package bar
|
||||
|
||||
class S<T> {
|
||||
fun foo() {
|
||||
<!TYPE_PARAMETER_IS_NOT_AN_EXPRESSION, UNUSED_EXPRESSION!>T<!>
|
||||
<!TYPE_PARAMETER_IS_NOT_AN_EXPRESSION!>T<!>
|
||||
<!TYPE_PARAMETER_ON_LHS_OF_DOT!>T<!>.<!UNRESOLVED_REFERENCE!>create<!>()
|
||||
}
|
||||
}
|
||||
@@ -171,6 +171,11 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest {
|
||||
doTest("compiler/testData/cfg/ShortFunction.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("typeParameter.kt")
|
||||
public void testTypeParameter() throws Exception {
|
||||
doTest("compiler/testData/cfg/typeParameter.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("unresolved.kt")
|
||||
public void testUnresolved() throws Exception {
|
||||
doTest("compiler/testData/cfg/unresolved.kt");
|
||||
|
||||
Reference in New Issue
Block a user