diff options
Diffstat (limited to 'test/files/neg/altherr3.scala')
-rw-r--r-- | test/files/neg/altherr3.scala | 70 |
1 files changed, 30 insertions, 40 deletions
diff --git a/test/files/neg/altherr3.scala b/test/files/neg/altherr3.scala index a078c3a0bb..bb40099e1e 100644 --- a/test/files/neg/altherr3.scala +++ b/test/files/neg/altherr3.scala @@ -1,6 +1,8 @@ +// $Id$ + module bug { -//########################################################################## + //########################################################################## trait Foo[a]; @@ -14,8 +16,7 @@ module bug { def bar2[a](x: Foo[Foo[a]]): Int = 0; def bar3[a](x: Foo[Foo[Foo[a]]]): Int = 0; - -//########################################################################## + //########################################################################## bar0(foo0()); bar0(foo0(foo0())); @@ -37,8 +38,7 @@ module bug { bar0[Foo[Foo[Int]]](foo0(foo0(foo0()))); // error 8 bar0[Foo[Foo[Int]]](foo0(foo0(foo0(foo0())))); // error 9 - -//########################################################################## + //########################################################################## bar1(foo0()); bar1(foo0(foo0())); @@ -60,8 +60,7 @@ module bug { bar1[Foo[Foo[Int]]](foo0(foo0(foo0()))); bar1[Foo[Foo[Int]]](foo0(foo0(foo0(foo0())))); // error 15 - -//########################################################################## + //########################################################################## bar2(foo0()); bar2(foo0(foo0())); @@ -76,25 +75,24 @@ module bug { bar2[Foo[Int]](foo0()); bar2[Foo[Int]](foo0(foo0())); bar2[Foo[Int]](foo0(foo0(foo0()))); - bar2[Foo[Int]](foo0(foo0(foo0(foo0())))); // error 18 + bar2[Foo[Int]](foo0(foo0(foo0(foo0())))); // error 18 bar2[Foo[Foo[Int]]](foo0()); bar2[Foo[Foo[Int]]](foo0(foo0())); bar2[Foo[Foo[Int]]](foo0(foo0(foo0()))); bar2[Foo[Foo[Int]]](foo0(foo0(foo0(foo0())))); - -//########################################################################## + //########################################################################## bar3(foo0()); - bar3(foo0(foo0())); + bar3(foo0(foo0())); // error 19 (inference fails) bar3(foo0(foo0(foo0()))); bar3(foo0(foo0(foo0(foo0())))); bar3[Int](foo0()); bar3[Int](foo0(foo0())); bar3[Int](foo0(foo0(foo0()))); - bar3[Int](foo0(foo0(foo0(foo0())))); // error 19 + bar3[Int](foo0(foo0(foo0(foo0())))); // error 20 bar3[Foo[Int]](foo0()); bar3[Foo[Int]](foo0(foo0())); @@ -106,35 +104,31 @@ module bug { bar3[Foo[Foo[Int]]](foo0(foo0(foo0()))); bar3[Foo[Foo[Int]]](foo0(foo0(foo0(foo0())))); - -//########################################################################## - -//########################################################################## - -//########################################################################## + //########################################################################## + //########################################################################## + //########################################################################## bar0(foo1()); bar0(foo1(foo1())); bar0(foo1(foo1(foo1()))); bar0(foo1(foo1(foo1(foo1())))); - bar0[Int](foo1()); // error 20 - bar0[Int](foo1(foo1())); // error 21 - bar0[Int](foo1(foo1(foo1()))); // error 22 - bar0[Int](foo1(foo1(foo1(foo1())))); // error 23 + bar0[Int](foo1()); // error 21 + bar0[Int](foo1(foo1())); // error 22 + bar0[Int](foo1(foo1(foo1()))); // error 23 + bar0[Int](foo1(foo1(foo1(foo1())))); // error 24 bar0[Foo[Int]](foo1()); - bar0[Foo[Int]](foo1(foo1())); // error 24 - bar0[Foo[Int]](foo1(foo1(foo1()))); // error 25 - bar0[Foo[Int]](foo0(foo1(foo1(foo1())))); // error 26 + bar0[Foo[Int]](foo1(foo1())); // error 25 + bar0[Foo[Int]](foo1(foo1(foo1()))); // error 26 + bar0[Foo[Int]](foo0(foo1(foo1(foo1())))); // error 27 bar0[Foo[Foo[Int]]](foo1()); bar0[Foo[Foo[Int]]](foo1(foo1())); - bar0[Foo[Foo[Int]]](foo1(foo1(foo1()))); // error 27 - bar0[Foo[Foo[Int]]](foo1(foo0(foo1(foo1())))); // error 28 - + bar0[Foo[Foo[Int]]](foo1(foo1(foo1()))); // error 28 + bar0[Foo[Foo[Int]]](foo1(foo0(foo1(foo1())))); // error 29 -//########################################################################## + //########################################################################## bar1(foo1()); bar1(foo1(foo1())); @@ -142,23 +136,19 @@ module bug { bar1(foo1(foo1(foo1(foo1())))); bar1[Int](foo1()); - bar1[Int](foo1(foo1())); // error 29 - bar1[Int](foo1(foo1(foo1()))); // error 30 - bar1[Int](foo1(foo1(foo1(foo1())))); // error 31 + bar1[Int](foo1(foo1())); // error 30 + bar1[Int](foo1(foo1(foo1()))); // error 31 + bar1[Int](foo1(foo1(foo1(foo1())))); // error 32 bar1[Foo[Int]](foo1()); bar1[Foo[Int]](foo1(foo1())); - bar1[Foo[Int]](foo1(foo1(foo1()))); // error 32 - bar1[Foo[Int]](foo1(foo1(foo1(foo1())))); // error 33 + bar1[Foo[Int]](foo1(foo1(foo1()))); // error 33 + bar1[Foo[Int]](foo1(foo1(foo1(foo1())))); // error 34 bar1[Foo[Foo[Int]]](foo1()); bar1[Foo[Foo[Int]]](foo1(foo1())); bar1[Foo[Foo[Int]]](foo1(foo1(foo1()))); - bar1[Foo[Foo[Int]]](foo1(foo1(foo1(foo1())))); // error 34 - + bar1[Foo[Foo[Int]]](foo1(foo1(foo1(foo1())))); // error 35 -//########################################################################## + //########################################################################## } - - - |