diff options
author | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2013-08-30 12:09:34 -0700 |
---|---|---|
committer | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2013-08-30 12:09:34 -0700 |
commit | 0b1bbbc49ed2cbb702af8f4ca6f9986de96a5356 (patch) | |
tree | 5713d0cdc0e0cf77991df181c64be5544b1987f4 /test/files/neg | |
parent | dd2023789202fa944ea7d4f04e25ad4092d37326 (diff) | |
parent | b65d67d71c962523cca625a80553571408b2a3e6 (diff) | |
download | scala-0b1bbbc49ed2cbb702af8f4ca6f9986de96a5356.tar.gz scala-0b1bbbc49ed2cbb702af8f4ca6f9986de96a5356.tar.bz2 scala-0b1bbbc49ed2cbb702af8f4ca6f9986de96a5356.zip |
Merge pull request #2861 from densh/topic/deprecate-early-type-defs
Deprecate early type defs
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/macro-invalidusage-presuper.check | 2 | ||||
-rw-r--r-- | test/files/neg/t2796.check | 5 | ||||
-rw-r--r-- | test/files/neg/t2796.flags | 2 | ||||
-rw-r--r-- | test/files/neg/t2796.scala | 3 |
4 files changed, 7 insertions, 5 deletions
diff --git a/test/files/neg/macro-invalidusage-presuper.check b/test/files/neg/macro-invalidusage-presuper.check index f63a0eef80..c0b1ec0248 100644 --- a/test/files/neg/macro-invalidusage-presuper.check +++ b/test/files/neg/macro-invalidusage-presuper.check @@ -1,4 +1,4 @@ -Macros_Test_2.scala:3: error: only type definitions and concrete field definitions allowed in early object initialization section +Macros_Test_2.scala:3: error: only concrete field definitions allowed in early object initialization section class D extends { def x = macro impl } with AnyRef ^ one error found diff --git a/test/files/neg/t2796.check b/test/files/neg/t2796.check index 4456a7fc19..22ee35a7e6 100644 --- a/test/files/neg/t2796.check +++ b/test/files/neg/t2796.check @@ -1,6 +1,9 @@ +t2796.scala:11: warning: early type members are deprecated. Move them to the regular body: the semantics are the same. + type X = Int // warn + ^ t2796.scala:7: warning: Implementation restriction: early definitions in traits are not initialized before the super class is initialized. val abstractVal = "T1.abstractVal" // warn ^ error: No warnings can be incurred under -Xfatal-warnings. -one warning found +two warnings found one error found diff --git a/test/files/neg/t2796.flags b/test/files/neg/t2796.flags index e8fb65d50c..d1b831ea87 100644 --- a/test/files/neg/t2796.flags +++ b/test/files/neg/t2796.flags @@ -1 +1 @@ --Xfatal-warnings
\ No newline at end of file +-deprecation -Xfatal-warnings
\ No newline at end of file diff --git a/test/files/neg/t2796.scala b/test/files/neg/t2796.scala index 3bcc9df562..fa2f2358b9 100644 --- a/test/files/neg/t2796.scala +++ b/test/files/neg/t2796.scala @@ -8,10 +8,9 @@ trait T1 extends { } with Base trait T2 extends { - type X = Int // okay + type X = Int // warn } with Base - class C1 extends { val abstractVal = "C1.abstractVal" // okay } with Base |