Support platform/impl modifiers for classes
Do not report "unused parameter" for parameters of platform declarations. Do not allow platform class constructors to have val/var parameters or have an explicit delegation call to another constructor. Do not allow platform classes to have 'init' blocks. Also suppress the "supertype not initialized" error for platform classes: the supertype should be initialized in the impl class
This commit is contained in:
+7
@@ -0,0 +1,7 @@
|
||||
<!UNSUPPORTED_FEATURE!>platform<!> fun foo1()
|
||||
<!UNSUPPORTED_FEATURE!>platform<!> val bar1 = <!PLATFORM_PROPERTY_INITIALIZER!>42<!>
|
||||
<!UNSUPPORTED_FEATURE!>platform<!> class Baz1
|
||||
|
||||
<!UNSUPPORTED_FEATURE!>impl<!> fun foo2() = 42
|
||||
<!MUST_BE_INITIALIZED!><!UNSUPPORTED_FEATURE!>impl<!> val bar2: Int<!>
|
||||
<!UNSUPPORTED_FEATURE!>impl<!> interface Baz2
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
package
|
||||
|
||||
public val bar2: kotlin.Int
|
||||
public impl fun foo2(): kotlin.Int
|
||||
|
||||
public impl interface Baz2 {
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user