From 9d8a37ee5c2d38b0e580560521ffdbd54d1b9981 Mon Sep 17 00:00:00 2001 From: paltherr Date: Mon, 17 Mar 2003 12:26:27 +0000 Subject: - Added .check files --- test/files/neg/S2.check | 7 ++ test/files/neg/S4.check | 4 + test/files/neg/S6.check | 4 + test/files/neg/S7.check | 4 + test/files/neg/altherr1.check | 4 + test/files/neg/altherr2.check | 4 + test/files/neg/altherr3.check | 172 ++++++++++++++++++++++++++++++++++++++ test/files/neg/constrparams.check | 4 + test/files/neg/matthias2.check | 4 + test/files/neg/vincent1.check | 4 + 10 files changed, 211 insertions(+) create mode 100644 test/files/neg/S2.check create mode 100644 test/files/neg/S4.check create mode 100644 test/files/neg/S6.check create mode 100644 test/files/neg/S7.check create mode 100644 test/files/neg/altherr1.check create mode 100644 test/files/neg/altherr2.check create mode 100644 test/files/neg/altherr3.check create mode 100644 test/files/neg/constrparams.check create mode 100644 test/files/neg/matthias2.check create mode 100644 test/files/neg/vincent1.check (limited to 'test/files/neg') diff --git a/test/files/neg/S2.check b/test/files/neg/S2.check new file mode 100644 index 0000000000..cb6bb9c991 --- /dev/null +++ b/test/files/neg/S2.check @@ -0,0 +1,7 @@ +S2.scala:14: type z.type escapes its defining scope as part of z.Inner + def x = { val z = new S2(); new z.Inner(); } + ^ +S2.scala:15: type z.type escapes its defining scope as part of z.Inner + def y = { val z = new S2(); new z.Inner(); } + ^ +two errors found diff --git a/test/files/neg/S4.check b/test/files/neg/S4.check new file mode 100644 index 0000000000..dd8ee22f5d --- /dev/null +++ b/test/files/neg/S4.check @@ -0,0 +1,4 @@ +S4.scala:5: stable identifier required + def foo(x: a.Inner) = x; + ^ +one error found diff --git a/test/files/neg/S6.check b/test/files/neg/S6.check new file mode 100644 index 0000000000..6303e4c8e2 --- /dev/null +++ b/test/files/neg/S6.check @@ -0,0 +1,4 @@ +S6.scala:11: illegal cyclic reference involving type S + type S <: T; + ^ +one error found diff --git a/test/files/neg/S7.check b/test/files/neg/S7.check new file mode 100644 index 0000000000..22769d0fe7 --- /dev/null +++ b/test/files/neg/S7.check @@ -0,0 +1,4 @@ +S7.scala:6: illegal cyclic reference involving class S7.A + class C() extends a.A() {} + ^ +one error found diff --git a/test/files/neg/altherr1.check b/test/files/neg/altherr1.check new file mode 100644 index 0000000000..831e28a8fe --- /dev/null +++ b/test/files/neg/altherr1.check @@ -0,0 +1,4 @@ +altherr1.scala:5: expected pattern type of cases could not be determined + foo() match { case _ => 0 } + ^ +one error found diff --git a/test/files/neg/altherr2.check b/test/files/neg/altherr2.check new file mode 100644 index 0000000000..53eeb2c84c --- /dev/null +++ b/test/files/neg/altherr2.check @@ -0,0 +1,4 @@ +altherr2.scala:5: ';' expected but '[' found. + foo()[Int]; + ^ +one error found diff --git a/test/files/neg/altherr3.check b/test/files/neg/altherr3.check new file mode 100644 index 0000000000..7d9d521e02 --- /dev/null +++ b/test/files/neg/altherr3.check @@ -0,0 +1,172 @@ +altherr3.scala:26: polymorphic expression of type [a <: scala.Any]bug.Foo[a] cannot be instantiated from expected type scala.Int + bar0[Int](foo0()); // error 1 + ^ +altherr3.scala:27: type mismatch; + found : bug.Foo[bug.Foo[scala.Any]] + required: scala.Int + bar0[Int](foo0(foo0())); // error 2 + ^ +altherr3.scala:28: type mismatch; + found : bug.Foo[bug.Foo[bug.Foo[scala.Any]]] + required: scala.Int + bar0[Int](foo0(foo0(foo0()))); // error 3 + ^ +altherr3.scala:29: type mismatch; + found : bug.Foo[bug.Foo[bug.Foo[bug.Foo[scala.Any]]]] + required: scala.Int + bar0[Int](foo0(foo0(foo0(foo0())))); // error 4 + ^ +altherr3.scala:32: polymorphic argument cannot be instantiated to formal parameter type; + found : [a <: scala.Any]bug.Foo[a] + required: scala.Int + bar0[Foo[Int]](foo0(foo0())); // error 5 + ^ +altherr3.scala:33: type mismatch; + found : bug.Foo[bug.Foo[scala.Any]] + required: scala.Int + bar0[Foo[Int]](foo0(foo0(foo0()))); // error 6 + ^ +altherr3.scala:34: type mismatch; + found : bug.Foo[bug.Foo[bug.Foo[scala.Any]]] + required: scala.Int + bar0[Foo[Int]](foo0(foo0(foo0(foo0())))); // error 7 + ^ +altherr3.scala:38: polymorphic argument cannot be instantiated to formal parameter type; + found : [a <: scala.Any]bug.Foo[a] + required: scala.Int + bar0[Foo[Foo[Int]]](foo0(foo0(foo0()))); // error 8 + ^ +altherr3.scala:39: type mismatch; + found : bug.Foo[bug.Foo[scala.Any]] + required: scala.Int + bar0[Foo[Foo[Int]]](foo0(foo0(foo0(foo0())))); // error 9 + ^ +altherr3.scala:49: polymorphic argument cannot be instantiated to formal parameter type; + found : [a <: scala.Any]bug.Foo[a] + required: scala.Int + bar1[Int](foo0(foo0())); // error 10 + ^ +altherr3.scala:50: type mismatch; + found : bug.Foo[bug.Foo[scala.Any]] + required: scala.Int + bar1[Int](foo0(foo0(foo0()))); // error 11 + ^ +altherr3.scala:51: type mismatch; + found : bug.Foo[bug.Foo[bug.Foo[scala.Any]]] + required: scala.Int + bar1[Int](foo0(foo0(foo0(foo0())))); // error 12 + ^ +altherr3.scala:55: polymorphic argument cannot be instantiated to formal parameter type; + found : [a <: scala.Any]bug.Foo[a] + required: scala.Int + bar1[Foo[Int]](foo0(foo0(foo0()))); // error 13 + ^ +altherr3.scala:56: type mismatch; + found : bug.Foo[bug.Foo[scala.Any]] + required: scala.Int + bar1[Foo[Int]](foo0(foo0(foo0(foo0())))); // error 14 + ^ +altherr3.scala:61: polymorphic argument cannot be instantiated to formal parameter type; + found : [a <: scala.Any]bug.Foo[a] + required: scala.Int + bar1[Foo[Foo[Int]]](foo0(foo0(foo0(foo0())))); // error 15 + ^ +altherr3.scala:72: polymorphic argument cannot be instantiated to formal parameter type; + found : [a <: scala.Any]bug.Foo[a] + required: scala.Int + bar2[Int](foo0(foo0(foo0()))); // error 16 + ^ +altherr3.scala:73: type mismatch; + found : bug.Foo[bug.Foo[scala.Any]] + required: scala.Int + bar2[Int](foo0(foo0(foo0(foo0())))); // error 17 + ^ +altherr3.scala:78: polymorphic argument cannot be instantiated to formal parameter type; + found : [a <: scala.Any]bug.Foo[a] + required: 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: polymorphic argument cannot be instantiated to formal parameter type; + found : [a <: scala.Any]bug.Foo[a] + required: scala.Int + bar3[Int](foo0(foo0(foo0(foo0())))); // error 20 + ^ +altherr3.scala:116: polymorphic expression of type [a <: scala.Any]bug.Foo[a] cannot be instantiated from expected type scala.Int + bar0[Int](foo1()); // error 21 + ^ +altherr3.scala:117: type mismatch; + found : bug.Foo[bug.Foo[scala.Any]] + required: scala.Int + bar0[Int](foo1(foo1())); // error 22 + ^ +altherr3.scala:118: type mismatch; + found : bug.Foo[bug.Foo[bug.Foo[scala.Any]]] + required: scala.Int + bar0[Int](foo1(foo1(foo1()))); // error 23 + ^ +altherr3.scala:119: type mismatch; + found : bug.Foo[bug.Foo[bug.Foo[bug.Foo[scala.Any]]]] + required: scala.Int + bar0[Int](foo1(foo1(foo1(foo1())))); // error 24 + ^ +altherr3.scala:122: polymorphic argument cannot be instantiated to formal parameter type; + found : [a <: scala.Any]bug.Foo[a] + required: scala.Int + bar0[Foo[Int]](foo1(foo1())); // error 25 + ^ +altherr3.scala:123: type mismatch; + found : bug.Foo[bug.Foo[scala.Any]] + required: scala.Int + bar0[Foo[Int]](foo1(foo1(foo1()))); // error 26 + ^ +altherr3.scala:124: type mismatch; + found : bug.Foo[bug.Foo[bug.Foo[scala.Any]]] + required: scala.Int + bar0[Foo[Int]](foo0(foo1(foo1(foo1())))); // error 27 + ^ +altherr3.scala:128: polymorphic argument cannot be instantiated to formal parameter type; + found : [a <: scala.Any]bug.Foo[a] + required: scala.Int + bar0[Foo[Foo[Int]]](foo1(foo1(foo1()))); // error 28 + ^ +altherr3.scala:129: type mismatch; + found : bug.Foo[bug.Foo[scala.Any]] + required: scala.Int + bar0[Foo[Foo[Int]]](foo1(foo0(foo1(foo1())))); // error 29 + ^ +altherr3.scala:139: polymorphic argument cannot be instantiated to formal parameter type; + found : [a <: scala.Any]bug.Foo[a] + required: scala.Int + bar1[Int](foo1(foo1())); // error 30 + ^ +altherr3.scala:140: type mismatch; + found : bug.Foo[bug.Foo[scala.Any]] + required: scala.Int + bar1[Int](foo1(foo1(foo1()))); // error 31 + ^ +altherr3.scala:141: type mismatch; + found : bug.Foo[bug.Foo[bug.Foo[scala.Any]]] + required: scala.Int + bar1[Int](foo1(foo1(foo1(foo1())))); // error 32 + ^ +altherr3.scala:145: polymorphic argument cannot be instantiated to formal parameter type; + found : [a <: scala.Any]bug.Foo[a] + required: scala.Int + bar1[Foo[Int]](foo1(foo1(foo1()))); // error 33 + ^ +altherr3.scala:146: type mismatch; + found : bug.Foo[bug.Foo[scala.Any]] + required: scala.Int + bar1[Foo[Int]](foo1(foo1(foo1(foo1())))); // error 34 + ^ +altherr3.scala:151: polymorphic argument cannot be instantiated to formal parameter type; + found : [a <: scala.Any]bug.Foo[a] + required: scala.Int + bar1[Foo[Foo[Int]]](foo1(foo1(foo1(foo1())))); // error 35 + ^ +35 errors found diff --git a/test/files/neg/constrparams.check b/test/files/neg/constrparams.check new file mode 100644 index 0000000000..702504ea4a --- /dev/null +++ b/test/files/neg/constrparams.check @@ -0,0 +1,4 @@ +constrparams.scala:4: stable identifier required + private val z: x.t = null; //error + ^ +one error found diff --git a/test/files/neg/matthias2.check b/test/files/neg/matthias2.check new file mode 100644 index 0000000000..9bd56714cd --- /dev/null +++ b/test/files/neg/matthias2.check @@ -0,0 +1,4 @@ +matthias2.scala:7: illegal cyclic reference involving value y + override val y: T; + ^ +one error found diff --git a/test/files/neg/vincent1.check b/test/files/neg/vincent1.check new file mode 100644 index 0000000000..576386a839 --- /dev/null +++ b/test/files/neg/vincent1.check @@ -0,0 +1,4 @@ +vincent1.scala:7: type x.type escapes its defining scope as part of test.B with {type T = x.T} + def functor(x: A): B with { type T = x.T } = + ^ +one error found -- cgit v1.2.3