diff options
author | Lukas Rytz <lukas.rytz@epfl.ch> | 2011-01-18 15:57:47 +0000 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@epfl.ch> | 2011-01-18 15:57:47 +0000 |
commit | bdd7487b066109bc3dc740b3e14ce2adb0113620 (patch) | |
tree | 526a1220701b3029e2430ef1a78008eda3bdc00e /test/files/neg | |
parent | b500a5c78d87052b8eff12f6e3eac472b257d635 (diff) | |
download | scala-bdd7487b066109bc3dc740b3e14ce2adb0113620.tar.gz scala-bdd7487b066109bc3dc740b3e14ce2adb0113620.tar.bz2 scala-bdd7487b066109bc3dc740b3e14ce2adb0113620.zip |
second version of close #3649. no review
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/t3649.check | 8 | ||||
-rw-r--r-- | test/files/neg/t3649.scala | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/test/files/neg/t3649.check b/test/files/neg/t3649.check index 07ff1bf3ac..76d68fa3b7 100644 --- a/test/files/neg/t3649.check +++ b/test/files/neg/t3649.check @@ -1,4 +1,10 @@ t3649.scala:1: error: C is already defined as (compiler-generated) case class companion object C object T { class C(s: String = ""); val C = 0 } ^ -one error found +t3649.scala:2: error: C is already defined as (compiler-generated) case class companion object C +object U { class C(val s: String = ""); val C = new C() {} } + ^ +t3649.scala:2: error: not enough arguments for constructor C: (s: String)U.C +object U { class C(val s: String = ""); val C = new C() {} } + ^ +three errors found diff --git a/test/files/neg/t3649.scala b/test/files/neg/t3649.scala index 02e020001a..2aaff96100 100644 --- a/test/files/neg/t3649.scala +++ b/test/files/neg/t3649.scala @@ -1 +1,2 @@ object T { class C(s: String = ""); val C = 0 } +object U { class C(val s: String = ""); val C = new C() {} } |