cd56678467
"since we made all classes have constructors some time ago", this error
doesn't even trigger on a class such as:
class testClass { {} }
It does trigger on a trait:
trait testTrait { {} }
Therefore, the error message should be changed to reflect the new
behavior.
However, an actual quickfix for this will be more involved. It is not a
good idea to simply delete the initializer, since it could contain
valuable code that the user wants to keep.
29 lines
383 B
Kotlin
29 lines
383 B
Kotlin
trait NoC {
|
|
<!ANONYMOUS_INITIALIZER_IN_TRAIT!>{
|
|
|
|
}<!>
|
|
|
|
val a : Int get() = 1
|
|
|
|
<!ANONYMOUS_INITIALIZER_IN_TRAIT!>{
|
|
|
|
}<!>
|
|
}
|
|
|
|
class WithC() {
|
|
val x : Int
|
|
{
|
|
$x = 1
|
|
<!UNRESOLVED_REFERENCE!>$y<!> = 2
|
|
val b = x
|
|
|
|
}
|
|
|
|
val a : Int get() = 1
|
|
|
|
{
|
|
val z = <!UNRESOLVED_REFERENCE!>b<!>
|
|
val zz = x
|
|
val zzz = <!NO_BACKING_FIELD_CUSTOM_ACCESSORS!>$a<!>
|
|
}
|
|
} |