JS frontend: added diagnostic about secondary constructors not supported yet.

This commit is contained in:
Zalim Bashorov
2015-03-20 12:28:01 +03:00
parent 9c88f9e744
commit d569ea5974
6 changed files with 54 additions and 0 deletions
@@ -0,0 +1,15 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
class A {
<!SECONDARY_CONSTRUCTOR!>constructor()<!> {}
}
class B {
<!SECONDARY_CONSTRUCTOR!>constructor()<!> {}
<!SECONDARY_CONSTRUCTOR!>constructor(a: Int)<!> {}
}
class C(a: Int) {
<!SECONDARY_CONSTRUCTOR!>constructor()<!> : this(1) {}
<!SECONDARY_CONSTRUCTOR!>constructor(a: String)<!> : this(2) {}
}
@@ -0,0 +1,25 @@
package
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 final class B {
public constructor B()
public constructor B(/*0*/ a: kotlin.Int)
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 {
public constructor C()
public constructor C(/*0*/ a: kotlin.Int)
public constructor C(/*0*/ a: kotlin.String)
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
}