From 07e0e2f92f9208c0b582d7cfd355d7574217cc23 Mon Sep 17 00:00:00 2001 From: Adriaan Moors Date: Wed, 19 Feb 2014 20:45:45 -0800 Subject: SI-5479 deprecate DelayedInit outside of App DelayedInit's semantics are way too surprising. For example, it delays initialization of fields, so that fields on objects that extend `App` (which `extends DelayedInit`) are not initialized until the `main` method is called. For more details and a proposed alternative, see https://issues.scala-lang.org/browse/SI-4330?jql=labels%20%3D%20delayedinit%20AND%20resolution%20%3D%20unresolved. Support for `App` will continue -- we'll special case it. --- test/files/run/delay-bad.check | 1 + 1 file changed, 1 insertion(+) (limited to 'test/files/run/delay-bad.check') diff --git a/test/files/run/delay-bad.check b/test/files/run/delay-bad.check index 2ae88267c5..5d8c5fa1d4 100644 --- a/test/files/run/delay-bad.check +++ b/test/files/run/delay-bad.check @@ -4,6 +4,7 @@ delay-bad.scala:53: warning: a pure expression does nothing in statement positio delay-bad.scala:73: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses f(new { val x = 5 } with E() { 5 }) ^ +warning: there were 1 deprecation warning(s); re-run with -deprecation for details // new C { } -- cgit v1.2.3