add test for private-to-this visibility in traits
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
internal trait Test</*0*/ in I> {
|
||||
private/*private to this*/ final fun foo(): I {
|
||||
throw Exception()
|
||||
}
|
||||
|
||||
private/*private to this*/ final val i: I get() = foo()
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package
|
||||
|
||||
internal trait Test</*0*/ in I> {
|
||||
private/*private to this*/ final val i: I
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
private/*private to this*/ final fun foo(): I
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
@@ -12515,6 +12515,12 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("Trait.kt")
|
||||
public void testTrait() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/variance/privateToThis/Trait.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ValReassigned.kt")
|
||||
public void testValReassigned() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/variance/privateToThis/ValReassigned.kt");
|
||||
|
||||
Reference in New Issue
Block a user