From 6f062616e25ccc18848b0e86ba999202bc20a6a2 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Thu, 8 May 2003 14:53:48 +0000 Subject: *** empty log message *** --- test/files/neg/altherr3.check | 45 +++++++++++++++++++------------------------ test/files/neg/altherr3.scala | 4 ++-- test/neg/altherr3.check | 45 +++++++++++++++++++------------------------ test/neg/altherr3.scala | 4 ++-- 4 files changed, 44 insertions(+), 54 deletions(-) (limited to 'test') diff --git a/test/files/neg/altherr3.check b/test/files/neg/altherr3.check index 076742e124..83d8437504 100644 --- a/test/files/neg/altherr3.check +++ b/test/files/neg/altherr3.check @@ -3,17 +3,17 @@ altherr3.scala:26: no type parameters for method foo0 of type [a <: scala.Any](a result type bug.Foo[a] is incompatible with expected type scala.Int bar0[Int](foo0()); // error 1 ^ -altherr3.scala:27: no type parameters for method foo0 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[scala.Any]) +altherr3.scala:27: no type parameters for method foo0 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[scala.All]) --- because --- result type bug.Foo[a] is incompatible with expected type scala.Int bar0[Int](foo0(foo0())); // error 2 ^ -altherr3.scala:28: no type parameters for method foo0 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[bug.Foo[scala.Any]]) +altherr3.scala:28: no type parameters for method foo0 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[bug.Foo[scala.All]]) --- because --- result type bug.Foo[a] is incompatible with expected type scala.Int bar0[Int](foo0(foo0(foo0()))); // error 3 ^ -altherr3.scala:29: no type parameters for method foo0 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[bug.Foo[bug.Foo[scala.Any]]]) +altherr3.scala:29: no type parameters for method foo0 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[bug.Foo[bug.Foo[scala.All]]]) --- because --- result type bug.Foo[a] is incompatible with expected type scala.Int bar0[Int](foo0(foo0(foo0(foo0())))); // error 4 @@ -23,12 +23,12 @@ altherr3.scala:32: no type parameters for method foo0 of type [a <: scala.Any](a result type bug.Foo[a] is incompatible with expected type scala.Int bar0[Foo[Int]](foo0(foo0())); // error 5 ^ -altherr3.scala:33: no type parameters for method foo0 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[scala.Any]) +altherr3.scala:33: no type parameters for method foo0 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[scala.All]) --- because --- result type bug.Foo[a] is incompatible with expected type scala.Int bar0[Foo[Int]](foo0(foo0(foo0()))); // error 6 ^ -altherr3.scala:34: no type parameters for method foo0 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[bug.Foo[scala.Any]]) +altherr3.scala:34: no type parameters for method foo0 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[bug.Foo[scala.All]]) --- because --- result type bug.Foo[a] is incompatible with expected type scala.Int bar0[Foo[Int]](foo0(foo0(foo0(foo0())))); // error 7 @@ -38,7 +38,7 @@ altherr3.scala:38: no type parameters for method foo0 of type [a <: scala.Any](a result type bug.Foo[a] is incompatible with expected type scala.Int bar0[Foo[Foo[Int]]](foo0(foo0(foo0()))); // error 8 ^ -altherr3.scala:39: no type parameters for method foo0 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[scala.Any]) +altherr3.scala:39: no type parameters for method foo0 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[scala.All]) --- because --- result type bug.Foo[a] is incompatible with expected type scala.Int bar0[Foo[Foo[Int]]](foo0(foo0(foo0(foo0())))); // error 9 @@ -48,12 +48,12 @@ altherr3.scala:49: no type parameters for method foo0 of type [a <: scala.Any](a result type bug.Foo[a] is incompatible with expected type scala.Int bar1[Int](foo0(foo0())); // error 10 ^ -altherr3.scala:50: no type parameters for method foo0 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[scala.Any]) +altherr3.scala:50: no type parameters for method foo0 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[scala.All]) --- because --- result type bug.Foo[a] is incompatible with expected type scala.Int bar1[Int](foo0(foo0(foo0()))); // error 11 ^ -altherr3.scala:51: no type parameters for method foo0 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[bug.Foo[scala.Any]]) +altherr3.scala:51: no type parameters for method foo0 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[bug.Foo[scala.All]]) --- because --- result type bug.Foo[a] is incompatible with expected type scala.Int bar1[Int](foo0(foo0(foo0(foo0())))); // error 12 @@ -63,7 +63,7 @@ altherr3.scala:55: no type parameters for method foo0 of type [a <: scala.Any](a result type bug.Foo[a] is incompatible with expected type scala.Int bar1[Foo[Int]](foo0(foo0(foo0()))); // error 13 ^ -altherr3.scala:56: no type parameters for method foo0 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[scala.Any]) +altherr3.scala:56: no type parameters for method foo0 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[scala.All]) --- because --- result type bug.Foo[a] is incompatible with expected type scala.Int bar1[Foo[Int]](foo0(foo0(foo0(foo0())))); // error 14 @@ -78,7 +78,7 @@ altherr3.scala:72: no type parameters for method foo0 of type [a <: scala.Any](a result type bug.Foo[a] is incompatible with expected type scala.Int bar2[Int](foo0(foo0(foo0()))); // error 16 ^ -altherr3.scala:73: no type parameters for method foo0 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[scala.Any]) +altherr3.scala:73: no type parameters for method foo0 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[scala.All]) --- because --- result type bug.Foo[a] is incompatible with expected type scala.Int bar2[Int](foo0(foo0(foo0(foo0())))); // error 17 @@ -88,11 +88,6 @@ altherr3.scala:78: no type parameters for method foo0 of type [a <: scala.Any](a result type bug.Foo[a] is incompatible with expected type scala.Int bar2[Foo[Int]](foo0(foo0(foo0(foo0())))); // error 18 ^ -altherr3.scala:88: type mismatch; - found : bug.Foo[bug.Foo[scala.Any]] - required: bug.Foo[bug.Foo[bug.Foo[]]] - bar3(foo0(foo0())); // error 19 (inference fails) - ^ altherr3.scala:95: no type parameters for method foo0 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments () --- because --- result type bug.Foo[a] is incompatible with expected type scala.Int @@ -103,17 +98,17 @@ altherr3.scala:116: no type parameters for method foo1 of type [a <: scala.Any]( result type bug.Foo[a] is incompatible with expected type scala.Int bar0[Int](foo1()); // error 21 ^ -altherr3.scala:117: no type parameters for method foo1 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[scala.Any]) +altherr3.scala:117: no type parameters for method foo1 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[scala.All]) --- because --- result type bug.Foo[a] is incompatible with expected type scala.Int bar0[Int](foo1(foo1())); // error 22 ^ -altherr3.scala:118: no type parameters for method foo1 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[bug.Foo[scala.Any]]) +altherr3.scala:118: no type parameters for method foo1 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[bug.Foo[scala.All]]) --- because --- result type bug.Foo[a] is incompatible with expected type scala.Int bar0[Int](foo1(foo1(foo1()))); // error 23 ^ -altherr3.scala:119: no type parameters for method foo1 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[bug.Foo[bug.Foo[scala.Any]]]) +altherr3.scala:119: no type parameters for method foo1 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[bug.Foo[bug.Foo[scala.All]]]) --- because --- result type bug.Foo[a] is incompatible with expected type scala.Int bar0[Int](foo1(foo1(foo1(foo1())))); // error 24 @@ -123,12 +118,12 @@ altherr3.scala:122: no type parameters for method foo1 of type [a <: scala.Any]( result type bug.Foo[a] is incompatible with expected type scala.Int bar0[Foo[Int]](foo1(foo1())); // error 25 ^ -altherr3.scala:123: no type parameters for method foo1 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[scala.Any]) +altherr3.scala:123: no type parameters for method foo1 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[scala.All]) --- because --- result type bug.Foo[a] is incompatible with expected type scala.Int bar0[Foo[Int]](foo1(foo1(foo1()))); // error 26 ^ -altherr3.scala:124: no type parameters for method foo1 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[bug.Foo[scala.Any]]) +altherr3.scala:124: no type parameters for method foo1 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[bug.Foo[scala.All]]) --- because --- result type bug.Foo[a] is incompatible with expected type scala.Int bar0[Foo[Int]](foo0(foo1(foo1(foo1())))); // error 27 @@ -138,7 +133,7 @@ altherr3.scala:128: no type parameters for method foo1 of type [a <: scala.Any]( result type bug.Foo[a] is incompatible with expected type scala.Int bar0[Foo[Foo[Int]]](foo1(foo1(foo1()))); // error 28 ^ -altherr3.scala:129: no type parameters for method foo1 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[scala.Any]) +altherr3.scala:129: no type parameters for method foo1 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[scala.All]) --- because --- result type bug.Foo[a] is incompatible with expected type scala.Int bar0[Foo[Foo[Int]]](foo1(foo0(foo1(foo1())))); // error 29 @@ -148,12 +143,12 @@ altherr3.scala:139: no type parameters for method foo1 of type [a <: scala.Any]( result type bug.Foo[a] is incompatible with expected type scala.Int bar1[Int](foo1(foo1())); // error 30 ^ -altherr3.scala:140: no type parameters for method foo1 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[scala.Any]) +altherr3.scala:140: no type parameters for method foo1 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[scala.All]) --- because --- result type bug.Foo[a] is incompatible with expected type scala.Int bar1[Int](foo1(foo1(foo1()))); // error 31 ^ -altherr3.scala:141: no type parameters for method foo1 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[bug.Foo[scala.Any]]) +altherr3.scala:141: no type parameters for method foo1 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[bug.Foo[scala.All]]) --- because --- result type bug.Foo[a] is incompatible with expected type scala.Int bar1[Int](foo1(foo1(foo1(foo1())))); // error 32 @@ -163,7 +158,7 @@ altherr3.scala:145: no type parameters for method foo1 of type [a <: scala.Any]( result type bug.Foo[a] is incompatible with expected type scala.Int bar1[Foo[Int]](foo1(foo1(foo1()))); // error 33 ^ -altherr3.scala:146: no type parameters for method foo1 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[scala.Any]) +altherr3.scala:146: no type parameters for method foo1 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[scala.All]) --- because --- result type bug.Foo[a] is incompatible with expected type scala.Int bar1[Foo[Int]](foo1(foo1(foo1(foo1())))); // error 34 @@ -173,4 +168,4 @@ altherr3.scala:151: no type parameters for method foo1 of type [a <: scala.Any]( result type bug.Foo[a] is incompatible with expected type scala.Int bar1[Foo[Foo[Int]]](foo1(foo1(foo1(foo1())))); // error 35 ^ -35 errors found +34 errors found diff --git a/test/files/neg/altherr3.scala b/test/files/neg/altherr3.scala index a96513e832..87f470db03 100644 --- a/test/files/neg/altherr3.scala +++ b/test/files/neg/altherr3.scala @@ -4,7 +4,7 @@ object bug { //########################################################################## - trait Foo[a]; + trait Foo[+a]; def foo0[a](x: a*): Foo[a] = foo0(); @@ -85,7 +85,7 @@ object bug { //########################################################################## bar3(foo0()); - bar3(foo0(foo0())); // error 19 (inference fails) + bar3(foo0(foo0())); bar3(foo0(foo0(foo0()))); bar3(foo0(foo0(foo0(foo0())))); diff --git a/test/neg/altherr3.check b/test/neg/altherr3.check index 076742e124..83d8437504 100644 --- a/test/neg/altherr3.check +++ b/test/neg/altherr3.check @@ -3,17 +3,17 @@ altherr3.scala:26: no type parameters for method foo0 of type [a <: scala.Any](a result type bug.Foo[a] is incompatible with expected type scala.Int bar0[Int](foo0()); // error 1 ^ -altherr3.scala:27: no type parameters for method foo0 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[scala.Any]) +altherr3.scala:27: no type parameters for method foo0 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[scala.All]) --- because --- result type bug.Foo[a] is incompatible with expected type scala.Int bar0[Int](foo0(foo0())); // error 2 ^ -altherr3.scala:28: no type parameters for method foo0 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[bug.Foo[scala.Any]]) +altherr3.scala:28: no type parameters for method foo0 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[bug.Foo[scala.All]]) --- because --- result type bug.Foo[a] is incompatible with expected type scala.Int bar0[Int](foo0(foo0(foo0()))); // error 3 ^ -altherr3.scala:29: no type parameters for method foo0 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[bug.Foo[bug.Foo[scala.Any]]]) +altherr3.scala:29: no type parameters for method foo0 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[bug.Foo[bug.Foo[scala.All]]]) --- because --- result type bug.Foo[a] is incompatible with expected type scala.Int bar0[Int](foo0(foo0(foo0(foo0())))); // error 4 @@ -23,12 +23,12 @@ altherr3.scala:32: no type parameters for method foo0 of type [a <: scala.Any](a result type bug.Foo[a] is incompatible with expected type scala.Int bar0[Foo[Int]](foo0(foo0())); // error 5 ^ -altherr3.scala:33: no type parameters for method foo0 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[scala.Any]) +altherr3.scala:33: no type parameters for method foo0 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[scala.All]) --- because --- result type bug.Foo[a] is incompatible with expected type scala.Int bar0[Foo[Int]](foo0(foo0(foo0()))); // error 6 ^ -altherr3.scala:34: no type parameters for method foo0 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[bug.Foo[scala.Any]]) +altherr3.scala:34: no type parameters for method foo0 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[bug.Foo[scala.All]]) --- because --- result type bug.Foo[a] is incompatible with expected type scala.Int bar0[Foo[Int]](foo0(foo0(foo0(foo0())))); // error 7 @@ -38,7 +38,7 @@ altherr3.scala:38: no type parameters for method foo0 of type [a <: scala.Any](a result type bug.Foo[a] is incompatible with expected type scala.Int bar0[Foo[Foo[Int]]](foo0(foo0(foo0()))); // error 8 ^ -altherr3.scala:39: no type parameters for method foo0 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[scala.Any]) +altherr3.scala:39: no type parameters for method foo0 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[scala.All]) --- because --- result type bug.Foo[a] is incompatible with expected type scala.Int bar0[Foo[Foo[Int]]](foo0(foo0(foo0(foo0())))); // error 9 @@ -48,12 +48,12 @@ altherr3.scala:49: no type parameters for method foo0 of type [a <: scala.Any](a result type bug.Foo[a] is incompatible with expected type scala.Int bar1[Int](foo0(foo0())); // error 10 ^ -altherr3.scala:50: no type parameters for method foo0 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[scala.Any]) +altherr3.scala:50: no type parameters for method foo0 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[scala.All]) --- because --- result type bug.Foo[a] is incompatible with expected type scala.Int bar1[Int](foo0(foo0(foo0()))); // error 11 ^ -altherr3.scala:51: no type parameters for method foo0 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[bug.Foo[scala.Any]]) +altherr3.scala:51: no type parameters for method foo0 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[bug.Foo[scala.All]]) --- because --- result type bug.Foo[a] is incompatible with expected type scala.Int bar1[Int](foo0(foo0(foo0(foo0())))); // error 12 @@ -63,7 +63,7 @@ altherr3.scala:55: no type parameters for method foo0 of type [a <: scala.Any](a result type bug.Foo[a] is incompatible with expected type scala.Int bar1[Foo[Int]](foo0(foo0(foo0()))); // error 13 ^ -altherr3.scala:56: no type parameters for method foo0 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[scala.Any]) +altherr3.scala:56: no type parameters for method foo0 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[scala.All]) --- because --- result type bug.Foo[a] is incompatible with expected type scala.Int bar1[Foo[Int]](foo0(foo0(foo0(foo0())))); // error 14 @@ -78,7 +78,7 @@ altherr3.scala:72: no type parameters for method foo0 of type [a <: scala.Any](a result type bug.Foo[a] is incompatible with expected type scala.Int bar2[Int](foo0(foo0(foo0()))); // error 16 ^ -altherr3.scala:73: no type parameters for method foo0 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[scala.Any]) +altherr3.scala:73: no type parameters for method foo0 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[scala.All]) --- because --- result type bug.Foo[a] is incompatible with expected type scala.Int bar2[Int](foo0(foo0(foo0(foo0())))); // error 17 @@ -88,11 +88,6 @@ altherr3.scala:78: no type parameters for method foo0 of type [a <: scala.Any](a result type bug.Foo[a] is incompatible with expected type scala.Int bar2[Foo[Int]](foo0(foo0(foo0(foo0())))); // error 18 ^ -altherr3.scala:88: type mismatch; - found : bug.Foo[bug.Foo[scala.Any]] - required: bug.Foo[bug.Foo[bug.Foo[]]] - bar3(foo0(foo0())); // error 19 (inference fails) - ^ altherr3.scala:95: no type parameters for method foo0 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments () --- because --- result type bug.Foo[a] is incompatible with expected type scala.Int @@ -103,17 +98,17 @@ altherr3.scala:116: no type parameters for method foo1 of type [a <: scala.Any]( result type bug.Foo[a] is incompatible with expected type scala.Int bar0[Int](foo1()); // error 21 ^ -altherr3.scala:117: no type parameters for method foo1 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[scala.Any]) +altherr3.scala:117: no type parameters for method foo1 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[scala.All]) --- because --- result type bug.Foo[a] is incompatible with expected type scala.Int bar0[Int](foo1(foo1())); // error 22 ^ -altherr3.scala:118: no type parameters for method foo1 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[bug.Foo[scala.Any]]) +altherr3.scala:118: no type parameters for method foo1 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[bug.Foo[scala.All]]) --- because --- result type bug.Foo[a] is incompatible with expected type scala.Int bar0[Int](foo1(foo1(foo1()))); // error 23 ^ -altherr3.scala:119: no type parameters for method foo1 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[bug.Foo[bug.Foo[scala.Any]]]) +altherr3.scala:119: no type parameters for method foo1 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[bug.Foo[bug.Foo[scala.All]]]) --- because --- result type bug.Foo[a] is incompatible with expected type scala.Int bar0[Int](foo1(foo1(foo1(foo1())))); // error 24 @@ -123,12 +118,12 @@ altherr3.scala:122: no type parameters for method foo1 of type [a <: scala.Any]( result type bug.Foo[a] is incompatible with expected type scala.Int bar0[Foo[Int]](foo1(foo1())); // error 25 ^ -altherr3.scala:123: no type parameters for method foo1 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[scala.Any]) +altherr3.scala:123: no type parameters for method foo1 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[scala.All]) --- because --- result type bug.Foo[a] is incompatible with expected type scala.Int bar0[Foo[Int]](foo1(foo1(foo1()))); // error 26 ^ -altherr3.scala:124: no type parameters for method foo1 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[bug.Foo[scala.Any]]) +altherr3.scala:124: no type parameters for method foo1 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[bug.Foo[scala.All]]) --- because --- result type bug.Foo[a] is incompatible with expected type scala.Int bar0[Foo[Int]](foo0(foo1(foo1(foo1())))); // error 27 @@ -138,7 +133,7 @@ altherr3.scala:128: no type parameters for method foo1 of type [a <: scala.Any]( result type bug.Foo[a] is incompatible with expected type scala.Int bar0[Foo[Foo[Int]]](foo1(foo1(foo1()))); // error 28 ^ -altherr3.scala:129: no type parameters for method foo1 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[scala.Any]) +altherr3.scala:129: no type parameters for method foo1 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[scala.All]) --- because --- result type bug.Foo[a] is incompatible with expected type scala.Int bar0[Foo[Foo[Int]]](foo1(foo0(foo1(foo1())))); // error 29 @@ -148,12 +143,12 @@ altherr3.scala:139: no type parameters for method foo1 of type [a <: scala.Any]( result type bug.Foo[a] is incompatible with expected type scala.Int bar1[Int](foo1(foo1())); // error 30 ^ -altherr3.scala:140: no type parameters for method foo1 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[scala.Any]) +altherr3.scala:140: no type parameters for method foo1 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[scala.All]) --- because --- result type bug.Foo[a] is incompatible with expected type scala.Int bar1[Int](foo1(foo1(foo1()))); // error 31 ^ -altherr3.scala:141: no type parameters for method foo1 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[bug.Foo[scala.Any]]) +altherr3.scala:141: no type parameters for method foo1 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[bug.Foo[scala.All]]) --- because --- result type bug.Foo[a] is incompatible with expected type scala.Int bar1[Int](foo1(foo1(foo1(foo1())))); // error 32 @@ -163,7 +158,7 @@ altherr3.scala:145: no type parameters for method foo1 of type [a <: scala.Any]( result type bug.Foo[a] is incompatible with expected type scala.Int bar1[Foo[Int]](foo1(foo1(foo1()))); // error 33 ^ -altherr3.scala:146: no type parameters for method foo1 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[scala.Any]) +altherr3.scala:146: no type parameters for method foo1 of type [a <: scala.Any](a*)bug.Foo[a] exist so that it can be applied to arguments (bug.Foo[scala.All]) --- because --- result type bug.Foo[a] is incompatible with expected type scala.Int bar1[Foo[Int]](foo1(foo1(foo1(foo1())))); // error 34 @@ -173,4 +168,4 @@ altherr3.scala:151: no type parameters for method foo1 of type [a <: scala.Any]( result type bug.Foo[a] is incompatible with expected type scala.Int bar1[Foo[Foo[Int]]](foo1(foo1(foo1(foo1())))); // error 35 ^ -35 errors found +34 errors found diff --git a/test/neg/altherr3.scala b/test/neg/altherr3.scala index a96513e832..87f470db03 100644 --- a/test/neg/altherr3.scala +++ b/test/neg/altherr3.scala @@ -4,7 +4,7 @@ object bug { //########################################################################## - trait Foo[a]; + trait Foo[+a]; def foo0[a](x: a*): Foo[a] = foo0(); @@ -85,7 +85,7 @@ object bug { //########################################################################## bar3(foo0()); - bar3(foo0(foo0())); // error 19 (inference fails) + bar3(foo0(foo0())); bar3(foo0(foo0(foo0()))); bar3(foo0(foo0(foo0(foo0())))); -- cgit v1.2.3