diff options
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/neg/scopes.check | 5 | ||||
-rw-r--r-- | test/files/run/bug920.check | 1 | ||||
-rw-r--r-- | test/files/run/bug920.scala | 20 |
3 files changed, 22 insertions, 4 deletions
diff --git a/test/files/neg/scopes.check b/test/files/neg/scopes.check index 09b1bcbdb6..ca32035316 100644 --- a/test/files/neg/scopes.check +++ b/test/files/neg/scopes.check @@ -1,9 +1,6 @@ scopes.scala:1: error: x is already defined as value x case class test0(x: int, x: float) ^ -scopes.scala:2: error: x is already defined as value x - -^ scopes.scala:5: error: t is already defined as type t type t = float ^ @@ -25,4 +22,4 @@ scopes.scala:15: error: x is already defined as value x scopes.scala:17: error: x is already defined as value x case x::x => x ^ -9 errors found +8 errors found diff --git a/test/files/run/bug920.check b/test/files/run/bug920.check new file mode 100644 index 0000000000..76018072e0 --- /dev/null +++ b/test/files/run/bug920.check @@ -0,0 +1 @@ +baz diff --git a/test/files/run/bug920.scala b/test/files/run/bug920.scala new file mode 100644 index 0000000000..6a7f122d55 --- /dev/null +++ b/test/files/run/bug920.scala @@ -0,0 +1,20 @@ +object Test { + trait A; + trait Foo0 { def foo : A; } + trait Baz extends Foo0; + trait B extends A { + def initialize = { + trait Foo extends Test.Foo0 { + def foo : B.this.type = B.this; + } + class baz extends Baz with Foo { + override def toString = "baz" + } + Console.println(new baz); + } + } + object b extends B; + def main(args : Array[String]) : Unit = { + b.initialize; + } +} |