Labels on function literal arguments are processed properly
This commit is contained in:
@@ -2436,6 +2436,17 @@ public class JetDiagnosticsTestGenerated extends AbstractDiagnosticsTestWithEage
|
||||
public void testForbiddenNonLocalReturnNoType() throws Exception {
|
||||
doTest("compiler/testData/diagnostics/tests/functionLiterals/return/ForbiddenNonLocalReturnNoType.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("LocalReturnExplicitLabelNoParens.kt")
|
||||
public void testLocalReturnExplicitLabelNoParens() throws Exception {
|
||||
doTest("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnExplicitLabelNoParens.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("LocalReturnExplicitLabelParens.kt")
|
||||
public void testLocalReturnExplicitLabelParens() throws Exception {
|
||||
doTest("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnExplicitLabelParens.kt");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static Test innerSuite() {
|
||||
|
||||
@@ -148,8 +148,8 @@ public class JetTypeCheckerTest extends JetLiteFixture {
|
||||
public void testIf() throws Exception {
|
||||
assertType("if (true) 1", "Unit");
|
||||
assertType("if (true) 1 else 1", "Int");
|
||||
assertType("if (true) 1 else return", "Int");
|
||||
assertType("if (true) return else 1", "Int");
|
||||
assertType("if (true) 1 else throw Exception()", "Int");
|
||||
assertType("if (true) throw Exception() else 1", "Int");
|
||||
assertType("if (true) throw Exception() else throw Exception()", "Nothing");
|
||||
|
||||
assertType("if (true) 1 else null", "Int?");
|
||||
|
||||
Reference in New Issue
Block a user