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:
Peter Tseng
2013-03-08 02:11:58 -05:00
parent 6f31fd7bd4
commit cd56678467
4 changed files with 5 additions and 5 deletions
@@ -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!>{
}<!>
}