Prohibit platformName on secondary constructor

#KT-6999 Fixed
This commit is contained in:
Denis Zharkov
2015-03-17 13:37:14 +03:00
parent 8aa4e9bd94
commit 66023e6f31
3 changed files with 7 additions and 4 deletions
@@ -1,4 +1,4 @@
// !DIAGNOSTICS: -UNUSED_VARIABLE
// !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER
import kotlin.platform.*
@@ -32,7 +32,8 @@ var vardef: Int = 1
set
[<!INAPPLICABLE_ANNOTATION!>platformName("C")<!>]
class C {
class C [platformName("primary")]() { // TODO: modifiers check on primary constructor KT-7057
<!INAPPLICABLE_ANNOTATION!>platformName("ctr")<!> constructor(x: Int): this() {}
[<!INAPPLICABLE_ANNOTATION!>platformName("a")<!>]
fun foo() {}