Test for KT-3162 More precise try-finally error marking
#KT-3162 Obsolete
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
|||||||
|
//KT-3162 More precise try-finally error marking
|
||||||
|
|
||||||
|
fun foo(x: String) : String {
|
||||||
|
<!UNREACHABLE_CODE!>val <!UNUSED_VARIABLE!>a<!> =<!> try {
|
||||||
|
x
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
} catch (e: Exception) {
|
||||||
|
}
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1551,6 +1551,11 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
|
|||||||
doTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/kt2585_3.kt");
|
doTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/kt2585_3.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("kt3162tryAsInitializer.kt")
|
||||||
|
public void testKt3162tryAsInitializer() throws Exception {
|
||||||
|
doTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/kt3162tryAsInitializer.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("kt5200DeadCodeInLambdas.kt")
|
@TestMetadata("kt5200DeadCodeInLambdas.kt")
|
||||||
public void testKt5200DeadCodeInLambdas() throws Exception {
|
public void testKt5200DeadCodeInLambdas() throws Exception {
|
||||||
doTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/kt5200DeadCodeInLambdas.kt");
|
doTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/kt5200DeadCodeInLambdas.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user