Tests for redeclarations with multi-decls
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
class A {
|
||||
fun component1() : Int = 1
|
||||
fun component2() : Int = 2
|
||||
}
|
||||
|
||||
fun a() {
|
||||
val (<!REDECLARATION!>a<!>, <!REDECLARATION!>a<!>) = A()
|
||||
val (x, <!REDECLARATION!>y<!>) = A();
|
||||
val <!REDECLARATION!>b<!> = 1
|
||||
use(b)
|
||||
val (<!REDECLARATION!>b<!>, <!REDECLARATION!>y<!>) = A();
|
||||
}
|
||||
|
||||
|
||||
fun use(a: Any): Any = a
|
||||
@@ -1088,6 +1088,11 @@ public class JetDiagnosticsTestGenerated extends AbstractDiagnosticsTestWithEage
|
||||
doTest("compiler/testData/diagnostics/tests/declarationChecks/MultiDeclarationErrors.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("RedeclarationsInMultiDecl.kt")
|
||||
public void testRedeclarationsInMultiDecl() throws Exception {
|
||||
doTest("compiler/testData/diagnostics/tests/declarationChecks/RedeclarationsInMultiDecl.kt");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/diagnostics/tests/extensions")
|
||||
|
||||
Reference in New Issue
Block a user