Add test case: 'platformStatic' on constructors
This commit is contained in:
+9
@@ -0,0 +1,9 @@
|
||||
import kotlin.platform.platformStatic
|
||||
class A {
|
||||
<!PLATFORM_STATIC_ILLEGAL_USAGE!>platformStatic constructor()<!> {}
|
||||
inner class B {
|
||||
<!PLATFORM_STATIC_ILLEGAL_USAGE!>platformStatic constructor()<!> {}
|
||||
}
|
||||
}
|
||||
|
||||
class C [platformStatic] () // TODO KT-7057
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package
|
||||
|
||||
internal final class A {
|
||||
kotlin.platform.platformStatic() 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 final inner class B {
|
||||
kotlin.platform.platformStatic() public constructor 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 final class C {
|
||||
kotlin.platform.platformStatic() public constructor C()
|
||||
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
|
||||
}
|
||||
+6
@@ -158,6 +158,12 @@ public class JetDiagnosticsTestWithStdLibGenerated extends AbstractJetDiagnostic
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/platformStatic"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("constructors.kt")
|
||||
public void testConstructors() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/platformStatic/constructors.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("finalAndAbstract.kt")
|
||||
public void testFinalAndAbstract() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/platformStatic/finalAndAbstract.kt");
|
||||
|
||||
Reference in New Issue
Block a user