Report warning on modifier list of primary ctor unless 'constructor' keyword specified

This commit is contained in:
Denis Zharkov
2015-05-12 16:13:59 +03:00
parent 805a811d91
commit 09cae59f0a
7 changed files with 54 additions and 0 deletions
@@ -0,0 +1,9 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
annotation class Ann(val x: Int = 1)
class A <!MISSING_CONSTRUCTOR_KEYWORD!>private<!> (val x: Int) {
inner class B <!MISSING_CONSTRUCTOR_KEYWORD!>Ann(2)<!> (val y: Int)
fun foo() {
class C <!MISSING_CONSTRUCTOR_KEYWORD!>private @Ann(3)<!> (args: Int)
}
}