Add test for soon to be deprecated 'class object' syntax
This commit is contained in:
@@ -0,0 +1,28 @@
|
|||||||
|
trait G
|
||||||
|
|
||||||
|
class A {
|
||||||
|
class object A {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
trait B {
|
||||||
|
class object : G {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun main() {
|
||||||
|
A
|
||||||
|
A.A
|
||||||
|
g(B.Default)
|
||||||
|
g(B)
|
||||||
|
|
||||||
|
A.ext()
|
||||||
|
A.A.ext()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun g(g: G) { <!UNUSED_EXPRESSION!>g<!> }
|
||||||
|
|
||||||
|
fun A.A.ext() {
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package
|
||||||
|
|
||||||
|
internal fun g(/*0*/ g: G): kotlin.Unit
|
||||||
|
internal fun main(): kotlin.Unit
|
||||||
|
internal fun A.A.ext(): kotlin.Unit
|
||||||
|
|
||||||
|
internal final class A {
|
||||||
|
public constructor A()
|
||||||
|
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
|
||||||
|
|
||||||
|
internal default object A {
|
||||||
|
private constructor A()
|
||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal trait B {
|
||||||
|
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
|
||||||
|
|
||||||
|
internal default object Default : G {
|
||||||
|
private constructor Default()
|
||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal trait G {
|
||||||
|
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
|
||||||
|
}
|
||||||
@@ -1540,6 +1540,12 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("deprecatedClassObjectSyntax.kt")
|
||||||
|
public void testDeprecatedClassObjectSyntax() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classObjects/deprecatedClassObjectSyntax.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("importClassInClassObject.kt")
|
@TestMetadata("importClassInClassObject.kt")
|
||||||
public void testImportClassInClassObject() throws Exception {
|
public void testImportClassInClassObject() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classObjects/importClassInClassObject.kt");
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classObjects/importClassInClassObject.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user