Prohibit val/vars/modifiers on secondary constructor parameter

#KT-6962 Fixed
This commit is contained in:
Denis Zharkov
2015-03-12 16:34:22 +03:00
parent 99fb75c943
commit 9e5192e0e3
10 changed files with 44 additions and 2 deletions
@@ -0,0 +1,7 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
class A {
constructor(
<!VAL_OR_VAR_ON_SECONDARY_CONSTRUCTOR_PARAMETER!>val<!> x: Int, y: Int,
<!VAL_OR_VAR_ON_SECONDARY_CONSTRUCTOR_PARAMETER!>var<!> z: Int,
<!ILLEGAL_MODIFIER!>public<!> a: Int) {}
}
@@ -0,0 +1,8 @@
package
internal final class A {
public constructor A(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.Int, /*2*/ z: kotlin.Int, /*3*/ 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
}