diff options
author | Martin Odersky <odersky@gmail.com> | 2007-07-25 15:27:04 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2007-07-25 15:27:04 +0000 |
commit | 538e22b80c657dcc3326959a8601cd0a0da78e37 (patch) | |
tree | 12eae89e320905e7f2286751c93024007a733bdf /test/files/neg | |
parent | 95eaa29b50cd8de56c798a6461d933d763a946fc (diff) | |
download | scala-538e22b80c657dcc3326959a8601cd0a0da78e37.tar.gz scala-538e22b80c657dcc3326959a8601cd0a0da78e37.tar.bz2 scala-538e22b80c657dcc3326959a8601cd0a0da78e37.zip |
fixed bugs 1237, 1241
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/bug1224.check | 2 | ||||
-rw-r--r-- | test/files/neg/bug1241.check | 4 | ||||
-rw-r--r-- | test/files/neg/bug1241.scala | 8 |
3 files changed, 13 insertions, 1 deletions
diff --git a/test/files/neg/bug1224.check b/test/files/neg/bug1224.check index 98babb0489..515f823e50 100644 --- a/test/files/neg/bug1224.check +++ b/test/files/neg/bug1224.check @@ -1,4 +1,4 @@ bug1224.scala:4: error: illegal cyclic reference involving type T - type T >: C[T] <: C[C[T]]
+ type T >: C[T] <: C[C[T]] ^ one error found diff --git a/test/files/neg/bug1241.check b/test/files/neg/bug1241.check new file mode 100644 index 0000000000..79271f56be --- /dev/null +++ b/test/files/neg/bug1241.check @@ -0,0 +1,4 @@ +bug1241.scala:5: error: AnyRef{def hello(): Unit} does not have a constructor + val x4 = new T { def hello() { println("4") } } // error! + ^ +one error found diff --git a/test/files/neg/bug1241.scala b/test/files/neg/bug1241.scala new file mode 100644 index 0000000000..68a2c963c4 --- /dev/null +++ b/test/files/neg/bug1241.scala @@ -0,0 +1,8 @@ +object test extends Application { + // more.. + type T = { def hello() } + //val x4 = new AnyRef { def hello() { println("4") } } // ok! + val x4 = new T { def hello() { println("4") } } // error! + x4.hello() + // more.. +} |