From 1dbc00126bf0e660b0286ac247271549158bcb65 Mon Sep 17 00:00:00 2001 From: paltherr Date: Mon, 19 Jan 2004 09:25:20 +0000 Subject: - Moved test/pos test/neg and test/new into tes... - Moved test/pos test/neg and test/new into test/files --- test/bin/scala-test | 4 +- test/neg/182.check | 5 -- test/neg/S2.check | 7 -- test/neg/S2.scala | 19 ----- test/neg/S4.check | 4 - test/neg/S4.scala | 11 --- test/neg/S6.check | 4 - test/neg/S6.scala | 12 --- test/neg/S7.check | 4 - test/neg/S7.scala | 7 -- test/neg/abstract.check | 7 -- test/neg/abstract.scala | 9 -- test/neg/altherr2.check | 4 - test/neg/altherr2.scala | 7 -- test/neg/altherr3.check | 171 ------------------------------------- test/neg/altherr3.scala | 154 --------------------------------- test/neg/bounds.check | 4 - test/neg/bounds.scala | 12 --- test/neg/bug105.check | 4 - test/neg/bug105.scala | 1 - test/neg/bug106.check | 4 - test/neg/bug106.scala | 2 - test/neg/bug107.check | 4 - test/neg/bug107.scala | 8 -- test/neg/bug108.check | 4 - test/neg/bug112.check | 4 - test/neg/bug112.scala | 7 -- test/neg/bug113.check | 7 -- test/neg/bug113.scala | 4 - test/neg/bug117.check | 10 --- test/neg/bug117.scala | 5 -- test/neg/bug118.check | 4 - test/neg/bug118.scala | 6 -- test/neg/bug122.check | 7 -- test/neg/bug122.scala | 4 - test/neg/bug128_129.check | 10 --- test/neg/bug128_129.scala | 15 ---- test/neg/bug136.check | 9 -- test/neg/bug144.check | 4 - test/neg/bug144.scala | 2 - test/neg/bug145.check | 4 - test/neg/bug145.scala | 17 ---- test/neg/bug152.check | 4 - test/neg/bug152.scala | 7 -- test/neg/bug169.check | 7 -- test/neg/bug169.scala | 14 --- test/neg/bug170.check | 4 - test/neg/bug170.scala | 15 ---- test/neg/bug191.check | 6 -- test/neg/bug191.scala | 15 ---- test/neg/bug228.check | 4 - test/neg/bug228.scala | 13 --- test/neg/bug236.check | 4 - test/neg/bug236.scala | 6 -- test/neg/bug25.check | 4 - test/neg/bug38.check | 7 -- test/neg/bug38.scala | 11 --- test/neg/bug40.check | 10 --- test/neg/bug40.scala | 3 - test/neg/bug43.check | 4 - test/neg/bug43.scala | 1 - test/neg/bug44.check | 6 -- test/neg/bug44.scala | 5 -- test/neg/bug45.check | 6 -- test/neg/bug45.scala | 10 --- test/neg/bug47.check | 7 -- test/neg/bug47.scala | 13 --- test/neg/bug52.check | 6 -- test/neg/bug52.scala | 4 - test/neg/bug58.check | 4 - test/neg/bug58.scala | 4 - test/neg/bug63.check | 4 - test/neg/bug63.scala | 3 - test/neg/bug67.check | 11 --- test/neg/bug67.scala | 21 ----- test/neg/bug72.check | 4 - test/neg/bug72.scala | 7 -- test/neg/bug74.check | 4 - test/neg/bug74.scala | 3 - test/neg/bug75.check | 5 -- test/neg/bug75.scala | 12 --- test/neg/bug86.check | 4 - test/neg/bug86.scala | 7 -- test/neg/bug87.check | 4 - test/neg/bug87.scala | 3 - test/neg/bug95.check | 15 ---- test/neg/bug95.scala | 2 - test/neg/bug96.check | 4 - test/neg/bug96.scala | 6 -- test/neg/bug97.check | 4 - test/neg/bug97.scala | 7 -- test/neg/constrparams.check | 9 -- test/neg/constrparams.scala | 6 -- test/neg/cyclic.check | 4 - test/neg/cyclic.scala | 6 -- test/neg/dep.check | 4 - test/neg/dep.scala | 6 -- test/neg/imports.check | 28 ------ test/neg/imports.scala | 161 ---------------------------------- test/neg/matthias2.check | 4 - test/neg/matthias2.scala | 8 -- test/neg/michel2.check | 4 - test/neg/michel2.scala | 1 - test/neg/overlapping.check | 6 -- test/neg/overlapping.scala | 10 --- test/neg/overload.check | 19 ----- test/neg/overload.scala | 17 ---- test/neg/protected.check | 5 -- test/neg/protected.scala | 14 --- test/neg/refine.check | 6 -- test/neg/refine.scala | 6 -- test/neg/seqtest.check | 7 -- test/neg/seqtest.scala | 13 --- test/neg/stable.check | 7 -- test/neg/stable.scala | 17 ---- test/neg/vincent1.check | 7 -- test/neg/vincent1.scala | 19 ----- test/pos/A.scala | 8 -- test/pos/List1.scala | 45 ---------- test/pos/MailBox.scala | 80 ----------------- test/pos/S1.scala | 13 --- test/pos/S3.scala | 14 --- test/pos/S5.scala | 30 ------- test/pos/S8.scala | 19 ----- test/pos/X.scala | 14 --- test/pos/Y.scala | 7 -- test/pos/Z.scala | 10 --- test/pos/abstract-data.scala | 55 ------------ test/pos/abstract.scala | 9 -- test/pos/aliases.scala | 25 ------ test/pos/arrays2.scala | 11 --- test/pos/bug082.scala | 18 ---- test/pos/bug1.scala | 8 -- test/pos/bug115.scala | 8 -- test/pos/bug116.scala | 8 -- test/pos/bug119.scala | 7 -- test/pos/bug121.scala | 3 - test/pos/bug123.scala | 3 - test/pos/bug124.scala | 5 -- test/pos/bug151.scala | 6 -- test/pos/bug159.scala | 22 ----- test/pos/bug160.scala | 5 -- test/pos/bug17.scala | 21 ----- test/pos/bug175.scala | 5 -- test/pos/bug177.scala | 10 --- test/pos/bug183.scala | 6 -- test/pos/bug193.scala | 74 ---------------- test/pos/bug2.scala | 6 -- test/pos/bug20.scala | 8 -- test/pos/bug201.scala | 7 -- test/pos/bug204.scala | 7 -- test/pos/bug210.scala | 17 ---- test/pos/bug211.scala | 8 -- test/pos/bug229.scala | 3 - test/pos/bug245.scala | 18 ---- test/pos/bug267.scala | 55 ------------ test/pos/bug29.scala | 3 - test/pos/bug30.scala | 9 -- test/pos/bug31.scala | 29 ------- test/pos/bug32.scala | 17 ---- test/pos/bug36.scala | 8 -- test/pos/bug39.scala | 6 -- test/pos/bug49.scala | 3 - test/pos/bug53.scala | 7 -- test/pos/bug54.scala | 4 - test/pos/bug61.scala | 10 --- test/pos/bug64.scala | 6 -- test/pos/bug66.scala | 7 -- test/pos/bug68.scala | 6 -- test/pos/bug69.scala | 11 --- test/pos/bug76.scala | 9 -- test/pos/bug81.scala | 4 - test/pos/bug85.scala | 8 -- test/pos/bug91.scala | 6 -- test/pos/bug93.scala | 4 - test/pos/cls.scala | 17 ---- test/pos/cls1.scala | 9 -- test/pos/clsrefine.scala | 33 ------- test/pos/compile.scala | 19 ----- test/pos/compound.scala | 9 -- test/pos/constfold.scala | 14 --- test/pos/eta.scala | 5 -- test/pos/exceptions.scala | 21 ----- test/pos/expressions-current.scala | 63 -------------- test/pos/gui.scala | 99 --------------------- test/pos/imports.scala | 16 ---- test/pos/infer.scala | 11 --- test/pos/infer2.scala | 10 --- test/pos/lambda.scala | 8 -- test/pos/lambdalift.scala | 15 ---- test/pos/lambdalift1.scala | 17 ---- test/pos/localmodules.scala | 22 ----- test/pos/matthias1.scala | 15 ---- test/pos/matthias3.scala | 13 --- test/pos/matthias4.scala | 84 ------------------ test/pos/matthias5.scala | 12 --- test/pos/maxim1.scala | 5 -- test/pos/michel1.scala | 9 -- test/pos/michel2.scala | 16 ---- test/pos/michel3.scala | 3 - test/pos/michel4.scala | 7 -- test/pos/michel5.scala | 5 -- test/pos/michel6.scala | 6 -- test/pos/mixins.scala | 17 ---- test/pos/modules.scala | 14 --- test/pos/modules1.scala | 14 --- test/pos/moduletrans.scala | 8 -- test/pos/nested.scala | 27 ------ test/pos/null.scala | 3 - test/pos/override.scala | 14 --- test/pos/partialfun.scala | 10 --- test/pos/patterns.scala | 27 ------ test/pos/patterns1.scala | 13 --- test/pos/patterns2.scala | 16 ---- test/pos/patterns3.scala | 5 -- test/pos/philippe1.scala | 8 -- test/pos/philippe2.scala | 7 -- test/pos/philippe3.scala | 40 --------- test/pos/philippe4.scala | 3 - test/pos/pmbug.scala | 8 -- test/pos/propagate.scala | 17 ---- test/pos/rebind.scala | 13 --- test/pos/refine.scala | 6 -- test/pos/reftest.scala | 4 - test/pos/scall.bat | 50 ----------- test/pos/scoping1.scala | 12 --- test/pos/scoping2.scala | 14 --- test/pos/scoping3.scala | 20 ----- test/pos/seqtest2.scala | 13 --- test/pos/simplelists.scala | 17 ---- test/pos/stable.scala | 11 --- test/pos/strings.scala | 6 -- test/pos/test1.scala | 5 -- test/pos/test2.scala | 5 -- test/pos/test4.scala | 45 ---------- test/pos/test4a.scala | 16 ---- test/pos/test4refine.scala | 49 ----------- test/pos/test5.scala | 68 --------------- test/pos/test5refine.scala | 75 ---------------- test/pos/thistype.scala | 14 --- test/pos/thistypes.scala | 8 -- test/pos/traits.scala | 42 --------- test/pos/valdefs.scala | 16 ---- test/pos/vincent.scala | 21 ----- 244 files changed, 2 insertions(+), 3496 deletions(-) delete mode 100644 test/neg/182.check delete mode 100644 test/neg/S2.check delete mode 100644 test/neg/S2.scala delete mode 100644 test/neg/S4.check delete mode 100644 test/neg/S4.scala delete mode 100644 test/neg/S6.check delete mode 100644 test/neg/S6.scala delete mode 100644 test/neg/S7.check delete mode 100644 test/neg/S7.scala delete mode 100644 test/neg/abstract.check delete mode 100644 test/neg/abstract.scala delete mode 100644 test/neg/altherr2.check delete mode 100644 test/neg/altherr2.scala delete mode 100644 test/neg/altherr3.check delete mode 100644 test/neg/altherr3.scala delete mode 100644 test/neg/bounds.check delete mode 100644 test/neg/bounds.scala delete mode 100644 test/neg/bug105.check delete mode 100644 test/neg/bug105.scala delete mode 100644 test/neg/bug106.check delete mode 100644 test/neg/bug106.scala delete mode 100644 test/neg/bug107.check delete mode 100644 test/neg/bug107.scala delete mode 100644 test/neg/bug108.check delete mode 100644 test/neg/bug112.check delete mode 100644 test/neg/bug112.scala delete mode 100644 test/neg/bug113.check delete mode 100644 test/neg/bug113.scala delete mode 100644 test/neg/bug117.check delete mode 100644 test/neg/bug117.scala delete mode 100644 test/neg/bug118.check delete mode 100644 test/neg/bug118.scala delete mode 100644 test/neg/bug122.check delete mode 100644 test/neg/bug122.scala delete mode 100644 test/neg/bug128_129.check delete mode 100644 test/neg/bug128_129.scala delete mode 100644 test/neg/bug136.check delete mode 100644 test/neg/bug144.check delete mode 100644 test/neg/bug144.scala delete mode 100644 test/neg/bug145.check delete mode 100644 test/neg/bug145.scala delete mode 100644 test/neg/bug152.check delete mode 100644 test/neg/bug152.scala delete mode 100644 test/neg/bug169.check delete mode 100644 test/neg/bug169.scala delete mode 100644 test/neg/bug170.check delete mode 100644 test/neg/bug170.scala delete mode 100644 test/neg/bug191.check delete mode 100644 test/neg/bug191.scala delete mode 100644 test/neg/bug228.check delete mode 100644 test/neg/bug228.scala delete mode 100644 test/neg/bug236.check delete mode 100644 test/neg/bug236.scala delete mode 100644 test/neg/bug25.check delete mode 100644 test/neg/bug38.check delete mode 100644 test/neg/bug38.scala delete mode 100644 test/neg/bug40.check delete mode 100644 test/neg/bug40.scala delete mode 100644 test/neg/bug43.check delete mode 100644 test/neg/bug43.scala delete mode 100644 test/neg/bug44.check delete mode 100644 test/neg/bug44.scala delete mode 100644 test/neg/bug45.check delete mode 100644 test/neg/bug45.scala delete mode 100644 test/neg/bug47.check delete mode 100644 test/neg/bug47.scala delete mode 100644 test/neg/bug52.check delete mode 100644 test/neg/bug52.scala delete mode 100644 test/neg/bug58.check delete mode 100644 test/neg/bug58.scala delete mode 100644 test/neg/bug63.check delete mode 100644 test/neg/bug63.scala delete mode 100644 test/neg/bug67.check delete mode 100644 test/neg/bug67.scala delete mode 100644 test/neg/bug72.check delete mode 100644 test/neg/bug72.scala delete mode 100644 test/neg/bug74.check delete mode 100644 test/neg/bug74.scala delete mode 100644 test/neg/bug75.check delete mode 100644 test/neg/bug75.scala delete mode 100644 test/neg/bug86.check delete mode 100644 test/neg/bug86.scala delete mode 100644 test/neg/bug87.check delete mode 100644 test/neg/bug87.scala delete mode 100644 test/neg/bug95.check delete mode 100644 test/neg/bug95.scala delete mode 100644 test/neg/bug96.check delete mode 100644 test/neg/bug96.scala delete mode 100644 test/neg/bug97.check delete mode 100644 test/neg/bug97.scala delete mode 100644 test/neg/constrparams.check delete mode 100644 test/neg/constrparams.scala delete mode 100644 test/neg/cyclic.check delete mode 100644 test/neg/cyclic.scala delete mode 100644 test/neg/dep.check delete mode 100644 test/neg/dep.scala delete mode 100644 test/neg/imports.check delete mode 100644 test/neg/imports.scala delete mode 100644 test/neg/matthias2.check delete mode 100644 test/neg/matthias2.scala delete mode 100644 test/neg/michel2.check delete mode 100644 test/neg/michel2.scala delete mode 100644 test/neg/overlapping.check delete mode 100644 test/neg/overlapping.scala delete mode 100644 test/neg/overload.check delete mode 100644 test/neg/overload.scala delete mode 100644 test/neg/protected.check delete mode 100644 test/neg/protected.scala delete mode 100644 test/neg/refine.check delete mode 100644 test/neg/refine.scala delete mode 100644 test/neg/seqtest.check delete mode 100644 test/neg/seqtest.scala delete mode 100644 test/neg/stable.check delete mode 100644 test/neg/stable.scala delete mode 100644 test/neg/vincent1.check delete mode 100644 test/neg/vincent1.scala delete mode 100644 test/pos/A.scala delete mode 100644 test/pos/List1.scala delete mode 100644 test/pos/MailBox.scala delete mode 100644 test/pos/S1.scala delete mode 100644 test/pos/S3.scala delete mode 100644 test/pos/S5.scala delete mode 100644 test/pos/S8.scala delete mode 100644 test/pos/X.scala delete mode 100644 test/pos/Y.scala delete mode 100644 test/pos/Z.scala delete mode 100644 test/pos/abstract-data.scala delete mode 100644 test/pos/abstract.scala delete mode 100644 test/pos/aliases.scala delete mode 100644 test/pos/arrays2.scala delete mode 100644 test/pos/bug082.scala delete mode 100644 test/pos/bug1.scala delete mode 100644 test/pos/bug115.scala delete mode 100644 test/pos/bug116.scala delete mode 100644 test/pos/bug119.scala delete mode 100644 test/pos/bug121.scala delete mode 100644 test/pos/bug123.scala delete mode 100644 test/pos/bug124.scala delete mode 100644 test/pos/bug151.scala delete mode 100644 test/pos/bug159.scala delete mode 100644 test/pos/bug160.scala delete mode 100644 test/pos/bug17.scala delete mode 100644 test/pos/bug175.scala delete mode 100644 test/pos/bug177.scala delete mode 100644 test/pos/bug183.scala delete mode 100644 test/pos/bug193.scala delete mode 100644 test/pos/bug2.scala delete mode 100644 test/pos/bug20.scala delete mode 100644 test/pos/bug201.scala delete mode 100644 test/pos/bug204.scala delete mode 100644 test/pos/bug210.scala delete mode 100644 test/pos/bug211.scala delete mode 100644 test/pos/bug229.scala delete mode 100644 test/pos/bug245.scala delete mode 100644 test/pos/bug267.scala delete mode 100644 test/pos/bug29.scala delete mode 100644 test/pos/bug30.scala delete mode 100644 test/pos/bug31.scala delete mode 100644 test/pos/bug32.scala delete mode 100644 test/pos/bug36.scala delete mode 100644 test/pos/bug39.scala delete mode 100644 test/pos/bug49.scala delete mode 100644 test/pos/bug53.scala delete mode 100644 test/pos/bug54.scala delete mode 100644 test/pos/bug61.scala delete mode 100644 test/pos/bug64.scala delete mode 100644 test/pos/bug66.scala delete mode 100644 test/pos/bug68.scala delete mode 100644 test/pos/bug69.scala delete mode 100644 test/pos/bug76.scala delete mode 100644 test/pos/bug81.scala delete mode 100644 test/pos/bug85.scala delete mode 100644 test/pos/bug91.scala delete mode 100644 test/pos/bug93.scala delete mode 100644 test/pos/cls.scala delete mode 100644 test/pos/cls1.scala delete mode 100644 test/pos/clsrefine.scala delete mode 100644 test/pos/compile.scala delete mode 100644 test/pos/compound.scala delete mode 100644 test/pos/constfold.scala delete mode 100644 test/pos/eta.scala delete mode 100644 test/pos/exceptions.scala delete mode 100644 test/pos/expressions-current.scala delete mode 100644 test/pos/gui.scala delete mode 100644 test/pos/imports.scala delete mode 100644 test/pos/infer.scala delete mode 100644 test/pos/infer2.scala delete mode 100644 test/pos/lambda.scala delete mode 100644 test/pos/lambdalift.scala delete mode 100644 test/pos/lambdalift1.scala delete mode 100644 test/pos/localmodules.scala delete mode 100644 test/pos/matthias1.scala delete mode 100644 test/pos/matthias3.scala delete mode 100644 test/pos/matthias4.scala delete mode 100644 test/pos/matthias5.scala delete mode 100644 test/pos/maxim1.scala delete mode 100644 test/pos/michel1.scala delete mode 100644 test/pos/michel2.scala delete mode 100644 test/pos/michel3.scala delete mode 100644 test/pos/michel4.scala delete mode 100644 test/pos/michel5.scala delete mode 100644 test/pos/michel6.scala delete mode 100644 test/pos/mixins.scala delete mode 100644 test/pos/modules.scala delete mode 100644 test/pos/modules1.scala delete mode 100644 test/pos/moduletrans.scala delete mode 100644 test/pos/nested.scala delete mode 100644 test/pos/null.scala delete mode 100644 test/pos/override.scala delete mode 100644 test/pos/partialfun.scala delete mode 100644 test/pos/patterns.scala delete mode 100644 test/pos/patterns1.scala delete mode 100644 test/pos/patterns2.scala delete mode 100644 test/pos/patterns3.scala delete mode 100644 test/pos/philippe1.scala delete mode 100644 test/pos/philippe2.scala delete mode 100644 test/pos/philippe3.scala delete mode 100644 test/pos/philippe4.scala delete mode 100644 test/pos/pmbug.scala delete mode 100644 test/pos/propagate.scala delete mode 100644 test/pos/rebind.scala delete mode 100644 test/pos/refine.scala delete mode 100644 test/pos/reftest.scala delete mode 100644 test/pos/scall.bat delete mode 100644 test/pos/scoping1.scala delete mode 100644 test/pos/scoping2.scala delete mode 100644 test/pos/scoping3.scala delete mode 100644 test/pos/seqtest2.scala delete mode 100644 test/pos/simplelists.scala delete mode 100644 test/pos/stable.scala delete mode 100644 test/pos/strings.scala delete mode 100644 test/pos/test1.scala delete mode 100644 test/pos/test2.scala delete mode 100644 test/pos/test4.scala delete mode 100644 test/pos/test4a.scala delete mode 100644 test/pos/test4refine.scala delete mode 100644 test/pos/test5.scala delete mode 100644 test/pos/test5refine.scala delete mode 100644 test/pos/thistype.scala delete mode 100644 test/pos/thistypes.scala delete mode 100644 test/pos/traits.scala delete mode 100644 test/pos/valdefs.scala delete mode 100644 test/pos/vincent.scala diff --git a/test/bin/scala-test b/test/bin/scala-test index 263cfdb1b5..b9ec9b68ff 100755 --- a/test/bin/scala-test +++ b/test/bin/scala-test @@ -537,10 +537,10 @@ main() { auto | xml ) FILES_XML="$FILES_XML $SRCDIR/xml";; esac; case "$TEST_TYPE" in - auto | pos ) FILES_POS="$FILES_POS $PREFIX/pos $PREFIX/cours";; + auto | pos ) FILES_POS="$FILES_POS $SRCDIR/pos";; esac; case "$TEST_TYPE" in - auto | neg ) FILES_NEG="$FILES_NEG $PREFIX/neg";; + auto | neg ) FILES_NEG="$FILES_NEG $SRCDIR/neg";; esac; case "$TEST_TYPE" in msil ) FILES_MSIL="$FILES_MSIL $SRCDIR/run";; diff --git a/test/neg/182.check b/test/neg/182.check deleted file mode 100644 index d5370cd43b..0000000000 --- a/test/neg/182.check +++ /dev/null @@ -1,5 +0,0 @@ -bug182.scala:2: error overriding class Foo.I in class Foo; - class Bar.I in class Bar cannot override a class -class Bar extends Foo { class I; } - ^ -one error found diff --git a/test/neg/S2.check b/test/neg/S2.check deleted file mode 100644 index cb6bb9c991..0000000000 --- a/test/neg/S2.check +++ /dev/null @@ -1,7 +0,0 @@ -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/neg/S2.scala b/test/neg/S2.scala deleted file mode 100644 index 47687a916a..0000000000 --- a/test/neg/S2.scala +++ /dev/null @@ -1,19 +0,0 @@ -/* I was wondering for a long time what types x and y have; -** the compiler claims: z.Inner (see commented out line) -** This is strange because z is not in scope. -** Furthermore, compilation of this class yields the message: (why?) -** -** S2.scala:16: illegal cyclic reference involving value t -** def t = foo(x, y); -** ^ -*/ -object M { - def foo[T](x: T, y: T): T = x; - class S2() { - class Inner() extends S2() {} - def x = { val z = new S2(); new z.Inner(); } - def y = { val z = new S2(); new z.Inner(); } - def t = foo(x, y); - //def testType: Inner = x; - } -} diff --git a/test/neg/S4.check b/test/neg/S4.check deleted file mode 100644 index c8de54cd39..0000000000 --- a/test/neg/S4.check +++ /dev/null @@ -1,4 +0,0 @@ -S4.scala:4: type a.type escapes its defining scope as part of a.Inner with scala.ScalaObject { def foo(a.Inner): a.Inner, val b$: Other, def b: Other } -class S4(a: Other) extends a.Inner() { - ^ -one error found diff --git a/test/neg/S4.scala b/test/neg/S4.scala deleted file mode 100644 index 4f7941082f..0000000000 --- a/test/neg/S4.scala +++ /dev/null @@ -1,11 +0,0 @@ -/* This one compiles, but even if we would have dependent -** constructor types, it would be not sound. -*/ -class S4(a: Other) extends a.Inner() { - def foo(x: a.Inner) = x; - val b = new Other(); - foo(new S4(b)) -} -class Other() { - class Inner() {} -} diff --git a/test/neg/S6.check b/test/neg/S6.check deleted file mode 100644 index 6303e4c8e2..0000000000 --- a/test/neg/S6.check +++ /dev/null @@ -1,4 +0,0 @@ -S6.scala:11: illegal cyclic reference involving type S - type S <: T; - ^ -one error found diff --git a/test/neg/S6.scala b/test/neg/S6.scala deleted file mode 100644 index dfe53d22bd..0000000000 --- a/test/neg/S6.scala +++ /dev/null @@ -1,12 +0,0 @@ -/* This program puts the compiler into an endless loop -*/ -trait T1 { - type T; -} -trait T2 { - type S; - type T <: S; -} -abstract class S6() extends T1 with T2 { - type S <: T; -} diff --git a/test/neg/S7.check b/test/neg/S7.check deleted file mode 100644 index c12c624cd7..0000000000 --- a/test/neg/S7.check +++ /dev/null @@ -1,4 +0,0 @@ -S7.scala:6: illegal cyclic reference involving class S7.A - class C() extends a.A() {} - ^ -one error found diff --git a/test/neg/S7.scala b/test/neg/S7.scala deleted file mode 100644 index ecb801b9dc..0000000000 --- a/test/neg/S7.scala +++ /dev/null @@ -1,7 +0,0 @@ -/* Another example for a non-terminating compiler run. -*/ -class S7[T]() { - val a: S7[T] = this; - class A() extends a.C() {} - class C() extends a.A() {} -} diff --git a/test/neg/abstract.check b/test/neg/abstract.check deleted file mode 100644 index 11d01ce3d9..0000000000 --- a/test/neg/abstract.check +++ /dev/null @@ -1,7 +0,0 @@ -abstract.scala:5: malformed type: A.this.T#T - def foo1 = bar().bar(); - ^ -abstract.scala:7: malformed type: A#T - def foo3 = baz().bar(); - ^ -two errors found diff --git a/test/neg/abstract.scala b/test/neg/abstract.scala deleted file mode 100644 index 41cfc81309..0000000000 --- a/test/neg/abstract.scala +++ /dev/null @@ -1,9 +0,0 @@ -trait A { - type T <: A; - def baz(): A; - def bar(): T; - def foo1 = bar().bar(); - def foo2 = bar().baz(); - def foo3 = baz().bar(); - def foo4 = baz().baz(); -} diff --git a/test/neg/altherr2.check b/test/neg/altherr2.check deleted file mode 100644 index 53eeb2c84c..0000000000 --- a/test/neg/altherr2.check +++ /dev/null @@ -1,4 +0,0 @@ -altherr2.scala:5: ';' expected but '[' found. - foo()[Int]; - ^ -one error found diff --git a/test/neg/altherr2.scala b/test/neg/altherr2.scala deleted file mode 100644 index 6ab26526f7..0000000000 --- a/test/neg/altherr2.scala +++ /dev/null @@ -1,7 +0,0 @@ -trait Foo[a]; - -object Bug { - def foo[a](): Foo[a] = foo[a](); - foo()[Int]; -} - diff --git a/test/neg/altherr3.check b/test/neg/altherr3.check deleted file mode 100644 index 1ee3655290..0000000000 --- a/test/neg/altherr3.check +++ /dev/null @@ -1,171 +0,0 @@ -altherr3.scala:26: no type parameters for method foo0 of type [a](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 - bar0[Int](foo0()); // error 1 - ^ -altherr3.scala:27: no type parameters for method foo0 of type [a](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](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](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 - ^ -altherr3.scala:32: no type parameters for method foo0 of type [a](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 - bar0[Foo[Int]](foo0(foo0())); // error 5 - ^ -altherr3.scala:33: no type parameters for method foo0 of type [a](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](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 - ^ -altherr3.scala:38: no type parameters for method foo0 of type [a](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 - bar0[Foo[Foo[Int]]](foo0(foo0(foo0()))); // error 8 - ^ -altherr3.scala:39: no type parameters for method foo0 of type [a](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 - ^ -altherr3.scala:49: no type parameters for method foo0 of type [a](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 - bar1[Int](foo0(foo0())); // error 10 - ^ -altherr3.scala:50: no type parameters for method foo0 of type [a](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](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 - ^ -altherr3.scala:55: no type parameters for method foo0 of type [a](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 - bar1[Foo[Int]](foo0(foo0(foo0()))); // error 13 - ^ -altherr3.scala:56: no type parameters for method foo0 of type [a](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 - ^ -altherr3.scala:61: no type parameters for method foo0 of type [a](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 - bar1[Foo[Foo[Int]]](foo0(foo0(foo0(foo0())))); // error 15 - ^ -altherr3.scala:72: no type parameters for method foo0 of type [a](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 - bar2[Int](foo0(foo0(foo0()))); // error 16 - ^ -altherr3.scala:73: no type parameters for method foo0 of type [a](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 - ^ -altherr3.scala:78: no type parameters for method foo0 of type [a](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 - bar2[Foo[Int]](foo0(foo0(foo0(foo0())))); // error 18 - ^ -altherr3.scala:95: no type parameters for method foo0 of type [a](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 - bar3[Int](foo0(foo0(foo0(foo0())))); // error 20 - ^ -altherr3.scala:116: no type parameters for method foo1 of type [a](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 - bar0[Int](foo1()); // error 21 - ^ -altherr3.scala:117: no type parameters for method foo1 of type [a](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](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](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 - ^ -altherr3.scala:122: no type parameters for method foo1 of type [a](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 - bar0[Foo[Int]](foo1(foo1())); // error 25 - ^ -altherr3.scala:123: no type parameters for method foo1 of type [a](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](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 - ^ -altherr3.scala:128: no type parameters for method foo1 of type [a](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 - bar0[Foo[Foo[Int]]](foo1(foo1(foo1()))); // error 28 - ^ -altherr3.scala:129: no type parameters for method foo1 of type [a](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 - ^ -altherr3.scala:139: no type parameters for method foo1 of type [a](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 - bar1[Int](foo1(foo1())); // error 30 - ^ -altherr3.scala:140: no type parameters for method foo1 of type [a](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](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 - ^ -altherr3.scala:145: no type parameters for method foo1 of type [a](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 - bar1[Foo[Int]](foo1(foo1(foo1()))); // error 33 - ^ -altherr3.scala:146: no type parameters for method foo1 of type [a](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 - ^ -altherr3.scala:151: no type parameters for method foo1 of type [a](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 - bar1[Foo[Foo[Int]]](foo1(foo1(foo1(foo1())))); // error 35 - ^ -34 errors found diff --git a/test/neg/altherr3.scala b/test/neg/altherr3.scala deleted file mode 100644 index 87f470db03..0000000000 --- a/test/neg/altherr3.scala +++ /dev/null @@ -1,154 +0,0 @@ -// $Id$ - -object bug { - - //########################################################################## - - trait Foo[+a]; - - def foo0[a](x: a*): Foo[a] = foo0(); - - val foo1: Int = 0; - def foo1[a](x: a*): Foo[a] = foo1(); - - def bar0[a](x: a): Int = 0; - def bar1[a](x: Foo[a]): Int = 0; - def bar2[a](x: Foo[Foo[a]]): Int = 0; - def bar3[a](x: Foo[Foo[Foo[a]]]): Int = 0; - - //########################################################################## - - bar0(foo0()); - bar0(foo0(foo0())); - bar0(foo0(foo0(foo0()))); - bar0(foo0(foo0(foo0(foo0())))); - - bar0[Int](foo0()); // error 1 - bar0[Int](foo0(foo0())); // error 2 - bar0[Int](foo0(foo0(foo0()))); // error 3 - bar0[Int](foo0(foo0(foo0(foo0())))); // error 4 - - bar0[Foo[Int]](foo0()); - bar0[Foo[Int]](foo0(foo0())); // error 5 - bar0[Foo[Int]](foo0(foo0(foo0()))); // error 6 - bar0[Foo[Int]](foo0(foo0(foo0(foo0())))); // error 7 - - bar0[Foo[Foo[Int]]](foo0()); - bar0[Foo[Foo[Int]]](foo0(foo0())); - bar0[Foo[Foo[Int]]](foo0(foo0(foo0()))); // error 8 - bar0[Foo[Foo[Int]]](foo0(foo0(foo0(foo0())))); // error 9 - - //########################################################################## - - bar1(foo0()); - bar1(foo0(foo0())); - bar1(foo0(foo0(foo0()))); - bar1(foo0(foo0(foo0(foo0())))); - - bar1[Int](foo0()); - bar1[Int](foo0(foo0())); // error 10 - bar1[Int](foo0(foo0(foo0()))); // error 11 - bar1[Int](foo0(foo0(foo0(foo0())))); // error 12 - - bar1[Foo[Int]](foo0()); - bar1[Foo[Int]](foo0(foo0())); - bar1[Foo[Int]](foo0(foo0(foo0()))); // error 13 - bar1[Foo[Int]](foo0(foo0(foo0(foo0())))); // error 14 - - bar1[Foo[Foo[Int]]](foo0()); - bar1[Foo[Foo[Int]]](foo0(foo0())); - bar1[Foo[Foo[Int]]](foo0(foo0(foo0()))); - bar1[Foo[Foo[Int]]](foo0(foo0(foo0(foo0())))); // error 15 - - //########################################################################## - - bar2(foo0()); - bar2(foo0(foo0())); - bar2(foo0(foo0(foo0()))); - bar2(foo0(foo0(foo0(foo0())))); - - bar2[Int](foo0()); - bar2[Int](foo0(foo0())); - bar2[Int](foo0(foo0(foo0()))); // error 16 - bar2[Int](foo0(foo0(foo0(foo0())))); // error 17 - - 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[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(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 20 - - bar3[Foo[Int]](foo0()); - bar3[Foo[Int]](foo0(foo0())); - bar3[Foo[Int]](foo0(foo0(foo0()))); - bar3[Foo[Int]](foo0(foo0(foo0(foo0())))); - - bar3[Foo[Foo[Int]]](foo0()); - bar3[Foo[Foo[Int]]](foo0(foo0())); - 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 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 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 28 - bar0[Foo[Foo[Int]]](foo1(foo0(foo1(foo1())))); // error 29 - - //########################################################################## - - bar1(foo1()); - bar1(foo1(foo1())); - bar1(foo1(foo1(foo1()))); - bar1(foo1(foo1(foo1(foo1())))); - - bar1[Int](foo1()); - 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 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 35 - - //########################################################################## -} diff --git a/test/neg/bounds.check b/test/neg/bounds.check deleted file mode 100644 index 461086194f..0000000000 --- a/test/neg/bounds.check +++ /dev/null @@ -1,4 +0,0 @@ -bounds.scala:11: type arguments [T] do not conform to constructor A's type parameter bounds [T >: I] -class B[T >: J](init: T) extends A[T](init) { - ^ -one error found diff --git a/test/neg/bounds.scala b/test/neg/bounds.scala deleted file mode 100644 index f9fbeaa674..0000000000 --- a/test/neg/bounds.scala +++ /dev/null @@ -1,12 +0,0 @@ -class I { - def i(): Unit = {} -} -class J extends I { - def j(): Unit = {} -} -class A[T >: I](init: T) { - var y: T = new B(); - class B() extends I {} -} -class B[T >: J](init: T) extends A[T](init) { -} diff --git a/test/neg/bug105.check b/test/neg/bug105.check deleted file mode 100644 index d0a980053a..0000000000 --- a/test/neg/bug105.check +++ /dev/null @@ -1,4 +0,0 @@ -bug105.scala:1: illegal inheritance from sealed class -object T extends Array[Int](1); - ^ -one error found diff --git a/test/neg/bug105.scala b/test/neg/bug105.scala deleted file mode 100644 index 08a7b2ac5b..0000000000 --- a/test/neg/bug105.scala +++ /dev/null @@ -1 +0,0 @@ -object T extends Array[Int](1); diff --git a/test/neg/bug106.check b/test/neg/bug106.check deleted file mode 100644 index b55e37ce3c..0000000000 --- a/test/neg/bug106.check +++ /dev/null @@ -1,4 +0,0 @@ -bug106.scala:2: Java class may not be used as mixin -class S extends T with Object; - ^ -one error found diff --git a/test/neg/bug106.scala b/test/neg/bug106.scala deleted file mode 100644 index bf705c9bf9..0000000000 --- a/test/neg/bug106.scala +++ /dev/null @@ -1,2 +0,0 @@ -class T extends AnyRef; -class S extends T with Object; diff --git a/test/neg/bug107.check b/test/neg/bug107.check deleted file mode 100644 index 5def0a4164..0000000000 --- a/test/neg/bug107.check +++ /dev/null @@ -1,4 +0,0 @@ -bug107.scala:4: class O needs to be abstract, since method foo in trait C is not defined -object O extends C { - ^ -one error found diff --git a/test/neg/bug107.scala b/test/neg/bug107.scala deleted file mode 100644 index 3bcb23e563..0000000000 --- a/test/neg/bug107.scala +++ /dev/null @@ -1,8 +0,0 @@ -trait C { - def foo: Int; -} -object O extends C { - def main(args: Array[String]) = { - System.out.println(foo); - } -} diff --git a/test/neg/bug108.check b/test/neg/bug108.check deleted file mode 100644 index 60330626c3..0000000000 --- a/test/neg/bug108.check +++ /dev/null @@ -1,4 +0,0 @@ -bug108.scala:3: x is already defined as value x - case x :: x => "first" - ^ -one error found diff --git a/test/neg/bug112.check b/test/neg/bug112.check deleted file mode 100644 index b01c2c6e8d..0000000000 --- a/test/neg/bug112.check +++ /dev/null @@ -1,4 +0,0 @@ -bug112.scala:6: T.A is not a legal prefix for a constructor - class D extends C; - ^ -one error found diff --git a/test/neg/bug112.scala b/test/neg/bug112.scala deleted file mode 100644 index 26a10c4e41..0000000000 --- a/test/neg/bug112.scala +++ /dev/null @@ -1,7 +0,0 @@ -object T { - class A { - class B; - } - type C = A#B; - class D extends C; -} diff --git a/test/neg/bug113.check b/test/neg/bug113.check deleted file mode 100644 index a9f699e90e..0000000000 --- a/test/neg/bug113.check +++ /dev/null @@ -1,7 +0,0 @@ -bug113.scala:3: illegal cyclic reference involving type A - type B <: A; - ^ -bug113.scala:2: only classes can have declared but undefined members - type A <: B; - ^ -two errors found diff --git a/test/neg/bug113.scala b/test/neg/bug113.scala deleted file mode 100644 index 62022b92c9..0000000000 --- a/test/neg/bug113.scala +++ /dev/null @@ -1,4 +0,0 @@ -object T { - type A <: B; - type B <: A; -} diff --git a/test/neg/bug117.check b/test/neg/bug117.check deleted file mode 100644 index f05e2e1c00..0000000000 --- a/test/neg/bug117.check +++ /dev/null @@ -1,10 +0,0 @@ -bug117.scala:2: '(' expected but '[' found. - def this[A](x: A, y: A) = { - ^ -bug117.scala:4: identifier expected but '}' found. - } - ^ -bug117.scala:5: illegal start of expression -} -^ -three errors found diff --git a/test/neg/bug117.scala b/test/neg/bug117.scala deleted file mode 100644 index 2c3cb65a08..0000000000 --- a/test/neg/bug117.scala +++ /dev/null @@ -1,5 +0,0 @@ -class C[A](x: A) { - def this[A](x: A, y: A) = { - this(x); - } -} diff --git a/test/neg/bug118.check b/test/neg/bug118.check deleted file mode 100644 index 1a44c754c6..0000000000 --- a/test/neg/bug118.check +++ /dev/null @@ -1,4 +0,0 @@ -bug118.scala:4: return outside method definition - return null; - ^ -one error found diff --git a/test/neg/bug118.scala b/test/neg/bug118.scala deleted file mode 100644 index 45f3ff6076..0000000000 --- a/test/neg/bug118.scala +++ /dev/null @@ -1,6 +0,0 @@ -class C(y: Int) { - def this() = { - this(1); - return null; - } -} diff --git a/test/neg/bug122.check b/test/neg/bug122.check deleted file mode 100644 index 9c49271882..0000000000 --- a/test/neg/bug122.check +++ /dev/null @@ -1,7 +0,0 @@ -bug122.scala:2: recursive value v$ needs type - val List(v:int,2) = List(2,v:int); - ^ -bug122.scala:3: recursive value ds$0$ needs type - val Pair(a:int,b:int) = Pair(1,a); - ^ -two errors found diff --git a/test/neg/bug122.scala b/test/neg/bug122.scala deleted file mode 100644 index f00c6874b8..0000000000 --- a/test/neg/bug122.scala +++ /dev/null @@ -1,4 +0,0 @@ -class L{ - val List(v:int,2) = List(2,v:int); - val Pair(a:int,b:int) = Pair(1,a); -} diff --git a/test/neg/bug128_129.check b/test/neg/bug128_129.check deleted file mode 100644 index 79b20ec4a5..0000000000 --- a/test/neg/bug128_129.check +++ /dev/null @@ -1,10 +0,0 @@ -bug128_129.scala:3: '=' expected but identifier found. - val x | 1 = 2; // not allowed - ^ -bug128_129.scala:3: illegal start of expression - val x | 1 = 2; // not allowed - ^ -bug128_129.scala:10: recursive patterns not allowed - case PT(a@PT(a)) => // not allowed - ^ -three errors found diff --git a/test/neg/bug128_129.scala b/test/neg/bug128_129.scala deleted file mode 100644 index afe4b8f332..0000000000 --- a/test/neg/bug128_129.scala +++ /dev/null @@ -1,15 +0,0 @@ -object Test { - def foo:int = { - val x | 1 = 2; // not allowed - x - } - - class Bar { - case class PT(x: PT) { - def foo(x: Any) = x match { - case PT(a@PT(a)) => // not allowed - } - } - } - -} diff --git a/test/neg/bug136.check b/test/neg/bug136.check deleted file mode 100644 index ea23cb313a..0000000000 --- a/test/neg/bug136.check +++ /dev/null @@ -1,9 +0,0 @@ -bug136.scala:5: type mismatch; - found : Bar - required: Foo - val foo2: Foo = bar; - ^ -bug136.scala:7: object bar does not implement Foo -object bar: Foo { - ^ -two errors found diff --git a/test/neg/bug144.check b/test/neg/bug144.check deleted file mode 100644 index 3342654b90..0000000000 --- a/test/neg/bug144.check +++ /dev/null @@ -1,4 +0,0 @@ -bug144.scala:2: trait I is inherited twice -class C with I with I; - ^ -one error found diff --git a/test/neg/bug144.scala b/test/neg/bug144.scala deleted file mode 100644 index 5702ed7224..0000000000 --- a/test/neg/bug144.scala +++ /dev/null @@ -1,2 +0,0 @@ -trait I; -class C with I with I; diff --git a/test/neg/bug145.check b/test/neg/bug145.check deleted file mode 100644 index 14e8334c0f..0000000000 --- a/test/neg/bug145.check +++ /dev/null @@ -1,4 +0,0 @@ -bug145.scala:8: symbol accessed from super may not be abstract - abstract override def foo(x: T): Int = super[J].foo(x) + 1; - ^ -one error found diff --git a/test/neg/bug145.scala b/test/neg/bug145.scala deleted file mode 100644 index da66ddba05..0000000000 --- a/test/neg/bug145.scala +++ /dev/null @@ -1,17 +0,0 @@ -class B[T] { - def foo(x: T): Int = 1; -} -trait J[T] { - def foo(x: T): Int; -} -trait I[T] extends B[T] with J[T] { - abstract override def foo(x: T): Int = super[J].foo(x) + 1; -} -class C extends B[Int] { - override def foo(x: Int): Int = x; -} -class D extends C with I[Int]; -object T with Application { - System.out.println((new D).foo(3)); -} - diff --git a/test/neg/bug152.check b/test/neg/bug152.check deleted file mode 100644 index 7b1f3262ce..0000000000 --- a/test/neg/bug152.check +++ /dev/null @@ -1,4 +0,0 @@ -bug152.scala:5: type foo.type escapes its defining scope as part of java.lang.Object with scala.ScalaObject { def a: foo.T } -class Bar(foo: Foo) { - ^ -one error found diff --git a/test/neg/bug152.scala b/test/neg/bug152.scala deleted file mode 100644 index c35fe00012..0000000000 --- a/test/neg/bug152.scala +++ /dev/null @@ -1,7 +0,0 @@ -abstract class Foo { - type T; -} - -class Bar(foo: Foo) { - def a: foo.T = a; -} diff --git a/test/neg/bug169.check b/test/neg/bug169.check deleted file mode 100644 index 4bd0c592fc..0000000000 --- a/test/neg/bug169.check +++ /dev/null @@ -1,7 +0,0 @@ -bug169.scala:8: not found: type TIMEOUT - case TIMEOUT() => { - ^ -bug169.scala:9: value ! is not a member of java.lang.Process - Child ! 'foo; - ^ -two errors found diff --git a/test/neg/bug169.scala b/test/neg/bug169.scala deleted file mode 100644 index 28f1853a68..0000000000 --- a/test/neg/bug169.scala +++ /dev/null @@ -1,14 +0,0 @@ -import scala.concurrent.Process._; - -class D() { - def start_listener(Child:Process) = { - var running = true; - while (running) { - receiveWithin(0) { - case TIMEOUT() => { - Child ! 'foo; - } - } - } - } -} diff --git a/test/neg/bug170.check b/test/neg/bug170.check deleted file mode 100644 index 544ed9591b..0000000000 --- a/test/neg/bug170.check +++ /dev/null @@ -1,4 +0,0 @@ -bug170.scala:9: class D needs to be abstract, since method foo in class D is marked `abstract' and `override' and overrides an incomplete superclass member in J -class D extends J with I { - ^ -one error found diff --git a/test/neg/bug170.scala b/test/neg/bug170.scala deleted file mode 100644 index 8e66a2e451..0000000000 --- a/test/neg/bug170.scala +++ /dev/null @@ -1,15 +0,0 @@ -trait J { - def foo(): Unit; -} - -trait I with J { - override def foo(): Unit = (); -} - -class D extends J with I { - abstract override def foo(): Unit = super.foo(); -} - -object Test with Application { - (new D).foo(); -} diff --git a/test/neg/bug191.check b/test/neg/bug191.check deleted file mode 100644 index 82681f970b..0000000000 --- a/test/neg/bug191.check +++ /dev/null @@ -1,6 +0,0 @@ -bug191.scala:11: type mismatch; - found : B.this.C - required: B.this.C - foo(new C); - ^ -one error found diff --git a/test/neg/bug191.scala b/test/neg/bug191.scala deleted file mode 100644 index 21e45b88e0..0000000000 --- a/test/neg/bug191.scala +++ /dev/null @@ -1,15 +0,0 @@ -class A { - private class C { - def print = Console.println("A.C"); - } - def foo(c: C) = c.print; -} -class B extends A { - class C { - def show = Console.println("B.C"); - } - foo(new C); -} -object Main with Application { - val b = new B; -} diff --git a/test/neg/bug228.check b/test/neg/bug228.check deleted file mode 100644 index a099f9fa0e..0000000000 --- a/test/neg/bug228.check +++ /dev/null @@ -1,4 +0,0 @@ -bug228.scala:11: constructor java.lang.reflect.AccessibleObject cannot be accessed in Foo - val o = new AccessibleObject; - ^ -one error found diff --git a/test/neg/bug228.scala b/test/neg/bug228.scala deleted file mode 100644 index 55e4a8f818..0000000000 --- a/test/neg/bug228.scala +++ /dev/null @@ -1,13 +0,0 @@ -import java.lang.reflect.AccessibleObject; - -class Test extends AccessibleObject { - - val o = new AccessibleObject; - -} - -class Foo { - - val o = new AccessibleObject; - -} diff --git a/test/neg/bug236.check b/test/neg/bug236.check deleted file mode 100644 index 6c1b463d68..0000000000 --- a/test/neg/bug236.check +++ /dev/null @@ -1,4 +0,0 @@ -bug236.scala:4: constructor A of type ()A cannot be applied to (scala.Int) - class B extends A(1) { - ^ -one error found diff --git a/test/neg/bug236.scala b/test/neg/bug236.scala deleted file mode 100644 index d109bab616..0000000000 --- a/test/neg/bug236.scala +++ /dev/null @@ -1,6 +0,0 @@ - class A { - private def this(i: Int) = this(); - } - class B extends A(1) { - val a = new A(1); - } diff --git a/test/neg/bug25.check b/test/neg/bug25.check deleted file mode 100644 index c620e8498f..0000000000 --- a/test/neg/bug25.check +++ /dev/null @@ -1,4 +0,0 @@ -bug25.scala:5: constructor javax.rmi.PortableRemoteObject cannot be accessed in javax.rmi -class A extends javax.rmi.PortableRemoteObject(); - ^ -one error found diff --git a/test/neg/bug38.check b/test/neg/bug38.check deleted file mode 100644 index 8f053cfaa8..0000000000 --- a/test/neg/bug38.check +++ /dev/null @@ -1,7 +0,0 @@ -bug38.scala:3: * is not a member of scala.xml - import scala.xml.* ; // does not work - ^ -bug38.scala:7: not found: type Element - val foo = new Element { def getName = "hallo"; def getChildren = Nil; def getAttribs = new HashMap[String,String] }; - ^ -two errors found diff --git a/test/neg/bug38.scala b/test/neg/bug38.scala deleted file mode 100644 index 8f31ad9a0e..0000000000 --- a/test/neg/bug38.scala +++ /dev/null @@ -1,11 +0,0 @@ -object testElem { - - import scala.xml.* ; // does not work - //import scala.xml.Element ; //works - - def main( args:Array[String] ) = { - val foo = new Element { def getName = "hallo"; def getChildren = Nil; def getAttribs = new HashMap[String,String] }; - () - } - -} diff --git a/test/neg/bug40.check b/test/neg/bug40.check deleted file mode 100644 index fd46531832..0000000000 --- a/test/neg/bug40.check +++ /dev/null @@ -1,10 +0,0 @@ -bug40.scala:2: 'val' expected but integer literal found. - val v = for (1 == 0) yield 1; - ^ -bug40.scala:3: illegal start of pattern -} -^ -bug40.scala:2: '<-' expected but '}' found. - val v = for (1 == 0) yield 1; - ^ -three errors found diff --git a/test/neg/bug40.scala b/test/neg/bug40.scala deleted file mode 100644 index a60a12531d..0000000000 --- a/test/neg/bug40.scala +++ /dev/null @@ -1,3 +0,0 @@ -object M { - val v = for (1 == 0) yield 1; -} diff --git a/test/neg/bug43.check b/test/neg/bug43.check deleted file mode 100644 index ffc0e8c0a2..0000000000 --- a/test/neg/bug43.check +++ /dev/null @@ -1,4 +0,0 @@ -bug43.scala:1: class C takes type parameters. -case class C[A >: C](x: A) {} - ^ -one error found diff --git a/test/neg/bug43.scala b/test/neg/bug43.scala deleted file mode 100644 index 013a74cc97..0000000000 --- a/test/neg/bug43.scala +++ /dev/null @@ -1 +0,0 @@ -case class C[A >: C](x: A) {} diff --git a/test/neg/bug44.check b/test/neg/bug44.check deleted file mode 100644 index d40af82749..0000000000 --- a/test/neg/bug44.check +++ /dev/null @@ -1,6 +0,0 @@ -bug44.scala:2: type mismatch; - found : java.lang.Object - required: java.lang.Object { def t: scala.Int } - var x: Object { def t: Int; } = new Object() { - ^ -one error found diff --git a/test/neg/bug44.scala b/test/neg/bug44.scala deleted file mode 100644 index 7989838250..0000000000 --- a/test/neg/bug44.scala +++ /dev/null @@ -1,5 +0,0 @@ -abstract class C { - var x: Object { def t: Int; } = new Object() { - def t: Int = 1; - } -} diff --git a/test/neg/bug45.check b/test/neg/bug45.check deleted file mode 100644 index 530bd78c42..0000000000 --- a/test/neg/bug45.check +++ /dev/null @@ -1,6 +0,0 @@ -bug45.scala:4: type mismatch; - found : scala.AllRef - required: Int - def foo[Int](x: Int): Int = null; - ^ -one error found diff --git a/test/neg/bug45.scala b/test/neg/bug45.scala deleted file mode 100644 index 8e5e55c274..0000000000 --- a/test/neg/bug45.scala +++ /dev/null @@ -1,10 +0,0 @@ -object Main { - - def main(args: Array[String]) = { - def foo[Int](x: Int): Int = null; - val y1 = null; - val y2 = foo(2); - () - } - -} diff --git a/test/neg/bug47.check b/test/neg/bug47.check deleted file mode 100644 index b0fb48f909..0000000000 --- a/test/neg/bug47.check +++ /dev/null @@ -1,7 +0,0 @@ -bug47.scala:8: malformed formal parameter list - val factory = new HashMap( String, Elem* => Elem ) - ^ -bug47.scala:9: ';' expected but '.' found. - factory.put("MySuperXML_Tag", MySuperXML_Tag ) - ^ -two errors found diff --git a/test/neg/bug47.scala b/test/neg/bug47.scala deleted file mode 100644 index fac1037802..0000000000 --- a/test/neg/bug47.scala +++ /dev/null @@ -1,13 +0,0 @@ -// this is not possible - -object Test { - - class Elem; - class MySuperXML_Tag( children: Elem* ) extends Elem; - - val factory = new HashMap( String, Elem* => Elem ) - factory.put("MySuperXML_Tag", MySuperXML_Tag ) -// ^ -// error "methods with repeated args have to be -// fully applied" -} diff --git a/test/neg/bug52.check b/test/neg/bug52.check deleted file mode 100644 index cd4b5eccce..0000000000 --- a/test/neg/bug52.check +++ /dev/null @@ -1,6 +0,0 @@ -bug52.scala:3: type mismatch; - found : scala.Any - required: scala.Int - val y: Int = x(2); - ^ -one error found diff --git a/test/neg/bug52.scala b/test/neg/bug52.scala deleted file mode 100644 index e171022eb6..0000000000 --- a/test/neg/bug52.scala +++ /dev/null @@ -1,4 +0,0 @@ -object test { - val x = if (2 == 3) (x: Int => 0) else (x: Int => ""); - val y: Int = x(2); -} diff --git a/test/neg/bug58.check b/test/neg/bug58.check deleted file mode 100644 index 0dff5495cf..0000000000 --- a/test/neg/bug58.check +++ /dev/null @@ -1,4 +0,0 @@ -bug58.scala:1: type x.type escapes its defining scope as part of x.C with scala.ScalaObject -class A(x: B) extends x.C {} - ^ -one error found diff --git a/test/neg/bug58.scala b/test/neg/bug58.scala deleted file mode 100644 index d7b5d431bb..0000000000 --- a/test/neg/bug58.scala +++ /dev/null @@ -1,4 +0,0 @@ -class A(x: B) extends x.C {} -class B { - class C {} -} diff --git a/test/neg/bug63.check b/test/neg/bug63.check deleted file mode 100644 index 51b7c65bd1..0000000000 --- a/test/neg/bug63.check +++ /dev/null @@ -1,4 +0,0 @@ -bug63.scala:2: covariant type T occurs in contravariant position in type T of value elem - def set(elem: T): Unit = (); - ^ -one error found diff --git a/test/neg/bug63.scala b/test/neg/bug63.scala deleted file mode 100644 index fc33f11e61..0000000000 --- a/test/neg/bug63.scala +++ /dev/null @@ -1,3 +0,0 @@ -class C[+T] { - def set(elem: T): Unit = (); -} diff --git a/test/neg/bug67.check b/test/neg/bug67.check deleted file mode 100644 index 1a1990c311..0000000000 --- a/test/neg/bug67.check +++ /dev/null @@ -1,11 +0,0 @@ -bug67.scala:15: constructor cannot be instantiated to expected type; - found : D.this.ITree[A?,B?] - required: D.this.InsertTree[A,B] - val ITree(t1) = insert_1(key, value, tree, s); - ^ -bug67.scala:19: no type parameters for method INode of type [A,B](D.this.Tree[A,B],scala.Int,scala.Int)D.this.INode[A,B] exist so that it can be applied to arguments (D.this.Tree[A,B],scala.Int,scala.Int) - --- because --- -result type D.this.INode[A,B] is incompatible with expected type D.this.InsertTree[A,B] - INode(t0,1,s); - ^ -two errors found diff --git a/test/neg/bug67.scala b/test/neg/bug67.scala deleted file mode 100644 index 48229defaa..0000000000 --- a/test/neg/bug67.scala +++ /dev/null @@ -1,21 +0,0 @@ -class D[A <: Ord[A],B] { - abstract class Tree[A <: Ord[A],B](); - case class Node[A,B](key:A,value:B,smaller:Tree[A,B],bigger:Tree[A,B]) - extends Tree[A,B]; - case class Nil[A,B]() extends Tree[A,B]; - - - abstract case class InsertTree[A,B](); - case class ITree[A,B](t:Tree[A,B]); // forgot extends InsertTree[A,B]; - case class INode[A,B](t:Tree[A,B],height:int,size:int); // forgot extends InsertTree[A,B]; - val tree:Tree[A,B] = Nil(); - val s = 0; - - def insert(key:A, value:B) = { - val ITree(t1) = insert_1(key, value, tree, s); - } - - def insert_1(key:A, value:B, t0:Tree[A,B], s:int):InsertTree[A,B] = { - INode(t0,1,s); - } -} diff --git a/test/neg/bug72.check b/test/neg/bug72.check deleted file mode 100644 index 5338fcc2c6..0000000000 --- a/test/neg/bug72.check +++ /dev/null @@ -1,4 +0,0 @@ -bug72.scala:5: object scala.collection.mutable.Set of type scala.collection.mutable.Set cannot be applied to (java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String) with expected result type scala.collection.mutable.Set[java.lang.String] - val weekDays : Set[String] = Set("Mon", "Tue", "Wed", "Thu", "Fri"); - ^ -one error found diff --git a/test/neg/bug72.scala b/test/neg/bug72.scala deleted file mode 100644 index 94d0b97e2b..0000000000 --- a/test/neg/bug72.scala +++ /dev/null @@ -1,7 +0,0 @@ -import scala.collection.mutable._; - -object Composites { - def main(args: Array[String]) = { - val weekDays : Set[String] = Set("Mon", "Tue", "Wed", "Thu", "Fri"); - } -} diff --git a/test/neg/bug74.check b/test/neg/bug74.check deleted file mode 100644 index dec69cd35f..0000000000 --- a/test/neg/bug74.check +++ /dev/null @@ -1,4 +0,0 @@ -bug74.scala:2: Int is not an enclosing class - def f = Int.super.hashCode; - ^ -one error found diff --git a/test/neg/bug74.scala b/test/neg/bug74.scala deleted file mode 100644 index 8e1301e5b9..0000000000 --- a/test/neg/bug74.scala +++ /dev/null @@ -1,3 +0,0 @@ -class A { - def f = Int.super.hashCode; -} diff --git a/test/neg/bug75.check b/test/neg/bug75.check deleted file mode 100644 index a988ebe40c..0000000000 --- a/test/neg/bug75.check +++ /dev/null @@ -1,5 +0,0 @@ -bug75.scala:6: value tree of type F.this.Nil[A] - cannot override value tree in class F of type scala.AllRef - new F[A](){ override val tree=t;}; - ^ -one error found diff --git a/test/neg/bug75.scala b/test/neg/bug75.scala deleted file mode 100644 index b0dc4408e1..0000000000 --- a/test/neg/bug75.scala +++ /dev/null @@ -1,12 +0,0 @@ -class F[A]() { - case class Nil[B]() {} - - val tree = null; - protected def mkF[A](t:Nil[A]) = - new F[A](){ override val tree=t;}; - - def update = { - mkF(Nil()); - } - -} diff --git a/test/neg/bug86.check b/test/neg/bug86.check deleted file mode 100644 index 9ef489429c..0000000000 --- a/test/neg/bug86.check +++ /dev/null @@ -1,4 +0,0 @@ -bug86.scala:4: trait Foo is abstract, so it cannot be instantiated - new Foo(); - ^ -one error found diff --git a/test/neg/bug86.scala b/test/neg/bug86.scala deleted file mode 100644 index a11f49aa90..0000000000 --- a/test/neg/bug86.scala +++ /dev/null @@ -1,7 +0,0 @@ -trait Foo(); - -object foo { - new Foo(); - new Foo(){}; - new Foo(){0}; -} diff --git a/test/neg/bug87.check b/test/neg/bug87.check deleted file mode 100644 index 595ba64ee4..0000000000 --- a/test/neg/bug87.check +++ /dev/null @@ -1,4 +0,0 @@ -bug87.scala:2: type C is not a member of foo - new foo.C; - ^ -one error found diff --git a/test/neg/bug87.scala b/test/neg/bug87.scala deleted file mode 100644 index 8e9a84928f..0000000000 --- a/test/neg/bug87.scala +++ /dev/null @@ -1,3 +0,0 @@ -object foo { - new foo.C; -} diff --git a/test/neg/bug95.check b/test/neg/bug95.check deleted file mode 100644 index 8dd3507cd9..0000000000 --- a/test/neg/bug95.check +++ /dev/null @@ -1,15 +0,0 @@ -bug95.scala:1: illegal inheritance from sealed class -class C extends AnyVal; - ^ -bug95.scala:1: illegal inheritance; - scala.AnyVal does not conform to scala.ScalaObject's supertype -class C extends AnyVal; - ^ -bug95.scala:2: illegal inheritance from sealed class -class T extends Unit; - ^ -bug95.scala:2: illegal inheritance; - scala.Unit does not conform to scala.ScalaObject's supertype -class T extends Unit; - ^ -four errors found diff --git a/test/neg/bug95.scala b/test/neg/bug95.scala deleted file mode 100644 index 9893d7f5a4..0000000000 --- a/test/neg/bug95.scala +++ /dev/null @@ -1,2 +0,0 @@ -class C extends AnyVal; -class T extends Unit; diff --git a/test/neg/bug96.check b/test/neg/bug96.check deleted file mode 100644 index 1ceaa84a94..0000000000 --- a/test/neg/bug96.check +++ /dev/null @@ -1,4 +0,0 @@ -bug96.scala:5: method foo overrides nothing - override def foo(def x: Any): Object = null; - ^ -one error found diff --git a/test/neg/bug96.scala b/test/neg/bug96.scala deleted file mode 100644 index 4694e9edc7..0000000000 --- a/test/neg/bug96.scala +++ /dev/null @@ -1,6 +0,0 @@ -class A { - def foo(x: Any): Object = null; -} -class B extends A { - override def foo(def x: Any): Object = null; -} diff --git a/test/neg/bug97.check b/test/neg/bug97.check deleted file mode 100644 index cc620b3650..0000000000 --- a/test/neg/bug97.check +++ /dev/null @@ -1,4 +0,0 @@ -bug97.scala:3: expected pattern type scala.Any does not conform to sequence trait scala.List - case List(y) => "zero" - ^ -one error found diff --git a/test/neg/bug97.scala b/test/neg/bug97.scala deleted file mode 100644 index c9bfebcfa0..0000000000 --- a/test/neg/bug97.scala +++ /dev/null @@ -1,7 +0,0 @@ -object Main { - def foo(x: Any) = x match { - case List(y) => "zero" - case y :: ys => "one" - } - def main(args: Array[String]) = System.out.println(List(1, 2)); -} diff --git a/test/neg/constrparams.check b/test/neg/constrparams.check deleted file mode 100644 index 6aef035af0..0000000000 --- a/test/neg/constrparams.check +++ /dev/null @@ -1,9 +0,0 @@ -constrparams.scala:4: type mismatch; - found : scala.AllRef - required: x.t - private val z: x.t = null; //error - ^ -constrparams.scala:1: type x.type escapes its defining scope as part of java.lang.Object with scala.ScalaObject { type t, val y$: x.type, def y: x.type, val z$: x.t, def z: x.t } -abstract class C(x: C) { - ^ -two errors found diff --git a/test/neg/constrparams.scala b/test/neg/constrparams.scala deleted file mode 100644 index f6b037b312..0000000000 --- a/test/neg/constrparams.scala +++ /dev/null @@ -1,6 +0,0 @@ -abstract class C(x: C) { - type t; - private val y: x.type = x; - private val z: x.t = null; //error -} - diff --git a/test/neg/cyclic.check b/test/neg/cyclic.check deleted file mode 100644 index 2c23c8b26a..0000000000 --- a/test/neg/cyclic.check +++ /dev/null @@ -1,4 +0,0 @@ -cyclic.scala:3: illegal cyclic reference involving type T - type T = List[T]; - ^ -one error found diff --git a/test/neg/cyclic.scala b/test/neg/cyclic.scala deleted file mode 100644 index 423fa70094..0000000000 --- a/test/neg/cyclic.scala +++ /dev/null @@ -1,6 +0,0 @@ -abstract class test { - - type T = List[T]; - type U <: List[U]; - -} diff --git a/test/neg/dep.check b/test/neg/dep.check deleted file mode 100644 index f6a2361121..0000000000 --- a/test/neg/dep.check +++ /dev/null @@ -1,4 +0,0 @@ -dep.scala:5: type x.type escapes its defining scope as part of x.t - def foo(x: C, y: x.t): Object = null; - ^ -one error found diff --git a/test/neg/dep.scala b/test/neg/dep.scala deleted file mode 100644 index 83c005b860..0000000000 --- a/test/neg/dep.scala +++ /dev/null @@ -1,6 +0,0 @@ -object Test { - abstract class C { - type t; - } - def foo(x: C, y: x.t): Object = null; -} \ No newline at end of file diff --git a/test/neg/imports.check b/test/neg/imports.check deleted file mode 100644 index 911d300c6f..0000000000 --- a/test/neg/imports.check +++ /dev/null @@ -1,28 +0,0 @@ -imports.scala:26: not found: value v_coi - def method: C_coi = v_coi; - ^ -imports.scala:27: not found: value v_coi - val field: C_coi = v_coi; - ^ -imports.scala:29: not found: value v_coi - check("C_coi", "v_coi ", v_coi); - ^ -imports.scala:47: not found: value v_cio - def method: C_cio = v_cio; - ^ -imports.scala:48: not found: value v_cio - val field: C_cio = v_cio; - ^ -imports.scala:50: not found: value v_cio - check("C_cio", "v_cio ", v_cio); - ^ -imports.scala:136: not found: value v_oci - def method: C_oci = v_oci; - ^ -imports.scala:137: not found: value v_oci - val field: C_oci = v_oci; - ^ -imports.scala:139: not found: value v_oci - check("C_oci", "v_oci ", v_oci); - ^ -9 errors found diff --git a/test/neg/imports.scala b/test/neg/imports.scala deleted file mode 100644 index 806253ffb1..0000000000 --- a/test/neg/imports.scala +++ /dev/null @@ -1,161 +0,0 @@ -//############################################################################ -// Import statements -//############################################################################ -// $Id$ - -//############################################################################ - -object checker { - def check(where: String, what: String, value: Any): Unit = { - System.out.print("In " + where + ", " + what + ".toString() returns "); - System.out.flush(); - val string: String = if (value == null) "null" else value.toString(); - val test = if (string == where) "ok" else "KO"; - System.out.println(string + " -> " + test); - System.out.flush(); - } -} - -import checker.check; - -//############################################################################ - -class C_coi() { - o_coi.v_coi = this; - override def toString(): String = "C_coi"; - def method: C_coi = v_coi; - val field: C_coi = v_coi; - - check("C_coi", "v_coi ", v_coi); - check("C_coi", "field ", field); - check("C_coi", "method", method); - System.out.println(); -} - -object o_coi { - var v_coi: C_coi = null; - new C_coi(); -} - -import o_coi.v_coi; - -//############################################################################ - -class C_cio() { - o_cio.v_cio = this; - override def toString(): String = "C_cio"; - def method: C_cio = v_cio; - val field: C_cio = v_cio; - - check("C_cio", "v_cio ", v_cio); - check("C_cio", "field ", field); - check("C_cio", "method", method); - System.out.println(); -} - -import o_cio.v_cio; - -object o_cio { - var v_cio: C_cio = null; - new C_cio(); -} - -//############################################################################ - -import o_ico.v_ico; - -class C_ico() { - o_ico.v_ico = this; - override def toString(): String = "C_ico"; - def method: C_ico = v_ico; - val field: C_ico = v_ico; - - check("C_ico", "v_ico ", v_ico); - check("C_ico", "field ", field); - check("C_ico", "method", method); - System.out.println(); -} - -object o_ico { - var v_ico: C_ico = null; - new C_ico(); -} - -//############################################################################ - -import o_ioc.v_ioc; - -object o_ioc { - var v_ioc: C_ioc = null; - new C_ioc(); -} - -class C_ioc() { - o_ioc.v_ioc = this; - override def toString(): String = "C_ioc"; - def method: C_ioc = v_ioc; - val field: C_ioc = v_ioc; - - check("C_ioc", "v_ioc ", v_ioc); - check("C_ioc", "field ", field); - check("C_ioc", "method", method); - System.out.println(); -} - -//############################################################################ - -object o_oic { - var v_oic: C_oic = null; - new C_oic(); -} - -import o_oic.v_oic; - -class C_oic() { - o_oic.v_oic = this; - override def toString(): String = "C_oic"; - def method: C_oic = v_oic; - val field: C_oic = v_oic; - - check("C_oic", "v_oic ", v_oic); - check("C_oic", "field ", field); - check("C_oic", "method", method); - System.out.println(); -} - -//############################################################################ - -object o_oci { - var v_oci: C_oci = null; - new C_oci(); -} - -class C_oci() { - o_oci.v_oci = this; - override def toString(): String = "C_oci"; - def method: C_oci = v_oci; - val field: C_oci = v_oci; - - check("C_oci", "v_oci ", v_oci); - check("C_oci", "field ", field); - check("C_oci", "method", method); - System.out.println(); -} - -import o_oci.v_oci; - -//############################################################################ - -object Test { - def main(args: Array[String]): Unit = { - o_coi; - o_cio; - o_ico; - o_ioc; - o_oic; - o_oci; - () - } -} - -//############################################################################ diff --git a/test/neg/matthias2.check b/test/neg/matthias2.check deleted file mode 100644 index b9a6d799f9..0000000000 --- a/test/neg/matthias2.check +++ /dev/null @@ -1,4 +0,0 @@ -matthias2.scala:7: illegal cyclic reference involving value y - override val y: T; - ^ -one error found diff --git a/test/neg/matthias2.scala b/test/neg/matthias2.scala deleted file mode 100644 index ab9296798f..0000000000 --- a/test/neg/matthias2.scala +++ /dev/null @@ -1,8 +0,0 @@ -class A() { - val x: A = this; - val y: x.type = x; - type T = y.type; -} -abstract class B() extends A() { - override val y: T; -} diff --git a/test/neg/michel2.check b/test/neg/michel2.check deleted file mode 100644 index 3317c40f61..0000000000 --- a/test/neg/michel2.check +++ /dev/null @@ -1,4 +0,0 @@ -michel2.scala:1: Java class may not be used as mixin -class A() extends java.lang.Object() with java.util.Random() { } - ^ -one error found diff --git a/test/neg/michel2.scala b/test/neg/michel2.scala deleted file mode 100644 index 4afbb30852..0000000000 --- a/test/neg/michel2.scala +++ /dev/null @@ -1 +0,0 @@ -class A() extends java.lang.Object() with java.util.Random() { } diff --git a/test/neg/overlapping.check b/test/neg/overlapping.check deleted file mode 100644 index 68251d32f7..0000000000 --- a/test/neg/overlapping.check +++ /dev/null @@ -1,6 +0,0 @@ -overlapping.scala:9: overlapping overloaded alternatives; the two following alternatives of method foo have the same erasure: ()Any - alternative 1: def foo: X.this.I - alternative 2: def foo: X.this.J - def foo: J; - ^ -one error found diff --git a/test/neg/overlapping.scala b/test/neg/overlapping.scala deleted file mode 100644 index 1c4a82ef79..0000000000 --- a/test/neg/overlapping.scala +++ /dev/null @@ -1,10 +0,0 @@ -// Tests detection of overlapping erased signatures - -// $Id$ - -trait X { - type I; - type J; - def foo: I; - def foo: J; -} diff --git a/test/neg/overload.check b/test/neg/overload.check deleted file mode 100644 index 011f10de7f..0000000000 --- a/test/neg/overload.check +++ /dev/null @@ -1,19 +0,0 @@ -overload.scala:15: x is already defined as value x in class Test - var x: int = 3; - ^ -overload.scala:5: foo is already defined in local scope - def foo() = 2; - ^ -overload.scala:11: ambiguous reference to overloaded definition, -both method foo: ()scala.Int -and method foo: ()scala.Int -match argument types () - foo(); - ^ -overload.scala:13: ambiguous reference to overloaded definition, -both value x$: scala.Int -and variable x$: scala.Int -match expected type scala.Int - val x: int = 1; - ^ -four errors found diff --git a/test/neg/overload.scala b/test/neg/overload.scala deleted file mode 100644 index 4add2e68bb..0000000000 --- a/test/neg/overload.scala +++ /dev/null @@ -1,17 +0,0 @@ -class Test { - - { - def foo() = 1; - def foo() = 2; - foo() - } - - def foo() = 1; - def foo() = 2; - foo(); - - val x: int = 1; - def x(): int = 2; - var x: int = 3; - -} diff --git a/test/neg/protected.check b/test/neg/protected.check deleted file mode 100644 index 23a5865dab..0000000000 --- a/test/neg/protected.check +++ /dev/null @@ -1,5 +0,0 @@ -protected.scala:11: error overriding method y in class A; - method y in class B has weaker access privileges; it should not be protected - protected def y(): int; - ^ -one error found diff --git a/test/neg/protected.scala b/test/neg/protected.scala deleted file mode 100644 index 668317e139..0000000000 --- a/test/neg/protected.scala +++ /dev/null @@ -1,14 +0,0 @@ -abstract class A { - - protected def x(): int; - def y(): int; - -} - -abstract class B extends A { - - def x(): int; - protected def y(): int; - -} - diff --git a/test/neg/refine.check b/test/neg/refine.check deleted file mode 100644 index 18f4fad76a..0000000000 --- a/test/neg/refine.check +++ /dev/null @@ -1,6 +0,0 @@ -refine.scala:3: type mismatch; - found : java.lang.Object - required: java.lang.Object { def t(): java.lang.String } - val x: Object { def t(): String } = new Object { - ^ -one error found diff --git a/test/neg/refine.scala b/test/neg/refine.scala deleted file mode 100644 index 5d175f26f5..0000000000 --- a/test/neg/refine.scala +++ /dev/null @@ -1,6 +0,0 @@ -object test { - - val x: Object { def t(): String } = new Object { - def t(): String = "1"; - } -} diff --git a/test/neg/seqtest.check b/test/neg/seqtest.check deleted file mode 100644 index 42d3a71a9c..0000000000 --- a/test/neg/seqtest.check +++ /dev/null @@ -1,7 +0,0 @@ -seqtest.scala:11: ambiguous reference to overloaded definition, -both method L: [a](scala.Seq[a])scala.Seq[a] -and method L: [a](a*)scala.Seq[a] -match argument types (scala.Seq[scala.Int]) - val c = L(a); - ^ -one error found diff --git a/test/neg/seqtest.scala b/test/neg/seqtest.scala deleted file mode 100644 index f61903c87b..0000000000 --- a/test/neg/seqtest.scala +++ /dev/null @@ -1,13 +0,0 @@ -object test { - - def L[a](xs: a*): Seq[a] = xs; - - def L[a](xs: Seq[a]): Seq[a] = xs; - - val a = L(1); - - val b = L(1, 2, 3); - - val c = L(a); - -} diff --git a/test/neg/stable.check b/test/neg/stable.check deleted file mode 100644 index eaa64ef62a..0000000000 --- a/test/neg/stable.check +++ /dev/null @@ -1,7 +0,0 @@ -stable.scala:10: stable identifier required, but test.y found. - type b = y.T; - ^ -stable.scala:11: stable identifier required, but test.z found. - type c = z.T; - ^ -two errors found diff --git a/test/neg/stable.scala b/test/neg/stable.scala deleted file mode 100644 index ba051cd0e4..0000000000 --- a/test/neg/stable.scala +++ /dev/null @@ -1,17 +0,0 @@ -abstract class C { type T; val next: C = this } - -object test { - - val x: C = new C { type T = int }; - var y: C = x; - def z: C = x; - - type a = x.T; - type b = y.T; - type c = z.T; - type d = x.next.next.T; - - import x.T; - - type e = T; -} diff --git a/test/neg/vincent1.check b/test/neg/vincent1.check deleted file mode 100644 index aa65a52341..0000000000 --- a/test/neg/vincent1.check +++ /dev/null @@ -1,7 +0,0 @@ -vincent1.scala:7: type x.type escapes its defining scope as part of java.lang.Object with scala.ScalaObject { type T = x.T } - class Functor(x: A) { type T = x.T } - ^ -vincent1.scala:9: type x.type escapes its defining scope as part of test.B { type T = x.T } - def functor(x: A): B { type T = x.T } = - ^ -two errors found diff --git a/test/neg/vincent1.scala b/test/neg/vincent1.scala deleted file mode 100644 index fb047305ff..0000000000 --- a/test/neg/vincent1.scala +++ /dev/null @@ -1,19 +0,0 @@ -object test { - - trait A { type T; } - - trait B { type T; } - - class Functor(x: A) { type T = x.T } - - def functor(x: A): B { type T = x.T } = - new B { - type T = x.T; - }; - - val a = new A { type T = String }; - val b = functor(a); - - val s: b.T = "coucou"; - -} diff --git a/test/pos/A.scala b/test/pos/A.scala deleted file mode 100644 index fc50379d88..0000000000 --- a/test/pos/A.scala +++ /dev/null @@ -1,8 +0,0 @@ -trait A extends java.lang.Object {} - -object test { - - def x: A = x; - -} - diff --git a/test/pos/List1.scala b/test/pos/List1.scala deleted file mode 100644 index f0fce9501f..0000000000 --- a/test/pos/List1.scala +++ /dev/null @@ -1,45 +0,0 @@ -object lists { - - trait List[a] { - def isEmpty: Boolean; - def head: a; - def tail: List[a]; - def prepend(x: a) = Cons[a](x, this); - } - - def Nil[a] = new List[a] { - def isEmpty: Boolean = true; - def head = error("head of Nil"); - def tail = error("tail of Nil"); - } - - def Cons[a](x: a, xs: List[a]): List[a] = new List[a] { - def isEmpty = false; - def head = x; - def tail = xs; - } - - def foo = { - val intnil = Nil[Int]; - val intlist = intnil.prepend(1).prepend(1+1); - val x: Int = intlist.head; - val strnil = Nil[String]; - val strlist = strnil.prepend("A").prepend("AA"); - val y: String = strlist.head; - () - } - - class IntList() extends List[Int] { - def isEmpty: Boolean = false; - def head: Int = 1; - def foo: List[Int] { def isEmpty: Boolean; def head: Int; def tail: List[Int] } = Nil[Int]; - def tail0: List[Int] = foo.prepend(1).prepend(1+1); - def tail: List[Int] = Nil[Int].prepend(1).prepend(1+1); - } - - def foo2 = { - val il1 = new IntList(); - val il2 = il1.prepend(1).prepend(2); - () - } -} diff --git a/test/pos/MailBox.scala b/test/pos/MailBox.scala deleted file mode 100644 index 3a633e3fbe..0000000000 --- a/test/pos/MailBox.scala +++ /dev/null @@ -1,80 +0,0 @@ -package test; - -import scala.concurrent._; - -class MailBox { - private class LinkedList[a] { - var elem: a = _; - var next: LinkedList[a] = null; - } - - def insert[a](l: LinkedList[a], x: a): LinkedList[a] = { - l.next = new LinkedList[a]; - l.next.elem = x; - l.next.next = l.next; - l - } - - private abstract class Receiver { - def isDefined(msg: Any): boolean; - var msg: Any = null; - } - - private val sent = new LinkedList[Any]; - private var lastSent = sent; - private val receivers = new LinkedList[Receiver]; - private var lastReceiver = receivers; - - def send(msg: Any): unit = synchronized { - var r = receivers, r1 = r.next; - while (r1 != null && !r1.elem.isDefined(msg)) { - r = r1; r1 = r1.next; - } - if (r1 != null) { - r.next = r1.next; r1.elem.msg = msg; r1.elem.notify; - } else { - lastSent = insert(lastSent, msg); - } - } - - def receive[a](f: PartialFunction[Any, a]): a = { - val msg: Any = synchronized { - var s = sent, s1 = s.next; - while (s1 != null && !f.isDefinedAt(s1.elem)) { - s = s1; s1 = s1.next - } - if (s1 != null) { - s.next = s1.next; s1.elem - } else { - val r = insert(lastReceiver, new Receiver { - def isDefined(msg: Any) = f.isDefinedAt(msg); - }); - lastReceiver = r; - r.elem.wait(); - r.elem.msg - } - } - f(msg) - } - - def receiveWithin[a](msec: long)(f: PartialFunction[Any, a]): a = { - val msg: Any = synchronized { - var s = sent, s1 = s.next; - while (s1 != null && !f.isDefinedAt(s1.elem)) { - s = s1; s1 = s1.next ; - } - if (s1 != null) { - s.next = s1.next; s1.elem - } else { - val r = insert(lastReceiver, new Receiver { - def isDefined(msg: Any) = f.isDefinedAt(msg); - }); - lastReceiver = r; - r.elem.wait(msec); - if (r.elem.msg == null) r.elem.msg = TIMEOUT; - r.elem.msg - } - } - f(msg) - } -} diff --git a/test/pos/S1.scala b/test/pos/S1.scala deleted file mode 100644 index 68706e3dd3..0000000000 --- a/test/pos/S1.scala +++ /dev/null @@ -1,13 +0,0 @@ -/* This is probably no bug, I just don't understand why -** type inference does not find the right instantiation of foo. -** Currently it reports: -** -** S1.scala:12: inferred type arguments [S1] do not conform to -** method foo's type parameter bounds [T <: S1.this.type] -** foo(this); -** ^ -*/ -class S1() { - def foo[T <: this.type](x: T) = x; - foo[this.type](this); -} diff --git a/test/pos/S3.scala b/test/pos/S3.scala deleted file mode 100644 index 1e0f0288b1..0000000000 --- a/test/pos/S3.scala +++ /dev/null @@ -1,14 +0,0 @@ -/* Why does this code fail? b has type a.type, so the third -** declaration in S3 should be okay... The compiler writes instead: -** -** found : S3.this.b.type (with underlying type S3) -** required: S3.this.a.type -** val c: a.type = b; -** ^ -** Without declaration 3, everything is fine. -*/ -class S3() { - val a = new S3(); - val b: a.type = a; - val c: a.type = b; -} diff --git a/test/pos/S5.scala b/test/pos/S5.scala deleted file mode 100644 index 08f5b2a6eb..0000000000 --- a/test/pos/S5.scala +++ /dev/null @@ -1,30 +0,0 @@ -/* Here's a fragment of a Scala encoding for the Keris module system; -** the compiler claims: -** -** S5.scala:28: value n in class N of type N.this._N.n -** cannot override value n in class M of type M.this._N.n -** val system = new M() with N() {} -** ^ -** To me it seems like the code is perfectly fine... -*/ -abstract class M() { - val _N: N; - val n: _N.n; - val _M: M = this; - val m: _M.m = new _M.m(); - class m() { - // module body of M - } -} -abstract class N() { - val _N: N = this; - val n: _N.n = new _N.n(); - val _M: M; - val m: _M.m; - class n() { - // module body of N - } -} -object O { - val system = new M() with N() {} -} diff --git a/test/pos/S8.scala b/test/pos/S8.scala deleted file mode 100644 index 50f1df27a2..0000000000 --- a/test/pos/S8.scala +++ /dev/null @@ -1,19 +0,0 @@ -/* I believe this code is correct, but the compiler rejects it: -** -** S8.scala:18: type mismatch; -** found : M.x.A -** required: M.x.a.B -** val y: x.a.B = new x.A(); //correct? -** ^ -** For a given value x of type S8, type x.A should be -** a subtype of x.a.B. -*/ -class S8() { - val a: S8 = this; - class A() extends a.B() {} - class B() {} -} -object M { - val x = new S8(); - val y: x.a.B = new x.A(); //correct? -} diff --git a/test/pos/X.scala b/test/pos/X.scala deleted file mode 100644 index 2edf010efd..0000000000 --- a/test/pos/X.scala +++ /dev/null @@ -1,14 +0,0 @@ -abstract class A() { - - var x: Int - -} - -abstract class B() extends A() { - - var xx: Int = 0; - - def x = xx; - def x_=(y: Int) = xx = y; -} - diff --git a/test/pos/Y.scala b/test/pos/Y.scala deleted file mode 100644 index fd235e735d..0000000000 --- a/test/pos/Y.scala +++ /dev/null @@ -1,7 +0,0 @@ -object test { - - def f(x: Object): java.lang.Object /* !!! Object */ = x.match; - -} - - diff --git a/test/pos/Z.scala b/test/pos/Z.scala deleted file mode 100644 index c1367e46b9..0000000000 --- a/test/pos/Z.scala +++ /dev/null @@ -1,10 +0,0 @@ -trait X { - val elem: Int = 1 -} - -object test { - - def g(x: X) = x.elem; - def f(x: Object) = x.toString(); - -} diff --git a/test/pos/abstract-data.scala b/test/pos/abstract-data.scala deleted file mode 100644 index eaa23b6834..0000000000 --- a/test/pos/abstract-data.scala +++ /dev/null @@ -1,55 +0,0 @@ -package expAbstractData; - -/** A base class consisting of - * - a root trait (i.e. abstract class) `Exp' with an `eval' function - * - an abstract type `exp' bounded by `Exp' - * - a concrete instance class `Num' of `Exp' for numeric literals - */ -trait Base { - type exp <: Exp; - - trait Exp { - def eval: int - } - class Num(v: int): exp extends Exp { - val value = v; - def eval = value - } -} - -object testBase extends Base with Application { - type exp = Exp; - val term = new Num(2); - System.out.println(term.eval); -} - -/** Data extension: An extension of `Base' with `Plus' expressions - */ -trait BasePlus extends Base { - class Plus(l: exp, r: exp): exp extends Exp { - val left = l; - val right = r; - def eval = left.eval + right.eval - } -} - -/** Operation extension: An extension of `Base' with 'show' methods. - */ -trait Show extends Base { - type exp <: Exp1; - - trait Exp1 extends Exp { - def show: String; - } - class Num1(v: int): exp extends Num(v) with Exp1 { - def show = value.toString(); - } -} - -/** Operation extension: An extension of `BasePlus' with 'show' methods. - */ -trait ShowPlus extends BasePlus with Show { - class Plus1(l: exp, r: exp): exp extends Plus(l, r) with Exp1 { - def show = left.show + " + " + right.show - } -} \ No newline at end of file diff --git a/test/pos/abstract.scala b/test/pos/abstract.scala deleted file mode 100644 index f51ae63e6b..0000000000 --- a/test/pos/abstract.scala +++ /dev/null @@ -1,9 +0,0 @@ -trait C { - type t; - def copy(x: t): t = x; -} - -class D() extends C { - type t = Int; - System.out.println(copy(1)); -} diff --git a/test/pos/aliases.scala b/test/pos/aliases.scala deleted file mode 100644 index b746a35861..0000000000 --- a/test/pos/aliases.scala +++ /dev/null @@ -1,25 +0,0 @@ -abstract class C() { - - type t <: C; - - val x: t; - val y: x.type; - val z: x.type; - val u: z.type; - - val xt: x.t; - val yt: y.t; - val zt: z.t; - val ut: z.t; - - def fx(a: x.t): Unit; - def fy(a: y.t): Unit; - def fz(a: z.t): Unit; - def fu(a: u.t): Unit; - - fx(xt); fx(yt); fx(zt); fx(ut); - fy(xt); fy(yt); fy(zt); fy(ut); - fz(xt); fz(yt); fz(zt); fz(ut); - fu(xt); fu(yt); fu(zt); fu(ut); - -} diff --git a/test/pos/arrays2.scala b/test/pos/arrays2.scala deleted file mode 100644 index 26adaf63ca..0000000000 --- a/test/pos/arrays2.scala +++ /dev/null @@ -1,11 +0,0 @@ -case class C(); - -object arrays2 { - - def main(args: Array[String]): unit = { - val a = new Array[Array[C]](2); - a(0) = new Array[C](2); - a(0)(0) = new C(); - } -} - diff --git a/test/pos/bug082.scala b/test/pos/bug082.scala deleted file mode 100644 index 594c9fdc86..0000000000 --- a/test/pos/bug082.scala +++ /dev/null @@ -1,18 +0,0 @@ - -object Main { - - def min0[A](less: (A, A) => Boolean, xs: List[A]): Option[A] = xs match { - case List() => None - case List(x) => Some(x) -// case x :: Nil => Some(x) - case y :: ys => min0(less, ys) match { - case Some(m) => if (less(y, m)) Some(y) else Some(m) - } - } - - def min(xs: List[Int]) = min0((x: Int, y: Int) => x < y, xs); - - def main(args: Array[String]) = - System.out.println(min(List())); - -} diff --git a/test/pos/bug1.scala b/test/pos/bug1.scala deleted file mode 100644 index bdf33ef20d..0000000000 --- a/test/pos/bug1.scala +++ /dev/null @@ -1,8 +0,0 @@ -object Exceptions { - - class CubeException(s: String) extends java.lang.RuntimeException(s); - - def main(args: Array[String]) = - System.out.println(new CubeException("test")); - -} diff --git a/test/pos/bug115.scala b/test/pos/bug115.scala deleted file mode 100644 index 87a5c10915..0000000000 --- a/test/pos/bug115.scala +++ /dev/null @@ -1,8 +0,0 @@ -class S[A](f: A => A, x: A) { - System.out.println(f(x)); -} -class T[A](f: A => A, y: A) extends S(x: A => f(x), y) { -} -object Test with Application { - new T[int](x: int => x * 2, 1); -} diff --git a/test/pos/bug116.scala b/test/pos/bug116.scala deleted file mode 100644 index b02c81f0b7..0000000000 --- a/test/pos/bug116.scala +++ /dev/null @@ -1,8 +0,0 @@ -// $Id$ - -class C { - def this(x: Int) = { - this(); - class D extends C; - } -} diff --git a/test/pos/bug119.scala b/test/pos/bug119.scala deleted file mode 100644 index e3f0993862..0000000000 --- a/test/pos/bug119.scala +++ /dev/null @@ -1,7 +0,0 @@ -class K[E] { - case class A(v:E){}; -} - -class K2 extends K[int] { - val A(v) = A(42); -} diff --git a/test/pos/bug121.scala b/test/pos/bug121.scala deleted file mode 100644 index 78ddc41ee5..0000000000 --- a/test/pos/bug121.scala +++ /dev/null @@ -1,3 +0,0 @@ -class Bug121_B(b: Array[Byte]) { - def get(x: Int): Byte = return b(x); -} diff --git a/test/pos/bug123.scala b/test/pos/bug123.scala deleted file mode 100644 index 79f0c907a3..0000000000 --- a/test/pos/bug123.scala +++ /dev/null @@ -1,3 +0,0 @@ -class M{ - val 1 = 1; -} diff --git a/test/pos/bug124.scala b/test/pos/bug124.scala deleted file mode 100644 index 9aed6786f6..0000000000 --- a/test/pos/bug124.scala +++ /dev/null @@ -1,5 +0,0 @@ -class N{ - val F: Any => Any = (x:Any) => F(x); - val f:(Any => Any) = (x:Any) => f(x); - val g: Any => Any = (x:Any) => g(x); -} diff --git a/test/pos/bug151.scala b/test/pos/bug151.scala deleted file mode 100644 index 86667b49f7..0000000000 --- a/test/pos/bug151.scala +++ /dev/null @@ -1,6 +0,0 @@ -abstract class Foo { - type T; - def foo(a: T): Int = 0; - val foo: Foo = null; - def a: foo.T = a; -} diff --git a/test/pos/bug159.scala b/test/pos/bug159.scala deleted file mode 100644 index d6cdb97b47..0000000000 --- a/test/pos/bug159.scala +++ /dev/null @@ -1,22 +0,0 @@ -object foo { - - // the problem seems to appear only - // if "val _" is in the body of a case - def cooked( ckd:StringBuffer ):Unit = - 'a'.match { - case '-' => - val _ = ckd.append( '_' ); - case 'v' => - val _ = ckd.append( '_' ); - } - -} -object foo1 { - def f():Unit = { - 1.match { - case 2 => val _ = 1; - case 3 => val _ = 2; - case 4 => val _ = 2; - } - } -} diff --git a/test/pos/bug160.scala b/test/pos/bug160.scala deleted file mode 100644 index f1c36ebeae..0000000000 --- a/test/pos/bug160.scala +++ /dev/null @@ -1,5 +0,0 @@ -// $Id$ - -class Foo(s:String) { - def this() = { this("DEFAULT") } -} diff --git a/test/pos/bug17.scala b/test/pos/bug17.scala deleted file mode 100644 index a83eefe972..0000000000 --- a/test/pos/bug17.scala +++ /dev/null @@ -1,21 +0,0 @@ -class Quantity { - def getValue = 0; - def connect(c: Constraint) = c.newValue; -} - -abstract class Constraint(q: Quantity) { - def newValue: Unit; - q connect this -} - -class Adder(q: Quantity) extends Constraint(q) { - def newValue = System.out.println(q.getValue); -} - -object Main { - def main(args: Array[String]): Unit = { - val x = new Quantity; - new Adder(x); - () - } -} diff --git a/test/pos/bug175.scala b/test/pos/bug175.scala deleted file mode 100644 index 2ef26589c2..0000000000 --- a/test/pos/bug175.scala +++ /dev/null @@ -1,5 +0,0 @@ -// $Id$ - -abstract class C { - def this(x: Unit) = { this() } -} diff --git a/test/pos/bug177.scala b/test/pos/bug177.scala deleted file mode 100644 index 9bd913f179..0000000000 --- a/test/pos/bug177.scala +++ /dev/null @@ -1,10 +0,0 @@ -// $Id$ - -class A { - def foo = { - object Y { - def bar = 1; - } - Y.bar - } -} diff --git a/test/pos/bug183.scala b/test/pos/bug183.scala deleted file mode 100644 index 4804eb3828..0000000000 --- a/test/pos/bug183.scala +++ /dev/null @@ -1,6 +0,0 @@ -// $Id$ - -object Test { - new Foo(0); - class Foo(x: Int); -} diff --git a/test/pos/bug193.scala b/test/pos/bug193.scala deleted file mode 100644 index 9b1c82f45f..0000000000 --- a/test/pos/bug193.scala +++ /dev/null @@ -1,74 +0,0 @@ -// $Id$ - -trait Test { - - def fun_00(x: Int): Unit = { - (0: Any) == 0; - (0 ) == 0; - (0: Any) != 0; - (0 ) != 0; - () - } - - def fun_i0(x: Int): Unit = { - (x: Any) == 0; - (x ) == 0; - (x: Any) != 0; - (x ) != 0; - () - } - - def fun_o0(x: Object): Unit = { - (x: Any) == 0; - (x ) == 0; - (x: Any) != 0; - (x ) != 0; - () - } - - def fun_0i(y: Int): Unit = { - (0: Any) == y; - (0 ) == y; - (0: Any) != y; - (0 ) != y; - () - } - - def fun_0o(y: Object): Unit = { - (0: Any) == y; - (0 ) == y; - (0: Any) != y; - (0 ) != y; - () - } - - def fun_ii(x: Int, y: Int): Unit = { - (x: Any) == y; - (x ) == y; - (x: Any) != y; - (x ) != y; - () - } - def fun_io(x: Int, y: Object): Unit = { - (x: Any) == y; - (x ) == y; - (x: Any) != y; - (x ) != y; - () - } - def fun_oi(x: Object, y: Int): Unit = { - (x: Any) == y; - (x ) == y; - (x: Any) != y; - (x ) != y; - () - } - def fun_oo(x: Object, y: Object): Unit = { - (x: Any) == y; - (x ) == y; - (x: Any) != y; - (x ) != y; - () - } - -} diff --git a/test/pos/bug2.scala b/test/pos/bug2.scala deleted file mode 100644 index 4c58ed3f4f..0000000000 --- a/test/pos/bug2.scala +++ /dev/null @@ -1,6 +0,0 @@ -object main { - def main(args: Array[String]) = { - val b = true; - while (b == true) { } - } -} diff --git a/test/pos/bug20.scala b/test/pos/bug20.scala deleted file mode 100644 index bdf33ef20d..0000000000 --- a/test/pos/bug20.scala +++ /dev/null @@ -1,8 +0,0 @@ -object Exceptions { - - class CubeException(s: String) extends java.lang.RuntimeException(s); - - def main(args: Array[String]) = - System.out.println(new CubeException("test")); - -} diff --git a/test/pos/bug201.scala b/test/pos/bug201.scala deleted file mode 100644 index 53dac21ef0..0000000000 --- a/test/pos/bug201.scala +++ /dev/null @@ -1,7 +0,0 @@ -class C[a] { def f: a = f; } -class D[b] { class E extends C[b]; } -object Test { - val d = new D[int]; - def e = new d.E; - e.f; -} diff --git a/test/pos/bug204.scala b/test/pos/bug204.scala deleted file mode 100644 index 23d36523e9..0000000000 --- a/test/pos/bug204.scala +++ /dev/null @@ -1,7 +0,0 @@ -class A { - object B { - def f() = { - class C extends A {}; new C : A - } - } -} diff --git a/test/pos/bug210.scala b/test/pos/bug210.scala deleted file mode 100644 index 20450335f4..0000000000 --- a/test/pos/bug210.scala +++ /dev/null @@ -1,17 +0,0 @@ -trait Lang1 { - trait Exp; - trait Visitor { def f(left: Exp): unit; } - class Eval1: Visitor extends Visitor { - def f(left: Exp) = (); - } -} - -trait Lang2 extends Lang1 { - class Eval2: Visitor extends Eval1; -} -/* -object Main with Application { - val lang2 = new Lang2 {}; - val eval = new lang2.Eval2; -} -*/ diff --git a/test/pos/bug211.scala b/test/pos/bug211.scala deleted file mode 100644 index 6c5b73ec4a..0000000000 --- a/test/pos/bug211.scala +++ /dev/null @@ -1,8 +0,0 @@ -trait A; -trait B; -class Foo: (A with B) extends A with B; -object Test with Application { - new Foo(); - System.out.println("bug211 completed"); -} - diff --git a/test/pos/bug229.scala b/test/pos/bug229.scala deleted file mode 100644 index 2bceea0782..0000000000 --- a/test/pos/bug229.scala +++ /dev/null @@ -1,3 +0,0 @@ -class Test extends java.util.ArrayList { - override def add(index: int, element: java.lang.Object): unit = {} -} diff --git a/test/pos/bug245.scala b/test/pos/bug245.scala deleted file mode 100644 index 3e5dee820b..0000000000 --- a/test/pos/bug245.scala +++ /dev/null @@ -1,18 +0,0 @@ -class Value { - def coerce: Int = 0; -} - -object Test { - - def foo(i: Int): Int = 0; - - def fun0 : Value = null; - def fun0(i: Int ): Value = null; - - def fun1(i: Int ): Value = null; - def fun1(l: Long): Value = null; - - foo(fun0 ); - foo(fun1(new Value)); - -} diff --git a/test/pos/bug267.scala b/test/pos/bug267.scala deleted file mode 100644 index 3c220e5df1..0000000000 --- a/test/pos/bug267.scala +++ /dev/null @@ -1,55 +0,0 @@ -package expAbstractData; - -/** A base class consisting of - * - a root trait (i.e. abstract class) `Exp' with an `eval' function - * - an abstract type `exp' bounded by `Exp' - * - a concrete instance class `Num' of `Exp' for numeric literals - */ -trait Base { - type exp <: Exp; - - trait Exp { - def eval: int - } - class Num(v: int): exp extends Exp { - val value = v; - def eval = value - } -} - -object testBase extends Base with Application { - type exp = Exp; - val term = new Num(2); - System.out.println(term.eval); -} - -/** Data extension: An extension of `Base' with `Plus' expressions - */ -trait BasePlus extends Base { - class Plus(l: exp, r: exp): exp extends Exp { - val left = l; - val right = r; - def eval = left.eval + right.eval - } -} - -/** Operation extension: An extension of `Base' with 'show' methods. - */ -trait Show extends Base { - type exp <: Exp1; - - trait Exp1 extends Exp { - def show: String; - } - class Num1(v: int): exp extends Num(v) with Exp1 { - def show = value.toString(); - } -} - -/** Operation extension: An extension of `BasePlus' with 'show' methods. - */ -trait ShowPlus extends BasePlus with Show { - class Plus1(l: exp, r: exp): exp extends Plus(l, r) with Exp1 { - def show = left.show + " + " + right.show - } -} diff --git a/test/pos/bug29.scala b/test/pos/bug29.scala deleted file mode 100644 index 1b33c6cffd..0000000000 --- a/test/pos/bug29.scala +++ /dev/null @@ -1,3 +0,0 @@ -object Main { - def f[a]: List[List[a]] = for (val l1 <- Nil; val l2 <- Nil) yield l1; -} diff --git a/test/pos/bug30.scala b/test/pos/bug30.scala deleted file mode 100644 index 6d28e18c0d..0000000000 --- a/test/pos/bug30.scala +++ /dev/null @@ -1,9 +0,0 @@ -trait A { - def f(x: int): unit; - def f(x: String): unit; -} - -class B extends A { - def f(x: int): unit = (); - def f(x: String): unit = (); -} diff --git a/test/pos/bug31.scala b/test/pos/bug31.scala deleted file mode 100644 index 607dd4ce4f..0000000000 --- a/test/pos/bug31.scala +++ /dev/null @@ -1,29 +0,0 @@ -object Main { - - trait Ensure[a] { - def ensure(postcondition: a => Boolean): a - } - - def require[a](def precondition: Boolean)(def command: a): Ensure[a] = - if (precondition) - new Ensure[a] { - def ensure(postcondition: a => Boolean): a = { - val result = command; - if (postcondition(result)) result - else error("Assertion error") - } - } - else - error("Assertion error"); - - def arb[a](s: List[a]) = - require (! s.isEmpty) { - s.head - } ensure (result => s contains result); - - def main(args: Array[String]) = { - val s = List(1, 2); - System.out.println(arb(s)) - } - -} diff --git a/test/pos/bug32.scala b/test/pos/bug32.scala deleted file mode 100644 index 4354727d1a..0000000000 --- a/test/pos/bug32.scala +++ /dev/null @@ -1,17 +0,0 @@ -import java.io._; - -class PromptStream(s: OutputStream) extends PrintStream(s) { - override def println() = super.println(); -} - -object Main { - - val out = new PromptStream(System.out); - - System.setOut(out); - - def main(args: Array[String]) = - //out.println("hello world"); - () - -} diff --git a/test/pos/bug36.scala b/test/pos/bug36.scala deleted file mode 100644 index 1d923b0017..0000000000 --- a/test/pos/bug36.scala +++ /dev/null @@ -1,8 +0,0 @@ -object m { - - val xs: List[int] = Nil; - def f(i: int) = 0; - val v = xs map f; - - def m() = {} -} diff --git a/test/pos/bug39.scala b/test/pos/bug39.scala deleted file mode 100644 index a131bc0450..0000000000 --- a/test/pos/bug39.scala +++ /dev/null @@ -1,6 +0,0 @@ -abstract class Extensible[A, This <: Extensible[A, This]](x: A, xs: This): This { - def mkObj(x: A, xs: This): This; -} -class Fixed[A](x: A, xs: Fixed[A]) extends Extensible[A, Fixed[A]](x, xs) { - def mkObj(x: A, xs: Fixed[A]) = new Fixed(x, xs); -} diff --git a/test/pos/bug49.scala b/test/pos/bug49.scala deleted file mode 100644 index 913ce06e00..0000000000 --- a/test/pos/bug49.scala +++ /dev/null @@ -1,3 +0,0 @@ -class C1(x: Object) {}; - -class C2 extends C1({ class A extends Object {}; (new A) : Object }) {}; diff --git a/test/pos/bug53.scala b/test/pos/bug53.scala deleted file mode 100644 index 44763ef144..0000000000 --- a/test/pos/bug53.scala +++ /dev/null @@ -1,7 +0,0 @@ -object bug { - def foobar[c]: Int = { - class Foo { def foo: Bar = new Bar(); } - class Bar { def bar: c = bar; } - 0 - } -} diff --git a/test/pos/bug54.scala b/test/pos/bug54.scala deleted file mode 100644 index 3dc8e161fd..0000000000 --- a/test/pos/bug54.scala +++ /dev/null @@ -1,4 +0,0 @@ -class A { - case class B(x: C) extends A {} - class C {} -} diff --git a/test/pos/bug61.scala b/test/pos/bug61.scala deleted file mode 100644 index dd3f94f30c..0000000000 --- a/test/pos/bug61.scala +++ /dev/null @@ -1,10 +0,0 @@ -object O { - - class testClass ; - - case class testA() extends testClass ; // works if you leave away "extends..." - // or if you write TestA - def ga( x:testClass ) = x match { - case testA() => () - } -} diff --git a/test/pos/bug64.scala b/test/pos/bug64.scala deleted file mode 100644 index c2ce4bf6d0..0000000000 --- a/test/pos/bug64.scala +++ /dev/null @@ -1,6 +0,0 @@ -object B { - def main(Args:Array[String]) = { - val Pair(_,x) = Pair(1,2); - x + 1; - } -} diff --git a/test/pos/bug66.scala b/test/pos/bug66.scala deleted file mode 100644 index 2153264e7a..0000000000 --- a/test/pos/bug66.scala +++ /dev/null @@ -1,7 +0,0 @@ -class GBTree[A, B] /*with Map[A, B, GBTree[A,B]]*/ { - abstract class Tree[A,B]; - case class Node[A,B](key:A,value:B,smaller:Node[A,B],bigger:Node[A,B]) - extends Tree[A,B]; - case class Nil[A,B]() extends Tree[A,B]; - -} diff --git a/test/pos/bug68.scala b/test/pos/bug68.scala deleted file mode 100644 index beb2c7c0ab..0000000000 --- a/test/pos/bug68.scala +++ /dev/null @@ -1,6 +0,0 @@ -class E { - def f() = { - val (_::l1) = List(1,2,3); - l1.tail; - } -} diff --git a/test/pos/bug69.scala b/test/pos/bug69.scala deleted file mode 100644 index 113820613f..0000000000 --- a/test/pos/bug69.scala +++ /dev/null @@ -1,11 +0,0 @@ -object testCQ { - // why does this not work directly - case class Thing( name:String, contains:List[ Thing ] ); - - /* ... but this one does? - abstract class T; - case class Thing2( name:String, contains:List[ T ] ) extends T; - */ - -} - diff --git a/test/pos/bug76.scala b/test/pos/bug76.scala deleted file mode 100644 index 07cddd714f..0000000000 --- a/test/pos/bug76.scala +++ /dev/null @@ -1,9 +0,0 @@ -// This is extracted from a test file => don't add a new test file. -object bug { - def foo(def i: Int): Int = 0; - - def bar: Int = { - var i: Int = 0; - foo (i); - } -} diff --git a/test/pos/bug81.scala b/test/pos/bug81.scala deleted file mode 100644 index 20fd604974..0000000000 --- a/test/pos/bug81.scala +++ /dev/null @@ -1,4 +0,0 @@ -class A { - val b: A#B = new B; - class B {} -} diff --git a/test/pos/bug85.scala b/test/pos/bug85.scala deleted file mode 100644 index e018afb6ee..0000000000 --- a/test/pos/bug85.scala +++ /dev/null @@ -1,8 +0,0 @@ -object A { - case class B(c: C) { - class C; - } - class C; - val b: B = new B(new C()); - val c: C = b.c; -} diff --git a/test/pos/bug91.scala b/test/pos/bug91.scala deleted file mode 100644 index e05365caf4..0000000000 --- a/test/pos/bug91.scala +++ /dev/null @@ -1,6 +0,0 @@ -class Bug { - def main(args: Array[String]) = { - var msg: String = _; // no bug if "null" instead of "_" - val f: PartialFunction[Any, unit] = { case 42 => msg = "coucou" }; - } -} diff --git a/test/pos/bug93.scala b/test/pos/bug93.scala deleted file mode 100644 index f3441fe9c3..0000000000 --- a/test/pos/bug93.scala +++ /dev/null @@ -1,4 +0,0 @@ -object Bug { - def f(def cond: Boolean) = while (cond == false) {}; - // no bug with "false == cond" -} diff --git a/test/pos/cls.scala b/test/pos/cls.scala deleted file mode 100644 index 54104ae692..0000000000 --- a/test/pos/cls.scala +++ /dev/null @@ -1,17 +0,0 @@ -import scala._; - -package scalac.util { - -class A[X1, X2](x1: X1, x2: X2) {} -class B[Y](y1: Y, y2: Y) extends A[Y, Y](y1, y2) { - def f(x: Y, xs: B[Y]): Unit = {} - def g() = f(y1, this); -} - -object test { - val b: B[Int] = new B[Int](1, 2); - val a: A[Int, Int] = b; - val a1 = new A(1, "hello"); - val b1 = new B(1, "hello"); -} -} \ No newline at end of file diff --git a/test/pos/cls1.scala b/test/pos/cls1.scala deleted file mode 100644 index 20ac12d59a..0000000000 --- a/test/pos/cls1.scala +++ /dev/null @@ -1,9 +0,0 @@ -package test; - -trait A { - type T; - - trait B extends A { - type T = A.this.T; - } -} diff --git a/test/pos/clsrefine.scala b/test/pos/clsrefine.scala deleted file mode 100644 index 56db9d4c13..0000000000 --- a/test/pos/clsrefine.scala +++ /dev/null @@ -1,33 +0,0 @@ -import scala._; - -package scalac.util { - -trait A { - type X1, X2; - val x1: X1, x2: X2; -} -trait B extends A { - type Y; - val y1: Y, y2: Y; - type X1 = Y, X2 = Y; - val x1 = y1, x2 = y2; - def f(x: Y, xs: B): Unit = {} - def g() = f(y1, this); -} - -object test { - val b: B { type Y = Int } = new B { - type Y = Int; - val y1 = 1, y2 = 1; - } - val a: A { type X1 = Int, X2 = Int } = b; - val a1 = new A { - type X1 = Int, X2 = String; - val x1 = 1, x2 = "hello" - } - val b1 = new B { - type Y = Any; - val y1 = 1, y2 = "hello"; - } -} -} \ No newline at end of file diff --git a/test/pos/compile.scala b/test/pos/compile.scala deleted file mode 100644 index f94aceedac..0000000000 --- a/test/pos/compile.scala +++ /dev/null @@ -1,19 +0,0 @@ -//############################################################################ -// Compile Time Bugs & Test Cases -//############################################################################ -// $Id$ - -import java.lang.System; // to avoid name clash with .NET's library - -//############################################################################ -// Test 0 - -class Test0Foo[X]; - -object Test0Test { - type Gen[A] = Test0Foo[A]; - class Tic(g: Test0Test.Gen[Int]); - class Tac(g: Gen[Int]); -} - -//############################################################################ diff --git a/test/pos/compound.scala b/test/pos/compound.scala deleted file mode 100644 index 60890f9102..0000000000 --- a/test/pos/compound.scala +++ /dev/null @@ -1,9 +0,0 @@ -abstract class A { type T } - -abstract class B { val xz: Any } - -abstract class Test { - var yy: A with B { type T; val xz: T } = null; - var xx: A with B { type T; val xz: T } = null; - xx = yy; -} diff --git a/test/pos/constfold.scala b/test/pos/constfold.scala deleted file mode 100644 index ef71285f72..0000000000 --- a/test/pos/constfold.scala +++ /dev/null @@ -1,14 +0,0 @@ -object A { - val x = 2; - val y = x.asInstanceOf[byte]; - val z = 1.0 / 2; - val s = "z is " + z; -} - -object Test with Application { - - System.out.println(A.x); - System.out.println(A.y); - System.out.println(A.z); - System.out.println(A.s); -} diff --git a/test/pos/eta.scala b/test/pos/eta.scala deleted file mode 100644 index 7d862f67b1..0000000000 --- a/test/pos/eta.scala +++ /dev/null @@ -1,5 +0,0 @@ -object test { - -def sum(f: Int => Int)(x: Int, y: Int): Int = 0; -def g = sum; -} \ No newline at end of file diff --git a/test/pos/exceptions.scala b/test/pos/exceptions.scala deleted file mode 100644 index 2ba15efb4a..0000000000 --- a/test/pos/exceptions.scala +++ /dev/null @@ -1,21 +0,0 @@ -import java.io._; - -object Test { - - //def error[a](x: String):a = new java.lang.RuntimeException(x) throw; - - def main(args: Array[String]): Unit = { - try { - try { - System.out.println("hi!"); - error("xx"); - } finally { - System.out.println("ho!") - } - } catch { - case ex: IOException => System.out.println("io exception!"); - case ex => System.out.println(ex); - } - } - -} diff --git a/test/pos/expressions-current.scala b/test/pos/expressions-current.scala deleted file mode 100644 index b343dbf68b..0000000000 --- a/test/pos/expressions-current.scala +++ /dev/null @@ -1,63 +0,0 @@ -package test; - -abstract class Lang { - trait Visitor { - def caseNum(n: int): unit; - } - - abstract class Exp { - def visit(v: visitor): unit; - } - - type visitor <: Visitor; - - class Num(n: int) extends Exp { - def visit(v: visitor): unit = v.caseNum(n); - } - - class Eval(result: Ref[int]): visitor extends Visitor { - def caseNum(n: int) = result.elem = n; - } -} - -abstract class Lang2 extends Lang { - trait Visitor2 extends Visitor { - def casePlus(left: Exp, right: Exp): unit; - } - - type visitor <: Visitor2; - - class Plus(l: Exp, r: Exp) extends Exp { - def visit(v: visitor): unit = v.casePlus(l, r); - } - - class Eval2(result: Ref[int]): visitor extends Eval(result) with Visitor2 { - def casePlus(l: Exp, r: Exp) = - result.elem = { l.visit(this); result.elem } + { r.visit(this); result.elem } - } - - class Show2(result: Ref[String]): visitor extends Visitor2 { - def caseNum(n: int) = result.elem = n.toString(); - def casePlus(l: Exp, r: Exp) = - result.elem = - "(" + { l.visit(this); result.elem } + - "+" + { r.visit(this); result.elem }+ ")"; - } -} - -object Main { - - def main(args: Array[String]) = { - object l1 extends Lang { type visitor = Visitor } - val e1: l1.Exp = new l1.Num(42); - - val iref = new Ref(0); - System.out.println("eval: " + { e1.visit(new l1.Eval(iref)); iref.elem }); - - object l2 extends Lang2 { type visitor = Visitor2 } - val e2: l2.Exp = new l2.Plus(new l2.Num(5), new l2.Num(37)); - val sref = new Ref(""); - System.out.println("eval: " + { e2.visit(new l2.Eval2(iref)); iref.elem }); - System.out.println("show: " + { e2.visit(new l2.Show2(sref)); sref.elem }); - } -} diff --git a/test/pos/gui.scala b/test/pos/gui.scala deleted file mode 100644 index 27863f7368..0000000000 --- a/test/pos/gui.scala +++ /dev/null @@ -1,99 +0,0 @@ -object Geom { - trait Shape; - case class Point(x: int, y: int) extends Shape; - case class Rectangle(ll: Point, ur: Point) extends Shape { - def inset(delta: int) = - Rectangle(Point(ll.x - delta, ll.y - delta), Point(ur.x + delta, ur.y + delta)); - } -} - -object Color { - type Color = int; - val black = 0x000000; - val grey = 0x808080; -} - -trait Screen { - type Color = int; - def drawRect(r: Geom.Rectangle, c: Color): unit; - def fillRect(r: Geom.Rectangle, c: Color): unit; -} - -object DummyScreen extends Screen { - def drawRect(r: Geom.Rectangle, c: Color): unit = - System.out.println("draw " + r + " with " + c); - def fillRect(r: Geom.Rectangle, c: Color): unit = - System.out.println("fill " + r + " with " + c); -} - -object GUI { - - object Controller { - def addMouseCtl(c: MouseCtl) = () - } - - trait Glyph { - def getRect: Geom.Rectangle; - def setLoc(p: Geom.Point): unit; - def draw() = System.out.println("draw " + this); - } - - class Label(scr: Screen, p: Geom.Point, name: String) extends Glyph { - private var origin = p; - def getRect = Geom.Rectangle(origin, origin).inset(10); - def setLoc(p: Geom.Point) = { origin = p } - } - - trait Ctl { - def getGlyph: Glyph; - def enable(b: Boolean): this.type; - } - - trait MouseCtl with Ctl { - def mouseDown(p: Geom.Point): unit; - } - - abstract class Button(scr: Screen, p: Geom.Point, name: String) - extends Glyph with MouseCtl { - var enabled: boolean = false; - val label = new Label(scr, p, name); - - /* Glyph methods */ - override def draw(): unit = { - if (enabled) scr.drawRect(getRect, Color.black) - else scr.fillRect(getRect, Color.grey); - label.draw(); - } - def setLoc(p: Geom.Point) = label.setLoc(p); - def getRect = label.getRect.inset(-2); - - /* Ctl methods */ - def enable(b: boolean): this.type = { enabled = b; draw(); this } - def getGlyph = label; - final def mouseDown(p: Geom.Point): unit = - if (enabled) doit() else System.out.println("button is disabled"); - - /* deferred method to be specified by client */ - def doit(): unit; - } -} - -object GUIClient { - - class Application { - def quit() = System.out.println("application exited"); - } - - class QuitButton (scr: Screen, p: Geom.Point, name: String, a: Application) - extends GUI.Button(scr, p, name) { - def doit(): unit = a.quit(); - } - - def main(args: Array[String]) = { - val b = new QuitButton( - DummyScreen, Geom.Point(1, 1), "quit", new Application); - b.draw(); - b.enable(true).mouseDown(Geom.Point(1, 2)); - } -} - diff --git a/test/pos/imports.scala b/test/pos/imports.scala deleted file mode 100644 index 65ea090436..0000000000 --- a/test/pos/imports.scala +++ /dev/null @@ -1,16 +0,0 @@ -package test; - -import java.lang.{System => S} - -object test { - import S.out.{print => p, println => print} - - val foo = 1; - - p("hello"); print("world"); S.out.println("!"); - S.out.flush(); -} -object test1 { - import test._; - foo -} \ No newline at end of file diff --git a/test/pos/infer.scala b/test/pos/infer.scala deleted file mode 100644 index 24871458b3..0000000000 --- a/test/pos/infer.scala +++ /dev/null @@ -1,11 +0,0 @@ -object test { - class List[+a] { - def ::[b >: a](x: b): List[b] = new Cons(x, this); - } - case class Cons[a, b <: a](x: a, xs: List[b]) extends List[a]; - case object Nil extends List[All]; - def nil[n]: List[n] = Nil; - def cons[a](x: a, xs: List[a]): List[a] = null; - val x: List[Int] = Nil.::(1); - val y: List[Int] = nil.::(1); -} diff --git a/test/pos/infer2.scala b/test/pos/infer2.scala deleted file mode 100644 index 66f3d76544..0000000000 --- a/test/pos/infer2.scala +++ /dev/null @@ -1,10 +0,0 @@ -object test { - - def f[a, b <: a](x: b): a = x: a; - def g[a >: b, b](x: b): a = x: a; - - val x: int = f(1); - val y: String = g("") - -} - diff --git a/test/pos/lambda.scala b/test/pos/lambda.scala deleted file mode 100644 index 187b3f9783..0000000000 --- a/test/pos/lambda.scala +++ /dev/null @@ -1,8 +0,0 @@ -object test { - - def apply[a,b](f: a => b): a => b = x: a => f(x); - - def twice[a](f: a => a): a => a = x: a => f(f(x)); - - def main = apply[Int,Int](twice[Int](x: Int => x))(1); -} \ No newline at end of file diff --git a/test/pos/lambdalift.scala b/test/pos/lambdalift.scala deleted file mode 100644 index ae5799a6f8..0000000000 --- a/test/pos/lambdalift.scala +++ /dev/null @@ -1,15 +0,0 @@ -import scala._; - -object test { - - def f(x: Int) = { - def g() = h(); - def h() = x; - g(); - class inner() { - def g() = h(); - def h() = x; - } - g() + new inner().g(); - } -} \ No newline at end of file diff --git a/test/pos/lambdalift1.scala b/test/pos/lambdalift1.scala deleted file mode 100644 index d9172f51eb..0000000000 --- a/test/pos/lambdalift1.scala +++ /dev/null @@ -1,17 +0,0 @@ -import scala._; - -object test { - - def f[a <: java.lang.Object](x: a) = { - def print() = java.lang.System.out.println(x); - class A() { - def g() = { - class B() { - def h() = print() - } - new B().h() - } - } - new A().g() - } -} \ No newline at end of file diff --git a/test/pos/localmodules.scala b/test/pos/localmodules.scala deleted file mode 100644 index 8ed34f455a..0000000000 --- a/test/pos/localmodules.scala +++ /dev/null @@ -1,22 +0,0 @@ -package test; - -object main { - - class a { - - object b { - - trait c {} - def foo(x: c): c = { System.out.println("foo(" + x + ")"); x } - - } - - def bar(x: b.c): a.this.b.c = { b.foo(x); x } - } - - def main(args: Array[String]) = { - val aa = new a; - val xx: aa.b.c = null; - System.out.println(aa.bar(xx)); - } -} diff --git a/test/pos/matthias1.scala b/test/pos/matthias1.scala deleted file mode 100644 index a923a529fe..0000000000 --- a/test/pos/matthias1.scala +++ /dev/null @@ -1,15 +0,0 @@ -class A() { - class B() { - def foo(x: B) = 0 - } -} -object test { - def main = { - val a = new A(); - val b = new a.B(); - val c = new a.B(); - val d = b.foo(c); - () - } -} - diff --git a/test/pos/matthias3.scala b/test/pos/matthias3.scala deleted file mode 100644 index 6e86afeca6..0000000000 --- a/test/pos/matthias3.scala +++ /dev/null @@ -1,13 +0,0 @@ - -abstract class A() { - val y: A; -} -class B() extends A() { - val x = this; - val y: x.type = x; -} -abstract class C() { - val b: B = new B(); - val a: A { val y: b.type }; -} - diff --git a/test/pos/matthias4.scala b/test/pos/matthias4.scala deleted file mode 100644 index bcda93746b..0000000000 --- a/test/pos/matthias4.scala +++ /dev/null @@ -1,84 +0,0 @@ -/* -object A requires B { - B.X getX() { - return B.getX(); - } - void setX(B.X x) {} -} -object B { - class X {} - X getX() { - return new X(); - } - void setX(X x) {} -} -object C requires B { - object A; - void test() { - A.setX(B.getX()); - } -} -*/ - -trait _a extends Object with _b { - val a: _a; - val A: A; - type A <: a.AObject; - trait AObject { - def getX(): B.X; - def setX(x: B.X): Unit; - } -} -abstract class a123() extends Object with _a with _b { - val a: this.type = this; - val A: A = new A(); - class A() extends AObject { - def getX(): B.X = B.getX(); - def setX(x: B.X) = B.setX(x); - } -} - -trait _b { - val b: _b; - val B: B; - type B <: b.BObject; - trait BObject { - type X; - def getX(): X; - def setX(x: X): Unit; - } -} -abstract class b() extends Object with _b { - val b: this.type = this; - val B: B = new B(); - class B() extends BObject { - class X() {} - def getX(): X = new X(); - def setX(x: X) = (); - } -} - -trait _m { - val m: _m; - val M: M; - type M <: m.MObject; - trait MObject {} -} -abstract class m() extends Object with _m with _b { - val m: this.type = this; - val M: M = new M(); - class M() extends MObject with a123() with Linker() { - def test() = { - val x: B.X = B.getX(); - A.setX(x); - } - } - abstract class Linker() { - val b: m.this.b.type = m.this.b; - val B: m.this.B.type = m.this.B; - type B = m.this.B; - val m: m.this.m.type = m.this.m; - val M: m.this.M.type = m.this.M; - type M = m.this.M; - } -} diff --git a/test/pos/matthias5.scala b/test/pos/matthias5.scala deleted file mode 100644 index 0dcb7f833d..0000000000 --- a/test/pos/matthias5.scala +++ /dev/null @@ -1,12 +0,0 @@ -abstract class A() { - val y: A; -} -class B() extends A() { - val x = this; - val y: x.type = x; -} -abstract class C() { - val b: B = new B(); - val a: A { val y: b.type }; -} - diff --git a/test/pos/maxim1.scala b/test/pos/maxim1.scala deleted file mode 100644 index 58916beb8a..0000000000 --- a/test/pos/maxim1.scala +++ /dev/null @@ -1,5 +0,0 @@ -object test { - def f(x: Int)(y: Int) = x + y; - def y: Int => Int = f(2); - def main = y(1); -} diff --git a/test/pos/michel1.scala b/test/pos/michel1.scala deleted file mode 100644 index 2fc409b4e5..0000000000 --- a/test/pos/michel1.scala +++ /dev/null @@ -1,9 +0,0 @@ -class A[Ta] (a : Ta) { - def f = 1 -} - -trait C {} - -class B[Tb] (b : Tb) extends C with A[Tb] (b) { - def g = 2 -} diff --git a/test/pos/michel2.scala b/test/pos/michel2.scala deleted file mode 100644 index e6976b0f40..0000000000 --- a/test/pos/michel2.scala +++ /dev/null @@ -1,16 +0,0 @@ -object Test { - - trait A extends Object { - def f : Int = 1 - } - - class B extends Object with A { - override def f : Int = super[A].f - } - - def main(args: Array[String]) = - System.out.println(new B().f); -} - - - diff --git a/test/pos/michel3.scala b/test/pos/michel3.scala deleted file mode 100644 index 0e85295bfb..0000000000 --- a/test/pos/michel3.scala +++ /dev/null @@ -1,3 +0,0 @@ -abstract class A() { - val v : Int -} \ No newline at end of file diff --git a/test/pos/michel4.scala b/test/pos/michel4.scala deleted file mode 100644 index 2390be5d26..0000000000 --- a/test/pos/michel4.scala +++ /dev/null @@ -1,7 +0,0 @@ -class A() { - val f : Int = 2 -} - -class B() extends A() { - override val f : Int = super.f -} \ No newline at end of file diff --git a/test/pos/michel5.scala b/test/pos/michel5.scala deleted file mode 100644 index 345ae04d9d..0000000000 --- a/test/pos/michel5.scala +++ /dev/null @@ -1,5 +0,0 @@ -trait A[Ta] { } - -class B() extends Object with A[Int] { - val x : Int = 2 -} \ No newline at end of file diff --git a/test/pos/michel6.scala b/test/pos/michel6.scala deleted file mode 100644 index b32e8bed75..0000000000 --- a/test/pos/michel6.scala +++ /dev/null @@ -1,6 +0,0 @@ -object M { - def f(x: Int): Unit = {} - - def g(): Int => Unit = - if (0 == 0) f else g() - } diff --git a/test/pos/mixins.scala b/test/pos/mixins.scala deleted file mode 100644 index 8d7e7dfa52..0000000000 --- a/test/pos/mixins.scala +++ /dev/null @@ -1,17 +0,0 @@ -package mixins; -abstract class Super { - def foo: int; -} -abstract class Mixin extends Super { - abstract override def foo = super.foo; -} -class Sub extends Super with Mixin { - override def foo: int = 1; -} -abstract class Mixin1 extends Mixin { - abstract override def foo = super.foo; -} -abstract class Base0 extends Super with Mixin { -} -class Base extends Sub with Mixin1 { -} diff --git a/test/pos/modules.scala b/test/pos/modules.scala deleted file mode 100644 index 8168a42d3c..0000000000 --- a/test/pos/modules.scala +++ /dev/null @@ -1,14 +0,0 @@ -package scala { - - object a { - - object b { - - trait c {} - def foo(x: c): c = bar(x) - - } - - def bar(x: b.c): b.c = x - } -} diff --git a/test/pos/modules1.scala b/test/pos/modules1.scala deleted file mode 100644 index 3da14af4fe..0000000000 --- a/test/pos/modules1.scala +++ /dev/null @@ -1,14 +0,0 @@ -package scala { - - object a { - - object b { - - trait c {} - def foo(x: c): c = bar(x) - - } - - def bar(x: b.c): a.b.c = { b.foo(x); x } - } -} diff --git a/test/pos/moduletrans.scala b/test/pos/moduletrans.scala deleted file mode 100644 index 51538417ed..0000000000 --- a/test/pos/moduletrans.scala +++ /dev/null @@ -1,8 +0,0 @@ -object m1 { - - class m() { - def f() = 5 - } - final val m: m = new m() - -} diff --git a/test/pos/nested.scala b/test/pos/nested.scala deleted file mode 100644 index e81b710d72..0000000000 --- a/test/pos/nested.scala +++ /dev/null @@ -1,27 +0,0 @@ -// A non-trivial example of nested classes (mostly to test -// ExplicitOuterClasses). - -class A(pa : Int) { - def a1 = pa; - class B(pb : Int) { - def b1 = pa+pb+a1; - class C(pc : Int) extends A(b1) { - def c1 = pc+pb+pa - } - val c1 = new C(66) - } -} - -class M(x : Int) { - def m1 = x -} - -class A1(x : Int) extends A(x) with M(x) { - class D() extends B(42) { - val c2 = new C(66); - class E() extends C(5) { - def e1 = c1+b1+a1; - def e2 = new D(); - } - } -} diff --git a/test/pos/null.scala b/test/pos/null.scala deleted file mode 100644 index 59f88ee0e0..0000000000 --- a/test/pos/null.scala +++ /dev/null @@ -1,3 +0,0 @@ -object M { - val x: Boolean = null == null; -} \ No newline at end of file diff --git a/test/pos/override.scala b/test/pos/override.scala deleted file mode 100644 index 9f068b8ecd..0000000000 --- a/test/pos/override.scala +++ /dev/null @@ -1,14 +0,0 @@ -trait A extends Object { - def f = 1; - val x: A; -} - -trait B extends Object { - def f = 2; -} - -trait C extends Object with A with B { - override def f = super[B].f; - val a: A; - val x: a.type = a; -} diff --git a/test/pos/partialfun.scala b/test/pos/partialfun.scala deleted file mode 100644 index 21e4d0a096..0000000000 --- a/test/pos/partialfun.scala +++ /dev/null @@ -1,10 +0,0 @@ -object partialfun { - - def applyPartial[b](f: PartialFunction[Option[String], b])(x: Option[String]) = - if (f.isDefinedAt(x)) f(x) else ""; - - applyPartial { - case Some(xxx) => xxx - } (None); - -} \ No newline at end of file diff --git a/test/pos/patterns.scala b/test/pos/patterns.scala deleted file mode 100644 index f996f89725..0000000000 --- a/test/pos/patterns.scala +++ /dev/null @@ -1,27 +0,0 @@ -trait Option[+a] {} -case class Some[a](x: a) extends Option[a] { - override def toString(): scala.String = "Some(" + x + ")"; - override def equals(that: Any): Boolean = that match { - case Some(x) => this.x == x - case _ => false - } - override def hashCode(): scala.Int = getClass().hashCode() * 41 + x.hashCode(); -} -case object None extends Option[All] { - override def toString(): scala.String = "None"; - override def equals(that: Any) = that match { - case None => true - case _ => false - } - override def hashCode(): scala.Int = getClass().hashCode(); -} - -object test { - - def println(str: String): Unit = java.lang.System.out.println(str); - - def print(opt: Option[String]) = opt match { - case Some(x) => println(x); - case None => println("nothing"); - } -} \ No newline at end of file diff --git a/test/pos/patterns1.scala b/test/pos/patterns1.scala deleted file mode 100644 index fa542e7b06..0000000000 --- a/test/pos/patterns1.scala +++ /dev/null @@ -1,13 +0,0 @@ -trait Option[+a] {} -case class Some[a](x: a) extends Option[a]; -case object None extends Option[All]; - -object test { - - def println(str: String): Unit = java.lang.System.out.println(str); - - def print(opt: Option[String]) = opt match { - case Some(x) => println(x); - case None => println("nothing"); - } -} \ No newline at end of file diff --git a/test/pos/patterns2.scala b/test/pos/patterns2.scala deleted file mode 100644 index 93dcedbcf8..0000000000 --- a/test/pos/patterns2.scala +++ /dev/null @@ -1,16 +0,0 @@ -trait Option {} -case class Choice(a: Option, b: Option) extends Option; -case class Some(x: java.lang.String) extends Option; -case object None extends Option; - -object test { - - def f(opt: Option) = opt match { - case Choice(Some("one"), Some(x)) => 1; - case Choice(Some("two"), None) => 1; - case Choice(y, Some("two")) => 2; - case Choice(Some(z), a) => 3; - case Some(b) => 4; - case None => 5; - } -} \ No newline at end of file diff --git a/test/pos/patterns3.scala b/test/pos/patterns3.scala deleted file mode 100644 index 001bd8989f..0000000000 --- a/test/pos/patterns3.scala +++ /dev/null @@ -1,5 +0,0 @@ -object M { - - val Tuple2(Tuple2(x, y), _) = Tuple2(Tuple2(1, 2), 3); - -} diff --git a/test/pos/philippe1.scala b/test/pos/philippe1.scala deleted file mode 100644 index 3cace0e116..0000000000 --- a/test/pos/philippe1.scala +++ /dev/null @@ -1,8 +0,0 @@ -object test { - def id[a](xs: Array[a]): Array[a] = xs; - - def main(args: Array[String]): Unit = { - val res: Array[String] = id(args); - () - } -} \ No newline at end of file diff --git a/test/pos/philippe2.scala b/test/pos/philippe2.scala deleted file mode 100644 index 0dc896ebfd..0000000000 --- a/test/pos/philippe2.scala +++ /dev/null @@ -1,7 +0,0 @@ - -import scala._; -class m1() { - def n() = 0; - def foo(i: Int)(j: Int): Unit = (); - val bar = foo(n()); -} diff --git a/test/pos/philippe3.scala b/test/pos/philippe3.scala deleted file mode 100644 index 9442583997..0000000000 --- a/test/pos/philippe3.scala +++ /dev/null @@ -1,40 +0,0 @@ - -class Foo(x: Int) {} -case class Bar(y: Int) extends Foo(y); - - -trait T {} -trait U {} -class C() {} - - -trait T1; -trait T2 {} -trait T5 extends T; -trait T6 extends T {} -trait T7 extends T with U; -trait T8 extends T with U {} - -class C1(); -class C2() {} -class C5() extends C(); -class C6() extends C() {} -class C7() extends C() with U; -class C8() extends C() with U {} - -case class D1(); -case class D2() {} -case class D5() extends C(); -case class D6() extends C() {} -case class D7() extends C() with U; -case class D8() extends C() with U {} - -object M1; -object M2 {} -object M5 extends C(); -object M6 extends C() {} -object M7 extends C() with U; -object M8 extends C() with U {} - - - diff --git a/test/pos/philippe4.scala b/test/pos/philippe4.scala deleted file mode 100644 index c9b1cdaeb0..0000000000 --- a/test/pos/philippe4.scala +++ /dev/null @@ -1,3 +0,0 @@ -trait Foo[t <: Foo[t]]: t { - def foo(that: t): Boolean; -} diff --git a/test/pos/pmbug.scala b/test/pos/pmbug.scala deleted file mode 100644 index 7d94e7a8bd..0000000000 --- a/test/pos/pmbug.scala +++ /dev/null @@ -1,8 +0,0 @@ -object Test { - - def flatten[a](l: List[List[a]]): List[a] = l match { - case Nil => Nil - case head :: tail => head ::: flatten(tail) - } - -} diff --git a/test/pos/propagate.scala b/test/pos/propagate.scala deleted file mode 100644 index 84f4f5d6d2..0000000000 --- a/test/pos/propagate.scala +++ /dev/null @@ -1,17 +0,0 @@ -class C { - - def f[a](x: a): a = { - - class D() { - def g(x: a) = f(x): a; - } - - new D().g(x); - - } - -} - - - - diff --git a/test/pos/rebind.scala b/test/pos/rebind.scala deleted file mode 100644 index 59afe82ffa..0000000000 --- a/test/pos/rebind.scala +++ /dev/null @@ -1,13 +0,0 @@ -abstract class Foo { - class Inner { - def inner: int = 1; - } - def foo: Inner; -} -abstract class Bar { - type Inner; - def foo: Inner = foo; -} -class Test extends Foo with Bar { - System.out.println(foo.inner); -} diff --git a/test/pos/refine.scala b/test/pos/refine.scala deleted file mode 100644 index 255621ad43..0000000000 --- a/test/pos/refine.scala +++ /dev/null @@ -1,6 +0,0 @@ -object test { - - val x: Object { def toString(): String } = new Object { - override def toString(): String = "1"; - } -} diff --git a/test/pos/reftest.scala b/test/pos/reftest.scala deleted file mode 100644 index f709f70897..0000000000 --- a/test/pos/reftest.scala +++ /dev/null @@ -1,4 +0,0 @@ -import scala._; -object test { - val x: Ref[Int] = new Ref(1); -} \ No newline at end of file diff --git a/test/pos/scall.bat b/test/pos/scall.bat deleted file mode 100644 index 4e9f31425e..0000000000 --- a/test/pos/scall.bat +++ /dev/null @@ -1,50 +0,0 @@ -scalac -prompt A.scala; -scalac -prompt IntSet.scala; -scalac -prompt List1.scala; -scalac -prompt Rational.scala; -scalac -prompt X.scala; -scalac -prompt Y.scala; -scalac -prompt Z.scala; -scalac -prompt abstract.scala; -scalac -prompt cls.scala; -scalac -prompt cls1.scala; -scalac -prompt clsrefine.scala; -scalac -prompt cours1.scala; -scalac -prompt cours2.scala; -scalac -prompt cours2a.scala; -scalac -prompt cours2b.scala; -scalac -prompt cours2c.scala; -scalac -prompt eta.scala; -scalac -prompt exceptions.scala; -scalac -prompt imports.scala; -scalac -prompt lambda.scala; -scalac -prompt lambdalift.scala; -scalac -prompt lambdalift1.scala; -scalac -prompt matthias1.scala; -scalac -prompt maxim1.scala; -scalac -prompt michel1.scala; -scalac -prompt michel2.scala; -scalac -prompt michel3.scala; -scalac -prompt michel4.scala; -scalac -prompt michel5.scala; -scalac -prompt modules.scala; -scalac -prompt modules1.scala; -scalac -prompt moduletrans.scala; -scalac -prompt nested.scala; -scalac -prompt override.scala; -scalac -prompt patterns.scala; -scalac -prompt patterns2.scala; -scalac -prompt philippe1.scala; -scalac -prompt philippe2.scala; -scalac -prompt reftest.scala; -scalac -prompt sort1.scala; -scalac -prompt sqrt.scala; -scalac -prompt stable.scala; -scalac -prompt strings.scala; -scalac -prompt test1.scala; -scalac -prompt test2.scala; -scalac -prompt test4.scala; -scalac -prompt test4a.scala; -scalac -prompt test4refine.scala; -scalac -prompt test5.scala; -scalac -prompt test5refine.scala; diff --git a/test/pos/scoping1.scala b/test/pos/scoping1.scala deleted file mode 100644 index c9bc14b563..0000000000 --- a/test/pos/scoping1.scala +++ /dev/null @@ -1,12 +0,0 @@ -object This with Application { - trait A { - def foo(): unit; - } - class C: A { - def bar() = this.foo(); - } - class D extends C with A { - def foo() = () - } - val c: C = new D; -} diff --git a/test/pos/scoping2.scala b/test/pos/scoping2.scala deleted file mode 100644 index 39f3ef5f0e..0000000000 --- a/test/pos/scoping2.scala +++ /dev/null @@ -1,14 +0,0 @@ -object That { - trait A { - type T <: I; - trait I {} - } - trait B { - type T <: J; - trait J {} - } - trait C extends A with B { - type T <: I with J; - } -} - diff --git a/test/pos/scoping3.scala b/test/pos/scoping3.scala deleted file mode 100644 index 4ebc7f6378..0000000000 --- a/test/pos/scoping3.scala +++ /dev/null @@ -1,20 +0,0 @@ -object CI { - trait TreeDisplay { - type TreeNode <: ITreeNode; - trait ITreeNode { - def display(): unit; - } - } - trait TreeDisplayExp { - def getRoot(): TreeNode; - type TreeNode <: ITreeNodeExp; - trait ITreeNodeExp {} - } - trait TreeDisplayFinal extends TreeDisplay with TreeDisplayExp { - type TreeNode <: ITreeNode with ITreeNodeExp; - } - abstract class SimpleTreeDisplay: TreeDisplayFinal extends -TreeDisplay { - def display() = { this.getRoot().display(); } - } -} diff --git a/test/pos/seqtest2.scala b/test/pos/seqtest2.scala deleted file mode 100644 index 903b270c95..0000000000 --- a/test/pos/seqtest2.scala +++ /dev/null @@ -1,13 +0,0 @@ -object test { - - val b = List(1, 2, 3); - - def main(args: Array[String]) = - System.out.println( - b match { - case List(1, 2, 3) => true; - case _ => false; - } - ) - -} diff --git a/test/pos/simplelists.scala b/test/pos/simplelists.scala deleted file mode 100644 index 73b04a8762..0000000000 --- a/test/pos/simplelists.scala +++ /dev/null @@ -1,17 +0,0 @@ - abstract class List[+a] { - def head: a; - def tail: List[a]; - def cons[b >: a](x: b): List[b] = new Cons[b, a](x, this); - } - - object Nil extends List[All] { - def error(msg: String): All = throw new java.lang.Error(msg); - def head: All = error("Nil.head"); - def tail: List[All] = error("Nil.tail"); - } - - class Cons[c, d <: c](x: c, xs: List[d]) extends List[c] { - def head: c = x; - def tail: List[c] = xs; - } - diff --git a/test/pos/stable.scala b/test/pos/stable.scala deleted file mode 100644 index 267a36fe5c..0000000000 --- a/test/pos/stable.scala +++ /dev/null @@ -1,11 +0,0 @@ -trait Base { - val x: Int; - val y: Int; - var z: Int; -} - -class Sub() extends Base { - val x: Int = 1; - val y: Int = 2; - var z: Int = 3; -} diff --git a/test/pos/strings.scala b/test/pos/strings.scala deleted file mode 100644 index 3bf40e3dda..0000000000 --- a/test/pos/strings.scala +++ /dev/null @@ -1,6 +0,0 @@ -// martin 1-3-2002: it seems there is a problem with the way Serializable is loaded. -object test { - - def f() = "hello".concat("world"); - -} diff --git a/test/pos/test1.scala b/test/pos/test1.scala deleted file mode 100644 index a36d2436ec..0000000000 --- a/test/pos/test1.scala +++ /dev/null @@ -1,5 +0,0 @@ -object test { - - def f() = 5; - -} diff --git a/test/pos/test2.scala b/test/pos/test2.scala deleted file mode 100644 index fe36d07f1b..0000000000 --- a/test/pos/test2.scala +++ /dev/null @@ -1,5 +0,0 @@ -import scala._; -object test2 { - def f(x: Int): Int = 'a'; - def g(x: Int) = f(f(x)); -} \ No newline at end of file diff --git a/test/pos/test4.scala b/test/pos/test4.scala deleted file mode 100644 index 66f7a1505c..0000000000 --- a/test/pos/test4.scala +++ /dev/null @@ -1,45 +0,0 @@ -trait C {} -trait D {} -trait E {} - -object test { - def c: C = c; - def d: D = d; - def e: E = e; -} - -import test._; - -trait S extends ooo.I[D] { - def bar: E = foo(c,d); -} - -class O[X]() { - trait I[Y] { - def foo(x: X, y: Y): E = e; - } - val i:I[E] = null; - val j:I[X] = null; -} - -object ooo extends O[C]() { - - def main = { - val s: S = null; - import s._; - foo(c,d); - ooo.i.foo(c,e); - ooo.j.foo(c,c); - bar - } -} - -class Main() { - val s: S = null; - import s._; - foo(c,d); - ooo.i.foo(c,e); - ooo.j.foo(c,c); - bar; -} - diff --git a/test/pos/test4a.scala b/test/pos/test4a.scala deleted file mode 100644 index ada0ba4e5f..0000000000 --- a/test/pos/test4a.scala +++ /dev/null @@ -1,16 +0,0 @@ -trait C {} - -class O[X]() { - trait I[Y] { - def foo(y: Y): Y = y; - } - val j:I[X] = null; -} - -object o extends O[C]() { - def c: C = c; - def main = { - o.j.foo(c); - } -} - diff --git a/test/pos/test4refine.scala b/test/pos/test4refine.scala deleted file mode 100644 index 6710962934..0000000000 --- a/test/pos/test4refine.scala +++ /dev/null @@ -1,49 +0,0 @@ -trait C {} -trait D {} -trait E {} - -object test { - def c: C = c; - def d: D = d; - def e: E = e; -} - -import test._; - -trait S extends o.I { - type Y = D; - def bar: E = foo(c,d); -} - -abstract class O() { - type X; - abstract trait I { - type Y; - def foo(x: X, y: Y): E = e; - } - val i:I { type Y = E } = null; - val j:I { type Y = X } = null; -} - -object o extends O() { - type X = C; - - def main = { - val s: S = null; - import s._; - foo(c,d); - o.i.foo(c,e); - o.j.foo(c,c); - bar - } -} - -class Main() { - val s: S = null; - import s._; - foo(c,d); - o.i.foo(c,e); - o.j.foo(c,c); - bar; -} - diff --git a/test/pos/test5.scala b/test/pos/test5.scala deleted file mode 100644 index 4dbafc9ac3..0000000000 --- a/test/pos/test5.scala +++ /dev/null @@ -1,68 +0,0 @@ -import scala._; - -object test { - - trait F[If] {} - - def f[Jf](h: Jf):F[Jf] = f[Jf](h); - - trait G[Ig] {} - - def g[Jg](h: Jg):G[Jg] = g[Jg](h); - - class M[P]() { - abstract class I[X]() { - // Methods to check the type X and P as seen from instances of I - def chk_ix(x: X): Unit = (); - def chk_ip(p: P): Unit; - - // Value with type X as seen from instances of I - def val_ix: X = val_ix; - } - - val i:I[G[P]] = null; - - // Values with types P and i.X as seen from instances of M - def val_mp: P = val_mp; - def val_mix: G[P] = g[P](val_mp); - } - - class N[Q]() extends M[F[Q]]() { - val j:J[G[Q]] = null; - - abstract class J[Y]() extends I[G[Y]]() { - // Values with types Y and X as seen from instances of J - def val_jy: Y = val_jy; - def val_jx: G[Y] = g[Y](val_jy); - - // Check type P - chk_ip(val_mp); - chk_ip(val_np); - } - - // Values with types Q, X.P, i.X, j.Y and j.X as seen from instances of N - def val_nq: Q = val_nq; - def val_np: F[Q] = f[Q](val_nq); - def val_nix: G[F[Q]] = g[F[Q]](val_np); - def val_njy: G[Q] = g[Q](val_nq); - def val_njx: G[G[Q]] = g[G[Q]](val_njy); - - // Check type i.P - i.chk_ip(val_mp); - i.chk_ip(val_np); - - // Check type j.P - j.chk_ip(val_mp); - j.chk_ip(val_np); - - // Check type i.X - i.chk_ix(i.val_ix); - i.chk_ix(val_mix); - i.chk_ix(val_nix); - - // Check j.X - j.chk_ix(j.val_ix); - j.chk_ix(j.val_jx); - j.chk_ix(val_njx); - } -} diff --git a/test/pos/test5refine.scala b/test/pos/test5refine.scala deleted file mode 100644 index 95670faa05..0000000000 --- a/test/pos/test5refine.scala +++ /dev/null @@ -1,75 +0,0 @@ -import scala._; - -object test { - - abstract trait F { type If; } - - def f[Jf](h: Jf):F { type If = Jf } = f[Jf](h); - - abstract trait G { type Ig; } - - def g[Jg](h: Jg):G { type Ig = Jg } = g[Jg](h); - - abstract class M() { - type P; - abstract class I() { - type X; - - // Methods to check the type X and P as seen from instances of I - def chk_ix(x: X): Unit = {} - def chk_ip(p: P): Unit = {} - - // Value with type X as seen from instances of I - def val_ix: X = val_ix; - } - - val i: I { type X = G { type Ig = P } } = null; - - // Values with types P and i.X as seen from instances of M - def val_mp: P = val_mp; - def val_mix: G { type Ig = P } = g[P](val_mp); - } - - abstract class N() extends M() { - type Q; - type P = F { type If = Q }; - val j:J { type Y = G { type Ig = Q } } = null; - - abstract class J() extends I() { - type Y; - type X = G { type Ig = Y; }; - // Values with types Y and X as seen from instances of J - def val_jy: Y = val_jy; - def val_jx: G { type Ig = Y; } = g[Y](val_jy); - - // Check type P - chk_ip(val_mp); - chk_ip(val_np); - } - - // Values with types Q, X.P, i.X, j.Y and j.X as seen from instances of N - def val_nq: Q = val_nq; - def val_np: F { type If = Q } = f[Q](val_nq); - def val_nix: G { type Ig = F { type If = Q } } = g[F { type If = Q }](val_np); - def val_njy: G { type Ig = Q; } = g[Q](val_nq); - def val_njx: G { type Ig = G { type Ig = Q }} = g[G { type Ig = Q; }](val_njy); - - // Check type i.P - i.chk_ip(val_mp); - i.chk_ip(val_np); - - // Check type j.P - j.chk_ip(val_mp); - j.chk_ip(val_np); - - // Check type i.X - i.chk_ix(i.val_ix); - i.chk_ix(val_mix); - i.chk_ix(val_nix); - - // Check j.X - j.chk_ix(j.val_ix); - j.chk_ix(j.val_jx); - j.chk_ix(val_njx); - } -} \ No newline at end of file diff --git a/test/pos/thistype.scala b/test/pos/thistype.scala deleted file mode 100644 index 8c0ba209be..0000000000 --- a/test/pos/thistype.scala +++ /dev/null @@ -1,14 +0,0 @@ -object Test { - - class Ctl { - def enable: this.type = { System.out.println("enable"); this } - } - - class MouseCtl extends Ctl { - def mouseDown(x: int, y: int): unit = { System.out.println("mouse down"); } - } - - def main(args: Array[String]) = - new MouseCtl().enable.mouseDown(1, 2); - -} diff --git a/test/pos/thistypes.scala b/test/pos/thistypes.scala deleted file mode 100644 index 4a68ba3e65..0000000000 --- a/test/pos/thistypes.scala +++ /dev/null @@ -1,8 +0,0 @@ -trait B { - trait I {} - def foo: B.this.I; -} - -trait C extends B { - def foo: C.this.I; -} \ No newline at end of file diff --git a/test/pos/traits.scala b/test/pos/traits.scala deleted file mode 100644 index 5fdf4b342e..0000000000 --- a/test/pos/traits.scala +++ /dev/null @@ -1,42 +0,0 @@ -object Test { - type Color = int; - trait Shape { - override def equals(other: Any) = true; - } - trait Bordered extends Shape { - val thickness: int; - override def equals(other: Any) = other match { - case that: Bordered => this.thickness == that.thickness; - case _ => false - } - } - trait Colored extends Shape { - val color: Color; - override def equals(other: Any) = other match { - case that: Colored => this.color == that.color; - case _ => false - } - } - trait BorderedColoredShape extends Shape with Bordered with Colored { - override def equals(other: Any) = other match { - case that: BorderedColoredShape => - super.equals(that) && - super[Bordered].equals(that) && - super[Colored].equals(that) - case _ => false - } - } - - val bcs1 = new BorderedColoredShape { - val thickness = 1; - val color = 0; - } - val bcs2 = new BorderedColoredShape { - val thickness = 2; - val color = 0; - } - System.out.println(bcs1 == bcs1); - System.out.println(bcs1 == bcs2); -} - - diff --git a/test/pos/valdefs.scala b/test/pos/valdefs.scala deleted file mode 100644 index 85ffa132b7..0000000000 --- a/test/pos/valdefs.scala +++ /dev/null @@ -1,16 +0,0 @@ -object test { - - abstract class Base() { - val x: String; - val y = 1.0; - } - - case class Sub() extends Base() { - val x = "hello"; - override val y = 2.0; - } - - abstract class Sub2() extends Base() { - override val Pair(x, y) = Pair("abc", 2.0); - } -} diff --git a/test/pos/vincent.scala b/test/pos/vincent.scala deleted file mode 100644 index eed25eb84c..0000000000 --- a/test/pos/vincent.scala +++ /dev/null @@ -1,21 +0,0 @@ -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 - } - -} -- cgit v1.2.3