Redeclaration errors for type aliases: type alias vs property.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
// FILE: file1.kt
|
||||
typealias <!REDECLARATION!>Test<!> = String
|
||||
|
||||
val <!REDECLARATION!>Test<!> = 42
|
||||
|
||||
class Outer {
|
||||
typealias <!REDECLARATION!>Test<!> = String
|
||||
|
||||
val <!REDECLARATION!>Test<!> = 42
|
||||
}
|
||||
|
||||
typealias <!REDECLARATION!>Test2<!> = String
|
||||
|
||||
// FILE: file2.kt
|
||||
val <!REDECLARATION!>Test2<!> = 42
|
||||
@@ -0,0 +1,15 @@
|
||||
package
|
||||
|
||||
public typealias Test = kotlin.String
|
||||
public typealias Test2 = kotlin.String
|
||||
public val Test: kotlin.Int = 42
|
||||
public val Test2: kotlin.Int = 42
|
||||
|
||||
public final class Outer {
|
||||
public typealias Test = kotlin.String
|
||||
public constructor Outer()
|
||||
public final val Test: kotlin.Int = 42
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
@@ -13908,6 +13908,12 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("TypeAliasVsProperty.kt")
|
||||
public void testTypeAliasVsProperty() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/TypeAliasVsProperty.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("typeParameterWithTwoBounds.kt")
|
||||
public void testTypeParameterWithTwoBounds() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/typeParameterWithTwoBounds.kt");
|
||||
|
||||
Reference in New Issue
Block a user