Change ANONYMOUS_INITIALIZER from _WITHOUT_CONSTRUCTOR to _IN_TRAIT
"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.
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
trait NoC {
|
||||
<!ANONYMOUS_INITIALIZER_WITHOUT_CONSTRUCTOR!>{
|
||||
<!ANONYMOUS_INITIALIZER_IN_TRAIT!>{
|
||||
|
||||
}<!>
|
||||
|
||||
val a : Int get() = 1
|
||||
|
||||
<!ANONYMOUS_INITIALIZER_WITHOUT_CONSTRUCTOR!>{
|
||||
<!ANONYMOUS_INITIALIZER_IN_TRAIT!>{
|
||||
|
||||
}<!>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user