Add warning for initializers with obsolete syntax
Expected 'init' keyword before class initializer
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
trait NoC {
|
||||
<error>{
|
||||
<error>init {
|
||||
|
||||
}</error>
|
||||
|
||||
val a : Int get() = 1
|
||||
|
||||
<error>{
|
||||
<error>init {
|
||||
|
||||
}</error>
|
||||
}
|
||||
|
||||
class WithC() {
|
||||
val x : Int
|
||||
{
|
||||
init {
|
||||
$x = 1
|
||||
<error>$y</error> = 2
|
||||
val <warning>b</warning> = x
|
||||
@@ -21,7 +21,7 @@ class WithC() {
|
||||
|
||||
val a : Int get() = 1
|
||||
|
||||
{
|
||||
init {
|
||||
val <warning>z</warning> = <error>b</error>
|
||||
val <warning>zz</warning> = x
|
||||
val <warning>zzz</warning> = <error>$a</error>
|
||||
|
||||
Reference in New Issue
Block a user