add test for private-to-this visibility in traits

This commit is contained in:
Dmitry Jemerov
2015-04-20 20:59:52 +02:00
parent 8d922dda4d
commit 14b92404cd
3 changed files with 22 additions and 0 deletions
@@ -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");