Report error on more than one class bound for type parameters

Such code may behave unexpectedly when compiled to JVM
This commit is contained in:
Alexander Udalov
2015-11-20 19:42:35 +03:00
parent 5541224288
commit 21e64e02bd
13 changed files with 184 additions and 51 deletions
@@ -16986,6 +16986,12 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/typeParameters"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("cannotHaveManyClassUpperBounds.kt")
public void testCannotHaveManyClassUpperBounds() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typeParameters/cannotHaveManyClassUpperBounds.kt");
doTest(fileName);
}
@TestMetadata("deprecatedSyntax.kt")
public void testDeprecatedSyntax() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typeParameters/deprecatedSyntax.kt");