diff options
Diffstat (limited to 'test')
-rwxr-xr-x[-rw-r--r--] | test/files/neg/bug421.scala (renamed from test/pending/pos/bug421.scala) | 0 | ||||
-rwxr-xr-x | test/files/pos/bug319.scala | 21 | ||||
-rw-r--r-- | test/files/pos/bug607.scala | 11 | ||||
-rw-r--r-- | test/files/pos/bug615.scala | 11 | ||||
-rwxr-xr-x[-rw-r--r--] | test/files/run/bug429.scala (renamed from test/pending/run/bug429.scala) | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | test/files/run/bug441.scala (renamed from test/pending/run/bug441.scala) | 0 |
6 files changed, 43 insertions, 0 deletions
diff --git a/test/pending/pos/bug421.scala b/test/files/neg/bug421.scala index 3e014b7500..3e014b7500 100644..100755 --- a/test/pending/pos/bug421.scala +++ b/test/files/neg/bug421.scala diff --git a/test/files/pos/bug319.scala b/test/files/pos/bug319.scala new file mode 100755 index 0000000000..eed25eb84c --- /dev/null +++ b/test/files/pos/bug319.scala @@ -0,0 +1,21 @@ +object test { + + trait A { type T; } + + trait B { type T; } + + /** def functor(x: A): B { type T = x.T } */ + abstract class functor() { + val arg: A; + val res: B { type T = arg.T } = + new B { type T = arg.T; }; + } + + val a = new A { type T = String }; + /** val b: B { type T = String } = functor(a) */ + val b: B { type T = String } = { + val tmp = new functor() { val arg = a }; + tmp.res + } + +} diff --git a/test/files/pos/bug607.scala b/test/files/pos/bug607.scala new file mode 100644 index 0000000000..42c3a15a85 --- /dev/null +++ b/test/files/pos/bug607.scala @@ -0,0 +1,11 @@ +object Test +{ + trait Foo { type T } + object FooX extends Foo { type T = X; trait X } + + def test(x : Foo { type T = FooX.X }) = {} + + def main(argv : Array[String]) : Unit = { + test(FooX) + } +} diff --git a/test/files/pos/bug615.scala b/test/files/pos/bug615.scala new file mode 100644 index 0000000000..8fefc952e0 --- /dev/null +++ b/test/files/pos/bug615.scala @@ -0,0 +1,11 @@ +object test { + abstract class Bar { + type T + def bar: Unit + } + new Bar { + type T = Int + def bar = () + }.bar +} + diff --git a/test/pending/run/bug429.scala b/test/files/run/bug429.scala index b2cc8128c0..b2cc8128c0 100644..100755 --- a/test/pending/run/bug429.scala +++ b/test/files/run/bug429.scala diff --git a/test/pending/run/bug441.scala b/test/files/run/bug441.scala index d90e872baa..d90e872baa 100644..100755 --- a/test/pending/run/bug441.scala +++ b/test/files/run/bug441.scala |