Add warning for initializers with obsolete syntax

Expected 'init' keyword before class initializer
This commit is contained in:
Denis Zharkov
2015-02-18 12:05:26 +03:00
parent 0dc155d8c9
commit f07566d30d
61 changed files with 175 additions and 131 deletions
@@ -1,18 +1,18 @@
trait NoC {
<!ANONYMOUS_INITIALIZER_IN_TRAIT!>{
<!ANONYMOUS_INITIALIZER_IN_TRAIT!>init {
}<!>
val a : Int get() = 1
<!ANONYMOUS_INITIALIZER_IN_TRAIT!>{
<!ANONYMOUS_INITIALIZER_IN_TRAIT!>init {
}<!>
}
class WithC() {
val x : Int
{
init {
$x = 1
<!UNRESOLVED_REFERENCE!>$y<!> = 2
val <!UNUSED_VARIABLE!>b<!> = x
@@ -21,7 +21,7 @@ class WithC() {
val a : Int get() = 1
{
init {
val <!UNUSED_VARIABLE!>z<!> = <!UNRESOLVED_REFERENCE!>b<!>
val <!UNUSED_VARIABLE!>zz<!> = x
val <!UNUSED_VARIABLE!>zzz<!> = <!NO_BACKING_FIELD_CUSTOM_ACCESSORS!>$a<!>