summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
Diffstat (limited to 'test/files')
-rw-r--r--[-rwxr-xr-x]test/files/bench/equality/eqeq.eqlog (renamed from test/files/bench/equality/eqeq.log)0
-rw-r--r--test/files/buildmanager/annotated/A.scala1
-rw-r--r--test/files/buildmanager/annotated/annotated.check6
-rw-r--r--test/files/buildmanager/annotated/annotated.test2
-rw-r--r--test/files/buildmanager/freshnames/A.scala16
-rw-r--r--test/files/buildmanager/freshnames/B.scala4
-rw-r--r--test/files/buildmanager/freshnames/freshnames.check6
-rw-r--r--test/files/buildmanager/freshnames/freshnames.test2
-rw-r--r--test/files/buildmanager/infer/A.scala16
-rw-r--r--test/files/buildmanager/infer/infer.check6
-rw-r--r--test/files/buildmanager/infer/infer.test2
-rw-r--r--test/files/buildmanager/overloaded_1/A.scala11
-rw-r--r--test/files/buildmanager/overloaded_1/overloaded_1.check6
-rw-r--r--test/files/buildmanager/overloaded_1/overloaded_1.test2
-rw-r--r--test/files/buildmanager/simpletest/A.scala3
-rw-r--r--test/files/buildmanager/simpletest/B.scala3
-rw-r--r--test/files/buildmanager/simpletest/simpletest.changes/A1.scala1
-rw-r--r--test/files/buildmanager/simpletest/simpletest.check11
-rw-r--r--test/files/buildmanager/simpletest/simpletest.test3
-rw-r--r--test/files/buildmanager/t2280/A.scala1
-rw-r--r--test/files/buildmanager/t2280/B.java2
-rw-r--r--test/files/buildmanager/t2280/t2280.check6
-rw-r--r--test/files/buildmanager/t2280/t2280.test2
-rw-r--r--test/files/buildmanager/t2556_1/A.scala3
-rw-r--r--test/files/buildmanager/t2556_1/B.scala3
-rw-r--r--test/files/buildmanager/t2556_1/t2556_1.changes/A2.scala4
-rw-r--r--test/files/buildmanager/t2556_1/t2556_1.check12
-rw-r--r--test/files/buildmanager/t2556_1/t2556_1.test3
-rw-r--r--test/files/buildmanager/t2556_2/A.scala4
-rw-r--r--test/files/buildmanager/t2556_2/B.scala2
-rw-r--r--test/files/buildmanager/t2556_2/C.scala4
-rw-r--r--test/files/buildmanager/t2556_2/t2556_2.changes/A2.scala4
-rw-r--r--test/files/buildmanager/t2556_2/t2556_2.check13
-rw-r--r--test/files/buildmanager/t2556_2/t2556_2.test3
-rw-r--r--test/files/buildmanager/t2556_3/A.scala5
-rw-r--r--test/files/buildmanager/t2556_3/B.scala5
-rw-r--r--test/files/buildmanager/t2556_3/C.scala2
-rw-r--r--test/files/buildmanager/t2556_3/t2556_3.changes/A2.scala5
-rw-r--r--test/files/buildmanager/t2556_3/t2556_3.check18
-rw-r--r--test/files/buildmanager/t2556_3/t2556_3.test3
-rw-r--r--test/files/buildmanager/t2557/A.scala4
-rw-r--r--test/files/buildmanager/t2557/B.scala4
-rw-r--r--test/files/buildmanager/t2557/C.scala3
-rw-r--r--test/files/buildmanager/t2557/D.scala1
-rw-r--r--test/files/buildmanager/t2557/E.scala1
-rw-r--r--test/files/buildmanager/t2557/F.scala4
-rw-r--r--test/files/buildmanager/t2557/t2557.changes/D2.scala2
-rw-r--r--test/files/buildmanager/t2557/t2557.check10
-rw-r--r--test/files/buildmanager/t2557/t2557.test3
-rw-r--r--test/files/buildmanager/t2559/A.scala5
-rw-r--r--test/files/buildmanager/t2559/D.scala8
-rw-r--r--test/files/buildmanager/t2559/t2559.changes/A2.scala5
-rw-r--r--test/files/buildmanager/t2559/t2559.check14
-rw-r--r--test/files/buildmanager/t2559/t2559.test3
-rw-r--r--test/files/buildmanager/t2562/A.scala7
-rw-r--r--test/files/buildmanager/t2562/B.scala8
-rw-r--r--test/files/buildmanager/t2562/t2562.changes/A2.scala8
-rw-r--r--test/files/buildmanager/t2562/t2562.check12
-rw-r--r--test/files/buildmanager/t2562/t2562.test3
-rw-r--r--test/files/buildmanager/t2649/A.scala3
-rw-r--r--test/files/buildmanager/t2649/B.scala4
-rw-r--r--test/files/buildmanager/t2649/t2649.changes/A2.scala4
-rw-r--r--test/files/buildmanager/t2649/t2649.check9
-rw-r--r--test/files/buildmanager/t2649/t2649.test3
-rw-r--r--test/files/buildmanager/t2650_1/A.scala4
-rw-r--r--test/files/buildmanager/t2650_1/B.scala3
-rw-r--r--test/files/buildmanager/t2650_1/t2650_1.changes/A2.scala3
-rw-r--r--test/files/buildmanager/t2650_1/t2650_1.check11
-rw-r--r--test/files/buildmanager/t2650_1/t2650_1.test3
-rw-r--r--test/files/buildmanager/t2650_2/A.scala3
-rw-r--r--test/files/buildmanager/t2650_2/B.scala4
-rw-r--r--test/files/buildmanager/t2650_2/t2650_2.changes/A2.scala4
-rw-r--r--test/files/buildmanager/t2650_2/t2650_2.check13
-rw-r--r--test/files/buildmanager/t2650_2/t2650_2.test3
-rw-r--r--test/files/buildmanager/t2650_3/A.scala4
-rw-r--r--test/files/buildmanager/t2650_3/B.scala3
-rw-r--r--test/files/buildmanager/t2650_3/t2650_3.changes/A2.scala4
-rw-r--r--test/files/buildmanager/t2650_3/t2650_3.check13
-rw-r--r--test/files/buildmanager/t2650_3/t2650_3.test3
-rw-r--r--test/files/buildmanager/t2650_4/A.scala5
-rw-r--r--test/files/buildmanager/t2650_4/B.scala3
-rw-r--r--test/files/buildmanager/t2650_4/t2650_4.changes/A2.scala5
-rw-r--r--test/files/buildmanager/t2650_4/t2650_4.check13
-rw-r--r--test/files/buildmanager/t2650_4/t2650_4.test3
-rw-r--r--test/files/buildmanager/t2651_2/A.scala1
-rw-r--r--test/files/buildmanager/t2651_2/t2651_2.changes/A2.scala1
-rw-r--r--test/files/buildmanager/t2651_2/t2651_2.check6
-rw-r--r--test/files/buildmanager/t2651_2/t2651_2.test3
-rw-r--r--test/files/buildmanager/t2651_3/A.scala3
-rw-r--r--test/files/buildmanager/t2651_3/t2651_3.changes/A2.scala3
-rw-r--r--test/files/buildmanager/t2651_3/t2651_3.check6
-rw-r--r--test/files/buildmanager/t2651_3/t2651_3.test3
-rw-r--r--test/files/buildmanager/t2651_4/A.scala5
-rw-r--r--test/files/buildmanager/t2651_4/B.scala3
-rw-r--r--test/files/buildmanager/t2651_4/t2651_4.changes/A2.scala5
-rw-r--r--test/files/buildmanager/t2651_4/t2651_4.check13
-rw-r--r--test/files/buildmanager/t2651_4/t2651_4.test3
-rw-r--r--test/files/buildmanager/t2652/A.scala3
-rw-r--r--test/files/buildmanager/t2652/B.scala4
-rw-r--r--test/files/buildmanager/t2652/t2652.changes/A2.scala4
-rw-r--r--test/files/buildmanager/t2652/t2652.check9
-rw-r--r--test/files/buildmanager/t2652/t2652.test3
-rw-r--r--test/files/buildmanager/t2653/A.scala2
-rw-r--r--test/files/buildmanager/t2653/B.scala3
-rw-r--r--test/files/buildmanager/t2653/t2653.changes/A2.scala2
-rw-r--r--test/files/buildmanager/t2653/t2653.check13
-rw-r--r--test/files/buildmanager/t2653/t2653.test3
-rw-r--r--test/files/buildmanager/t2654/A.scala2
-rw-r--r--test/files/buildmanager/t2654/B.scala1
-rw-r--r--test/files/buildmanager/t2654/t2654.changes/A2.scala4
-rw-r--r--test/files/buildmanager/t2654/t2654.check6
-rw-r--r--test/files/buildmanager/t2654/t2654.test3
-rw-r--r--test/files/buildmanager/t2655/A.scala4
-rw-r--r--test/files/buildmanager/t2655/B.scala3
-rw-r--r--test/files/buildmanager/t2655/t2655.changes/A2.scala4
-rw-r--r--test/files/buildmanager/t2655/t2655.check13
-rw-r--r--test/files/buildmanager/t2655/t2655.test3
-rw-r--r--test/files/buildmanager/t2657/A.scala3
-rw-r--r--test/files/buildmanager/t2657/B.scala4
-rw-r--r--test/files/buildmanager/t2657/t2657.changes/A2.scala3
-rw-r--r--test/files/buildmanager/t2657/t2657.check13
-rw-r--r--test/files/buildmanager/t2657/t2657.test3
-rw-r--r--test/files/buildmanager/t2789/A.scala5
-rw-r--r--test/files/buildmanager/t2789/B.scala3
-rw-r--r--test/files/buildmanager/t2789/t2789.changes/A2.scala5
-rw-r--r--test/files/buildmanager/t2789/t2789.check11
-rw-r--r--test/files/buildmanager/t2789/t2789.test3
-rw-r--r--test/files/buildmanager/t2790/A.scala5
-rw-r--r--test/files/buildmanager/t2790/B.scala4
-rw-r--r--test/files/buildmanager/t2790/t2790.changes/A2.scala4
-rw-r--r--test/files/buildmanager/t2790/t2790.check14
-rw-r--r--test/files/buildmanager/t2790/t2790.test3
-rw-r--r--test/files/buildmanager/t3045/A.java7
-rw-r--r--test/files/buildmanager/t3045/t3045.check3
-rw-r--r--test/files/buildmanager/t3045/t3045.test1
-rw-r--r--test/files/buildmanager/t3054/bar/Bar.java7
-rw-r--r--test/files/buildmanager/t3054/foo/Foo.scala5
-rw-r--r--test/files/buildmanager/t3054/t3054.check3
-rw-r--r--test/files/buildmanager/t3054/t3054.test1
-rw-r--r--test/files/buildmanager/t3133/A.java7
-rw-r--r--test/files/buildmanager/t3133/t3133.check3
-rw-r--r--test/files/buildmanager/t3133/t3133.test1
-rw-r--r--test/files/cli/test1/Main.check.j9vm54
-rw-r--r--test/files/cli/test1/Main.check.java6
-rw-r--r--test/files/cli/test1/Main.check.java56
-rw-r--r--test/files/cli/test1/Main.check.java5_api19
-rw-r--r--test/files/cli/test1/Main.check.java5_j94
-rw-r--r--test/files/cli/test1/Main.check.javac19
-rw-r--r--test/files/cli/test1/Main.check.javac524
-rw-r--r--test/files/cli/test1/Main.check.javac629
-rw-r--r--test/files/cli/test1/Main.check.jikes3
-rw-r--r--test/files/cli/test1/Main.check.jikes53
-rw-r--r--test/files/cli/test1/Main.check.scala24
-rw-r--r--test/files/cli/test1/Main.check.scala_api33
-rw-r--r--test/files/cli/test1/Main.check.scala_j915
-rw-r--r--test/files/cli/test1/Main.check.scalac63
-rw-r--r--test/files/cli/test1/Main.check.scalaint45
-rw-r--r--test/files/cli/test1/Main.java8
-rw-r--r--test/files/cli/test1/Main.scala8
-rw-r--r--test/files/cli/test2/Main.check.j9vm54
-rw-r--r--test/files/cli/test2/Main.check.java6
-rw-r--r--test/files/cli/test2/Main.check.java56
-rw-r--r--test/files/cli/test2/Main.check.java5_api24
-rw-r--r--test/files/cli/test2/Main.check.java5_j936
-rw-r--r--test/files/cli/test2/Main.check.javac27
-rw-r--r--test/files/cli/test2/Main.check.javac528
-rw-r--r--test/files/cli/test2/Main.check.javac633
-rw-r--r--test/files/cli/test2/Main.check.jikes9
-rw-r--r--test/files/cli/test2/Main.check.jikes59
-rw-r--r--test/files/cli/test2/Main.check.scala24
-rw-r--r--test/files/cli/test2/Main.check.scala_api37
-rw-r--r--test/files/cli/test2/Main.check.scala_j915
-rw-r--r--test/files/cli/test2/Main.check.scalac63
-rw-r--r--test/files/cli/test2/Main.check.scalaint45
-rw-r--r--test/files/cli/test2/Main.java8
-rw-r--r--test/files/cli/test2/Main.scala8
-rw-r--r--test/files/cli/test3/Main.check.j9vm55
-rw-r--r--test/files/cli/test3/Main.check.java10
-rw-r--r--test/files/cli/test3/Main.check.java510
-rw-r--r--test/files/cli/test3/Main.check.java5_api29
-rw-r--r--test/files/cli/test3/Main.check.java5_j936
-rw-r--r--test/files/cli/test3/Main.check.javac33
-rw-r--r--test/files/cli/test3/Main.check.javac531
-rw-r--r--test/files/cli/test3/Main.check.javac636
-rw-r--r--test/files/cli/test3/Main.check.jikes14
-rw-r--r--test/files/cli/test3/Main.check.jikes514
-rw-r--r--test/files/cli/test3/Main.check.scala28
-rw-r--r--test/files/cli/test3/Main.check.scala_api41
-rw-r--r--test/files/cli/test3/Main.check.scala_j919
-rw-r--r--test/files/cli/test3/Main.check.scalac63
-rw-r--r--test/files/cli/test3/Main.check.scalaint48
-rw-r--r--test/files/cli/test3/Main.java10
-rw-r--r--test/files/cli/test3/Main.scala10
-rw-r--r--test/files/files.iml17
-rw-r--r--test/files/jvm/JavaInteraction.check4
-rw-r--r--test/files/jvm/JavaInteraction.scala23
-rw-r--r--test/files/jvm/NestedAnnotations.java25
-rw-r--r--test/files/jvm/OuterEnum.java5
-rw-r--r--test/files/jvm/OuterTParams.java6
-rw-r--r--test/files/jvm/SourceAnnotation.java9
-rw-r--r--test/files/jvm/actor-exceptions.check14
-rw-r--r--test/files/jvm/actor-exceptions.scala20
-rw-r--r--test/files/jvm/actor-executor.check20
-rw-r--r--test/files/jvm/actor-executor.scala65
-rw-r--r--test/files/jvm/actor-executor2.check21
-rw-r--r--test/files/jvm/actor-executor2.scala67
-rw-r--r--test/files/jvm/actor-executor3.check20
-rw-r--r--test/files/jvm/actor-executor3.scala52
-rw-r--r--test/files/jvm/actor-getstate.check2
-rw-r--r--test/files/jvm/actor-getstate.scala85
-rw-r--r--test/files/jvm/actor-link-getstate.check5
-rw-r--r--test/files/jvm/actor-link-getstate.scala47
-rw-r--r--test/files/jvm/actor-receivewithin.scala2
-rw-r--r--test/files/jvm/actor-uncaught-exception.check5
-rw-r--r--test/files/jvm/actor-uncaught-exception.scala46
-rw-r--r--test/files/jvm/deprecation.cmds3
-rw-r--r--test/files/jvm/future-alarm.check20
-rw-r--r--test/files/jvm/future-alarm.scala16
-rw-r--r--test/files/jvm/genericNest/genericNest.jar.desired.sha1 (renamed from test/files/lib/genericNest.jar.desired.sha1)0
-rw-r--r--test/files/jvm/genericNest/genericNest.scala (renamed from test/files/jvm/genericNest.scala)0
-rw-r--r--test/files/jvm/inner.scala4
-rw-r--r--test/files/jvm/interpreter.check12
-rw-r--r--test/files/jvm/lib/annotations.jar.desired.sha1 (renamed from test/files/lib/annotations.jar.desired.sha1)0
-rw-r--r--test/files/jvm/lib/nest.jar.desired.sha1 (renamed from test/files/lib/nest.jar.desired.sha1)0
-rw-r--r--test/files/jvm/methvsfield/methvsfield.jar.desired.sha1 (renamed from test/files/lib/methvsfield.jar.desired.sha1)0
-rw-r--r--test/files/jvm/methvsfield/methvsfield.java (renamed from test/files/jvm/methvsfield.java)0
-rw-r--r--test/files/jvm/methvsfield/methvsfield.scala (renamed from test/files/jvm/methvsfield.scala)0
-rwxr-xr-xtest/files/jvm/mkAnnotationsJar.sh28
-rw-r--r--test/files/jvm/nest/nest.java (renamed from test/files/jvm/nest.java)0
-rw-r--r--test/files/jvm/nest/nest.scala (renamed from test/files/jvm/nest.scala)0
-rw-r--r--test/files/jvm/outerEnum/enums.jar.desired.sha1 (renamed from test/files/lib/enums.jar.desired.sha1)0
-rw-r--r--test/files/jvm/outerEnum/outerEnum.scala (renamed from test/files/jvm/outerEnum.scala)0
-rw-r--r--test/files/jvm/reactor-exceptionOnSend.scala4
-rw-r--r--test/files/jvm/reactor-producer-consumer.scala10
-rw-r--r--test/files/jvm/reactor.scala9
-rw-r--r--test/files/jvm/replyablereactor.scala5
-rw-r--r--test/files/jvm/replyablereactor2.scala2
-rw-r--r--test/files/jvm/replyablereactor3.scala2
-rw-r--r--test/files/jvm/replyablereactor4.scala2
-rw-r--r--test/files/jvm/replyreactor.scala6
-rw-r--r--test/files/jvm/serialization.check8
-rw-r--r--test/files/jvm/t1652.check2
-rw-r--r--test/files/jvm/t2470.cmds3
-rw-r--r--test/files/jvm/t2827.check3
-rw-r--r--test/files/jvm/t2827.scala14
-rw-r--r--test/files/jvm/t3003.check1
-rw-r--r--test/files/jvm/t3003.cmds2
-rw-r--r--test/files/jvm/t3003/Annot.java4
-rw-r--r--test/files/jvm/t3003/Test_1.scala8
-rw-r--r--test/files/jvm/t3102.check2
-rw-r--r--test/files/jvm/t3102.scala26
-rw-r--r--test/files/jvm/unittest_io.scala2
-rw-r--r--test/files/jvm/xml01.scala40
-rw-r--r--test/files/jvm/xml02.scala16
-rw-r--r--test/files/jvm/xmlstuff.scala8
-rw-r--r--test/files/neg/bug1210.check7
-rw-r--r--test/files/neg/bug1279a.check6
-rw-r--r--test/files/neg/bug1878.check7
-rw-r--r--test/files/neg/bug2148.check4
-rw-r--r--test/files/neg/bug2148.scala10
-rw-r--r--test/files/neg/bug3123.check4
-rw-r--r--test/files/neg/bug3123.scala5
-rw-r--r--test/files/neg/bug414.check5
-rw-r--r--test/files/neg/bug961.check5
-rw-r--r--test/files/neg/bug961.scala6
-rw-r--r--test/files/neg/migration28.check9
-rw-r--r--test/files/neg/migration28.flags1
-rw-r--r--test/files/neg/migration28.scala12
-rw-r--r--test/files/neg/multi-array.flags1
-rw-r--r--test/files/neg/patmat-type-check.check21
-rw-r--r--test/files/neg/patmat-type-check.scala28
-rw-r--r--test/files/neg/patmatexhaust.check2
-rw-r--r--test/files/neg/t0528neg.scala2
-rw-r--r--test/files/neg/t0851.check9
-rw-r--r--test/files/neg/t0851.scala25
-rw-r--r--test/files/neg/t2179.check4
-rw-r--r--test/files/neg/t2386.check4
-rw-r--r--test/files/neg/t2386.scala3
-rw-r--r--test/files/neg/t2918.check7
-rwxr-xr-xtest/files/neg/t2918.scala3
-rw-r--r--test/files/neg/t3006.check6
-rwxr-xr-xtest/files/neg/t3006.scala10
-rw-r--r--test/files/neg/t3015.check11
-rw-r--r--test/files/neg/t3015.scala8
-rw-r--r--test/files/neg/t3115.check10
-rw-r--r--test/files/neg/t3115.flags1
-rwxr-xr-xtest/files/neg/t3115.scala9
-rw-r--r--test/files/neg/t3118.check7
-rw-r--r--test/files/neg/t3118.scala8
-rw-r--r--test/files/neg/t3222.check13
-rw-r--r--test/files/neg/t3222.scala9
-rw-r--r--test/files/neg/unit2anyref.check6
-rw-r--r--test/files/pos/annotations.scala24
-rw-r--r--test/files/pos/bug0646.scala2
-rw-r--r--test/files/pos/bug2310.scala38
-rw-r--r--test/files/pos/bug3097.flags1
-rw-r--r--test/files/pos/bug3097.scala31
-rw-r--r--test/files/pos/bug3136.scala19
-rw-r--r--test/files/pos/bug3175.scala7
-rw-r--r--test/files/pos/bug432.scala2
-rw-r--r--test/files/pos/bug715.cmds2
-rw-r--r--test/files/pos/manifest1.scala7
-rw-r--r--test/files/pos/scan.scala23
-rw-r--r--test/files/pos/spec-List.scala18
-rw-r--r--test/files/pos/spec-arrays.scala6
-rw-r--r--test/files/pos/spec-partially.flags1
-rw-r--r--test/files/pos/spec-partially.scala5
-rw-r--r--test/files/pos/super.cmds2
-rw-r--r--test/files/pos/switchUnbox.flags2
-rw-r--r--test/files/pos/t0816.scala12
-rw-r--r--test/files/pos/t0971.java4
-rw-r--r--test/files/pos/t0999.scala5
-rw-r--r--test/files/pos/t1029.cmds2
-rw-r--r--test/files/pos/t1035.scala32
-rw-r--r--test/files/pos/t1164.scala2
-rw-r--r--test/files/pos/t1380.flags1
-rw-r--r--test/files/pos/t1380/gnujaxp.jar.desired.sha11
-rw-r--r--test/files/pos/t1380/hallo.scala3
-rw-r--r--test/files/pos/t1751.cmds3
-rwxr-xr-xtest/files/pos/t1756.scala2
-rw-r--r--test/files/pos/t1782.cmds2
-rw-r--r--test/files/pos/t1836/J.java1
-rw-r--r--test/files/pos/t1836/S.scala1
-rw-r--r--test/files/pos/t1942.cmds2
-rw-r--r--test/files/pos/t1996.scala19
-rw-r--r--test/files/pos/t2421c.scala17
-rwxr-xr-xtest/files/pos/t2433/A.java4
-rwxr-xr-xtest/files/pos/t2433/B.java4
-rwxr-xr-xtest/files/pos/t2433/Test.scala3
-rw-r--r--test/files/pos/t2464.cmds3
-rw-r--r--test/files/pos/t2610.scala17
-rw-r--r--test/files/pos/t2660.scala25
-rw-r--r--test/files/pos/t2691.scala9
-rw-r--r--test/files/pos/t2726.cmds2
-rw-r--r--test/files/pos/t2741/2741-1.scala13
-rw-r--r--test/files/pos/t2741/2741-2.scala5
-rw-r--r--test/files/pos/t2795.scala1
-rw-r--r--test/files/pos/t2797.scala9
-rw-r--r--test/files/pos/t2867.scala1
-rw-r--r--test/files/pos/t2868.cmds3
-rw-r--r--test/files/pos/t2868/Jann.java5
-rw-r--r--test/files/pos/t2868/Nest.java3
-rw-r--r--test/files/pos/t2868/pick_1.scala7
-rw-r--r--test/files/pos/t2868/test_2.scala6
-rwxr-xr-xtest/files/pos/t2913.scala53
-rw-r--r--test/files/pos/t294.cmds3
-rw-r--r--test/files/pos/t2940/Cycle.java3
-rw-r--r--test/files/pos/t2940/Error.scala12
-rw-r--r--test/files/pos/t2956/BeanDefinitionVisitor.java6
-rwxr-xr-xtest/files/pos/t2956/t2956.scala7
-rw-r--r--test/files/pos/t2994a.scala27
-rw-r--r--test/files/pos/t2994b.scala7
-rw-r--r--test/files/pos/t3037.scala13
-rw-r--r--test/files/pos/t3071.scala7
-rw-r--r--test/files/pos/t3076/C2.scala4
-rw-r--r--test/files/pos/t3076/T.scala2
-rw-r--r--test/files/pos/t3079.scala17
-rw-r--r--test/files/pos/t3152.scala20
-rw-r--r--test/files/pos/t425.scala11
-rw-r--r--test/files/positions/Unsupported2.scala5
-rw-r--r--test/files/res/bug687.check5
-rw-r--r--test/files/run/Course-2002-13.scala4
-rw-r--r--test/files/run/ReplacementMatching.scala47
-rw-r--r--test/files/run/arraycopy.scala31
-rw-r--r--test/files/run/arybufgrow.scala4
-rw-r--r--test/files/run/bigDecimalCache.scala9
-rw-r--r--test/files/run/bug1074.check2
-rw-r--r--test/files/run/bug1697.scala19
-rw-r--r--test/files/run/bug3126.scala9
-rw-r--r--test/files/run/bug3175.check11
-rw-r--r--test/files/run/bug3175.scala55
-rw-r--r--test/files/run/bug594.scala2
-rw-r--r--test/files/run/bug751.scala6
-rw-r--r--test/files/run/bytecodecs.scala39
-rw-r--r--test/files/run/caseClassEquality.scala36
-rw-r--r--test/files/run/colltest1.check32
-rw-r--r--test/files/run/colltest1.scala8
-rw-r--r--test/files/run/constrained-types.check2
-rw-r--r--test/files/run/elidable.check1
-rw-r--r--test/files/run/elidable.flags1
-rw-r--r--test/files/run/elidable.scala16
-rw-r--r--test/files/run/equality.scala2
-rw-r--r--test/files/run/hashCodeBoxesRunTime.scala2
-rw-r--r--test/files/run/hashCodeDistribution.scala2
-rw-r--r--test/files/run/hashhash.scala15
-rw-r--r--test/files/run/iterators.check2
-rw-r--r--test/files/run/iterators.scala10
-rw-r--r--test/files/run/lists.scala4
-rw-r--r--test/files/run/names-defaults.check2
-rw-r--r--test/files/run/names-defaults.scala15
-rw-r--r--test/files/run/programmatic-main.check26
-rw-r--r--test/files/run/programmatic-main.scala12
-rw-r--r--test/files/run/range.scala3
-rw-r--r--test/files/run/regularpatmat.check126
-rw-r--r--test/files/run/spec-absfun.flags1
-rw-r--r--test/files/run/spec-absfun.scala43
-rw-r--r--test/files/run/spec-matrix.check1
-rw-r--r--test/files/run/spec-matrix.flags1
-rw-r--r--test/files/run/spec-matrix.scala70
-rw-r--r--test/files/run/spec-patmatch.check19
-rw-r--r--test/files/run/spec-patmatch.flags1
-rw-r--r--test/files/run/spec-patmatch.scala52
-rw-r--r--test/files/run/t0017.check2
-rw-r--r--test/files/run/t0528.scala2
-rw-r--r--test/files/run/t1500.scala6
-rw-r--r--test/files/run/t1501.scala8
-rw-r--r--test/files/run/t1773.scala2
-rw-r--r--test/files/run/t2074.scala3
-rw-r--r--test/files/run/t2074_2.check6
-rw-r--r--test/files/run/t2074_2.scala7
-rw-r--r--test/files/run/t2212.scala10
-rw-r--r--test/files/run/t2417.check12
-rw-r--r--test/files/run/t2417.scala77
-rw-r--r--test/files/run/t2526.scala5
-rw-r--r--test/files/run/t2867.scala15
-rw-r--r--test/files/run/t2886.check1
-rw-r--r--test/files/run/t2886.scala7
-rw-r--r--test/files/run/t2946/Parsers.scala4
-rw-r--r--test/files/run/t2946/ResponseCommon.scala14
-rw-r--r--test/files/run/t2946/Test.scala7
-rw-r--r--test/files/run/t3026.check2
-rwxr-xr-xtest/files/run/t3026.scala8
-rw-r--r--test/files/run/t3112.check4
-rw-r--r--test/files/run/t3112.scala11
-rw-r--r--test/files/run/t3158.check1
-rw-r--r--test/files/run/t3158.scala9
-rw-r--r--test/files/run/t3186.check1
-rw-r--r--test/files/run/t3186.scala7
-rw-r--r--test/files/run/t3242.check18
-rw-r--r--test/files/run/t3242.scala49
-rw-r--r--test/files/run/t3242b.scala17
-rw-r--r--test/files/run/treePrint.check5
-rw-r--r--test/files/run/treePrint.scala40
-rw-r--r--test/files/run/unittest_collection.scala2
-rw-r--r--test/files/run/unittest_iterator.scala13
-rw-r--r--test/files/run/vector1.scala10
-rw-r--r--test/files/run/viewtest.check12
-rwxr-xr-xtest/files/run/viewtest.scala2
-rw-r--r--test/files/run/withIndex.scala2
-rw-r--r--test/files/scalacheck/array.scala46
-rw-r--r--test/files/scalacheck/eqeq.scala37
-rw-r--r--test/files/scalacheck/list.scala4
-rw-r--r--test/files/scalacheck/range.scala205
-rw-r--r--test/files/scalacheck/scan.scala17
-rw-r--r--test/files/scalap/caseClass/result.test7
-rw-r--r--test/files/scalap/classPrivate/A.scala9
-rw-r--r--test/files/scalap/classPrivate/result.test10
-rw-r--r--test/files/scalap/classWithExistential/result.test4
-rw-r--r--test/files/scalap/covariantParam/result.test4
-rw-r--r--test/files/scalap/defaultParameter/A.scala3
-rw-r--r--test/files/scalap/defaultParameter/result.test3
-rw-r--r--test/files/scalap/typeAnnotations/A.scala9
-rw-r--r--test/files/scalap/typeAnnotations/result.test8
-rwxr-xr-x[-rw-r--r--]test/files/script/fact.scala0
-rwxr-xr-xtest/files/script/loadAndExecute/lAndE1.scala3
-rwxr-xr-xtest/files/script/loadAndExecute/lAndE2.scala1
-rw-r--r--test/files/script/loadAndExecute/loadAndExecute.check1
-rwxr-xr-xtest/files/script/loadAndExecute/loadAndExecute.scala3
-rwxr-xr-xtest/files/script/utf8.bat11
-rw-r--r--test/files/script/utf8.check2
-rwxr-xr-xtest/files/script/utf8.scala27
461 files changed, 3376 insertions, 1750 deletions
diff --git a/test/files/bench/equality/eqeq.log b/test/files/bench/equality/eqeq.eqlog
index d1e27aceed..d1e27aceed 100755..100644
--- a/test/files/bench/equality/eqeq.log
+++ b/test/files/bench/equality/eqeq.eqlog
diff --git a/test/files/buildmanager/annotated/A.scala b/test/files/buildmanager/annotated/A.scala
new file mode 100644
index 0000000000..4130cf21ec
--- /dev/null
+++ b/test/files/buildmanager/annotated/A.scala
@@ -0,0 +1 @@
+case class A[T](x: String, y: T)
diff --git a/test/files/buildmanager/annotated/annotated.check b/test/files/buildmanager/annotated/annotated.check
new file mode 100644
index 0000000000..ce92c9a294
--- /dev/null
+++ b/test/files/buildmanager/annotated/annotated.check
@@ -0,0 +1,6 @@
+builder > A.scala
+compiling Set(A.scala)
+Changes: Map()
+builder > A.scala
+compiling Set(A.scala)
+Changes: Map(class A -> List(), object A -> List())
diff --git a/test/files/buildmanager/annotated/annotated.test b/test/files/buildmanager/annotated/annotated.test
new file mode 100644
index 0000000000..392e0d365f
--- /dev/null
+++ b/test/files/buildmanager/annotated/annotated.test
@@ -0,0 +1,2 @@
+>>compile A.scala
+>>compile A.scala
diff --git a/test/files/buildmanager/freshnames/A.scala b/test/files/buildmanager/freshnames/A.scala
new file mode 100644
index 0000000000..88ea44b3c7
--- /dev/null
+++ b/test/files/buildmanager/freshnames/A.scala
@@ -0,0 +1,16 @@
+abstract class A {
+
+ var t: List[B]
+
+ def foo(n: String): Option[B] = {
+ t.reverse find (_.names contains n)
+ }
+
+ def bar(n: Int): Option[B] = {
+ t.reverse find (_.names contains n)
+ }
+}
+
+//class A
+case class B(names: List[String])
+
diff --git a/test/files/buildmanager/freshnames/B.scala b/test/files/buildmanager/freshnames/B.scala
new file mode 100644
index 0000000000..d700225c08
--- /dev/null
+++ b/test/files/buildmanager/freshnames/B.scala
@@ -0,0 +1,4 @@
+abstract class C extends A {
+ def test(n: Int) = bar(n)
+}
+
diff --git a/test/files/buildmanager/freshnames/freshnames.check b/test/files/buildmanager/freshnames/freshnames.check
new file mode 100644
index 0000000000..9f05fb8a36
--- /dev/null
+++ b/test/files/buildmanager/freshnames/freshnames.check
@@ -0,0 +1,6 @@
+builder > B.scala A.scala
+compiling Set(A.scala, B.scala)
+Changes: Map()
+builder > A.scala
+compiling Set(A.scala)
+Changes: Map(class A -> List(), class B -> List(), object B -> List())
diff --git a/test/files/buildmanager/freshnames/freshnames.test b/test/files/buildmanager/freshnames/freshnames.test
new file mode 100644
index 0000000000..20b20298f9
--- /dev/null
+++ b/test/files/buildmanager/freshnames/freshnames.test
@@ -0,0 +1,2 @@
+>>compile B.scala A.scala
+>>compile A.scala
diff --git a/test/files/buildmanager/infer/A.scala b/test/files/buildmanager/infer/A.scala
new file mode 100644
index 0000000000..5e0e268122
--- /dev/null
+++ b/test/files/buildmanager/infer/A.scala
@@ -0,0 +1,16 @@
+class Foo(flag: Boolean) {
+ val classpath =
+ if (flag)
+ new AClasspath
+ else
+ new BClasspath
+}
+
+class AClasspath extends MergedClasspath[A]
+
+class BClasspath extends MergedClasspath[B]
+
+abstract class MergedClasspath[T]
+
+class A
+class B
diff --git a/test/files/buildmanager/infer/infer.check b/test/files/buildmanager/infer/infer.check
new file mode 100644
index 0000000000..1f736977ff
--- /dev/null
+++ b/test/files/buildmanager/infer/infer.check
@@ -0,0 +1,6 @@
+builder > A.scala
+compiling Set(A.scala)
+Changes: Map()
+builder > A.scala
+compiling Set(A.scala)
+Changes: Map(class A -> List(), class AClasspath -> List(), class B -> List(), class BClasspath -> List(), class Foo -> List(), class MergedClasspath -> List())
diff --git a/test/files/buildmanager/infer/infer.test b/test/files/buildmanager/infer/infer.test
new file mode 100644
index 0000000000..392e0d365f
--- /dev/null
+++ b/test/files/buildmanager/infer/infer.test
@@ -0,0 +1,2 @@
+>>compile A.scala
+>>compile A.scala
diff --git a/test/files/buildmanager/overloaded_1/A.scala b/test/files/buildmanager/overloaded_1/A.scala
new file mode 100644
index 0000000000..c070faf978
--- /dev/null
+++ b/test/files/buildmanager/overloaded_1/A.scala
@@ -0,0 +1,11 @@
+trait As {
+ trait C extends D {
+ override def foo = this /// Shouldn't cause the change
+ override def foo(act: List[D]) = this
+ }
+
+ abstract class D{
+ def foo: D = this
+ def foo(act: List[D]) = this
+ }
+}
diff --git a/test/files/buildmanager/overloaded_1/overloaded_1.check b/test/files/buildmanager/overloaded_1/overloaded_1.check
new file mode 100644
index 0000000000..4d643ce6b4
--- /dev/null
+++ b/test/files/buildmanager/overloaded_1/overloaded_1.check
@@ -0,0 +1,6 @@
+builder > A.scala
+compiling Set(A.scala)
+Changes: Map()
+builder > A.scala
+compiling Set(A.scala)
+Changes: Map(class As$D -> List(), object As$C$class -> List(), object As$class -> List(), trait As -> List(), trait As$C -> List())
diff --git a/test/files/buildmanager/overloaded_1/overloaded_1.test b/test/files/buildmanager/overloaded_1/overloaded_1.test
new file mode 100644
index 0000000000..392e0d365f
--- /dev/null
+++ b/test/files/buildmanager/overloaded_1/overloaded_1.test
@@ -0,0 +1,2 @@
+>>compile A.scala
+>>compile A.scala
diff --git a/test/files/buildmanager/simpletest/A.scala b/test/files/buildmanager/simpletest/A.scala
new file mode 100644
index 0000000000..ef704706bb
--- /dev/null
+++ b/test/files/buildmanager/simpletest/A.scala
@@ -0,0 +1,3 @@
+class A {
+ def foo = 2
+}
diff --git a/test/files/buildmanager/simpletest/B.scala b/test/files/buildmanager/simpletest/B.scala
new file mode 100644
index 0000000000..364dc6e4cb
--- /dev/null
+++ b/test/files/buildmanager/simpletest/B.scala
@@ -0,0 +1,3 @@
+class B extends A {
+ override def foo = 2
+}
diff --git a/test/files/buildmanager/simpletest/simpletest.changes/A1.scala b/test/files/buildmanager/simpletest/simpletest.changes/A1.scala
new file mode 100644
index 0000000000..83d15dc739
--- /dev/null
+++ b/test/files/buildmanager/simpletest/simpletest.changes/A1.scala
@@ -0,0 +1 @@
+class A
diff --git a/test/files/buildmanager/simpletest/simpletest.check b/test/files/buildmanager/simpletest/simpletest.check
new file mode 100644
index 0000000000..95ea2c4c0d
--- /dev/null
+++ b/test/files/buildmanager/simpletest/simpletest.check
@@ -0,0 +1,11 @@
+builder > A.scala B.scala
+compiling Set(A.scala, B.scala)
+Changes: Map()
+builder > A.scala
+compiling Set(A.scala)
+Changes: Map(class A -> List(Removed(Definition(A.foo))))
+invalidate B.scala because inherited method removed [Removed(Definition(A.foo))]
+compiling Set(B.scala)
+B.scala:2: error: method foo overrides nothing
+ override def foo = 2
+ ^
diff --git a/test/files/buildmanager/simpletest/simpletest.test b/test/files/buildmanager/simpletest/simpletest.test
new file mode 100644
index 0000000000..2c0be1502f
--- /dev/null
+++ b/test/files/buildmanager/simpletest/simpletest.test
@@ -0,0 +1,3 @@
+>>compile A.scala B.scala
+>>update A.scala=>A1.scala
+>>compile A.scala
diff --git a/test/files/buildmanager/t2280/A.scala b/test/files/buildmanager/t2280/A.scala
new file mode 100644
index 0000000000..5febadeb06
--- /dev/null
+++ b/test/files/buildmanager/t2280/A.scala
@@ -0,0 +1 @@
+class A extends B
diff --git a/test/files/buildmanager/t2280/B.java b/test/files/buildmanager/t2280/B.java
new file mode 100644
index 0000000000..aef8e106e9
--- /dev/null
+++ b/test/files/buildmanager/t2280/B.java
@@ -0,0 +1,2 @@
+public class B {}
+
diff --git a/test/files/buildmanager/t2280/t2280.check b/test/files/buildmanager/t2280/t2280.check
new file mode 100644
index 0000000000..7ea7511c63
--- /dev/null
+++ b/test/files/buildmanager/t2280/t2280.check
@@ -0,0 +1,6 @@
+builder > A.scala B.java
+compiling Set(A.scala, B.java)
+Changes: Map()
+builder > B.java
+compiling Set(B.java)
+Changes: Map(class B -> List())
diff --git a/test/files/buildmanager/t2280/t2280.test b/test/files/buildmanager/t2280/t2280.test
new file mode 100644
index 0000000000..2eda777853
--- /dev/null
+++ b/test/files/buildmanager/t2280/t2280.test
@@ -0,0 +1,2 @@
+>>compile A.scala B.java
+>>compile B.java
diff --git a/test/files/buildmanager/t2556_1/A.scala b/test/files/buildmanager/t2556_1/A.scala
new file mode 100644
index 0000000000..c6e200b217
--- /dev/null
+++ b/test/files/buildmanager/t2556_1/A.scala
@@ -0,0 +1,3 @@
+class A {
+ def x(i: Int) = i+"3"
+}
diff --git a/test/files/buildmanager/t2556_1/B.scala b/test/files/buildmanager/t2556_1/B.scala
new file mode 100644
index 0000000000..8529587b56
--- /dev/null
+++ b/test/files/buildmanager/t2556_1/B.scala
@@ -0,0 +1,3 @@
+class B extends A {
+ def x(s: String) = s+"5"
+}
diff --git a/test/files/buildmanager/t2556_1/t2556_1.changes/A2.scala b/test/files/buildmanager/t2556_1/t2556_1.changes/A2.scala
new file mode 100644
index 0000000000..4ac1045e13
--- /dev/null
+++ b/test/files/buildmanager/t2556_1/t2556_1.changes/A2.scala
@@ -0,0 +1,4 @@
+class A {
+ def x(i: String) = i+"3"
+}
+
diff --git a/test/files/buildmanager/t2556_1/t2556_1.check b/test/files/buildmanager/t2556_1/t2556_1.check
new file mode 100644
index 0000000000..dc9437fa7e
--- /dev/null
+++ b/test/files/buildmanager/t2556_1/t2556_1.check
@@ -0,0 +1,12 @@
+builder > A.scala B.scala
+compiling Set(A.scala, B.scala)
+Changes: Map()
+builder > A.scala
+compiling Set(A.scala)
+Changes: Map(class A -> List(Changed(Definition(A.x))[method x changed from (i: Int)java.lang.String to (i: java.lang.String)java.lang.String flags: <method>]))
+invalidate B.scala because inherited method changed [Changed(Definition(A.x))[method x changed from (i: Int)java.lang.String to (i: java.lang.String)java.lang.String flags: <method>]]
+compiling Set(B.scala)
+B.scala:2: error: overriding method x in class A of type (i: String)java.lang.String;
+ method x needs `override' modifier
+ def x(s: String) = s+"5"
+ ^
diff --git a/test/files/buildmanager/t2556_1/t2556_1.test b/test/files/buildmanager/t2556_1/t2556_1.test
new file mode 100644
index 0000000000..6f3bd03361
--- /dev/null
+++ b/test/files/buildmanager/t2556_1/t2556_1.test
@@ -0,0 +1,3 @@
+>>compile A.scala B.scala
+>>update A.scala=>A2.scala
+>>compile A.scala
diff --git a/test/files/buildmanager/t2556_2/A.scala b/test/files/buildmanager/t2556_2/A.scala
new file mode 100644
index 0000000000..b8da5c8fb1
--- /dev/null
+++ b/test/files/buildmanager/t2556_2/A.scala
@@ -0,0 +1,4 @@
+class A {
+ def x(i: Int) = i+"3"
+}
+
diff --git a/test/files/buildmanager/t2556_2/B.scala b/test/files/buildmanager/t2556_2/B.scala
new file mode 100644
index 0000000000..80ff25d0ca
--- /dev/null
+++ b/test/files/buildmanager/t2556_2/B.scala
@@ -0,0 +1,2 @@
+class B extends A
+
diff --git a/test/files/buildmanager/t2556_2/C.scala b/test/files/buildmanager/t2556_2/C.scala
new file mode 100644
index 0000000000..0ab13e3757
--- /dev/null
+++ b/test/files/buildmanager/t2556_2/C.scala
@@ -0,0 +1,4 @@
+class C extends B {
+ def x(s: String) = s+"5"
+}
+
diff --git a/test/files/buildmanager/t2556_2/t2556_2.changes/A2.scala b/test/files/buildmanager/t2556_2/t2556_2.changes/A2.scala
new file mode 100644
index 0000000000..4ac1045e13
--- /dev/null
+++ b/test/files/buildmanager/t2556_2/t2556_2.changes/A2.scala
@@ -0,0 +1,4 @@
+class A {
+ def x(i: String) = i+"3"
+}
+
diff --git a/test/files/buildmanager/t2556_2/t2556_2.check b/test/files/buildmanager/t2556_2/t2556_2.check
new file mode 100644
index 0000000000..a4d6724b11
--- /dev/null
+++ b/test/files/buildmanager/t2556_2/t2556_2.check
@@ -0,0 +1,13 @@
+builder > A.scala B.scala C.scala
+compiling Set(A.scala, B.scala, C.scala)
+Changes: Map()
+builder > A.scala
+compiling Set(A.scala)
+Changes: Map(class A -> List(Changed(Definition(A.x))[method x changed from (i: Int)java.lang.String to (i: java.lang.String)java.lang.String flags: <method>]))
+invalidate B.scala because inherited method changed [Changed(Definition(A.x))[method x changed from (i: Int)java.lang.String to (i: java.lang.String)java.lang.String flags: <method>]]
+invalidate C.scala because inherited method changed [Changed(Definition(A.x))[method x changed from (i: Int)java.lang.String to (i: java.lang.String)java.lang.String flags: <method>]]
+compiling Set(B.scala, C.scala)
+C.scala:2: error: overriding method x in class A of type (i: String)java.lang.String;
+ method x needs `override' modifier
+ def x(s: String) = s+"5"
+ ^
diff --git a/test/files/buildmanager/t2556_2/t2556_2.test b/test/files/buildmanager/t2556_2/t2556_2.test
new file mode 100644
index 0000000000..9f31bb6409
--- /dev/null
+++ b/test/files/buildmanager/t2556_2/t2556_2.test
@@ -0,0 +1,3 @@
+>>compile A.scala B.scala C.scala
+>>update A.scala=>A2.scala
+>>compile A.scala
diff --git a/test/files/buildmanager/t2556_3/A.scala b/test/files/buildmanager/t2556_3/A.scala
new file mode 100644
index 0000000000..089a05f493
--- /dev/null
+++ b/test/files/buildmanager/t2556_3/A.scala
@@ -0,0 +1,5 @@
+class A {
+ def x = 3
+}
+class B extends A
+
diff --git a/test/files/buildmanager/t2556_3/B.scala b/test/files/buildmanager/t2556_3/B.scala
new file mode 100644
index 0000000000..0ec5ae4b55
--- /dev/null
+++ b/test/files/buildmanager/t2556_3/B.scala
@@ -0,0 +1,5 @@
+object E {
+ def main(args: Array[String]) =
+ println( (new C).x )
+}
+
diff --git a/test/files/buildmanager/t2556_3/C.scala b/test/files/buildmanager/t2556_3/C.scala
new file mode 100644
index 0000000000..403df8455e
--- /dev/null
+++ b/test/files/buildmanager/t2556_3/C.scala
@@ -0,0 +1,2 @@
+class C extends B
+
diff --git a/test/files/buildmanager/t2556_3/t2556_3.changes/A2.scala b/test/files/buildmanager/t2556_3/t2556_3.changes/A2.scala
new file mode 100644
index 0000000000..21cb2779f9
--- /dev/null
+++ b/test/files/buildmanager/t2556_3/t2556_3.changes/A2.scala
@@ -0,0 +1,5 @@
+class A {
+ def x = 3
+}
+class B
+
diff --git a/test/files/buildmanager/t2556_3/t2556_3.check b/test/files/buildmanager/t2556_3/t2556_3.check
new file mode 100644
index 0000000000..af0c63eebc
--- /dev/null
+++ b/test/files/buildmanager/t2556_3/t2556_3.check
@@ -0,0 +1,18 @@
+builder > A.scala B.scala C.scala
+compiling Set(A.scala, B.scala, C.scala)
+Changes: Map()
+builder > A.scala
+compiling Set(A.scala)
+Changes: Map(class A -> List(), class B -> List(Changed(Class(B))[List((A,java.lang.Object), (ScalaObject,ScalaObject))]))
+invalidate C.scala because parents have changed [Changed(Class(B))[List((A,java.lang.Object), (ScalaObject,ScalaObject))]]
+invalidate B.scala because it references invalid (no longer inherited) definition [ParentChanged(Class(C))]
+compiling Set(B.scala, C.scala)
+B.scala:3: error: type mismatch;
+ found : C
+ required: ?{val x: ?}
+Note that implicit conversions are not applicable because they are ambiguous:
+ both method any2ArrowAssoc in object Predef of type [A](x: A)ArrowAssoc[A]
+ and method any2Ensuring in object Predef of type [A](x: A)Ensuring[A]
+ are possible conversion functions from C to ?{val x: ?}
+ println( (new C).x )
+ ^
diff --git a/test/files/buildmanager/t2556_3/t2556_3.test b/test/files/buildmanager/t2556_3/t2556_3.test
new file mode 100644
index 0000000000..9f31bb6409
--- /dev/null
+++ b/test/files/buildmanager/t2556_3/t2556_3.test
@@ -0,0 +1,3 @@
+>>compile A.scala B.scala C.scala
+>>update A.scala=>A2.scala
+>>compile A.scala
diff --git a/test/files/buildmanager/t2557/A.scala b/test/files/buildmanager/t2557/A.scala
new file mode 100644
index 0000000000..3be55f19a6
--- /dev/null
+++ b/test/files/buildmanager/t2557/A.scala
@@ -0,0 +1,4 @@
+trait A {
+ def x = 3
+}
+
diff --git a/test/files/buildmanager/t2557/B.scala b/test/files/buildmanager/t2557/B.scala
new file mode 100644
index 0000000000..ea86a90079
--- /dev/null
+++ b/test/files/buildmanager/t2557/B.scala
@@ -0,0 +1,4 @@
+trait B extends A {
+ override def x = super.x * 2
+}
+
diff --git a/test/files/buildmanager/t2557/C.scala b/test/files/buildmanager/t2557/C.scala
new file mode 100644
index 0000000000..dd575ac38d
--- /dev/null
+++ b/test/files/buildmanager/t2557/C.scala
@@ -0,0 +1,3 @@
+trait C extends A {
+ override def x = super.x + 5
+}
diff --git a/test/files/buildmanager/t2557/D.scala b/test/files/buildmanager/t2557/D.scala
new file mode 100644
index 0000000000..4e662a80ce
--- /dev/null
+++ b/test/files/buildmanager/t2557/D.scala
@@ -0,0 +1 @@
+trait D extends C with B
diff --git a/test/files/buildmanager/t2557/E.scala b/test/files/buildmanager/t2557/E.scala
new file mode 100644
index 0000000000..2aee552675
--- /dev/null
+++ b/test/files/buildmanager/t2557/E.scala
@@ -0,0 +1 @@
+trait E extends D
diff --git a/test/files/buildmanager/t2557/F.scala b/test/files/buildmanager/t2557/F.scala
new file mode 100644
index 0000000000..e1996704e7
--- /dev/null
+++ b/test/files/buildmanager/t2557/F.scala
@@ -0,0 +1,4 @@
+object F extends E {
+ def main(args: Array[String]) =
+ println(x)
+}
diff --git a/test/files/buildmanager/t2557/t2557.changes/D2.scala b/test/files/buildmanager/t2557/t2557.changes/D2.scala
new file mode 100644
index 0000000000..67295f8e6d
--- /dev/null
+++ b/test/files/buildmanager/t2557/t2557.changes/D2.scala
@@ -0,0 +1,2 @@
+trait D extends B with C
+
diff --git a/test/files/buildmanager/t2557/t2557.check b/test/files/buildmanager/t2557/t2557.check
new file mode 100644
index 0000000000..f51e801017
--- /dev/null
+++ b/test/files/buildmanager/t2557/t2557.check
@@ -0,0 +1,10 @@
+builder > A.scala B.scala C.scala D.scala E.scala F.scala
+compiling Set(A.scala, B.scala, C.scala, D.scala, E.scala, F.scala)
+Changes: Map()
+builder > D.scala
+compiling Set(D.scala)
+Changes: Map(trait D -> List(Changed(Class(D))[List((java.lang.Object,java.lang.Object), (C,B), (B,C))]))
+invalidate E.scala because parents have changed [Changed(Class(D))[List((java.lang.Object,java.lang.Object), (C,B), (B,C))]]
+invalidate F.scala because parents have changed [Changed(Class(D))[List((java.lang.Object,java.lang.Object), (C,B), (B,C))]]
+compiling Set(E.scala, F.scala)
+Changes: Map(object F -> List(), trait E -> List())
diff --git a/test/files/buildmanager/t2557/t2557.test b/test/files/buildmanager/t2557/t2557.test
new file mode 100644
index 0000000000..6b0103092f
--- /dev/null
+++ b/test/files/buildmanager/t2557/t2557.test
@@ -0,0 +1,3 @@
+>>compile A.scala B.scala C.scala D.scala E.scala F.scala
+>>update D.scala=>D2.scala
+>>compile D.scala
diff --git a/test/files/buildmanager/t2559/A.scala b/test/files/buildmanager/t2559/A.scala
new file mode 100644
index 0000000000..fb4f6e3545
--- /dev/null
+++ b/test/files/buildmanager/t2559/A.scala
@@ -0,0 +1,5 @@
+sealed trait A
+class B extends A
+class C extends A
+//class E extends A
+
diff --git a/test/files/buildmanager/t2559/D.scala b/test/files/buildmanager/t2559/D.scala
new file mode 100644
index 0000000000..4b8422db04
--- /dev/null
+++ b/test/files/buildmanager/t2559/D.scala
@@ -0,0 +1,8 @@
+object D {
+ def x(a: A) =
+ a match {
+ case _: B => ()
+ case _: C => ()
+ }
+}
+
diff --git a/test/files/buildmanager/t2559/t2559.changes/A2.scala b/test/files/buildmanager/t2559/t2559.changes/A2.scala
new file mode 100644
index 0000000000..8e90594e2c
--- /dev/null
+++ b/test/files/buildmanager/t2559/t2559.changes/A2.scala
@@ -0,0 +1,5 @@
+sealed trait A
+class B extends A
+class C extends A
+class E extends A
+
diff --git a/test/files/buildmanager/t2559/t2559.check b/test/files/buildmanager/t2559/t2559.check
new file mode 100644
index 0000000000..752278fbe8
--- /dev/null
+++ b/test/files/buildmanager/t2559/t2559.check
@@ -0,0 +1,14 @@
+builder > A.scala D.scala
+compiling Set(A.scala, D.scala)
+Changes: Map()
+builder > A.scala
+compiling Set(A.scala)
+Changes: Map(class B -> List(), class C -> List(), class E -> List(Changed(Class(A))[class E extends a sealed trait A]), trait A -> List())
+invalidate D.scala because it references changed class [Changed(Class(A))[class E extends a sealed trait A]]
+compiling Set(D.scala)
+D.scala:3: warning: match is not exhaustive!
+missing combination E
+
+ a match {
+ ^
+Changes: Map(object D -> List())
diff --git a/test/files/buildmanager/t2559/t2559.test b/test/files/buildmanager/t2559/t2559.test
new file mode 100644
index 0000000000..b787c5b39f
--- /dev/null
+++ b/test/files/buildmanager/t2559/t2559.test
@@ -0,0 +1,3 @@
+>>compile A.scala D.scala
+>>update A.scala=>A2.scala
+>>compile A.scala
diff --git a/test/files/buildmanager/t2562/A.scala b/test/files/buildmanager/t2562/A.scala
new file mode 100644
index 0000000000..2208585eed
--- /dev/null
+++ b/test/files/buildmanager/t2562/A.scala
@@ -0,0 +1,7 @@
+object A
+{
+ def x0 = B.x0
+ def x1 = B.x1
+ def x2 = B.x2
+ def x3 = 3
+}
diff --git a/test/files/buildmanager/t2562/B.scala b/test/files/buildmanager/t2562/B.scala
new file mode 100644
index 0000000000..6f658954e1
--- /dev/null
+++ b/test/files/buildmanager/t2562/B.scala
@@ -0,0 +1,8 @@
+object B
+{
+ def x0 = A.x1
+ def x1 = A.x2
+ def x2 = A.x3
+}
+
+
diff --git a/test/files/buildmanager/t2562/t2562.changes/A2.scala b/test/files/buildmanager/t2562/t2562.changes/A2.scala
new file mode 100644
index 0000000000..743609eb18
--- /dev/null
+++ b/test/files/buildmanager/t2562/t2562.changes/A2.scala
@@ -0,0 +1,8 @@
+object A
+{
+ def x0 = B.x0
+ def x1 = B.x1
+ def x2 = B.x2
+ def x3 = "3"
+}
+
diff --git a/test/files/buildmanager/t2562/t2562.check b/test/files/buildmanager/t2562/t2562.check
new file mode 100644
index 0000000000..813d2735e1
--- /dev/null
+++ b/test/files/buildmanager/t2562/t2562.check
@@ -0,0 +1,12 @@
+builder > A.scala B.scala
+compiling Set(A.scala, B.scala)
+Changes: Map()
+builder > A.scala
+compiling Set(A.scala)
+Changes: Map(object A -> List(Changed(Definition(A.x3))[method x3 changed from ()Int to ()java.lang.String flags: <method>]))
+invalidate B.scala because it references changed definition [Changed(Definition(A.x3))[method x3 changed from ()Int to ()java.lang.String flags: <method>]]
+compiling Set(B.scala)
+Changes: Map(object B -> List(Changed(Definition(B.x2))[method x2 changed from ()Int to ()java.lang.String flags: <method>]))
+invalidate A.scala because it references changed definition [Changed(Definition(B.x2))[method x2 changed from ()Int to ()java.lang.String flags: <method>]]
+compiling Set(A.scala, B.scala)
+Changes: Map(object A -> List(Changed(Definition(A.x0))[method x0 changed from ()Int to ()java.lang.String flags: <method>], Changed(Definition(A.x1))[method x1 changed from ()Int to ()java.lang.String flags: <method>], Changed(Definition(A.x2))[method x2 changed from ()Int to ()java.lang.String flags: <method>]), object B -> List(Changed(Definition(B.x0))[method x0 changed from ()Int to ()java.lang.String flags: <method>], Changed(Definition(B.x1))[method x1 changed from ()Int to ()java.lang.String flags: <method>]))
diff --git a/test/files/buildmanager/t2562/t2562.test b/test/files/buildmanager/t2562/t2562.test
new file mode 100644
index 0000000000..6f3bd03361
--- /dev/null
+++ b/test/files/buildmanager/t2562/t2562.test
@@ -0,0 +1,3 @@
+>>compile A.scala B.scala
+>>update A.scala=>A2.scala
+>>compile A.scala
diff --git a/test/files/buildmanager/t2649/A.scala b/test/files/buildmanager/t2649/A.scala
new file mode 100644
index 0000000000..86cc3f2c15
--- /dev/null
+++ b/test/files/buildmanager/t2649/A.scala
@@ -0,0 +1,3 @@
+object A {
+ def x(zz: Int, yy: Int) = yy - zz
+}
diff --git a/test/files/buildmanager/t2649/B.scala b/test/files/buildmanager/t2649/B.scala
new file mode 100644
index 0000000000..26c89518cb
--- /dev/null
+++ b/test/files/buildmanager/t2649/B.scala
@@ -0,0 +1,4 @@
+object B {
+ def main(args: Array[String]): Unit =
+ println( A.x(zz = 3, yy = 4) )
+}
diff --git a/test/files/buildmanager/t2649/t2649.changes/A2.scala b/test/files/buildmanager/t2649/t2649.changes/A2.scala
new file mode 100644
index 0000000000..9a6309fca3
--- /dev/null
+++ b/test/files/buildmanager/t2649/t2649.changes/A2.scala
@@ -0,0 +1,4 @@
+object A {
+ def x(yy: Int, zz: Int) = yy - zz
+}
+
diff --git a/test/files/buildmanager/t2649/t2649.check b/test/files/buildmanager/t2649/t2649.check
new file mode 100644
index 0000000000..5b698ec03f
--- /dev/null
+++ b/test/files/buildmanager/t2649/t2649.check
@@ -0,0 +1,9 @@
+builder > A.scala B.scala
+compiling Set(A.scala, B.scala)
+Changes: Map()
+builder > A.scala
+compiling Set(A.scala)
+Changes: Map(object A -> List(Changed(Definition(A.x))[method x changed from (zz: Int,yy: Int)Int to (yy: Int,zz: Int)Int flags: <method>]))
+invalidate B.scala because it references changed definition [Changed(Definition(A.x))[method x changed from (zz: Int,yy: Int)Int to (yy: Int,zz: Int)Int flags: <method>]]
+compiling Set(B.scala)
+Changes: Map(object B -> List())
diff --git a/test/files/buildmanager/t2649/t2649.test b/test/files/buildmanager/t2649/t2649.test
new file mode 100644
index 0000000000..6f3bd03361
--- /dev/null
+++ b/test/files/buildmanager/t2649/t2649.test
@@ -0,0 +1,3 @@
+>>compile A.scala B.scala
+>>update A.scala=>A2.scala
+>>compile A.scala
diff --git a/test/files/buildmanager/t2650_1/A.scala b/test/files/buildmanager/t2650_1/A.scala
new file mode 100644
index 0000000000..74714a3c47
--- /dev/null
+++ b/test/files/buildmanager/t2650_1/A.scala
@@ -0,0 +1,4 @@
+trait A {
+ type S[_]
+}
+
diff --git a/test/files/buildmanager/t2650_1/B.scala b/test/files/buildmanager/t2650_1/B.scala
new file mode 100644
index 0000000000..80f0e30259
--- /dev/null
+++ b/test/files/buildmanager/t2650_1/B.scala
@@ -0,0 +1,3 @@
+trait B extends A {
+ type F = S[Int]
+}
diff --git a/test/files/buildmanager/t2650_1/t2650_1.changes/A2.scala b/test/files/buildmanager/t2650_1/t2650_1.changes/A2.scala
new file mode 100644
index 0000000000..2b8ead4ff1
--- /dev/null
+++ b/test/files/buildmanager/t2650_1/t2650_1.changes/A2.scala
@@ -0,0 +1,3 @@
+trait A {
+ type S
+}
diff --git a/test/files/buildmanager/t2650_1/t2650_1.check b/test/files/buildmanager/t2650_1/t2650_1.check
new file mode 100644
index 0000000000..ecddb33620
--- /dev/null
+++ b/test/files/buildmanager/t2650_1/t2650_1.check
@@ -0,0 +1,11 @@
+builder > A.scala B.scala
+compiling Set(A.scala, B.scala)
+Changes: Map()
+builder > A.scala
+compiling Set(A.scala)
+Changes: Map(trait A -> List(Changed(Definition(A.S))[type S changed from A.this.S[_] to A.this.S flags: <deferred>]))
+invalidate B.scala because inherited method changed [Changed(Definition(A.S))[type S changed from A.this.S[_] to A.this.S flags: <deferred>]]
+compiling Set(B.scala)
+B.scala:2: error: B.this.S does not take type parameters
+ type F = S[Int]
+ ^
diff --git a/test/files/buildmanager/t2650_1/t2650_1.test b/test/files/buildmanager/t2650_1/t2650_1.test
new file mode 100644
index 0000000000..6f3bd03361
--- /dev/null
+++ b/test/files/buildmanager/t2650_1/t2650_1.test
@@ -0,0 +1,3 @@
+>>compile A.scala B.scala
+>>update A.scala=>A2.scala
+>>compile A.scala
diff --git a/test/files/buildmanager/t2650_2/A.scala b/test/files/buildmanager/t2650_2/A.scala
new file mode 100644
index 0000000000..bcea634485
--- /dev/null
+++ b/test/files/buildmanager/t2650_2/A.scala
@@ -0,0 +1,3 @@
+trait A {
+ type S = Int
+}
diff --git a/test/files/buildmanager/t2650_2/B.scala b/test/files/buildmanager/t2650_2/B.scala
new file mode 100644
index 0000000000..22a3a9a48e
--- /dev/null
+++ b/test/files/buildmanager/t2650_2/B.scala
@@ -0,0 +1,4 @@
+trait B extends A {
+ def x: S
+ def y: Int = x
+}
diff --git a/test/files/buildmanager/t2650_2/t2650_2.changes/A2.scala b/test/files/buildmanager/t2650_2/t2650_2.changes/A2.scala
new file mode 100644
index 0000000000..8274c1b62d
--- /dev/null
+++ b/test/files/buildmanager/t2650_2/t2650_2.changes/A2.scala
@@ -0,0 +1,4 @@
+trait A {
+ type S = Long
+}
+
diff --git a/test/files/buildmanager/t2650_2/t2650_2.check b/test/files/buildmanager/t2650_2/t2650_2.check
new file mode 100644
index 0000000000..7ab72fb619
--- /dev/null
+++ b/test/files/buildmanager/t2650_2/t2650_2.check
@@ -0,0 +1,13 @@
+builder > A.scala B.scala
+compiling Set(A.scala, B.scala)
+Changes: Map()
+builder > A.scala
+compiling Set(A.scala)
+Changes: Map(trait A -> List(Changed(Definition(A.S))[type S changed from A.this.S to A.this.S flags: ]))
+invalidate B.scala because inherited method changed [Changed(Definition(A.S))[type S changed from A.this.S to A.this.S flags: ]]
+compiling Set(B.scala)
+B.scala:3: error: type mismatch;
+ found : B.this.S
+ required: Int
+ def y: Int = x
+ ^
diff --git a/test/files/buildmanager/t2650_2/t2650_2.test b/test/files/buildmanager/t2650_2/t2650_2.test
new file mode 100644
index 0000000000..6f3bd03361
--- /dev/null
+++ b/test/files/buildmanager/t2650_2/t2650_2.test
@@ -0,0 +1,3 @@
+>>compile A.scala B.scala
+>>update A.scala=>A2.scala
+>>compile A.scala
diff --git a/test/files/buildmanager/t2650_3/A.scala b/test/files/buildmanager/t2650_3/A.scala
new file mode 100644
index 0000000000..cd13843eb9
--- /dev/null
+++ b/test/files/buildmanager/t2650_3/A.scala
@@ -0,0 +1,4 @@
+trait A {
+ type T = Int
+ def x: T
+}
diff --git a/test/files/buildmanager/t2650_3/B.scala b/test/files/buildmanager/t2650_3/B.scala
new file mode 100644
index 0000000000..46a8cf270a
--- /dev/null
+++ b/test/files/buildmanager/t2650_3/B.scala
@@ -0,0 +1,3 @@
+object B {
+ def x(a: A): Int = a.x
+}
diff --git a/test/files/buildmanager/t2650_3/t2650_3.changes/A2.scala b/test/files/buildmanager/t2650_3/t2650_3.changes/A2.scala
new file mode 100644
index 0000000000..e5667b2539
--- /dev/null
+++ b/test/files/buildmanager/t2650_3/t2650_3.changes/A2.scala
@@ -0,0 +1,4 @@
+trait A {
+ type T = Long
+ def x: T
+}
diff --git a/test/files/buildmanager/t2650_3/t2650_3.check b/test/files/buildmanager/t2650_3/t2650_3.check
new file mode 100644
index 0000000000..27be2f5ae8
--- /dev/null
+++ b/test/files/buildmanager/t2650_3/t2650_3.check
@@ -0,0 +1,13 @@
+builder > A.scala B.scala
+compiling Set(A.scala, B.scala)
+Changes: Map()
+builder > A.scala
+compiling Set(A.scala)
+Changes: Map(trait A -> List(Changed(Definition(A.T))[type T changed from A.this.T to A.this.T flags: ]))
+invalidate B.scala because it references changed definition [Changed(Definition(A.T))[type T changed from A.this.T to A.this.T flags: ]]
+compiling Set(B.scala)
+B.scala:2: error: type mismatch;
+ found : a.T
+ required: Int
+ def x(a: A): Int = a.x
+ ^
diff --git a/test/files/buildmanager/t2650_3/t2650_3.test b/test/files/buildmanager/t2650_3/t2650_3.test
new file mode 100644
index 0000000000..6f3bd03361
--- /dev/null
+++ b/test/files/buildmanager/t2650_3/t2650_3.test
@@ -0,0 +1,3 @@
+>>compile A.scala B.scala
+>>update A.scala=>A2.scala
+>>compile A.scala
diff --git a/test/files/buildmanager/t2650_4/A.scala b/test/files/buildmanager/t2650_4/A.scala
new file mode 100644
index 0000000000..b9a519eb48
--- /dev/null
+++ b/test/files/buildmanager/t2650_4/A.scala
@@ -0,0 +1,5 @@
+trait A {
+ type T = Int
+ type T2 = T
+ def x: T2
+}
diff --git a/test/files/buildmanager/t2650_4/B.scala b/test/files/buildmanager/t2650_4/B.scala
new file mode 100644
index 0000000000..46a8cf270a
--- /dev/null
+++ b/test/files/buildmanager/t2650_4/B.scala
@@ -0,0 +1,3 @@
+object B {
+ def x(a: A): Int = a.x
+}
diff --git a/test/files/buildmanager/t2650_4/t2650_4.changes/A2.scala b/test/files/buildmanager/t2650_4/t2650_4.changes/A2.scala
new file mode 100644
index 0000000000..0220e7b7bc
--- /dev/null
+++ b/test/files/buildmanager/t2650_4/t2650_4.changes/A2.scala
@@ -0,0 +1,5 @@
+trait A {
+ type T = Long
+ type T2 = T
+ def x: T2
+}
diff --git a/test/files/buildmanager/t2650_4/t2650_4.check b/test/files/buildmanager/t2650_4/t2650_4.check
new file mode 100644
index 0000000000..ba092d013f
--- /dev/null
+++ b/test/files/buildmanager/t2650_4/t2650_4.check
@@ -0,0 +1,13 @@
+builder > A.scala B.scala
+compiling Set(A.scala, B.scala)
+Changes: Map()
+builder > A.scala
+compiling Set(A.scala)
+Changes: Map(trait A -> List(Changed(Definition(A.T))[type T changed from A.this.T to A.this.T flags: ]))
+invalidate B.scala because it references changed definition [Changed(Definition(A.T))[type T changed from A.this.T to A.this.T flags: ]]
+compiling Set(B.scala)
+B.scala:2: error: type mismatch;
+ found : a.T2
+ required: Int
+ def x(a: A): Int = a.x
+ ^
diff --git a/test/files/buildmanager/t2650_4/t2650_4.test b/test/files/buildmanager/t2650_4/t2650_4.test
new file mode 100644
index 0000000000..6f3bd03361
--- /dev/null
+++ b/test/files/buildmanager/t2650_4/t2650_4.test
@@ -0,0 +1,3 @@
+>>compile A.scala B.scala
+>>update A.scala=>A2.scala
+>>compile A.scala
diff --git a/test/files/buildmanager/t2651_2/A.scala b/test/files/buildmanager/t2651_2/A.scala
new file mode 100644
index 0000000000..d712f6febe
--- /dev/null
+++ b/test/files/buildmanager/t2651_2/A.scala
@@ -0,0 +1 @@
+trait A[T]
diff --git a/test/files/buildmanager/t2651_2/t2651_2.changes/A2.scala b/test/files/buildmanager/t2651_2/t2651_2.changes/A2.scala
new file mode 100644
index 0000000000..7fb573e077
--- /dev/null
+++ b/test/files/buildmanager/t2651_2/t2651_2.changes/A2.scala
@@ -0,0 +1 @@
+trait A[S]
diff --git a/test/files/buildmanager/t2651_2/t2651_2.check b/test/files/buildmanager/t2651_2/t2651_2.check
new file mode 100644
index 0000000000..dd789b7565
--- /dev/null
+++ b/test/files/buildmanager/t2651_2/t2651_2.check
@@ -0,0 +1,6 @@
+builder > A.scala
+compiling Set(A.scala)
+Changes: Map()
+builder > A.scala
+compiling Set(A.scala)
+Changes: Map(trait A -> List())
diff --git a/test/files/buildmanager/t2651_2/t2651_2.test b/test/files/buildmanager/t2651_2/t2651_2.test
new file mode 100644
index 0000000000..d0614473ce
--- /dev/null
+++ b/test/files/buildmanager/t2651_2/t2651_2.test
@@ -0,0 +1,3 @@
+>>compile A.scala
+>>update A.scala=>A2.scala
+>>compile A.scala
diff --git a/test/files/buildmanager/t2651_3/A.scala b/test/files/buildmanager/t2651_3/A.scala
new file mode 100644
index 0000000000..14f9e4662f
--- /dev/null
+++ b/test/files/buildmanager/t2651_3/A.scala
@@ -0,0 +1,3 @@
+trait A[T, S] {
+ def x: T
+}
diff --git a/test/files/buildmanager/t2651_3/t2651_3.changes/A2.scala b/test/files/buildmanager/t2651_3/t2651_3.changes/A2.scala
new file mode 100644
index 0000000000..51bf27d1fa
--- /dev/null
+++ b/test/files/buildmanager/t2651_3/t2651_3.changes/A2.scala
@@ -0,0 +1,3 @@
+trait A[T, S] {
+ def x: S
+}
diff --git a/test/files/buildmanager/t2651_3/t2651_3.check b/test/files/buildmanager/t2651_3/t2651_3.check
new file mode 100644
index 0000000000..d4bac196e9
--- /dev/null
+++ b/test/files/buildmanager/t2651_3/t2651_3.check
@@ -0,0 +1,6 @@
+builder > A.scala
+compiling Set(A.scala)
+Changes: Map()
+builder > A.scala
+compiling Set(A.scala)
+Changes: Map(trait A -> List(Changed(Definition(A.x))[method x changed from ()T to ()S flags: <deferred> <method>]))
diff --git a/test/files/buildmanager/t2651_3/t2651_3.test b/test/files/buildmanager/t2651_3/t2651_3.test
new file mode 100644
index 0000000000..d0614473ce
--- /dev/null
+++ b/test/files/buildmanager/t2651_3/t2651_3.test
@@ -0,0 +1,3 @@
+>>compile A.scala
+>>update A.scala=>A2.scala
+>>compile A.scala
diff --git a/test/files/buildmanager/t2651_4/A.scala b/test/files/buildmanager/t2651_4/A.scala
new file mode 100644
index 0000000000..63f2a1643e
--- /dev/null
+++ b/test/files/buildmanager/t2651_4/A.scala
@@ -0,0 +1,5 @@
+trait A[T, S] {
+ def x: T
+ def y(a: T)
+ def z[B <: T]
+}
diff --git a/test/files/buildmanager/t2651_4/B.scala b/test/files/buildmanager/t2651_4/B.scala
new file mode 100644
index 0000000000..b33dbde676
--- /dev/null
+++ b/test/files/buildmanager/t2651_4/B.scala
@@ -0,0 +1,3 @@
+trait B extends A[Int, String] {
+ def x = 3
+}
diff --git a/test/files/buildmanager/t2651_4/t2651_4.changes/A2.scala b/test/files/buildmanager/t2651_4/t2651_4.changes/A2.scala
new file mode 100644
index 0000000000..f155129d13
--- /dev/null
+++ b/test/files/buildmanager/t2651_4/t2651_4.changes/A2.scala
@@ -0,0 +1,5 @@
+trait A[S, T] {
+ def x: T
+ def y(a: T)
+ def z[B <: T]
+}
diff --git a/test/files/buildmanager/t2651_4/t2651_4.check b/test/files/buildmanager/t2651_4/t2651_4.check
new file mode 100644
index 0000000000..c4ce382b5f
--- /dev/null
+++ b/test/files/buildmanager/t2651_4/t2651_4.check
@@ -0,0 +1,13 @@
+builder > A.scala B.scala
+compiling Set(A.scala, B.scala)
+Changes: Map()
+builder > A.scala
+compiling Set(A.scala)
+Changes: Map(trait A -> List(Changed(Definition(A.x))[method x changed from ()T to ()T flags: <deferred> <method>], Changed(Definition(A.y))[method y changed from (a: T)Unit to (a: T)Unit flags: <deferred> <method>], Changed(Definition(A.z))[method z changed from [B <: T]()Unit to [B <: T]()Unit flags: <deferred> <method>]))
+invalidate B.scala because inherited method changed [Changed(Definition(A.x))[method x changed from ()T to ()T flags: <deferred> <method>]]
+compiling Set(B.scala)
+B.scala:2: error: type mismatch;
+ found : Int(3)
+ required: String
+ def x = 3
+ ^
diff --git a/test/files/buildmanager/t2651_4/t2651_4.test b/test/files/buildmanager/t2651_4/t2651_4.test
new file mode 100644
index 0000000000..6f3bd03361
--- /dev/null
+++ b/test/files/buildmanager/t2651_4/t2651_4.test
@@ -0,0 +1,3 @@
+>>compile A.scala B.scala
+>>update A.scala=>A2.scala
+>>compile A.scala
diff --git a/test/files/buildmanager/t2652/A.scala b/test/files/buildmanager/t2652/A.scala
new file mode 100644
index 0000000000..a62506e890
--- /dev/null
+++ b/test/files/buildmanager/t2652/A.scala
@@ -0,0 +1,3 @@
+class A {
+ def x[T](t: T) = t
+}
diff --git a/test/files/buildmanager/t2652/B.scala b/test/files/buildmanager/t2652/B.scala
new file mode 100644
index 0000000000..86d08f0d3d
--- /dev/null
+++ b/test/files/buildmanager/t2652/B.scala
@@ -0,0 +1,4 @@
+object B {
+ val y = (new A).x(3)
+}
+
diff --git a/test/files/buildmanager/t2652/t2652.changes/A2.scala b/test/files/buildmanager/t2652/t2652.changes/A2.scala
new file mode 100644
index 0000000000..29135c0e94
--- /dev/null
+++ b/test/files/buildmanager/t2652/t2652.changes/A2.scala
@@ -0,0 +1,4 @@
+class A {
+ def x[@specialized T](t: T) = t
+}
+
diff --git a/test/files/buildmanager/t2652/t2652.check b/test/files/buildmanager/t2652/t2652.check
new file mode 100644
index 0000000000..77a27a727f
--- /dev/null
+++ b/test/files/buildmanager/t2652/t2652.check
@@ -0,0 +1,9 @@
+builder > A.scala B.scala
+compiling Set(A.scala, B.scala)
+Changes: Map()
+builder > A.scala
+compiling Set(A.scala)
+Changes: Map(class A -> List(Changed(Definition(A.x))[method x changed from [T](t: T)T to [T](t: T)T flags: <method>]))
+invalidate B.scala because it references changed definition [Changed(Definition(A.x))[method x changed from [T](t: T)T to [T](t: T)T flags: <method>]]
+compiling Set(B.scala)
+Changes: Map(object B -> List())
diff --git a/test/files/buildmanager/t2652/t2652.test b/test/files/buildmanager/t2652/t2652.test
new file mode 100644
index 0000000000..6f3bd03361
--- /dev/null
+++ b/test/files/buildmanager/t2652/t2652.test
@@ -0,0 +1,3 @@
+>>compile A.scala B.scala
+>>update A.scala=>A2.scala
+>>compile A.scala
diff --git a/test/files/buildmanager/t2653/A.scala b/test/files/buildmanager/t2653/A.scala
new file mode 100644
index 0000000000..fb17a158c7
--- /dev/null
+++ b/test/files/buildmanager/t2653/A.scala
@@ -0,0 +1,2 @@
+class A[+T]
+
diff --git a/test/files/buildmanager/t2653/B.scala b/test/files/buildmanager/t2653/B.scala
new file mode 100644
index 0000000000..8f55a88e05
--- /dev/null
+++ b/test/files/buildmanager/t2653/B.scala
@@ -0,0 +1,3 @@
+object B {
+ val a: A[Any] = new A[Int]
+}
diff --git a/test/files/buildmanager/t2653/t2653.changes/A2.scala b/test/files/buildmanager/t2653/t2653.changes/A2.scala
new file mode 100644
index 0000000000..51d13cce6e
--- /dev/null
+++ b/test/files/buildmanager/t2653/t2653.changes/A2.scala
@@ -0,0 +1,2 @@
+class A[T]
+
diff --git a/test/files/buildmanager/t2653/t2653.check b/test/files/buildmanager/t2653/t2653.check
new file mode 100644
index 0000000000..0d40601962
--- /dev/null
+++ b/test/files/buildmanager/t2653/t2653.check
@@ -0,0 +1,13 @@
+builder > A.scala B.scala
+compiling Set(A.scala, B.scala)
+Changes: Map()
+builder > A.scala
+compiling Set(A.scala)
+Changes: Map(class A -> List(Changed(Class(A))[ tparams: List((type T,type T))], Changed(Definition(A.<init>))[constructor A changed from ()A[T] to ()A[T] flags: <method>]))
+invalidate B.scala because it references changed class [Changed(Class(A))[ tparams: List((type T,type T))]]
+compiling Set(B.scala)
+B.scala:2: error: type mismatch;
+ found : A[Int]
+ required: A[Any]
+ val a: A[Any] = new A[Int]
+ ^
diff --git a/test/files/buildmanager/t2653/t2653.test b/test/files/buildmanager/t2653/t2653.test
new file mode 100644
index 0000000000..6f3bd03361
--- /dev/null
+++ b/test/files/buildmanager/t2653/t2653.test
@@ -0,0 +1,3 @@
+>>compile A.scala B.scala
+>>update A.scala=>A2.scala
+>>compile A.scala
diff --git a/test/files/buildmanager/t2654/A.scala b/test/files/buildmanager/t2654/A.scala
new file mode 100644
index 0000000000..75f396d039
--- /dev/null
+++ b/test/files/buildmanager/t2654/A.scala
@@ -0,0 +1,2 @@
+class A
+
diff --git a/test/files/buildmanager/t2654/B.scala b/test/files/buildmanager/t2654/B.scala
new file mode 100644
index 0000000000..a18aec3dbe
--- /dev/null
+++ b/test/files/buildmanager/t2654/B.scala
@@ -0,0 +1 @@
+class B extends A
diff --git a/test/files/buildmanager/t2654/t2654.changes/A2.scala b/test/files/buildmanager/t2654/t2654.changes/A2.scala
new file mode 100644
index 0000000000..c302edbd85
--- /dev/null
+++ b/test/files/buildmanager/t2654/t2654.changes/A2.scala
@@ -0,0 +1,4 @@
+class A {
+ private def x = 5
+}
+
diff --git a/test/files/buildmanager/t2654/t2654.check b/test/files/buildmanager/t2654/t2654.check
new file mode 100644
index 0000000000..68f6e8efc0
--- /dev/null
+++ b/test/files/buildmanager/t2654/t2654.check
@@ -0,0 +1,6 @@
+builder > A.scala B.scala
+compiling Set(A.scala, B.scala)
+Changes: Map()
+builder > A.scala
+compiling Set(A.scala)
+Changes: Map(class A -> List())
diff --git a/test/files/buildmanager/t2654/t2654.test b/test/files/buildmanager/t2654/t2654.test
new file mode 100644
index 0000000000..6f3bd03361
--- /dev/null
+++ b/test/files/buildmanager/t2654/t2654.test
@@ -0,0 +1,3 @@
+>>compile A.scala B.scala
+>>update A.scala=>A2.scala
+>>compile A.scala
diff --git a/test/files/buildmanager/t2655/A.scala b/test/files/buildmanager/t2655/A.scala
new file mode 100644
index 0000000000..b2c54ac47d
--- /dev/null
+++ b/test/files/buildmanager/t2655/A.scala
@@ -0,0 +1,4 @@
+object A {
+ def x(i: => String) = ()
+}
+
diff --git a/test/files/buildmanager/t2655/B.scala b/test/files/buildmanager/t2655/B.scala
new file mode 100644
index 0000000000..6c1918c0fb
--- /dev/null
+++ b/test/files/buildmanager/t2655/B.scala
@@ -0,0 +1,3 @@
+object B {
+ val x = A.x("3")
+}
diff --git a/test/files/buildmanager/t2655/t2655.changes/A2.scala b/test/files/buildmanager/t2655/t2655.changes/A2.scala
new file mode 100644
index 0000000000..0d6a7c69bb
--- /dev/null
+++ b/test/files/buildmanager/t2655/t2655.changes/A2.scala
@@ -0,0 +1,4 @@
+object A {
+ def x(i: Function0[String]) = ()
+}
+
diff --git a/test/files/buildmanager/t2655/t2655.check b/test/files/buildmanager/t2655/t2655.check
new file mode 100644
index 0000000000..a4a071ed70
--- /dev/null
+++ b/test/files/buildmanager/t2655/t2655.check
@@ -0,0 +1,13 @@
+builder > A.scala B.scala
+compiling Set(A.scala, B.scala)
+Changes: Map()
+builder > A.scala
+compiling Set(A.scala)
+Changes: Map(object A -> List(Changed(Definition(A.x))[method x changed from (i: Function0)Unit to (i: Function0)Unit flags: <method>]))
+invalidate B.scala because it references changed definition [Changed(Definition(A.x))[method x changed from (i: Function0)Unit to (i: Function0)Unit flags: <method>]]
+compiling Set(B.scala)
+B.scala:2: error: type mismatch;
+ found : java.lang.String("3")
+ required: () => String
+ val x = A.x("3")
+ ^
diff --git a/test/files/buildmanager/t2655/t2655.test b/test/files/buildmanager/t2655/t2655.test
new file mode 100644
index 0000000000..6f3bd03361
--- /dev/null
+++ b/test/files/buildmanager/t2655/t2655.test
@@ -0,0 +1,3 @@
+>>compile A.scala B.scala
+>>update A.scala=>A2.scala
+>>compile A.scala
diff --git a/test/files/buildmanager/t2657/A.scala b/test/files/buildmanager/t2657/A.scala
new file mode 100644
index 0000000000..2a6c62d29c
--- /dev/null
+++ b/test/files/buildmanager/t2657/A.scala
@@ -0,0 +1,3 @@
+class A {
+ implicit def y(i: Int): String = i.toString
+}
diff --git a/test/files/buildmanager/t2657/B.scala b/test/files/buildmanager/t2657/B.scala
new file mode 100644
index 0000000000..77869890db
--- /dev/null
+++ b/test/files/buildmanager/t2657/B.scala
@@ -0,0 +1,4 @@
+object B extends A {
+ val x: String = 3
+}
+
diff --git a/test/files/buildmanager/t2657/t2657.changes/A2.scala b/test/files/buildmanager/t2657/t2657.changes/A2.scala
new file mode 100644
index 0000000000..7dc99d425e
--- /dev/null
+++ b/test/files/buildmanager/t2657/t2657.changes/A2.scala
@@ -0,0 +1,3 @@
+class A {
+ def y(i: Int): String = i.toString
+}
diff --git a/test/files/buildmanager/t2657/t2657.check b/test/files/buildmanager/t2657/t2657.check
new file mode 100644
index 0000000000..9713f66024
--- /dev/null
+++ b/test/files/buildmanager/t2657/t2657.check
@@ -0,0 +1,13 @@
+builder > A.scala B.scala
+compiling Set(A.scala, B.scala)
+Changes: Map()
+builder > A.scala
+compiling Set(A.scala)
+Changes: Map(class A -> List(Changed(Definition(A.y))[method y changed from (i: Int)java.lang.String to (i: Int)java.lang.String flags: implicit <method>]))
+invalidate B.scala because inherited method changed [Changed(Definition(A.y))[method y changed from (i: Int)java.lang.String to (i: Int)java.lang.String flags: implicit <method>]]
+compiling Set(B.scala)
+B.scala:2: error: type mismatch;
+ found : Int(3)
+ required: String
+ val x: String = 3
+ ^
diff --git a/test/files/buildmanager/t2657/t2657.test b/test/files/buildmanager/t2657/t2657.test
new file mode 100644
index 0000000000..6f3bd03361
--- /dev/null
+++ b/test/files/buildmanager/t2657/t2657.test
@@ -0,0 +1,3 @@
+>>compile A.scala B.scala
+>>update A.scala=>A2.scala
+>>compile A.scala
diff --git a/test/files/buildmanager/t2789/A.scala b/test/files/buildmanager/t2789/A.scala
new file mode 100644
index 0000000000..08d5bc840c
--- /dev/null
+++ b/test/files/buildmanager/t2789/A.scala
@@ -0,0 +1,5 @@
+class A {
+ implicit def e: E = new E
+ def x(i: Int)(implicit y: E): String = ""
+}
+class E
diff --git a/test/files/buildmanager/t2789/B.scala b/test/files/buildmanager/t2789/B.scala
new file mode 100644
index 0000000000..dcefbeec1b
--- /dev/null
+++ b/test/files/buildmanager/t2789/B.scala
@@ -0,0 +1,3 @@
+object B extends A {
+ val y = x(3)
+}
diff --git a/test/files/buildmanager/t2789/t2789.changes/A2.scala b/test/files/buildmanager/t2789/t2789.changes/A2.scala
new file mode 100644
index 0000000000..4ba3814e71
--- /dev/null
+++ b/test/files/buildmanager/t2789/t2789.changes/A2.scala
@@ -0,0 +1,5 @@
+class A {
+ def e: E = new E
+ def x(i: Int)(implicit y: E): String = ""
+}
+class E
diff --git a/test/files/buildmanager/t2789/t2789.check b/test/files/buildmanager/t2789/t2789.check
new file mode 100644
index 0000000000..78c5119355
--- /dev/null
+++ b/test/files/buildmanager/t2789/t2789.check
@@ -0,0 +1,11 @@
+builder > A.scala B.scala
+compiling Set(A.scala, B.scala)
+Changes: Map()
+builder > A.scala
+compiling Set(A.scala)
+Changes: Map(class A -> List(Changed(Definition(A.e))[method e changed from ()E to ()E flags: implicit <method>]), class E -> List())
+invalidate B.scala because inherited method changed [Changed(Definition(A.e))[method e changed from ()E to ()E flags: implicit <method>]]
+compiling Set(B.scala)
+B.scala:2: error: could not find implicit value for parameter y: E
+ val y = x(3)
+ ^
diff --git a/test/files/buildmanager/t2789/t2789.test b/test/files/buildmanager/t2789/t2789.test
new file mode 100644
index 0000000000..6f3bd03361
--- /dev/null
+++ b/test/files/buildmanager/t2789/t2789.test
@@ -0,0 +1,3 @@
+>>compile A.scala B.scala
+>>update A.scala=>A2.scala
+>>compile A.scala
diff --git a/test/files/buildmanager/t2790/A.scala b/test/files/buildmanager/t2790/A.scala
new file mode 100644
index 0000000000..6e9c1a90db
--- /dev/null
+++ b/test/files/buildmanager/t2790/A.scala
@@ -0,0 +1,5 @@
+object A {
+ def x(f: String, g: Int): Int = g
+ def x(f: Int, g: Int = 3): Int = g
+}
+
diff --git a/test/files/buildmanager/t2790/B.scala b/test/files/buildmanager/t2790/B.scala
new file mode 100644
index 0000000000..441055ca12
--- /dev/null
+++ b/test/files/buildmanager/t2790/B.scala
@@ -0,0 +1,4 @@
+object B {
+ val y = A.x(5)
+}
+
diff --git a/test/files/buildmanager/t2790/t2790.changes/A2.scala b/test/files/buildmanager/t2790/t2790.changes/A2.scala
new file mode 100644
index 0000000000..704ef4e96e
--- /dev/null
+++ b/test/files/buildmanager/t2790/t2790.changes/A2.scala
@@ -0,0 +1,4 @@
+object A {
+ def x(f: String, g: Int = 3): Int = g
+ def x(f: Int, g: Int): Int = g
+}
diff --git a/test/files/buildmanager/t2790/t2790.check b/test/files/buildmanager/t2790/t2790.check
new file mode 100644
index 0000000000..065956765a
--- /dev/null
+++ b/test/files/buildmanager/t2790/t2790.check
@@ -0,0 +1,14 @@
+builder > A.scala B.scala
+compiling Set(A.scala, B.scala)
+Changes: Map()
+builder > A.scala
+compiling Set(A.scala)
+Changes: Map(object A -> List(Added(Definition(A.x)), Changed(Definition(A.x))[value x changed from (f: java.lang.String,g: Int)Int to (f: java.lang.String,g: Int)Int <and> (f: Int,g: Int)Int flags: <method>]))
+invalidate B.scala because it references changed definition [Changed(Definition(A.x))[value x changed from (f: java.lang.String,g: Int)Int to (f: java.lang.String,g: Int)Int <and> (f: Int,g: Int)Int flags: <method>]]
+compiling Set(B.scala)
+B.scala:2: error: type mismatch;
+ found : Int(5)
+ required: String
+Error occured in an application involving default arguments.
+ val y = A.x(5)
+ ^
diff --git a/test/files/buildmanager/t2790/t2790.test b/test/files/buildmanager/t2790/t2790.test
new file mode 100644
index 0000000000..6f3bd03361
--- /dev/null
+++ b/test/files/buildmanager/t2790/t2790.test
@@ -0,0 +1,3 @@
+>>compile A.scala B.scala
+>>update A.scala=>A2.scala
+>>compile A.scala
diff --git a/test/files/buildmanager/t3045/A.java b/test/files/buildmanager/t3045/A.java
new file mode 100644
index 0000000000..d1acb00cd6
--- /dev/null
+++ b/test/files/buildmanager/t3045/A.java
@@ -0,0 +1,7 @@
+public interface A {
+ public class C implements A {}
+}
+
+class B {
+ static class C {}
+}
diff --git a/test/files/buildmanager/t3045/t3045.check b/test/files/buildmanager/t3045/t3045.check
new file mode 100644
index 0000000000..5e4e71e045
--- /dev/null
+++ b/test/files/buildmanager/t3045/t3045.check
@@ -0,0 +1,3 @@
+builder > A.java
+compiling Set(A.java)
+Changes: Map()
diff --git a/test/files/buildmanager/t3045/t3045.test b/test/files/buildmanager/t3045/t3045.test
new file mode 100644
index 0000000000..6cf7e35543
--- /dev/null
+++ b/test/files/buildmanager/t3045/t3045.test
@@ -0,0 +1 @@
+>>compile A.java
diff --git a/test/files/buildmanager/t3054/bar/Bar.java b/test/files/buildmanager/t3054/bar/Bar.java
new file mode 100644
index 0000000000..e1b056d4e5
--- /dev/null
+++ b/test/files/buildmanager/t3054/bar/Bar.java
@@ -0,0 +1,7 @@
+package bar;
+import foo.Foo$;
+
+
+public class Bar {
+ void bar() { Foo$.MODULE$.foo(); }
+}
diff --git a/test/files/buildmanager/t3054/foo/Foo.scala b/test/files/buildmanager/t3054/foo/Foo.scala
new file mode 100644
index 0000000000..c4838b9958
--- /dev/null
+++ b/test/files/buildmanager/t3054/foo/Foo.scala
@@ -0,0 +1,5 @@
+package foo
+
+class Foo {
+ def foo = println("foo")
+}
diff --git a/test/files/buildmanager/t3054/t3054.check b/test/files/buildmanager/t3054/t3054.check
new file mode 100644
index 0000000000..97cca8862e
--- /dev/null
+++ b/test/files/buildmanager/t3054/t3054.check
@@ -0,0 +1,3 @@
+builder > bar/Bar.java foo/Foo.scala
+compiling Set(bar/Bar.java, foo/Foo.scala)
+Changes: Map()
diff --git a/test/files/buildmanager/t3054/t3054.test b/test/files/buildmanager/t3054/t3054.test
new file mode 100644
index 0000000000..903df24b13
--- /dev/null
+++ b/test/files/buildmanager/t3054/t3054.test
@@ -0,0 +1 @@
+>>compile bar/Bar.java foo/Foo.scala
diff --git a/test/files/buildmanager/t3133/A.java b/test/files/buildmanager/t3133/A.java
new file mode 100644
index 0000000000..9cf4d96bd4
--- /dev/null
+++ b/test/files/buildmanager/t3133/A.java
@@ -0,0 +1,7 @@
+public class A {
+ class Foo {}
+
+ public A(Foo a) {}
+
+ private void bar(Foo z) {}
+}
diff --git a/test/files/buildmanager/t3133/t3133.check b/test/files/buildmanager/t3133/t3133.check
new file mode 100644
index 0000000000..5e4e71e045
--- /dev/null
+++ b/test/files/buildmanager/t3133/t3133.check
@@ -0,0 +1,3 @@
+builder > A.java
+compiling Set(A.java)
+Changes: Map()
diff --git a/test/files/buildmanager/t3133/t3133.test b/test/files/buildmanager/t3133/t3133.test
new file mode 100644
index 0000000000..6cf7e35543
--- /dev/null
+++ b/test/files/buildmanager/t3133/t3133.test
@@ -0,0 +1 @@
+>>compile A.java
diff --git a/test/files/cli/test1/Main.check.j9vm5 b/test/files/cli/test1/Main.check.j9vm5
deleted file mode 100644
index de454ef478..0000000000
--- a/test/files/cli/test1/Main.check.j9vm5
+++ /dev/null
@@ -1,4 +0,0 @@
-env: -cpp: No such file or directory
-env: test1.Main: No such file or directory
-env: -cp: No such file or directory
-1: test 3 passed
diff --git a/test/files/cli/test1/Main.check.java b/test/files/cli/test1/Main.check.java
deleted file mode 100644
index 64410de98f..0000000000
--- a/test/files/cli/test1/Main.check.java
+++ /dev/null
@@ -1,6 +0,0 @@
-Unrecognized option: -cpp
-Could not create the Java virtual machine.
-1: test 1 passed (1)
-1: test 2 passed (1)
-1: test 3 passed (1)
-1: test 4 passed (2)
diff --git a/test/files/cli/test1/Main.check.java5 b/test/files/cli/test1/Main.check.java5
deleted file mode 100644
index 64410de98f..0000000000
--- a/test/files/cli/test1/Main.check.java5
+++ /dev/null
@@ -1,6 +0,0 @@
-Unrecognized option: -cpp
-Could not create the Java virtual machine.
-1: test 1 passed (1)
-1: test 2 passed (1)
-1: test 3 passed (1)
-1: test 4 passed (2)
diff --git a/test/files/cli/test1/Main.check.java5_api b/test/files/cli/test1/Main.check.java5_api
deleted file mode 100644
index 8693a5d92f..0000000000
--- a/test/files/cli/test1/Main.check.java5_api
+++ /dev/null
@@ -1,19 +0,0 @@
-|-- allclasses-frame.html
-|-- allclasses-noframe.html
-|-- constant-values.html
-|-- deprecated-list.html
-|-- help-doc.html
-|-- index-all.html
-|-- index.html
-|-- overview-tree.html
-|-- package-list
-|-- resources
-| `-- inherit.gif
-|-- stylesheet.css
-`-- test1
- |-- Main.html
- |-- package-frame.html
- |-- package-summary.html
- `-- package-tree.html
-
-2 directories, 15 files
diff --git a/test/files/cli/test1/Main.check.java5_j9 b/test/files/cli/test1/Main.check.java5_j9
deleted file mode 100644
index de454ef478..0000000000
--- a/test/files/cli/test1/Main.check.java5_j9
+++ /dev/null
@@ -1,4 +0,0 @@
-env: -cpp: No such file or directory
-env: test1.Main: No such file or directory
-env: -cp: No such file or directory
-1: test 3 passed
diff --git a/test/files/cli/test1/Main.check.javac b/test/files/cli/test1/Main.check.javac
deleted file mode 100644
index ba25d9b6ca..0000000000
--- a/test/files/cli/test1/Main.check.javac
+++ /dev/null
@@ -1,19 +0,0 @@
-javac: invalid flag: -dd
-Usage: javac <options> <source files>
-where possible options include:
- -g Generate all debugging info
- -g:none Generate no debugging info
- -g:{lines,vars,source} Generate only some debugging info
- -nowarn Generate no warnings
- -verbose Output messages about what the compiler is doing
- -deprecation Output source locations where deprecated APIs are used
- -classpath <path> Specify where to find user class files
- -sourcepath <path> Specify where to find input source files
- -bootclasspath <path> Override location of bootstrap class files
- -extdirs <dirs> Override location of installed extensions
- -d <directory> Specify where to place generated class files
- -encoding <encoding> Specify character encoding used by source files
- -source <release> Provide source compatibility with specified release
- -target <release> Generate class files for specific VM version
- -help Print a synopsis of standard options
-
diff --git a/test/files/cli/test1/Main.check.javac5 b/test/files/cli/test1/Main.check.javac5
deleted file mode 100644
index 0cb29d31ff..0000000000
--- a/test/files/cli/test1/Main.check.javac5
+++ /dev/null
@@ -1,24 +0,0 @@
-javac: invalid flag: -dd
-Usage: javac <options> <source files>
-where possible options include:
- -g Generate all debugging info
- -g:none Generate no debugging info
- -g:{lines,vars,source} Generate only some debugging info
- -nowarn Generate no warnings
- -verbose Output messages about what the compiler is doing
- -deprecation Output source locations where deprecated APIs are used
- -classpath <path> Specify where to find user class files
- -cp <path> Specify where to find user class files
- -sourcepath <path> Specify where to find input source files
- -bootclasspath <path> Override location of bootstrap class files
- -extdirs <dirs> Override location of installed extensions
- -endorseddirs <dirs> Override location of endorsed standards path
- -d <directory> Specify where to place generated class files
- -encoding <encoding> Specify character encoding used by source files
- -source <release> Provide source compatibility with specified release
- -target <release> Generate class files for specific VM version
- -version Version information
- -help Print a synopsis of standard options
- -X Print a synopsis of nonstandard options
- -J<flag> Pass <flag> directly to the runtime system
-
diff --git a/test/files/cli/test1/Main.check.javac6 b/test/files/cli/test1/Main.check.javac6
deleted file mode 100644
index 8f37a05bcb..0000000000
--- a/test/files/cli/test1/Main.check.javac6
+++ /dev/null
@@ -1,29 +0,0 @@
-javac: invalid flag: -dd
-Usage: javac <options> <source files>
-where possible options include:
- -g Generate all debugging info
- -g:none Generate no debugging info
- -g:{lines,vars,source} Generate only some debugging info
- -nowarn Generate no warnings
- -verbose Output messages about what the compiler is doing
- -deprecation Output source locations where deprecated APIs are used
- -classpath <path> Specify where to find user class files and annotation processors
- -cp <path> Specify where to find user class files and annotation processors
- -sourcepath <path> Specify where to find input source files
- -bootclasspath <path> Override location of bootstrap class files
- -extdirs <dirs> Override location of installed extensions
- -endorseddirs <dirs> Override location of endorsed standards path
- -proc:{none, only} Control whether annotation processing and/or compilation is done.
- -processor <class> Name of the annotation processor to run; bypasses default discovery process
- -processorpath <path> Specify where to find annotation processors
- -d <directory> Specify where to place generated class files
- -s <directory> Specify where to place generated source files
- -encoding <encoding> Specify character encoding used by source files
- -source <release> Provide source compatibility with specified release
- -target <release> Generate class files for specific VM version
- -version Version information
- -help Print a synopsis of standard options
- -A[key[=value]] Options to pass to annotation processors
- -X Print a synopsis of nonstandard options
- -J<flag> Pass <flag> directly to the runtime system
-
diff --git a/test/files/cli/test1/Main.check.jikes b/test/files/cli/test1/Main.check.jikes
deleted file mode 100644
index cd891689db..0000000000
--- a/test/files/cli/test1/Main.check.jikes
+++ /dev/null
@@ -1,3 +0,0 @@
-Error: "-dd" is an invalid option.
-use: jikes [options] [@files] file.java...
-For more help, try -help or -version.
diff --git a/test/files/cli/test1/Main.check.jikes5 b/test/files/cli/test1/Main.check.jikes5
deleted file mode 100644
index cd891689db..0000000000
--- a/test/files/cli/test1/Main.check.jikes5
+++ /dev/null
@@ -1,3 +0,0 @@
-Error: "-dd" is an invalid option.
-use: jikes [options] [@files] file.java...
-For more help, try -help or -version.
diff --git a/test/files/cli/test1/Main.check.scala b/test/files/cli/test1/Main.check.scala
deleted file mode 100644
index 43b200ae02..0000000000
--- a/test/files/cli/test1/Main.check.scala
+++ /dev/null
@@ -1,24 +0,0 @@
-unknown option: '-cpp'
-scala [ <option> ]... [<torun> <arguments>]
-
-All options to scalac are allowed. See scalac -help.
-
-<torun>, if present, is an object or script file to run.
-If no <torun> is present, run an interactive interpreter.
-
-Option -howtorun allows explicitly specifying how to run <torun>:
- script: it is a script file
- object: it is an object name
- guess: (the default) try to guess
-
-Option -savecompiled requests that the compiled script be saved
-for future use.
-
-Option -nocompdaemon requests that the fsc offline compiler not be used.
-
-Option -Dproperty=value sets a Java system property.
-
-1: test 1 passed (1)
-1: test 2 passed (1)
-1: test 3 passed (1)
-1: test 4 passed (2)
diff --git a/test/files/cli/test1/Main.check.scala_api b/test/files/cli/test1/Main.check.scala_api
deleted file mode 100644
index 6fac39d3f0..0000000000
--- a/test/files/cli/test1/Main.check.scala_api
+++ /dev/null
@@ -1,33 +0,0 @@
-|-- all-classes.html
-|-- index.html
-|-- modules.html
-|-- nav-classes.html
-|-- root-content.html
-|-- scala
-| |-- Any.html
-| |-- AnyRef.html
-| |-- AnyVal.html
-| |-- Boolean.html
-| |-- Byte.html
-| |-- Char.html
-| |-- Double.html
-| |-- Float.html
-| |-- Int.html
-| |-- Long.html
-| |-- Nothing.html
-| |-- Null.html
-| |-- Short.html
-| |-- Unit.html
-| `-- runtime
-| |-- BoxedFloat.html
-| |-- BoxedInt.html
-| |-- BoxedLong.html
-| `-- BoxedNumber.html
-|-- script.js
-|-- style.css
-|-- test1
-| `-- Main$object.html
-|-- test1$content.html
-`-- test1$package.html
-
-3 directories, 28 files
diff --git a/test/files/cli/test1/Main.check.scala_j9 b/test/files/cli/test1/Main.check.scala_j9
deleted file mode 100644
index 65d5ddaac4..0000000000
--- a/test/files/cli/test1/Main.check.scala_j9
+++ /dev/null
@@ -1,15 +0,0 @@
-unknown option: '-cpp'
-scala [ <compiler-option> | -howtorun:how ]... [<torun> <arguments>]
-
-<compiler-option>'s are as for scalac; see scalac -help.
-<torun>, if present, is an object or script file to run.
-If no <torun> is present, run an interactive interpreter.
--howtorun allows explicitly specifying how to run <torun>:
- script: it is a script file
- object: it is an object name
- guess: (the default) try to guess
-
-1: test 1 passed (1)
-1: test 2 passed (1)
-1: test 3 passed (1)
-1: test 4 passed (2)
diff --git a/test/files/cli/test1/Main.check.scalac b/test/files/cli/test1/Main.check.scalac
deleted file mode 100644
index 8465810d0b..0000000000
--- a/test/files/cli/test1/Main.check.scalac
+++ /dev/null
@@ -1,63 +0,0 @@
-scalac error: bad option: '-dd'
- scalac -help gives more information
-Usage: scalac <options | source files>
-where possible options include:
- -doc Generate documentation
- -g:<g> Generate debugging info (none,source,line,vars,notc)
- -nowarn Generate no warnings
- -noassert Generate no assertions and assumptions
- -verbose Output messages about what the compiler is doing
- -classpath <path> Specify where to find user class files
- -sourcepath <path> Specify where to find input source files
- -bootclasspath <path> Override location of bootstrap class files
- -extdirs <dirs> Override location of installed extensions
- -d <directory> Specify where to place generated class files
- -encoding <encoding> Specify character encoding used by source files
- -windowtitle <windowtitle> Specify window title of generated HTML documentation
- -documenttitle <documenttitle> Specify document title of generated HTML documentation
- -target:<target> Specify which backend to use (jvm-1.5,msil)
- -migrate Assist in migrating from Scala version 1.0
- -o <file> Name of the output assembly (only relevant with -target:msil)
- -r <path> List of assemblies referenced by the program (only relevant with -target:msil)
- -debug Output debugging messages
- -deprecation enable detailed deprecation warnings
- -unchecked enable detailed unchecked warnings
- -statistics Print compiler statistics
- -explaintypes Explain type errors in more detail
- -resident Compiler stays resident, files to compile are read from standard input
- -uniqid Print identifiers with unique names (debugging option)
- -printtypes Print tree types (debugging option)
- -prompt Display a prompt after each error (debugging option)
- -noimports Compile without any implicit imports
- -nopredefs Compile without any implicit predefined values
- -skip:<phase> Skip <phase>
- -check:<phase> Check the tree at start of <phase>
- -print:<phase> Print out program after <phase>
- -printer:<printer> Printer to use (text,html)
- -printfile <file> Specify file in which to print trees
- -graph:<phase> Graph the program after <phase>
- -browse:<phase> Browse the abstract syntax tree after <phase>
- -stop:<phase> Stop after phase <phase>
- -log:<phase> Log operations in <phase>
- -logall Log all operations
- -version Print product version and exit
- -help Print a synopsis of standard options
- -nouescape disables handling of \u unicode escapes
- -Xinline Perform inlining when possible
- -XO Optimize. implies -Xinline, -Xcloselim and -Xdce
- -Xcloselim Perform closure elimination
- -Xdce Perform dead code elimination
- -Xwarndeadcode Emit warnings for dead code
- -XbytecodeRead Enable bytecode reader.
- -Xdetach Perform detaching of remote closures
- -Xshowcls <class> Show class info
- -Xshowobj <object> Show object info
- -Xlinearizer:<Xlinearizer> Linearizer to use (normal,dfs,rpo,dump)
- -Xgenerics Use generic Java types
- -Xprintpos Print tree positions (as offsets)
- -Xscript compile script file
- -Xexperimental enable experimental extensions
- -Xplugtypes parse but ignore annotations in more locations
- -Xkilloption optimizes option types
-
-one error found
diff --git a/test/files/cli/test1/Main.check.scalaint b/test/files/cli/test1/Main.check.scalaint
deleted file mode 100644
index 88345d1874..0000000000
--- a/test/files/cli/test1/Main.check.scalaint
+++ /dev/null
@@ -1,45 +0,0 @@
-unknown option: '-cpp'
-scala [ <option> ]... [<torun> <arguments>]
-
-All options to scalac are allowed. See scalac -help.
-
-<torun>, if present, is an object or script file to run.
-If no <torun> is present, run an interactive interpreter.
-
-Option -howtorun allows explicitly specifying how to run <torun>:
- script: it is a script file
- object: it is an object name
- guess: (the default) try to guess
-
-Option -savecompiled requests that the compiled script be saved
-for future use.
-
-Option -nocompdaemon requests that the fsc offline compiler not be used.
-
-Option -Dproperty=value sets a Java system property.
-
-
-This is an interpreter for Scala.
-Type in expressions to have them evaluated.
-Type :help for more information.
-
-scala> 1: test 1 passed (1)
-unnamed0: scala.Unit = ()
-
-scala>
-This is an interpreter for Scala.
-Type in expressions to have them evaluated.
-Type :help for more information.
-
-scala> 1: test 2 passed (1)
-unnamed0: scala.Unit = ()
-
-scala>
-This is an interpreter for Scala.
-Type in expressions to have them evaluated.
-Type :help for more information.
-
-scala> 1: test 3 passed (1)
-unnamed0: scala.Unit = ()
-
-scala>
diff --git a/test/files/cli/test1/Main.java b/test/files/cli/test1/Main.java
deleted file mode 100644
index 8850b87517..0000000000
--- a/test/files/cli/test1/Main.java
+++ /dev/null
@@ -1,8 +0,0 @@
-// @info no dependency
-package test1;
-public class Main {
- public static void main(String args[]) {
- String arg = (args.length > 0) ? args[0] : "?";
- System.out.println("1: test " + arg + " passed (" + args.length + ")");
- }
-}
diff --git a/test/files/cli/test1/Main.scala b/test/files/cli/test1/Main.scala
deleted file mode 100644
index f7dd8a0a36..0000000000
--- a/test/files/cli/test1/Main.scala
+++ /dev/null
@@ -1,8 +0,0 @@
-// @info no dependency
-package test1
-object Main {
- def main(args: Array[String]) = {
- val arg = if (args != null && args.length > 0) args(0) else "?"
- Console.println("1: test " + arg + " passed (" + args.length + ")")
- }
-}
diff --git a/test/files/cli/test2/Main.check.j9vm5 b/test/files/cli/test2/Main.check.j9vm5
deleted file mode 100644
index 8f4fdf8aa1..0000000000
--- a/test/files/cli/test2/Main.check.j9vm5
+++ /dev/null
@@ -1,4 +0,0 @@
-env: -cpp: No such file or directory
-env: test2.Main: No such file or directory
-env: -cp: No such file or directory
-2: 1: test 3 passed
diff --git a/test/files/cli/test2/Main.check.java b/test/files/cli/test2/Main.check.java
deleted file mode 100644
index aca383de3e..0000000000
--- a/test/files/cli/test2/Main.check.java
+++ /dev/null
@@ -1,6 +0,0 @@
-Unrecognized option: -cpp
-Could not create the Java virtual machine.
-2: 1: test 1 passed (1)
-2: 1: test 2 passed (1)
-2: 1: test 3 passed (1)
-2: 1: test 4 passed (2)
diff --git a/test/files/cli/test2/Main.check.java5 b/test/files/cli/test2/Main.check.java5
deleted file mode 100644
index aca383de3e..0000000000
--- a/test/files/cli/test2/Main.check.java5
+++ /dev/null
@@ -1,6 +0,0 @@
-Unrecognized option: -cpp
-Could not create the Java virtual machine.
-2: 1: test 1 passed (1)
-2: 1: test 2 passed (1)
-2: 1: test 3 passed (1)
-2: 1: test 4 passed (2)
diff --git a/test/files/cli/test2/Main.check.java5_api b/test/files/cli/test2/Main.check.java5_api
deleted file mode 100644
index 4ff775c3da..0000000000
--- a/test/files/cli/test2/Main.check.java5_api
+++ /dev/null
@@ -1,24 +0,0 @@
-|-- allclasses-frame.html
-|-- allclasses-noframe.html
-|-- constant-values.html
-|-- deprecated-list.html
-|-- help-doc.html
-|-- index-all.html
-|-- index.html
-|-- overview-tree.html
-|-- package-list
-|-- resources
-| `-- inherit.gif
-|-- stylesheet.css
-|-- test1
-| |-- Main.html
-| |-- package-frame.html
-| |-- package-summary.html
-| `-- package-tree.html
-`-- test2
- |-- Main.html
- |-- package-frame.html
- |-- package-summary.html
- `-- package-tree.html
-
-3 directories, 19 files
diff --git a/test/files/cli/test2/Main.check.java5_j9 b/test/files/cli/test2/Main.check.java5_j9
deleted file mode 100644
index 2dcb6e892a..0000000000
--- a/test/files/cli/test2/Main.check.java5_j9
+++ /dev/null
@@ -1,36 +0,0 @@
-JVMJ9VM007E Command-line option unrecognised: -cpp
-Could not create the Java virtual machine.
-
-Usage: java [-options] class [args...]
- (to execute a class)
- or java [-jar] [-options] jarfile [args...]
- (to execute a jar file)
-
-where options include:
- -cp -classpath <directories and zip/jar files separated by :>
- set search path for application classes and resources
- -D<name>=<value>
- set a system property
- -verbose[:class|gc|jni]
- enable verbose output
- -version print product version
- -version:<value>
- require the specified version to run
- -showversion print product version and continue
- -jre-restrict-search | -no-jre-restrict-search
- include/exclude user private JREs in the version search
- -agentlib:<libname>[=<options>]
- load native agent library <libname>, e.g. -agentlib:hprof
- see also, -agentlib:jdwp=help and -agentlib:hprof=help
- -agentpath:<pathname>[=<options>]
- load native agent library by full pathname
- -javaagent:<jarpath>[=<options>]
- load Java programming language agent, see java.lang.instrument
- -? -help print this help message
- -X print help on non-standard options
- -assert print help on assert options
-
-The java class is not found: test2.Main
-The java class is not found: test2.Main
-The java class is not found: test2.Main
-The java class is not found: test2.Main
diff --git a/test/files/cli/test2/Main.check.javac b/test/files/cli/test2/Main.check.javac
deleted file mode 100644
index c40c0a7a89..0000000000
--- a/test/files/cli/test2/Main.check.javac
+++ /dev/null
@@ -1,27 +0,0 @@
-javac: invalid flag: -dd
-Usage: javac <options> <source files>
-where possible options include:
- -g Generate all debugging info
- -g:none Generate no debugging info
- -g:{lines,vars,source} Generate only some debugging info
- -nowarn Generate no warnings
- -verbose Output messages about what the compiler is doing
- -deprecation Output source locations where deprecated APIs are used
- -classpath <path> Specify where to find user class files
- -sourcepath <path> Specify where to find input source files
- -bootclasspath <path> Override location of bootstrap class files
- -extdirs <dirs> Override location of installed extensions
- -d <directory> Specify where to place generated class files
- -encoding <encoding> Specify character encoding used by source files
- -source <release> Provide source compatibility with specified release
- -target <release> Generate class files for specific VM version
- -help Print a synopsis of standard options
-
-files/cli/test2/Main.java:6: package test1 does not exist
- test1.Main.main(args);
- ^
-1 error
-files/cli/test2/Main.java:6: package test1 does not exist
- test1.Main.main(args);
- ^
-1 error
diff --git a/test/files/cli/test2/Main.check.javac5 b/test/files/cli/test2/Main.check.javac5
deleted file mode 100644
index 0ac32b056e..0000000000
--- a/test/files/cli/test2/Main.check.javac5
+++ /dev/null
@@ -1,28 +0,0 @@
-javac: invalid flag: -dd
-Usage: javac <options> <source files>
-where possible options include:
- -g Generate all debugging info
- -g:none Generate no debugging info
- -g:{lines,vars,source} Generate only some debugging info
- -nowarn Generate no warnings
- -verbose Output messages about what the compiler is doing
- -deprecation Output source locations where deprecated APIs are used
- -classpath <path> Specify where to find user class files
- -cp <path> Specify where to find user class files
- -sourcepath <path> Specify where to find input source files
- -bootclasspath <path> Override location of bootstrap class files
- -extdirs <dirs> Override location of installed extensions
- -endorseddirs <dirs> Override location of endorsed standards path
- -d <directory> Specify where to place generated class files
- -encoding <encoding> Specify character encoding used by source files
- -source <release> Provide source compatibility with specified release
- -target <release> Generate class files for specific VM version
- -version Version information
- -help Print a synopsis of standard options
- -X Print a synopsis of nonstandard options
- -J<flag> Pass <flag> directly to the runtime system
-
-files/cli/test2/Main.java:6: package test1 does not exist
- test1.Main.main(args);
- ^
-1 error
diff --git a/test/files/cli/test2/Main.check.javac6 b/test/files/cli/test2/Main.check.javac6
deleted file mode 100644
index 350d3253bc..0000000000
--- a/test/files/cli/test2/Main.check.javac6
+++ /dev/null
@@ -1,33 +0,0 @@
-javac: invalid flag: -dd
-Usage: javac <options> <source files>
-where possible options include:
- -g Generate all debugging info
- -g:none Generate no debugging info
- -g:{lines,vars,source} Generate only some debugging info
- -nowarn Generate no warnings
- -verbose Output messages about what the compiler is doing
- -deprecation Output source locations where deprecated APIs are used
- -classpath <path> Specify where to find user class files and annotation processors
- -cp <path> Specify where to find user class files and annotation processors
- -sourcepath <path> Specify where to find input source files
- -bootclasspath <path> Override location of bootstrap class files
- -extdirs <dirs> Override location of installed extensions
- -endorseddirs <dirs> Override location of endorsed standards path
- -proc:{none, only} Control whether annotation processing and/or compilation is done.
- -processor <class> Name of the annotation processor to run; bypasses default discovery process
- -processorpath <path> Specify where to find annotation processors
- -d <directory> Specify where to place generated class files
- -s <directory> Specify where to place generated source files
- -encoding <encoding> Specify character encoding used by source files
- -source <release> Provide source compatibility with specified release
- -target <release> Generate class files for specific VM version
- -version Version information
- -help Print a synopsis of standard options
- -A[key[=value]] Options to pass to annotation processors
- -X Print a synopsis of nonstandard options
- -J<flag> Pass <flag> directly to the runtime system
-
-files/cli/test2/Main.java:5: package test1 does not exist
- test1.Main.main(args);
- ^
-1 error
diff --git a/test/files/cli/test2/Main.check.jikes b/test/files/cli/test2/Main.check.jikes
deleted file mode 100644
index 97943e8347..0000000000
--- a/test/files/cli/test2/Main.check.jikes
+++ /dev/null
@@ -1,9 +0,0 @@
-Error: "-dd" is an invalid option.
-use: jikes [options] [@files] file.java...
-For more help, try -help or -version.
-
-Found 1 semantic error compiling "files/cli/test2/Main.java":
-
- 6. test1.Main.main(args);
- ^---^
-*** Semantic Error: No accessible field named "test1" was found in type "test2.Main".
diff --git a/test/files/cli/test2/Main.check.jikes5 b/test/files/cli/test2/Main.check.jikes5
deleted file mode 100644
index 97943e8347..0000000000
--- a/test/files/cli/test2/Main.check.jikes5
+++ /dev/null
@@ -1,9 +0,0 @@
-Error: "-dd" is an invalid option.
-use: jikes [options] [@files] file.java...
-For more help, try -help or -version.
-
-Found 1 semantic error compiling "files/cli/test2/Main.java":
-
- 6. test1.Main.main(args);
- ^---^
-*** Semantic Error: No accessible field named "test1" was found in type "test2.Main".
diff --git a/test/files/cli/test2/Main.check.scala b/test/files/cli/test2/Main.check.scala
deleted file mode 100644
index 7e5f17625b..0000000000
--- a/test/files/cli/test2/Main.check.scala
+++ /dev/null
@@ -1,24 +0,0 @@
-unknown option: '-cpp'
-scala [ <option> ]... [<torun> <arguments>]
-
-All options to scalac are allowed. See scalac -help.
-
-<torun>, if present, is an object or script file to run.
-If no <torun> is present, run an interactive interpreter.
-
-Option -howtorun allows explicitly specifying how to run <torun>:
- script: it is a script file
- object: it is an object name
- guess: (the default) try to guess
-
-Option -savecompiled requests that the compiled script be saved
-for future use.
-
-Option -nocompdaemon requests that the fsc offline compiler not be used.
-
-Option -Dproperty=value sets a Java system property.
-
-2: 1: test 1 passed (1)
-2: 1: test 2 passed (1)
-2: 1: test 3 passed (1)
-2: 1: test 4 passed (2)
diff --git a/test/files/cli/test2/Main.check.scala_api b/test/files/cli/test2/Main.check.scala_api
deleted file mode 100644
index bcb0f0c7fb..0000000000
--- a/test/files/cli/test2/Main.check.scala_api
+++ /dev/null
@@ -1,37 +0,0 @@
-|-- all-classes.html
-|-- index.html
-|-- modules.html
-|-- nav-classes.html
-|-- root-content.html
-|-- scala
-| |-- Any.html
-| |-- AnyRef.html
-| |-- AnyVal.html
-| |-- Boolean.html
-| |-- Byte.html
-| |-- Char.html
-| |-- Double.html
-| |-- Float.html
-| |-- Int.html
-| |-- Long.html
-| |-- Nothing.html
-| |-- Null.html
-| |-- Short.html
-| |-- Unit.html
-| `-- runtime
-| |-- BoxedFloat.html
-| |-- BoxedInt.html
-| |-- BoxedLong.html
-| `-- BoxedNumber.html
-|-- script.js
-|-- style.css
-|-- test1
-| `-- Main$object.html
-|-- test1$content.html
-|-- test1$package.html
-|-- test2
-| `-- Main$object.html
-|-- test2$content.html
-`-- test2$package.html
-
-4 directories, 31 files
diff --git a/test/files/cli/test2/Main.check.scala_j9 b/test/files/cli/test2/Main.check.scala_j9
deleted file mode 100644
index 80cbb50fa9..0000000000
--- a/test/files/cli/test2/Main.check.scala_j9
+++ /dev/null
@@ -1,15 +0,0 @@
-unknown option: '-cpp'
-scala [ <compiler-option> | -howtorun:how ]... [<torun> <arguments>]
-
-<compiler-option>'s are as for scalac; see scalac -help.
-<torun>, if present, is an object or script file to run.
-If no <torun> is present, run an interactive interpreter.
--howtorun allows explicitly specifying how to run <torun>:
- script: it is a script file
- object: it is an object name
- guess: (the default) try to guess
-
-2: 1: test 1 passed (1)
-2: 1: test 2 passed (1)
-2: 1: test 3 passed (1)
-2: 1: test 4 passed (2)
diff --git a/test/files/cli/test2/Main.check.scalac b/test/files/cli/test2/Main.check.scalac
deleted file mode 100644
index 8465810d0b..0000000000
--- a/test/files/cli/test2/Main.check.scalac
+++ /dev/null
@@ -1,63 +0,0 @@
-scalac error: bad option: '-dd'
- scalac -help gives more information
-Usage: scalac <options | source files>
-where possible options include:
- -doc Generate documentation
- -g:<g> Generate debugging info (none,source,line,vars,notc)
- -nowarn Generate no warnings
- -noassert Generate no assertions and assumptions
- -verbose Output messages about what the compiler is doing
- -classpath <path> Specify where to find user class files
- -sourcepath <path> Specify where to find input source files
- -bootclasspath <path> Override location of bootstrap class files
- -extdirs <dirs> Override location of installed extensions
- -d <directory> Specify where to place generated class files
- -encoding <encoding> Specify character encoding used by source files
- -windowtitle <windowtitle> Specify window title of generated HTML documentation
- -documenttitle <documenttitle> Specify document title of generated HTML documentation
- -target:<target> Specify which backend to use (jvm-1.5,msil)
- -migrate Assist in migrating from Scala version 1.0
- -o <file> Name of the output assembly (only relevant with -target:msil)
- -r <path> List of assemblies referenced by the program (only relevant with -target:msil)
- -debug Output debugging messages
- -deprecation enable detailed deprecation warnings
- -unchecked enable detailed unchecked warnings
- -statistics Print compiler statistics
- -explaintypes Explain type errors in more detail
- -resident Compiler stays resident, files to compile are read from standard input
- -uniqid Print identifiers with unique names (debugging option)
- -printtypes Print tree types (debugging option)
- -prompt Display a prompt after each error (debugging option)
- -noimports Compile without any implicit imports
- -nopredefs Compile without any implicit predefined values
- -skip:<phase> Skip <phase>
- -check:<phase> Check the tree at start of <phase>
- -print:<phase> Print out program after <phase>
- -printer:<printer> Printer to use (text,html)
- -printfile <file> Specify file in which to print trees
- -graph:<phase> Graph the program after <phase>
- -browse:<phase> Browse the abstract syntax tree after <phase>
- -stop:<phase> Stop after phase <phase>
- -log:<phase> Log operations in <phase>
- -logall Log all operations
- -version Print product version and exit
- -help Print a synopsis of standard options
- -nouescape disables handling of \u unicode escapes
- -Xinline Perform inlining when possible
- -XO Optimize. implies -Xinline, -Xcloselim and -Xdce
- -Xcloselim Perform closure elimination
- -Xdce Perform dead code elimination
- -Xwarndeadcode Emit warnings for dead code
- -XbytecodeRead Enable bytecode reader.
- -Xdetach Perform detaching of remote closures
- -Xshowcls <class> Show class info
- -Xshowobj <object> Show object info
- -Xlinearizer:<Xlinearizer> Linearizer to use (normal,dfs,rpo,dump)
- -Xgenerics Use generic Java types
- -Xprintpos Print tree positions (as offsets)
- -Xscript compile script file
- -Xexperimental enable experimental extensions
- -Xplugtypes parse but ignore annotations in more locations
- -Xkilloption optimizes option types
-
-one error found
diff --git a/test/files/cli/test2/Main.check.scalaint b/test/files/cli/test2/Main.check.scalaint
deleted file mode 100644
index 89b6766bb5..0000000000
--- a/test/files/cli/test2/Main.check.scalaint
+++ /dev/null
@@ -1,45 +0,0 @@
-unknown option: '-cpp'
-scala [ <option> ]... [<torun> <arguments>]
-
-All options to scalac are allowed. See scalac -help.
-
-<torun>, if present, is an object or script file to run.
-If no <torun> is present, run an interactive interpreter.
-
-Option -howtorun allows explicitly specifying how to run <torun>:
- script: it is a script file
- object: it is an object name
- guess: (the default) try to guess
-
-Option -savecompiled requests that the compiled script be saved
-for future use.
-
-Option -nocompdaemon requests that the fsc offline compiler not be used.
-
-Option -Dproperty=value sets a Java system property.
-
-
-This is an interpreter for Scala.
-Type in expressions to have them evaluated.
-Type :help for more information.
-
-scala> 2: 1: test 1 passed (1)
-unnamed0: scala.Unit = ()
-
-scala>
-This is an interpreter for Scala.
-Type in expressions to have them evaluated.
-Type :help for more information.
-
-scala> 2: 1: test 2 passed (1)
-unnamed0: scala.Unit = ()
-
-scala>
-This is an interpreter for Scala.
-Type in expressions to have them evaluated.
-Type :help for more information.
-
-scala> 2: 1: test 3 passed (1)
-unnamed0: scala.Unit = ()
-
-scala>
diff --git a/test/files/cli/test2/Main.java b/test/files/cli/test2/Main.java
deleted file mode 100644
index f6797632bf..0000000000
--- a/test/files/cli/test2/Main.java
+++ /dev/null
@@ -1,8 +0,0 @@
-// @info 1 dependency
-package test2;
-public class Main {
- public static void main(String args[]) {
- System.out.print("2: ");
- test1.Main.main(args);
- }
-}
diff --git a/test/files/cli/test2/Main.scala b/test/files/cli/test2/Main.scala
deleted file mode 100644
index 1d43759fdf..0000000000
--- a/test/files/cli/test2/Main.scala
+++ /dev/null
@@ -1,8 +0,0 @@
-// @info 1 dependency
-package test2
-object Main {
- def main(args: Array[String]) = {
- Console.print("2: ")
- test1.Main.main(args)
- }
-}
diff --git a/test/files/cli/test3/Main.check.j9vm5 b/test/files/cli/test3/Main.check.j9vm5
deleted file mode 100644
index a094dc8daf..0000000000
--- a/test/files/cli/test3/Main.check.j9vm5
+++ /dev/null
@@ -1,5 +0,0 @@
-env: -cpp: No such file or directory
-env: test3.Main: No such file or directory
-env: -cp: No such file or directory
-3: 1: test 3 passed
-3: 2: 1: test 3 passed
diff --git a/test/files/cli/test3/Main.check.java b/test/files/cli/test3/Main.check.java
deleted file mode 100644
index de3eb7b136..0000000000
--- a/test/files/cli/test3/Main.check.java
+++ /dev/null
@@ -1,10 +0,0 @@
-Unrecognized option: -cpp
-Could not create the Java virtual machine.
-3: 1: test 1 passed (1)
-3: 2: 1: test 1 passed (1)
-3: 1: test 2 passed (1)
-3: 2: 1: test 2 passed (1)
-3: 1: test 3 passed (1)
-3: 2: 1: test 3 passed (1)
-3: 1: test 4 passed (2)
-3: 2: 1: test 4 passed (2)
diff --git a/test/files/cli/test3/Main.check.java5 b/test/files/cli/test3/Main.check.java5
deleted file mode 100644
index de3eb7b136..0000000000
--- a/test/files/cli/test3/Main.check.java5
+++ /dev/null
@@ -1,10 +0,0 @@
-Unrecognized option: -cpp
-Could not create the Java virtual machine.
-3: 1: test 1 passed (1)
-3: 2: 1: test 1 passed (1)
-3: 1: test 2 passed (1)
-3: 2: 1: test 2 passed (1)
-3: 1: test 3 passed (1)
-3: 2: 1: test 3 passed (1)
-3: 1: test 4 passed (2)
-3: 2: 1: test 4 passed (2)
diff --git a/test/files/cli/test3/Main.check.java5_api b/test/files/cli/test3/Main.check.java5_api
deleted file mode 100644
index f6112211f0..0000000000
--- a/test/files/cli/test3/Main.check.java5_api
+++ /dev/null
@@ -1,29 +0,0 @@
-|-- allclasses-frame.html
-|-- allclasses-noframe.html
-|-- constant-values.html
-|-- deprecated-list.html
-|-- help-doc.html
-|-- index-all.html
-|-- index.html
-|-- overview-tree.html
-|-- package-list
-|-- resources
-| `-- inherit.gif
-|-- stylesheet.css
-|-- test1
-| |-- Main.html
-| |-- package-frame.html
-| |-- package-summary.html
-| `-- package-tree.html
-|-- test2
-| |-- Main.html
-| |-- package-frame.html
-| |-- package-summary.html
-| `-- package-tree.html
-`-- test3
- |-- Main.html
- |-- package-frame.html
- |-- package-summary.html
- `-- package-tree.html
-
-4 directories, 23 files
diff --git a/test/files/cli/test3/Main.check.java5_j9 b/test/files/cli/test3/Main.check.java5_j9
deleted file mode 100644
index 9e228d7649..0000000000
--- a/test/files/cli/test3/Main.check.java5_j9
+++ /dev/null
@@ -1,36 +0,0 @@
-JVMJ9VM007E Command-line option unrecognised: -cpp
-Could not create the Java virtual machine.
-
-Usage: java [-options] class [args...]
- (to execute a class)
- or java [-jar] [-options] jarfile [args...]
- (to execute a jar file)
-
-where options include:
- -cp -classpath <directories and zip/jar files separated by :>
- set search path for application classes and resources
- -D<name>=<value>
- set a system property
- -verbose[:class|gc|jni]
- enable verbose output
- -version print product version
- -version:<value>
- require the specified version to run
- -showversion print product version and continue
- -jre-restrict-search | -no-jre-restrict-search
- include/exclude user private JREs in the version search
- -agentlib:<libname>[=<options>]
- load native agent library <libname>, e.g. -agentlib:hprof
- see also, -agentlib:jdwp=help and -agentlib:hprof=help
- -agentpath:<pathname>[=<options>]
- load native agent library by full pathname
- -javaagent:<jarpath>[=<options>]
- load Java programming language agent, see java.lang.instrument
- -? -help print this help message
- -X print help on non-standard options
- -assert print help on assert options
-
-The java class is not found: test3.Main
-The java class is not found: test3.Main
-The java class is not found: test3.Main
-The java class is not found: test3.Main
diff --git a/test/files/cli/test3/Main.check.javac b/test/files/cli/test3/Main.check.javac
deleted file mode 100644
index 8d235b647b..0000000000
--- a/test/files/cli/test3/Main.check.javac
+++ /dev/null
@@ -1,33 +0,0 @@
-javac: invalid flag: -dd
-Usage: javac <options> <source files>
-where possible options include:
- -g Generate all debugging info
- -g:none Generate no debugging info
- -g:{lines,vars,source} Generate only some debugging info
- -nowarn Generate no warnings
- -verbose Output messages about what the compiler is doing
- -deprecation Output source locations where deprecated APIs are used
- -classpath <path> Specify where to find user class files
- -sourcepath <path> Specify where to find input source files
- -bootclasspath <path> Override location of bootstrap class files
- -extdirs <dirs> Override location of installed extensions
- -d <directory> Specify where to place generated class files
- -encoding <encoding> Specify character encoding used by source files
- -source <release> Provide source compatibility with specified release
- -target <release> Generate class files for specific VM version
- -help Print a synopsis of standard options
-
-files/cli/test3/Main.java:6: package test1 does not exist
- test1.Main.main(args);
- ^
-files/cli/test3/Main.java:8: package test2 does not exist
- test2.Main.main(args);
- ^
-2 errors
-files/cli/test3/Main.java:6: package test1 does not exist
- test1.Main.main(args);
- ^
-files/cli/test3/Main.java:8: package test2 does not exist
- test2.Main.main(args);
- ^
-2 errors
diff --git a/test/files/cli/test3/Main.check.javac5 b/test/files/cli/test3/Main.check.javac5
deleted file mode 100644
index 3a48fa000e..0000000000
--- a/test/files/cli/test3/Main.check.javac5
+++ /dev/null
@@ -1,31 +0,0 @@
-javac: invalid flag: -dd
-Usage: javac <options> <source files>
-where possible options include:
- -g Generate all debugging info
- -g:none Generate no debugging info
- -g:{lines,vars,source} Generate only some debugging info
- -nowarn Generate no warnings
- -verbose Output messages about what the compiler is doing
- -deprecation Output source locations where deprecated APIs are used
- -classpath <path> Specify where to find user class files
- -cp <path> Specify where to find user class files
- -sourcepath <path> Specify where to find input source files
- -bootclasspath <path> Override location of bootstrap class files
- -extdirs <dirs> Override location of installed extensions
- -endorseddirs <dirs> Override location of endorsed standards path
- -d <directory> Specify where to place generated class files
- -encoding <encoding> Specify character encoding used by source files
- -source <release> Provide source compatibility with specified release
- -target <release> Generate class files for specific VM version
- -version Version information
- -help Print a synopsis of standard options
- -X Print a synopsis of nonstandard options
- -J<flag> Pass <flag> directly to the runtime system
-
-files/cli/test3/Main.java:6: package test1 does not exist
- test1.Main.main(args);
- ^
-files/cli/test3/Main.java:8: package test2 does not exist
- test2.Main.main(args);
- ^
-2 errors
diff --git a/test/files/cli/test3/Main.check.javac6 b/test/files/cli/test3/Main.check.javac6
deleted file mode 100644
index 677b950aed..0000000000
--- a/test/files/cli/test3/Main.check.javac6
+++ /dev/null
@@ -1,36 +0,0 @@
-javac: invalid flag: -dd
-Usage: javac <options> <source files>
-where possible options include:
- -g Generate all debugging info
- -g:none Generate no debugging info
- -g:{lines,vars,source} Generate only some debugging info
- -nowarn Generate no warnings
- -verbose Output messages about what the compiler is doing
- -deprecation Output source locations where deprecated APIs are used
- -classpath <path> Specify where to find user class files and annotation processors
- -cp <path> Specify where to find user class files and annotation processors
- -sourcepath <path> Specify where to find input source files
- -bootclasspath <path> Override location of bootstrap class files
- -extdirs <dirs> Override location of installed extensions
- -endorseddirs <dirs> Override location of endorsed standards path
- -proc:{none, only} Control whether annotation processing and/or compilation is done.
- -processor <class> Name of the annotation processor to run; bypasses default discovery process
- -processorpath <path> Specify where to find annotation processors
- -d <directory> Specify where to place generated class files
- -s <directory> Specify where to place generated source files
- -encoding <encoding> Specify character encoding used by source files
- -source <release> Provide source compatibility with specified release
- -target <release> Generate class files for specific VM version
- -version Version information
- -help Print a synopsis of standard options
- -A[key[=value]] Options to pass to annotation processors
- -X Print a synopsis of nonstandard options
- -J<flag> Pass <flag> directly to the runtime system
-
-files/cli/test3/Main.java:5: package test1 does not exist
- test1.Main.main(args);
- ^
-files/cli/test3/Main.java:7: package test2 does not exist
- test2.Main.main(args);
- ^
-2 errors
diff --git a/test/files/cli/test3/Main.check.jikes b/test/files/cli/test3/Main.check.jikes
deleted file mode 100644
index 604333e81a..0000000000
--- a/test/files/cli/test3/Main.check.jikes
+++ /dev/null
@@ -1,14 +0,0 @@
-Error: "-dd" is an invalid option.
-use: jikes [options] [@files] file.java...
-For more help, try -help or -version.
-
-Found 2 semantic errors compiling "files/cli/test3/Main.java":
-
- 6. test1.Main.main(args);
- ^---^
-*** Semantic Error: No accessible field named "test1" was found in type "test3.Main".
-
-
- 8. test2.Main.main(args);
- ^---^
-*** Semantic Error: No accessible field named "test2" was found in type "test3.Main".
diff --git a/test/files/cli/test3/Main.check.jikes5 b/test/files/cli/test3/Main.check.jikes5
deleted file mode 100644
index 604333e81a..0000000000
--- a/test/files/cli/test3/Main.check.jikes5
+++ /dev/null
@@ -1,14 +0,0 @@
-Error: "-dd" is an invalid option.
-use: jikes [options] [@files] file.java...
-For more help, try -help or -version.
-
-Found 2 semantic errors compiling "files/cli/test3/Main.java":
-
- 6. test1.Main.main(args);
- ^---^
-*** Semantic Error: No accessible field named "test1" was found in type "test3.Main".
-
-
- 8. test2.Main.main(args);
- ^---^
-*** Semantic Error: No accessible field named "test2" was found in type "test3.Main".
diff --git a/test/files/cli/test3/Main.check.scala b/test/files/cli/test3/Main.check.scala
deleted file mode 100644
index f78729b9a2..0000000000
--- a/test/files/cli/test3/Main.check.scala
+++ /dev/null
@@ -1,28 +0,0 @@
-unknown option: '-cpp'
-scala [ <option> ]... [<torun> <arguments>]
-
-All options to scalac are allowed. See scalac -help.
-
-<torun>, if present, is an object or script file to run.
-If no <torun> is present, run an interactive interpreter.
-
-Option -howtorun allows explicitly specifying how to run <torun>:
- script: it is a script file
- object: it is an object name
- guess: (the default) try to guess
-
-Option -savecompiled requests that the compiled script be saved
-for future use.
-
-Option -nocompdaemon requests that the fsc offline compiler not be used.
-
-Option -Dproperty=value sets a Java system property.
-
-3: 1: test 1 passed (1)
-3: 2: 1: test 1 passed (1)
-3: 1: test 2 passed (1)
-3: 2: 1: test 2 passed (1)
-3: 1: test 3 passed (1)
-3: 2: 1: test 3 passed (1)
-3: 1: test 4 passed (2)
-3: 2: 1: test 4 passed (2)
diff --git a/test/files/cli/test3/Main.check.scala_api b/test/files/cli/test3/Main.check.scala_api
deleted file mode 100644
index 4552819b5b..0000000000
--- a/test/files/cli/test3/Main.check.scala_api
+++ /dev/null
@@ -1,41 +0,0 @@
-|-- all-classes.html
-|-- index.html
-|-- modules.html
-|-- nav-classes.html
-|-- root-content.html
-|-- scala
-| |-- Any.html
-| |-- AnyRef.html
-| |-- AnyVal.html
-| |-- Boolean.html
-| |-- Byte.html
-| |-- Char.html
-| |-- Double.html
-| |-- Float.html
-| |-- Int.html
-| |-- Long.html
-| |-- Nothing.html
-| |-- Null.html
-| |-- Short.html
-| |-- Unit.html
-| `-- runtime
-| |-- BoxedFloat.html
-| |-- BoxedInt.html
-| |-- BoxedLong.html
-| `-- BoxedNumber.html
-|-- script.js
-|-- style.css
-|-- test1
-| `-- Main$object.html
-|-- test1$content.html
-|-- test1$package.html
-|-- test2
-| `-- Main$object.html
-|-- test2$content.html
-|-- test2$package.html
-|-- test3
-| `-- Main$object.html
-|-- test3$content.html
-`-- test3$package.html
-
-5 directories, 34 files
diff --git a/test/files/cli/test3/Main.check.scala_j9 b/test/files/cli/test3/Main.check.scala_j9
deleted file mode 100644
index 3804c17636..0000000000
--- a/test/files/cli/test3/Main.check.scala_j9
+++ /dev/null
@@ -1,19 +0,0 @@
-unknown option: '-cpp'
-scala [ <compiler-option> | -howtorun:how ]... [<torun> <arguments>]
-
-<compiler-option>'s are as for scalac; see scalac -help.
-<torun>, if present, is an object or script file to run.
-If no <torun> is present, run an interactive interpreter.
--howtorun allows explicitly specifying how to run <torun>:
- script: it is a script file
- object: it is an object name
- guess: (the default) try to guess
-
-3: 1: test 1 passed (1)
-3: 2: 1: test 1 passed (1)
-3: 1: test 2 passed (1)
-3: 2: 1: test 2 passed (1)
-3: 1: test 3 passed (1)
-3: 2: 1: test 3 passed (1)
-3: 1: test 4 passed (2)
-3: 2: 1: test 4 passed (2)
diff --git a/test/files/cli/test3/Main.check.scalac b/test/files/cli/test3/Main.check.scalac
deleted file mode 100644
index 8465810d0b..0000000000
--- a/test/files/cli/test3/Main.check.scalac
+++ /dev/null
@@ -1,63 +0,0 @@
-scalac error: bad option: '-dd'
- scalac -help gives more information
-Usage: scalac <options | source files>
-where possible options include:
- -doc Generate documentation
- -g:<g> Generate debugging info (none,source,line,vars,notc)
- -nowarn Generate no warnings
- -noassert Generate no assertions and assumptions
- -verbose Output messages about what the compiler is doing
- -classpath <path> Specify where to find user class files
- -sourcepath <path> Specify where to find input source files
- -bootclasspath <path> Override location of bootstrap class files
- -extdirs <dirs> Override location of installed extensions
- -d <directory> Specify where to place generated class files
- -encoding <encoding> Specify character encoding used by source files
- -windowtitle <windowtitle> Specify window title of generated HTML documentation
- -documenttitle <documenttitle> Specify document title of generated HTML documentation
- -target:<target> Specify which backend to use (jvm-1.5,msil)
- -migrate Assist in migrating from Scala version 1.0
- -o <file> Name of the output assembly (only relevant with -target:msil)
- -r <path> List of assemblies referenced by the program (only relevant with -target:msil)
- -debug Output debugging messages
- -deprecation enable detailed deprecation warnings
- -unchecked enable detailed unchecked warnings
- -statistics Print compiler statistics
- -explaintypes Explain type errors in more detail
- -resident Compiler stays resident, files to compile are read from standard input
- -uniqid Print identifiers with unique names (debugging option)
- -printtypes Print tree types (debugging option)
- -prompt Display a prompt after each error (debugging option)
- -noimports Compile without any implicit imports
- -nopredefs Compile without any implicit predefined values
- -skip:<phase> Skip <phase>
- -check:<phase> Check the tree at start of <phase>
- -print:<phase> Print out program after <phase>
- -printer:<printer> Printer to use (text,html)
- -printfile <file> Specify file in which to print trees
- -graph:<phase> Graph the program after <phase>
- -browse:<phase> Browse the abstract syntax tree after <phase>
- -stop:<phase> Stop after phase <phase>
- -log:<phase> Log operations in <phase>
- -logall Log all operations
- -version Print product version and exit
- -help Print a synopsis of standard options
- -nouescape disables handling of \u unicode escapes
- -Xinline Perform inlining when possible
- -XO Optimize. implies -Xinline, -Xcloselim and -Xdce
- -Xcloselim Perform closure elimination
- -Xdce Perform dead code elimination
- -Xwarndeadcode Emit warnings for dead code
- -XbytecodeRead Enable bytecode reader.
- -Xdetach Perform detaching of remote closures
- -Xshowcls <class> Show class info
- -Xshowobj <object> Show object info
- -Xlinearizer:<Xlinearizer> Linearizer to use (normal,dfs,rpo,dump)
- -Xgenerics Use generic Java types
- -Xprintpos Print tree positions (as offsets)
- -Xscript compile script file
- -Xexperimental enable experimental extensions
- -Xplugtypes parse but ignore annotations in more locations
- -Xkilloption optimizes option types
-
-one error found
diff --git a/test/files/cli/test3/Main.check.scalaint b/test/files/cli/test3/Main.check.scalaint
deleted file mode 100644
index cffa02c5b6..0000000000
--- a/test/files/cli/test3/Main.check.scalaint
+++ /dev/null
@@ -1,48 +0,0 @@
-unknown option: '-cpp'
-scala [ <option> ]... [<torun> <arguments>]
-
-All options to scalac are allowed. See scalac -help.
-
-<torun>, if present, is an object or script file to run.
-If no <torun> is present, run an interactive interpreter.
-
-Option -howtorun allows explicitly specifying how to run <torun>:
- script: it is a script file
- object: it is an object name
- guess: (the default) try to guess
-
-Option -savecompiled requests that the compiled script be saved
-for future use.
-
-Option -nocompdaemon requests that the fsc offline compiler not be used.
-
-Option -Dproperty=value sets a Java system property.
-
-
-This is an interpreter for Scala.
-Type in expressions to have them evaluated.
-Type :help for more information.
-
-scala> 3: 1: test 1 passed (1)
-3: 2: 1: test 1 passed (1)
-unnamed0: scala.Unit = ()
-
-scala>
-This is an interpreter for Scala.
-Type in expressions to have them evaluated.
-Type :help for more information.
-
-scala> 3: 1: test 2 passed (1)
-3: 2: 1: test 2 passed (1)
-unnamed0: scala.Unit = ()
-
-scala>
-This is an interpreter for Scala.
-Type in expressions to have them evaluated.
-Type :help for more information.
-
-scala> 3: 1: test 3 passed (1)
-3: 2: 1: test 3 passed (1)
-unnamed0: scala.Unit = ()
-
-scala>
diff --git a/test/files/cli/test3/Main.java b/test/files/cli/test3/Main.java
deleted file mode 100644
index 208863d012..0000000000
--- a/test/files/cli/test3/Main.java
+++ /dev/null
@@ -1,10 +0,0 @@
-// @info 2 dependency
-package test3;
-public class Main {
- public static void main(String args[]) {
- System.out.print("3: ");
- test1.Main.main(args);
- System.out.print("3: ");
- test2.Main.main(args);
- }
-}
diff --git a/test/files/cli/test3/Main.scala b/test/files/cli/test3/Main.scala
deleted file mode 100644
index 63fc11b771..0000000000
--- a/test/files/cli/test3/Main.scala
+++ /dev/null
@@ -1,10 +0,0 @@
-// @info 2 dependencies
-package test3
-object Main {
- def main(args: Array[String]) = {
- Console.print("3: ")
- test1.Main.main(args)
- Console.print("3: ")
- test2.Main.main(args)
- }
-}
diff --git a/test/files/files.iml b/test/files/files.iml
deleted file mode 100644
index ac78e33f39..0000000000
--- a/test/files/files.iml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module relativePaths="true" type="JAVA_MODULE" version="4">
- <component name="FacetManager">
- <facet type="Scala" name="Scala">
- <configuration />
- </facet>
- </component>
- <component name="NewModuleRootManager" inherit-compiler-output="true">
- <exclude-output />
- <content url="file://$MODULE_DIR$" />
- <orderEntry type="library" name="lib1" level="project" />
- <orderEntry type="inheritedJdk" />
- <orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="library" name="lib" level="project" />
- </component>
-</module>
-
diff --git a/test/files/jvm/JavaInteraction.check b/test/files/jvm/JavaInteraction.check
deleted file mode 100644
index fb9d3cdd8c..0000000000
--- a/test/files/jvm/JavaInteraction.check
+++ /dev/null
@@ -1,4 +0,0 @@
-p.x = 5
-p.c = java.awt.Color[r=255,g=0,b=0]
-p.getX() = 5.0
-p.getC() = java.awt.Color[r=255,g=0,b=0]
diff --git a/test/files/jvm/JavaInteraction.scala b/test/files/jvm/JavaInteraction.scala
deleted file mode 100644
index 1316fad5d4..0000000000
--- a/test/files/jvm/JavaInteraction.scala
+++ /dev/null
@@ -1,23 +0,0 @@
-//############################################################################
-// Test Java interaction
-//############################################################################
-
-import java.awt.Color;
-import java.awt.Point;
-
-class ColoredPoint(x: Int, y: Int, c_ : Color) extends Point(x, y) {
- val c: Color = c_;
- def getC(): Color = c;
-}
-
-object Test {
- def main(args: Array[String]): Unit = {
- val p = new ColoredPoint(5, 7, Color.RED);
- Console.println("p.x = " + p.x);
- Console.println("p.c = " + p.c);
- Console.println("p.getX() = " + p.getX());
- Console.println("p.getC() = " + p.getC());
- }
-}
-
-//############################################################################
diff --git a/test/files/jvm/NestedAnnotations.java b/test/files/jvm/NestedAnnotations.java
deleted file mode 100644
index 8f2327dcce..0000000000
--- a/test/files/jvm/NestedAnnotations.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package test;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-public class NestedAnnotations {
-
- @OuterAnno(inner=@InnerAnno(name="inner"))
- String field;
-
- @Target({FIELD})
- @Retention(RUNTIME)
- public static @interface InnerAnno {
- String name();
- }
-
- @Target({FIELD})
- @Retention(RUNTIME)
- public static @interface OuterAnno {
- InnerAnno inner();
- }
-}
diff --git a/test/files/jvm/OuterEnum.java b/test/files/jvm/OuterEnum.java
deleted file mode 100644
index 75d3f34223..0000000000
--- a/test/files/jvm/OuterEnum.java
+++ /dev/null
@@ -1,5 +0,0 @@
-package enums;
-
-public class OuterEnum {
- public enum Foo { Bar }
-}
diff --git a/test/files/jvm/OuterTParams.java b/test/files/jvm/OuterTParams.java
deleted file mode 100644
index 1d3db49fcf..0000000000
--- a/test/files/jvm/OuterTParams.java
+++ /dev/null
@@ -1,6 +0,0 @@
-public class OuterTParams<A> {
- class InnerClass {
- // Cannot parse method signature: "()TA;"
- public A method() { return null; }
- }
-}
diff --git a/test/files/jvm/SourceAnnotation.java b/test/files/jvm/SourceAnnotation.java
deleted file mode 100644
index 047751ddfe..0000000000
--- a/test/files/jvm/SourceAnnotation.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package test;
-
-import java.lang.annotation.*;
-
-@Retention(value=RetentionPolicy.RUNTIME)
-public @interface SourceAnnotation {
- public String value();
- public String[] mails() default { "bill.gates@bloodsuckers.com" };
-}
diff --git a/test/files/jvm/actor-exceptions.check b/test/files/jvm/actor-exceptions.check
index 021ccea1f1..bd44b968cc 100644
--- a/test/files/jvm/actor-exceptions.check
+++ b/test/files/jvm/actor-exceptions.check
@@ -1,11 +1,3 @@
-problem
-received A
-problem
-received A
-problem
-received A
-problem
-received A
-problem
-received last A
-slave exited because of java.lang.Exception: unhandled
+Uncaught exception in Slave
+Message: A
+MyOtherException
diff --git a/test/files/jvm/actor-exceptions.scala b/test/files/jvm/actor-exceptions.scala
index ccec84c56c..77bf05c048 100644
--- a/test/files/jvm/actor-exceptions.scala
+++ b/test/files/jvm/actor-exceptions.scala
@@ -2,7 +2,13 @@
import scala.actors.{Actor, Exit}
import Actor._
-case class MyException(text: String) extends Exception
+case class MyException(text: String) extends Exception {
+ override def fillInStackTrace() = this
+}
+
+case class MyOtherException(text: String) extends Exception {
+ override def fillInStackTrace() = this
+}
object Master extends Actor {
trapExit = true
@@ -11,14 +17,15 @@ object Master extends Actor {
Slave.start()
for (i <- 0 until 10) Slave ! A
react {
- case Exit(from, reason) => println("slave exited because of "+reason)
+ case Exit(from, reason) =>
}
}
}
object Slave extends Actor {
+ override def toString = "Slave"
override def exceptionHandler: PartialFunction[Exception, Unit] = {
- case MyException(text) => println(text)
+ case MyException(text) =>
}
def act() {
var cnt = 0
@@ -27,11 +34,8 @@ object Slave extends Actor {
case A =>
cnt += 1
if (cnt % 2 != 0) throw MyException("problem")
- if (cnt < 10)
- println("received A")
- else {
- println("received last A")
- throw new Exception("unhandled")
+ if (cnt == 10) {
+ throw new MyOtherException("unhandled")
}
}
}
diff --git a/test/files/jvm/actor-executor.check b/test/files/jvm/actor-executor.check
new file mode 100644
index 0000000000..bdbdb5c6a2
--- /dev/null
+++ b/test/files/jvm/actor-executor.check
@@ -0,0 +1,20 @@
+Two: OK
+One: OK
+Two: OK
+One: OK
+Two: OK
+One: OK
+Two: OK
+One: OK
+Two: OK
+One: OK
+Two: OK
+One: OK
+Two: OK
+One: OK
+Two: OK
+One: OK
+Two: OK
+One: OK
+Two: OK
+One: OK
diff --git a/test/files/jvm/actor-executor.scala b/test/files/jvm/actor-executor.scala
new file mode 100644
index 0000000000..435c666fff
--- /dev/null
+++ b/test/files/jvm/actor-executor.scala
@@ -0,0 +1,65 @@
+import java.util.concurrent.Executors
+import scala.actors.{Actor, SchedulerAdapter}
+import Actor._
+
+trait AdaptedActor extends Actor {
+ override def scheduler =
+ Test.scheduler
+}
+
+object One extends AdaptedActor {
+ def act() {
+ Two.start()
+ var i = 0
+ loopWhile (i < 10000) {
+ i += 1
+ Two ! 'MsgForTwo
+ react {
+ case 'MsgForOne =>
+ if (i % 1000 == 0)
+ println("One: OK")
+ if (i == 10000)
+ Test.executor.shutdown()
+ }
+ }
+ }
+}
+
+object Two extends AdaptedActor {
+ def act() {
+ var i = 0
+ loopWhile (i < 10000) {
+ i += 1
+ react {
+ case 'MsgForTwo =>
+ if (i % 1000 == 0)
+ println("Two: OK")
+ One ! 'MsgForOne
+ }
+ }
+ }
+}
+
+object Test {
+ val executor =
+ Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors())
+
+ val scheduler =
+ new SchedulerAdapter {
+ def execute(block: => Unit) {
+ val task = new Runnable {
+ def run() { block }
+ }
+ try {
+ executor.execute(task)
+ } catch {
+ case ree: java.util.concurrent.RejectedExecutionException =>
+ task.run()
+ }
+ }
+ }
+
+ def main(args: Array[String]) {
+ One.start()
+ }
+}
diff --git a/test/files/jvm/actor-executor2.check b/test/files/jvm/actor-executor2.check
new file mode 100644
index 0000000000..da78f45836
--- /dev/null
+++ b/test/files/jvm/actor-executor2.check
@@ -0,0 +1,21 @@
+Two: OK
+One: OK
+Two: OK
+One: OK
+Two: OK
+One: OK
+Two: OK
+One: OK
+Two: OK
+One: OK
+Two: OK
+One: OK
+Two: OK
+One: OK
+Two: OK
+One: OK
+Two: OK
+One: OK
+Two: OK
+One: OK
+One exited
diff --git a/test/files/jvm/actor-executor2.scala b/test/files/jvm/actor-executor2.scala
new file mode 100644
index 0000000000..9e99e167aa
--- /dev/null
+++ b/test/files/jvm/actor-executor2.scala
@@ -0,0 +1,67 @@
+import scala.actors.{Actor, SchedulerAdapter, Exit}
+import Actor._
+import java.util.concurrent.Executors
+
+object One extends AdaptedActor {
+ def act() {
+ Two.start()
+ var i = 0
+ loopWhile (i < Test.NUM_MSG) {
+ i += 1
+ Two ! 'MsgForTwo
+ react {
+ case 'MsgForOne =>
+ if (i % (Test.NUM_MSG/10) == 0)
+ println("One: OK")
+ }
+ }
+ }
+}
+
+object Two extends AdaptedActor {
+ def act() {
+ var i = 0
+ loopWhile (i < Test.NUM_MSG) {
+ i += 1
+ react {
+ case 'MsgForTwo =>
+ if (i % (Test.NUM_MSG/10) == 0)
+ println("Two: OK")
+ One ! 'MsgForOne
+ }
+ }
+ }
+}
+
+trait AdaptedActor extends Actor {
+ override def scheduler =
+ Test.scheduler
+}
+
+object Test {
+ val NUM_MSG = 100000
+
+ val executor =
+ Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors())
+
+ val scheduler =
+ new SchedulerAdapter {
+ def execute(block: => Unit) {
+ executor.execute(new Runnable {
+ def run() { block }
+ })
+ }
+ }
+
+ def main(args: Array[String]) {
+ self.trapExit = true
+ link(One)
+ One.start()
+
+ receive {
+ case Exit(from, reason) =>
+ println("One exited")
+ Test.executor.shutdown()
+ }
+ }
+}
diff --git a/test/files/jvm/actor-executor3.check b/test/files/jvm/actor-executor3.check
new file mode 100644
index 0000000000..bdbdb5c6a2
--- /dev/null
+++ b/test/files/jvm/actor-executor3.check
@@ -0,0 +1,20 @@
+Two: OK
+One: OK
+Two: OK
+One: OK
+Two: OK
+One: OK
+Two: OK
+One: OK
+Two: OK
+One: OK
+Two: OK
+One: OK
+Two: OK
+One: OK
+Two: OK
+One: OK
+Two: OK
+One: OK
+Two: OK
+One: OK
diff --git a/test/files/jvm/actor-executor3.scala b/test/files/jvm/actor-executor3.scala
new file mode 100644
index 0000000000..bf060b8ac5
--- /dev/null
+++ b/test/files/jvm/actor-executor3.scala
@@ -0,0 +1,52 @@
+import scala.actors.Actor
+import scala.actors.scheduler.ExecutorScheduler
+import java.util.concurrent.Executors
+
+object One extends AdaptedActor {
+ def act() {
+ Two.start()
+ var i = 0
+ loopWhile (i < Test.NUM_MSG) {
+ i += 1
+ Two ! 'MsgForTwo
+ react {
+ case 'MsgForOne =>
+ if (i % (Test.NUM_MSG/10) == 0)
+ println("One: OK")
+ }
+ }
+ }
+}
+
+object Two extends AdaptedActor {
+ def act() {
+ var i = 0
+ loopWhile (i < Test.NUM_MSG) {
+ i += 1
+ react {
+ case 'MsgForTwo =>
+ if (i % (Test.NUM_MSG/10) == 0)
+ println("Two: OK")
+ One ! 'MsgForOne
+ }
+ }
+ }
+}
+
+trait AdaptedActor extends Actor {
+ override def scheduler =
+ Test.scheduler
+}
+
+object Test {
+ val NUM_MSG = 100000
+
+ val executor =
+ Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors())
+
+ val scheduler = ExecutorScheduler(executor)
+
+ def main(args: Array[String]) {
+ One.start()
+ }
+}
diff --git a/test/files/jvm/actor-getstate.check b/test/files/jvm/actor-getstate.check
new file mode 100644
index 0000000000..2c94e48371
--- /dev/null
+++ b/test/files/jvm/actor-getstate.check
@@ -0,0 +1,2 @@
+OK
+OK
diff --git a/test/files/jvm/actor-getstate.scala b/test/files/jvm/actor-getstate.scala
new file mode 100644
index 0000000000..a6e15a8721
--- /dev/null
+++ b/test/files/jvm/actor-getstate.scala
@@ -0,0 +1,85 @@
+import scala.actors.{Reactor, Actor, TIMEOUT}
+import Actor._
+
+object Test {
+
+ def assert(cond: => Boolean, hint: String) {
+ if (!cond)
+ println("FAIL ["+hint+"]")
+ }
+
+ def expectActorState(a: Reactor[T] forSome { type T }, s: Actor.State.Value) {
+ var done = false
+ var i = 0
+ while (!done) {
+ i = i + 1
+ if (i == 10) { // only wait for 2 seconds total
+ println("FAIL ["+a+": expected "+s+"]")
+ done = true
+ }
+
+ Thread.sleep(200)
+ if (a.getState == s) // success
+ done = true
+ }
+ }
+
+ def main(args: Array[String]) {
+ actor {
+ val a = new Reactor[Any] {
+ def act() {
+ assert(getState == Actor.State.Runnable, "runnable1")
+ react {
+ case 'go =>
+ println("OK")
+ }
+ }
+ }
+ expectActorState(a, Actor.State.New)
+
+ a.start()
+ expectActorState(a, Actor.State.Suspended)
+
+ a ! 'go
+ expectActorState(a, Actor.State.Terminated)
+
+ val b = new Actor {
+ def act() {
+ assert(getState == Actor.State.Runnable, "runnable2: "+getState)
+ react {
+ case 'go =>
+ reactWithin(100000) {
+ case TIMEOUT =>
+ case 'go =>
+ receive {
+ case 'go =>
+ }
+ receiveWithin(100000) {
+ case TIMEOUT =>
+ case 'go =>
+ println("OK")
+ }
+ }
+ }
+ }
+ }
+ expectActorState(b, Actor.State.New)
+
+ b.start()
+ expectActorState(b, Actor.State.Suspended)
+
+ b ! 'go
+ expectActorState(b, Actor.State.TimedSuspended)
+
+ b ! 'go
+ expectActorState(b, Actor.State.Blocked)
+
+ b ! 'go
+ expectActorState(b, Actor.State.TimedBlocked)
+
+ b ! 'go
+ expectActorState(b, Actor.State.Terminated)
+ }
+ }
+
+}
diff --git a/test/files/jvm/actor-link-getstate.check b/test/files/jvm/actor-link-getstate.check
new file mode 100644
index 0000000000..45967222e6
--- /dev/null
+++ b/test/files/jvm/actor-link-getstate.check
@@ -0,0 +1,5 @@
+Done
+Uncaught exception in Master
+Message: 'done
+MyException: Master crashed
+Terminated
diff --git a/test/files/jvm/actor-link-getstate.scala b/test/files/jvm/actor-link-getstate.scala
new file mode 100644
index 0000000000..ec01757883
--- /dev/null
+++ b/test/files/jvm/actor-link-getstate.scala
@@ -0,0 +1,47 @@
+import scala.actors.{Actor, Exit}
+import scala.actors.Actor._
+
+case class MyException(text: String) extends Exception(text) {
+ override def fillInStackTrace() = this
+}
+
+object Slave extends Actor {
+ def act() {
+ loop {
+ react {
+ case 'doWork =>
+ Console.err.println("Done")
+ reply('done)
+ }
+ }
+ }
+}
+
+object Master extends Actor {
+ override def toString = "Master"
+ def act() {
+ link(Slave)
+ Slave ! 'doWork
+ react {
+ case 'done =>
+ throw new MyException("Master crashed")
+ }
+ }
+}
+
+object Test {
+
+ def main(args: Array[String]) {
+ actor {
+ self.trapExit = true
+ link(Slave)
+ Slave.start()
+ Master.start()
+ react {
+ case Exit(from, reason) if (from == Slave) =>
+ Console.err.println(Slave.getState)
+ }
+ }
+ }
+
+}
diff --git a/test/files/jvm/actor-receivewithin.scala b/test/files/jvm/actor-receivewithin.scala
index c6818cf211..a5c87c2722 100644
--- a/test/files/jvm/actor-receivewithin.scala
+++ b/test/files/jvm/actor-receivewithin.scala
@@ -29,6 +29,7 @@ object A extends Actor {
}
}
B ! 'next
+ receive { case 'done => }
cnt = 0
while (cnt < 501) {
cnt += 1
@@ -56,6 +57,7 @@ object B extends Actor {
for (_ <- 1 to 500) {
A ! 'msg2
}
+ A ! 'done
}
}
}
diff --git a/test/files/jvm/actor-uncaught-exception.check b/test/files/jvm/actor-uncaught-exception.check
new file mode 100644
index 0000000000..3e669779df
--- /dev/null
+++ b/test/files/jvm/actor-uncaught-exception.check
@@ -0,0 +1,5 @@
+Uncaught exception in StartError
+MyException: I don't want to run!
+Uncaught exception in MessageError
+Message: 'ping
+MyException: No message for me!
diff --git a/test/files/jvm/actor-uncaught-exception.scala b/test/files/jvm/actor-uncaught-exception.scala
new file mode 100644
index 0000000000..9f64be26e1
--- /dev/null
+++ b/test/files/jvm/actor-uncaught-exception.scala
@@ -0,0 +1,46 @@
+import scala.actors.{Actor, Exit}
+
+class MyException(msg: String) extends Exception(msg) {
+ override def fillInStackTrace() = this
+}
+
+object Test {
+
+ case object StartError extends Actor {
+ def act() {
+ throw new MyException("I don't want to run!")
+ }
+ }
+
+ case object MessageError extends Actor {
+ def act() {
+ react {
+ case _ => throw new MyException("No message for me!")
+ }
+ }
+ }
+
+ case object Supervisor extends Actor {
+ def act() {
+ trapExit = true
+ link(StartError)
+ link(MessageError)
+ StartError.start()
+ MessageError.start()
+
+ Actor.loop {
+ react {
+ case Exit(actor, reason) =>
+ if (actor == StartError)
+ MessageError ! 'ping
+ else
+ exit()
+ }
+ }
+ }
+ }
+
+ def main(args: Array[String]) {
+ Supervisor.start()
+ }
+}
diff --git a/test/files/jvm/deprecation.cmds b/test/files/jvm/deprecation.cmds
new file mode 100644
index 0000000000..4c0f73c58b
--- /dev/null
+++ b/test/files/jvm/deprecation.cmds
@@ -0,0 +1,3 @@
+javac Defs.java
+scalac Test_1.scala
+javac Use_2.java
diff --git a/test/files/jvm/future-alarm.check b/test/files/jvm/future-alarm.check
new file mode 100644
index 0000000000..01a87d1c4c
--- /dev/null
+++ b/test/files/jvm/future-alarm.check
@@ -0,0 +1,20 @@
+OK
+OK
+OK
+OK
+OK
+OK
+OK
+OK
+OK
+OK
+OK
+OK
+OK
+OK
+OK
+OK
+OK
+OK
+OK
+OK
diff --git a/test/files/jvm/future-alarm.scala b/test/files/jvm/future-alarm.scala
new file mode 100644
index 0000000000..0dda492741
--- /dev/null
+++ b/test/files/jvm/future-alarm.scala
@@ -0,0 +1,16 @@
+import scala.actors.Futures
+
+object Test {
+ def main(args: Array[String]) {
+ for (i <- 1 to 100000) {
+ Futures.alarm(0)
+ if (i % 10000 == 0)
+ println("OK")
+ }
+ for (_ <- 1 to 10) {
+ val ft = Futures.alarm(100)
+ ft()
+ println("OK")
+ }
+ }
+}
diff --git a/test/files/lib/genericNest.jar.desired.sha1 b/test/files/jvm/genericNest/genericNest.jar.desired.sha1
index e9321262f2..e9321262f2 100644
--- a/test/files/lib/genericNest.jar.desired.sha1
+++ b/test/files/jvm/genericNest/genericNest.jar.desired.sha1
diff --git a/test/files/jvm/genericNest.scala b/test/files/jvm/genericNest/genericNest.scala
index c1b0210117..c1b0210117 100644
--- a/test/files/jvm/genericNest.scala
+++ b/test/files/jvm/genericNest/genericNest.scala
diff --git a/test/files/jvm/inner.scala b/test/files/jvm/inner.scala
index 51e3909ef3..d0d2226de6 100644
--- a/test/files/jvm/inner.scala
+++ b/test/files/jvm/inner.scala
@@ -53,8 +53,8 @@ class A {
}
object Scalatest {
- private val outputdir = System.getProperty("scalatest.output", "inner-jvm.obj")
- private val scalalib = System.getProperty("scalatest.lib", "")
+ private val outputdir = System.getProperty("partest.output", "inner.obj")
+ private val scalalib = System.getProperty("partest.lib", "")
private val classpath = outputdir + File.pathSeparator + scalalib
private val javabin = {
val jhome = new File(System.getProperty("java.home"))
diff --git a/test/files/jvm/interpreter.check b/test/files/jvm/interpreter.check
index 6c89318470..b74ba1be0a 100644
--- a/test/files/jvm/interpreter.check
+++ b/test/files/jvm/interpreter.check
@@ -19,7 +19,7 @@ scala> defined type alias anotherint
scala> four: anotherint = 4
-scala> <console>:5: error: type mismatch;
+scala> <console>:6: error: type mismatch;
found : java.lang.String("hello")
required: anotherint
val bogus: anotherint = "hello"
@@ -169,7 +169,7 @@ scala> res4: Array[_] = Array(2)
scala> res5: Array[java.lang.String] = Array(abc, abc)
-scala> res6: scala.collection.mutable.GenericArray[_] = GenericArray(1, 2)
+scala> res6: scala.collection.mutable.ArraySeq[_] = ArraySeq(1, 2)
scala> res7: Array[(_$1, _$1)] forSome { type _$1 } = Array((1,1), (2,2))
@@ -217,9 +217,9 @@ scala> defined class Exp
defined class Fact
defined class Term
-scala> | | <console>:15: warning: match is not exhaustive!
-missing combination Term
+scala> | | <console>:16: warning: match is not exhaustive!
missing combination Exp
+missing combination Term
def f(e: Exp) = e match { // non-exhaustive warning here
^
@@ -229,7 +229,7 @@ scala>
scala>
plusOne: (x: Int)Int
res0: Int = 6
-res0: java.lang.String = after reset
-<console>:5: error: not found: value plusOne
+res1: java.lang.String = after reset
+<console>:6: error: not found: value plusOne
plusOne(5) // should be undefined now
^
diff --git a/test/files/lib/annotations.jar.desired.sha1 b/test/files/jvm/lib/annotations.jar.desired.sha1
index 2b4292d796..2b4292d796 100644
--- a/test/files/lib/annotations.jar.desired.sha1
+++ b/test/files/jvm/lib/annotations.jar.desired.sha1
diff --git a/test/files/lib/nest.jar.desired.sha1 b/test/files/jvm/lib/nest.jar.desired.sha1
index 674ca79a5b..674ca79a5b 100644
--- a/test/files/lib/nest.jar.desired.sha1
+++ b/test/files/jvm/lib/nest.jar.desired.sha1
diff --git a/test/files/lib/methvsfield.jar.desired.sha1 b/test/files/jvm/methvsfield/methvsfield.jar.desired.sha1
index 8c01532b88..8c01532b88 100644
--- a/test/files/lib/methvsfield.jar.desired.sha1
+++ b/test/files/jvm/methvsfield/methvsfield.jar.desired.sha1
diff --git a/test/files/jvm/methvsfield.java b/test/files/jvm/methvsfield/methvsfield.java
index dadc98669a..dadc98669a 100644
--- a/test/files/jvm/methvsfield.java
+++ b/test/files/jvm/methvsfield/methvsfield.java
diff --git a/test/files/jvm/methvsfield.scala b/test/files/jvm/methvsfield/methvsfield.scala
index e9795ec6a8..e9795ec6a8 100644
--- a/test/files/jvm/methvsfield.scala
+++ b/test/files/jvm/methvsfield/methvsfield.scala
diff --git a/test/files/jvm/mkAnnotationsJar.sh b/test/files/jvm/mkAnnotationsJar.sh
deleted file mode 100755
index 3d69351165..0000000000
--- a/test/files/jvm/mkAnnotationsJar.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-
-##############################################################################
-# Author : Nikolay Mihaylov
-##############################################################################
-
-##############################################################################
-# variables
-
-OBJDIR=./classes
-
-if [ -z "${JAVA_HOME}" ]; then
- echo "environment variable JAVA_HOME is undefined."
- exit
-fi
-
-JAVAC=${JAVA_HOME}/bin/javac
-JAVAC_OPTIONS="-source 1.5 -target 1.5"
-
-JAR=${JAVA_HOME}/bin/jar
-
-##############################################################################
-# commands
-
-mkdir -p ${OBJDIR}
-${JAVAC} ${JAVAC_OPTIONS} -d ${OBJDIR} SourceAnnotation.java NestedAnnotations.java
-${JAR} cf ../lib/annotations.jar -C ${OBJDIR} .
-rm -rf ${OBJDIR}
diff --git a/test/files/jvm/nest.java b/test/files/jvm/nest/nest.java
index 3f6f0bebbd..3f6f0bebbd 100644
--- a/test/files/jvm/nest.java
+++ b/test/files/jvm/nest/nest.java
diff --git a/test/files/jvm/nest.scala b/test/files/jvm/nest/nest.scala
index 3ab62484fa..3ab62484fa 100644
--- a/test/files/jvm/nest.scala
+++ b/test/files/jvm/nest/nest.scala
diff --git a/test/files/lib/enums.jar.desired.sha1 b/test/files/jvm/outerEnum/enums.jar.desired.sha1
index 46cd8e92cf..46cd8e92cf 100644
--- a/test/files/lib/enums.jar.desired.sha1
+++ b/test/files/jvm/outerEnum/enums.jar.desired.sha1
diff --git a/test/files/jvm/outerEnum.scala b/test/files/jvm/outerEnum/outerEnum.scala
index 18794b7dbe..18794b7dbe 100644
--- a/test/files/jvm/outerEnum.scala
+++ b/test/files/jvm/outerEnum/outerEnum.scala
diff --git a/test/files/jvm/reactor-exceptionOnSend.scala b/test/files/jvm/reactor-exceptionOnSend.scala
index 3684943b9b..c89aab334b 100644
--- a/test/files/jvm/reactor-exceptionOnSend.scala
+++ b/test/files/jvm/reactor-exceptionOnSend.scala
@@ -3,7 +3,7 @@ import scala.actors.Actor._
case class MyException(text: String) extends Exception(text)
-object A extends Reactor {
+object A extends Reactor[Any] {
override def exceptionHandler = {
case MyException(text) =>
println("receiver handles exception")
@@ -29,7 +29,7 @@ object A extends Reactor {
}
}
-object B extends Reactor {
+object B extends Reactor[Any] {
def act() {
A.start()
A ! 'hello
diff --git a/test/files/jvm/reactor-producer-consumer.scala b/test/files/jvm/reactor-producer-consumer.scala
index 946e1561ce..0d33043fc6 100644
--- a/test/files/jvm/reactor-producer-consumer.scala
+++ b/test/files/jvm/reactor-producer-consumer.scala
@@ -2,10 +2,10 @@ import scala.actors.Reactor
object Test {
case class Stop()
- case class Get(from: Reactor)
+ case class Get(from: Reactor[Any])
case class Put(x: Int)
- class UnboundedBuffer extends Reactor {
+ class UnboundedBuffer extends Reactor[Any] {
def act() {
react {
case Stop() =>
@@ -20,7 +20,7 @@ object Test {
}
}
- class Producer(buf: UnboundedBuffer, n: Int, delay: Long, parent: Reactor) extends Reactor {
+ class Producer(buf: UnboundedBuffer, n: Int, delay: Long, parent: Reactor[Any]) extends Reactor[Any] {
def act() {
var i = 0
while (i < n) {
@@ -32,7 +32,7 @@ object Test {
}
}
- class Consumer(buf: UnboundedBuffer, n: Int, delay: Long, parent: Reactor) extends Reactor {
+ class Consumer(buf: UnboundedBuffer, n: Int, delay: Long, parent: Reactor[Any]) extends Reactor[Any] {
val step = n / 10
var i = 0
def act() {
@@ -53,7 +53,7 @@ object Test {
}
def main(args: Array[String]) {
- val parent = new Reactor {
+ val parent = new Reactor[Any] {
def act() {
val buffer = new UnboundedBuffer
buffer.start()
diff --git a/test/files/jvm/reactor.scala b/test/files/jvm/reactor.scala
index 8985f90569..12d5c7c221 100644
--- a/test/files/jvm/reactor.scala
+++ b/test/files/jvm/reactor.scala
@@ -1,13 +1,12 @@
import scala.actors.Reactor
-import scala.actors.Actor._
-case class Ping(from: Reactor)
+case class Ping(from: Reactor[Any])
case object Pong
case object Stop
/**
- * Ping pong example for OutputChannelActor.
+ * Ping pong example for Reactor.
*
* @author Philipp Haller
*/
@@ -20,7 +19,7 @@ object Test {
}
}
-class PingActor(count: Int, pong: Reactor) extends Reactor {
+class PingActor(count: Int, pong: Reactor[Any]) extends Reactor[Any] {
def act() {
var pingsLeft = count - 1
pong ! Ping(this)
@@ -42,7 +41,7 @@ class PingActor(count: Int, pong: Reactor) extends Reactor {
}
}
-class PongActor extends Reactor {
+class PongActor extends Reactor[Any] {
def act() {
var pongCount = 0
loop {
diff --git a/test/files/jvm/replyablereactor.scala b/test/files/jvm/replyablereactor.scala
index 368d172e3f..896a0bf440 100644
--- a/test/files/jvm/replyablereactor.scala
+++ b/test/files/jvm/replyablereactor.scala
@@ -1,5 +1,4 @@
-import scala.actors._
-import scala.actors.Actor._
+import scala.actors.ReplyReactor
class MyActor extends ReplyReactor {
def act() {
@@ -19,7 +18,7 @@ object Test {
val a = new MyActor
a.start()
- val b = new Reactor {
+ val b = new ReplyReactor {
def act() {
react {
case r: MyActor =>
diff --git a/test/files/jvm/replyablereactor2.scala b/test/files/jvm/replyablereactor2.scala
index 22622274dd..57b7cfe201 100644
--- a/test/files/jvm/replyablereactor2.scala
+++ b/test/files/jvm/replyablereactor2.scala
@@ -19,7 +19,7 @@ object Test {
val a = new MyActor
a.start()
- val b = new Reactor {
+ val b = new Reactor[Any] {
def act() {
react {
case r: MyActor =>
diff --git a/test/files/jvm/replyablereactor3.scala b/test/files/jvm/replyablereactor3.scala
index 676ffe98e6..b33db811e2 100644
--- a/test/files/jvm/replyablereactor3.scala
+++ b/test/files/jvm/replyablereactor3.scala
@@ -19,7 +19,7 @@ object Test {
val a = new MyActor
a.start()
- val b = new Reactor {
+ val b = new Reactor[Any] {
def act() {
react {
case r: MyActor =>
diff --git a/test/files/jvm/replyablereactor4.scala b/test/files/jvm/replyablereactor4.scala
index d61fb64287..dc24f5e88d 100644
--- a/test/files/jvm/replyablereactor4.scala
+++ b/test/files/jvm/replyablereactor4.scala
@@ -19,7 +19,7 @@ object Test {
val a = new MyActor
a.start()
- val b = new Reactor {
+ val b = new Reactor[Any] {
def act() {
react {
case r: MyActor =>
diff --git a/test/files/jvm/replyreactor.scala b/test/files/jvm/replyreactor.scala
index 0f452dbc7b..fb915cf3f9 100644
--- a/test/files/jvm/replyreactor.scala
+++ b/test/files/jvm/replyreactor.scala
@@ -1,4 +1,4 @@
-import scala.actors.{Reactor, ReplyReactor}
+import scala.actors.ReplyReactor
object Test {
def main(args: Array[String]) {
@@ -12,10 +12,10 @@ object Test {
}
a.start()
- val b = new Reactor {
+ val b = new ReplyReactor {
def act() {
react {
- case r: Reactor =>
+ case r: ReplyReactor =>
r ! 'hello
react {
case any =>
diff --git a/test/files/jvm/serialization.check b/test/files/jvm/serialization.check
index 2b0ad3888b..3f095cb51e 100644
--- a/test/files/jvm/serialization.check
+++ b/test/files/jvm/serialization.check
@@ -33,9 +33,9 @@ x10 eq y10: true, y10 eq x10: true
x10 equals y10: true, y10 equals x10: true
x9 eq x10: false, x10 eq x9: false
-x9 equals x10: true, x10 equals x9: true
+x9 equals x10: false, x10 equals x9: false
x9 eq y10: false, y10 eq x9: false
-x9 equals y10: true, y10 equals x9: true
+x9 equals y10: false, y10 equals x9: false
f1 = <na>
_f1 = <na>
@@ -77,12 +77,12 @@ x = BitSet(2, 3)
y = BitSet(2, 3)
x equals y: true, y equals x: true
-x = Map(2 -> B, 1 -> A, 3 -> C)
+x = Map(1 -> A, 2 -> B, 3 -> C)
y = Map(1 -> A, 2 -> B, 3 -> C)
x equals y: true, y equals x: true
x = Set(1, 2)
-y = Set(2, 1)
+y = Set(1, 2)
x equals y: true, y equals x: true
x = List((buffers,20), (layers,2), (title,3))
diff --git a/test/files/jvm/t1652.check b/test/files/jvm/t1652.check
deleted file mode 100644
index dfa480ce6e..0000000000
--- a/test/files/jvm/t1652.check
+++ /dev/null
@@ -1,2 +0,0 @@
-OK1
-OK2
diff --git a/test/files/jvm/t2470.cmds b/test/files/jvm/t2470.cmds
new file mode 100644
index 0000000000..b4ef0f4aeb
--- /dev/null
+++ b/test/files/jvm/t2470.cmds
@@ -0,0 +1,3 @@
+javac Action.java Task.java
+scalac Test_1.scala
+scalac Read_Classfile_2.scala
diff --git a/test/files/jvm/t2827.check b/test/files/jvm/t2827.check
new file mode 100644
index 0000000000..c318e01ae5
--- /dev/null
+++ b/test/files/jvm/t2827.check
@@ -0,0 +1,3 @@
+Larry
+Curly
+Moe
diff --git a/test/files/jvm/t2827.scala b/test/files/jvm/t2827.scala
new file mode 100644
index 0000000000..d89e68516b
--- /dev/null
+++ b/test/files/jvm/t2827.scala
@@ -0,0 +1,14 @@
+object Stooges extends Enumeration {
+ type Stooge = Value
+ val Larry, Curly, Moe = Value
+ def nextStooge(v:Stooges.Stooge):Stooges.Stooge =
+ Stooges((v.id+1) % Stooges.maxId)
+}
+
+object Test {
+ def main(args: Array[String]) {
+ println(Stooges.Larry)
+ println(Stooges.Curly)
+ println(Stooges.Moe)
+ }
+}
diff --git a/test/files/jvm/t3003.check b/test/files/jvm/t3003.check
new file mode 100644
index 0000000000..c69e389d13
--- /dev/null
+++ b/test/files/jvm/t3003.check
@@ -0,0 +1 @@
+List(List(@Annot(optionType=class java.lang.String)))
diff --git a/test/files/jvm/t3003.cmds b/test/files/jvm/t3003.cmds
new file mode 100644
index 0000000000..c00396627c
--- /dev/null
+++ b/test/files/jvm/t3003.cmds
@@ -0,0 +1,2 @@
+javac Annot.java
+scalac Test_1.scala
diff --git a/test/files/jvm/t3003/Annot.java b/test/files/jvm/t3003/Annot.java
new file mode 100644
index 0000000000..1d5f206fd7
--- /dev/null
+++ b/test/files/jvm/t3003/Annot.java
@@ -0,0 +1,4 @@
+@java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME)
+public @interface Annot {
+ Class<?> optionType();
+}
diff --git a/test/files/jvm/t3003/Test_1.scala b/test/files/jvm/t3003/Test_1.scala
new file mode 100644
index 0000000000..ec7f220c94
--- /dev/null
+++ b/test/files/jvm/t3003/Test_1.scala
@@ -0,0 +1,8 @@
+class C {
+ @Annot(optionType=classOf[String]) val k = 0
+}
+object Test {
+ def main(args: Array[String]) {
+ println(classOf[C].getDeclaredFields.toList.sortBy(f => f.getName).map(f => f.getAnnotations.toList))
+ }
+}
diff --git a/test/files/jvm/t3102.check b/test/files/jvm/t3102.check
new file mode 100644
index 0000000000..d705e0b20e
--- /dev/null
+++ b/test/files/jvm/t3102.check
@@ -0,0 +1,2 @@
+42
+OK
diff --git a/test/files/jvm/t3102.scala b/test/files/jvm/t3102.scala
new file mode 100644
index 0000000000..ea3e720eca
--- /dev/null
+++ b/test/files/jvm/t3102.scala
@@ -0,0 +1,26 @@
+import scala.actors.{Actor, TIMEOUT}
+import Actor._
+
+object Test {
+ def main(args: Array[String]) {
+ val a = actor {
+ react {
+ case 'hello =>
+ reply(42)
+ }
+ }
+
+ val b = actor {
+ self.trapExit = true
+ val ft = a !! 'hello
+ println(ft())
+ // no message should be left over in mailbox
+ reactWithin(0) {
+ case TIMEOUT =>
+ println("OK")
+ case any =>
+ println(any)
+ }
+ }
+ }
+}
diff --git a/test/files/jvm/unittest_io.scala b/test/files/jvm/unittest_io.scala
index 0cf1165ec8..80d33d8433 100644
--- a/test/files/jvm/unittest_io.scala
+++ b/test/files/jvm/unittest_io.scala
@@ -16,7 +16,7 @@ it is split on several lines.
isn't it?
""")
def runTest() = assertEquals("wrong number of lines",src.getLines("\n").toList.length,5) // five new lines in there
- //for(val line <- src.getLines) {
+ //for (line <- src.getLines) {
// Console.print(line)
//}
}
diff --git a/test/files/jvm/xml01.scala b/test/files/jvm/xml01.scala
index e305f516d7..56e1c4ef96 100644
--- a/test/files/jvm/xml01.scala
+++ b/test/files/jvm/xml01.scala
@@ -25,20 +25,18 @@ object Test extends Application with Assert {
override def text = ""
}
- assertSameElements(List(3), List(3))
-
println("equality")
- assertEquals(c, parsedxml11)
- assertEquals(parsedxml1, parsedxml11)
- assertSameElements(List(parsedxml1), List(parsedxml11))
- assertSameElements(Array(parsedxml1).toList, List(parsedxml11))
+ assertEqualsXML(c, parsedxml11)
+ assertEqualsXML(parsedxml1, parsedxml11)
+ assertSameElementsXML(List(parsedxml1), List(parsedxml11))
+ assertSameElementsXML(Array(parsedxml1).toList, List(parsedxml11))
val x2 = "<book><author>Peter Buneman</author><author>Dan Suciu</author><title>Data on ze web</title></book>";
val i = new InputSource(new StringReader(x2))
val x2p = XML.load(i)
- assertEquals(x2p, Elem(null, "book" , e, sc,
+ assertEqualsXML(x2p, Elem(null, "book" , e, sc,
Elem(null, "author", e, sc,Text("Peter Buneman")),
Elem(null, "author", e, sc,Text("Dan Suciu")),
Elem(null, "title" , e, sc,Text("Data on ze web"))));
@@ -51,9 +49,9 @@ object Test extends Application with Assert {
println("xpath \\")
- assertSameElements(parsedxml1 \ "_" , List(Elem(null,"world", e, sc)))
+ assertSameElementsXML(parsedxml1 \ "_" , List(Elem(null,"world", e, sc)))
- assertSameElements(parsedxml1 \ "world", List(Elem(null,"world", e, sc)))
+ assertSameElementsXML(parsedxml1 \ "world", List(Elem(null,"world", e, sc)))
/*
Console.println( parsedxml2 \ "_" );
@@ -63,7 +61,7 @@ object Test extends Application with Assert {
};
*/
- assertSameElements(
+ assertSameElementsXML(
parsedxml2 \ "_" ,
List(
@@ -77,7 +75,7 @@ object Test extends Application with Assert {
);
assertEquals( (parsedxml2 \ "author").length, 0 );
- assertSameElements(
+ assertSameElementsXML(
parsedxml2 \ "book",
List(
@@ -91,7 +89,7 @@ object Test extends Application with Assert {
)
);
- assertSameElements(
+ assertSameElementsXML(
parsedxml2 \ "_" \ "_",
@@ -104,7 +102,7 @@ object Test extends Application with Assert {
)
);
- assertSameElements(
+ assertSameElementsXML(
parsedxml2 \ "_" \ "author",
@@ -116,11 +114,11 @@ object Test extends Application with Assert {
);
- assertSameElements( (parsedxml2 \ "_" \ "_" \ "author"), List() );
+ assertSameElementsXML( (parsedxml2 \ "_" \ "_" \ "author"), List() );
Console.println("xpath \\\\ DESCENDANTS");
- assertSameElements(
+ assertSameElementsXML(
parsedxml2 \\ "author",
@@ -133,7 +131,7 @@ object Test extends Application with Assert {
);
- assertSameElements(
+ assertSameElementsXML(
parsedxml2 \\ "title",
@@ -144,10 +142,10 @@ object Test extends Application with Assert {
println(
- (parsedxml2 \\ "book" ){ n:Node => n \ "title" == "Data on ze web" }
+ (parsedxml2 \\ "book" ){ n:Node => (n \ "title") xml_== "Data on ze web" }
);
- assertEquals(
+ assertEqualsXML(
(new NodeSeq { val theSeq = List( parsedxml2 ) }) \\ "_",
@@ -191,13 +189,13 @@ object Test extends Application with Assert {
val zz1 = <xml:group><a/><b/><c/></xml:group>
- assertTrue(zx1 == zz1)
+ assertTrue(zx1 xml_== zz1)
assertTrue(zz1.length == 3)
// unparsed
- val uup = <xml:unparsed>&<<>""^%@$!#</xml:unparsed>
- assertTrue(uup == "&<<>\"\"^%@$!#")
+ // val uup = <xml:unparsed>&<<>""^%@$!#</xml:unparsed>
+ // assertTrue(uup == "&<<>\"\"^%@$!#")
// test unicode escapes backslash u
println("attribute value normalization")
diff --git a/test/files/jvm/xml02.scala b/test/files/jvm/xml02.scala
index 0cbeb27ce2..11f77cc90f 100644
--- a/test/files/jvm/xml02.scala
+++ b/test/files/jvm/xml02.scala
@@ -18,10 +18,10 @@ object Test extends TestConsoleMain {
object XmlEx extends TestCase("attributes") with Assert {
override def runTest = {
- assertTrue("@one", ax \ "@foo" == "bar") // uses NodeSeq.view!
- assertTrue("@two", ax \ "@foo" == xml.Text("bar")) // dto.
- assertTrue("@three", bx \ "@foo" == "bar&x") // dto.
- assertTrue ("@four", (bx \ "@foo") sameElements List(xml.Text("bar&x")))
+ assertTrue("@one", (ax \ "@foo") xml_== "bar") // uses NodeSeq.view!
+ assertTrue("@two", (ax \ "@foo") xml_== xml.Text("bar")) // dto.
+ assertTrue("@three", (bx \ "@foo") xml_== "bar&x") // dto.
+ assertTrue ("@four", (bx \ "@foo") xml_sameElements List(xml.Text("bar&x")))
assertEquals("@five", "<hello foo=\"bar&amp;x\"></hello>", bx.toString)
}
}
@@ -29,8 +29,8 @@ object Test extends TestConsoleMain {
object XmlEy extends TestCase("attributes with namespace") with Assert {
override def runTest = {
val z = ax \ "@{the namespace from outer space}foo"
- assertTrue("@six", ax \ "@{the namespace from outer space}foo" == "baz")
- assertTrue("@eight", cx \ "@{the namespace from outer space}foo" == "baz")
+ assertTrue("@six", (ax \ "@{the namespace from outer space}foo") xml_== "baz")
+ assertTrue("@eight", (cx \ "@{the namespace from outer space}foo") xml_== "baz")
try {
ax \ "@"
@@ -58,8 +58,8 @@ object Test extends TestConsoleMain {
override def runTest = {
assertTrue(<hello/> match { case <hello/> => true; case _ => false; })
assertTrue(<x:ga xmlns:x="z"/> match { case <x:ga/> => true; case _ => false; });
- assertTrue(Utility.trim(cx) match { case n @ <hello>crazy text world</hello> if n \ "@foo" == "bar" => true; })
- assertTrue(Utility.trim(cx) match { case n @ <z:hello>crazy text world</z:hello> if n \ "@foo" == "bar" => true; })
+ assertTrue(Utility.trim(cx) match { case n @ <hello>crazy text world</hello> if (n \ "@foo") xml_== "bar" => true; })
+ assertTrue(Utility.trim(cx) match { case n @ <z:hello>crazy text world</z:hello> if (n \ "@foo") xml_== "bar" => true; })
}
}
diff --git a/test/files/jvm/xmlstuff.scala b/test/files/jvm/xmlstuff.scala
index 46faf283dc..6e711a0f86 100644
--- a/test/files/jvm/xmlstuff.scala
+++ b/test/files/jvm/xmlstuff.scala
@@ -64,9 +64,9 @@ passed ok
Text(x.attributes("value").toString + y.attributes("bazValue").toString+ "!")
};
val pelems_2 = new NodeSeq { val theSeq = List(Text("38!"),Text("58!")) };
- assertSameElements(pelems_1, pelems_2)
+ assertSameElementsXML(pelems_1, pelems_2)
- assertEquals(p \\ "@bazValue", Text("8"))
+ assertEqualsXML(p \\ "@bazValue", Text("8"))
val books =
<bks>
@@ -97,7 +97,7 @@ passed ok
println( new scala.xml.PrettyPrinter(80, 5).formatNodes (
for (t <- books \\ "title";
r <- reviews \\ "entry"
- if r \ "title" == t) yield
+ if (r \ "title") xml_== t) yield
<result>
{ t }
{ r \ "remarks" }
@@ -139,7 +139,7 @@ val addrBook =
println( new scala.xml.PrettyPrinter(80, 5).formatNodes (
for (t <- addrBook \\ "entry";
r <- phoneBook \\ "entry"
- if t \ "name" == r \ "name") yield
+ if (t \ "name") xml_== (r \ "name")) yield
<result>
{ t.child }
{ r \ "phone" }
diff --git a/test/files/neg/bug1210.check b/test/files/neg/bug1210.check
deleted file mode 100644
index 4db920556f..0000000000
--- a/test/files/neg/bug1210.check
+++ /dev/null
@@ -1,7 +0,0 @@
-bug1210.scala:13: error: illegal cyclic reference involving type Settings
- val v: List[selfType] = f[selfType]((x: selfType) => x.v)
- ^
-bug1210.scala:24: error: illegal cyclic reference involving type Settings
- f[selfType](_.g)
- ^
-two errors found
diff --git a/test/files/neg/bug1279a.check b/test/files/neg/bug1279a.check
deleted file mode 100644
index edfd1fe871..0000000000
--- a/test/files/neg/bug1279a.check
+++ /dev/null
@@ -1,6 +0,0 @@
-bug1279a.scala:34: error: type mismatch;
- found : first.selfType
- required: M{type T <: this.T}
- def all4Impl[U](first: M {type T <: U}): Stream[M {type T <: U}] = Stream.cons(first, all4Impl(first.next))
- ^
-one error found
diff --git a/test/files/neg/bug1878.check b/test/files/neg/bug1878.check
index 5484d675af..f760781fa0 100644
--- a/test/files/neg/bug1878.check
+++ b/test/files/neg/bug1878.check
@@ -1,10 +1,15 @@
bug1878.scala:3: error: _* may only come last
val err1 = "" match { case Seq(f @ _*, ',') => f }
^
+bug1878.scala:3: error: scrutinee is incompatible with pattern type;
+ found : Seq[A]
+ required: java.lang.String
+ val err1 = "" match { case Seq(f @ _*, ',') => f }
+ ^
bug1878.scala:9: error: _* may only come last
val List(List(_*, arg2), _) = List(List(1,2,3), List(4,5,6))
^
bug1878.scala:13: error: _* may only come last
case <p> { _* } </p> =>
^
-three errors found
+four errors found
diff --git a/test/files/neg/bug2148.check b/test/files/neg/bug2148.check
new file mode 100644
index 0000000000..22be424c39
--- /dev/null
+++ b/test/files/neg/bug2148.check
@@ -0,0 +1,4 @@
+bug2148.scala:9: error: type A is not a stable prefix
+ val b = new A with A#A1
+ ^
+one error found
diff --git a/test/files/neg/bug2148.scala b/test/files/neg/bug2148.scala
new file mode 100644
index 0000000000..25788be84a
--- /dev/null
+++ b/test/files/neg/bug2148.scala
@@ -0,0 +1,10 @@
+class A {
+ var i = 0
+ trait A1 extends A {
+ i += 1
+ }
+}
+
+object Bob {
+ val b = new A with A#A1
+} \ No newline at end of file
diff --git a/test/files/neg/bug3123.check b/test/files/neg/bug3123.check
new file mode 100644
index 0000000000..8f5319c9a3
--- /dev/null
+++ b/test/files/neg/bug3123.check
@@ -0,0 +1,4 @@
+bug3123.scala:3: error: object Int is not a value
+ t match { case Int => true }
+ ^
+one error found
diff --git a/test/files/neg/bug3123.scala b/test/files/neg/bug3123.scala
new file mode 100644
index 0000000000..667a1da918
--- /dev/null
+++ b/test/files/neg/bug3123.scala
@@ -0,0 +1,5 @@
+object NotAValue {
+ def test[T](t : T) {
+ t match { case Int => true }
+ }
+}
diff --git a/test/files/neg/bug414.check b/test/files/neg/bug414.check
index c0f039ad26..ec23e26337 100644
--- a/test/files/neg/bug414.check
+++ b/test/files/neg/bug414.check
@@ -1,7 +1,3 @@
-bug414.scala:1: warning: case classes without a parameter list have been deprecated;
-use either case objects or case classes with `()' as parameter list.
-case class Empty[a] extends IntMap[a];
- ^
bug414.scala:5: error: pattern type is incompatible with expected type;
found : object Empty
required: IntMap[a]
@@ -12,5 +8,4 @@ bug414.scala:7: error: type mismatch;
required: a
case _ =>
^
-one warning found
two errors found
diff --git a/test/files/neg/bug961.check b/test/files/neg/bug961.check
index 8b407d1d0c..439ed98675 100644
--- a/test/files/neg/bug961.check
+++ b/test/files/neg/bug961.check
@@ -1,9 +1,4 @@
-bug961.scala:4: warning: case classes without a parameter list have been deprecated;
-use either case objects or case classes with `()' as parameter list.
- private case class B_inner extends A
- ^
bug961.scala:11: error: Temp.this.B of type object Temp.B does not take parameters
B() match {
^
-one warning found
one error found
diff --git a/test/files/neg/bug961.scala b/test/files/neg/bug961.scala
index 15309b96b4..088bddd7ee 100644
--- a/test/files/neg/bug961.scala
+++ b/test/files/neg/bug961.scala
@@ -1,7 +1,7 @@
-object Temp{
+object Temp {
abstract class A
- object B{
- private case class B_inner extends A
+ object B {
+ private case class B_inner() extends A
def apply: A = B_inner()
def unapply(a: A) = a match {
case B_inner() => true
diff --git a/test/files/neg/migration28.check b/test/files/neg/migration28.check
new file mode 100644
index 0000000000..9e042a0f0b
--- /dev/null
+++ b/test/files/neg/migration28.check
@@ -0,0 +1,9 @@
+migration28.scala:5: error: method ++= in class Stack has changed semantics:
+Stack ++= now pushes arguments on the stack from left to right.
+ s ++= List(1,2,3)
+ ^
+migration28.scala:7: error: method foreach in class Stack has changed semantics:
+Stack iterator and foreach now traverse in FIFO order.
+ s foreach (_ => ())
+ ^
+two errors found
diff --git a/test/files/neg/migration28.flags b/test/files/neg/migration28.flags
new file mode 100644
index 0000000000..f7025d0226
--- /dev/null
+++ b/test/files/neg/migration28.flags
@@ -0,0 +1 @@
+-Yfatal-warnings -Xmigration
diff --git a/test/files/neg/migration28.scala b/test/files/neg/migration28.scala
new file mode 100644
index 0000000000..090b32d690
--- /dev/null
+++ b/test/files/neg/migration28.scala
@@ -0,0 +1,12 @@
+object Test {
+ import scala.collection.mutable._
+
+ val s = new Stack[Int]
+ s ++= List(1,2,3)
+ s map (_ + 1)
+ s foreach (_ => ())
+
+ def main(args: Array[String]): Unit = {
+
+ }
+}
diff --git a/test/files/neg/multi-array.flags b/test/files/neg/multi-array.flags
new file mode 100644
index 0000000000..c36e713ab8
--- /dev/null
+++ b/test/files/neg/multi-array.flags
@@ -0,0 +1 @@
+-deprecation \ No newline at end of file
diff --git a/test/files/neg/patmat-type-check.check b/test/files/neg/patmat-type-check.check
new file mode 100644
index 0000000000..ab638b616d
--- /dev/null
+++ b/test/files/neg/patmat-type-check.check
@@ -0,0 +1,21 @@
+patmat-type-check.scala:18: error: scrutinee is incompatible with pattern type;
+ found : Seq[A]
+ required: java.lang.String
+ def f1 = "bob".reverse match { case Seq('b', 'o', 'b') => true } // fail
+ ^
+patmat-type-check.scala:19: error: scrutinee is incompatible with pattern type;
+ found : Seq[A]
+ required: Array[Char]
+ def f2 = "bob".toArray match { case Seq('b', 'o', 'b') => true } // fail
+ ^
+patmat-type-check.scala:23: error: scrutinee is incompatible with pattern type;
+ found : Seq[A]
+ required: Test.Bop2
+ def f3(x: Bop2) = x match { case Seq('b', 'o', 'b') => true } // fail
+ ^
+patmat-type-check.scala:27: error: scrutinee is incompatible with pattern type;
+ found : Seq[A]
+ required: Test.Bop3[T]
+ def f4[T](x: Bop3[T]) = x match { case Seq('b', 'o', 'b') => true } // fail
+ ^
+four errors found
diff --git a/test/files/neg/patmat-type-check.scala b/test/files/neg/patmat-type-check.scala
new file mode 100644
index 0000000000..c6c689b256
--- /dev/null
+++ b/test/files/neg/patmat-type-check.scala
@@ -0,0 +1,28 @@
+object Test
+{
+ def s1 = "bob".toList match { case Seq('b', 'o', 'b') => true } // list ok
+
+ // not final, allowed
+ class Bop
+ def s2(x: Bop) = x match { case Seq('b', 'o', 'b') => true }
+
+ // covariance, allowed
+ final class Bop4[+T]
+ def s3[T](x: Bop4[T]) = x match { case Seq('b', 'o', 'b') => true }
+
+ // contravariance, allowed
+ final class Bop5[T, U, -V]
+ def s4[T1, T2](x: Bop5[_, T1, T2]) = x match { case Seq('b', 'o', 'b') => true }
+
+ // String and Array are final/invariant, disallowed
+ def f1 = "bob".reverse match { case Seq('b', 'o', 'b') => true } // fail
+ def f2 = "bob".toArray match { case Seq('b', 'o', 'b') => true } // fail
+
+ // final, no type parameters, should be disallowed
+ final class Bop2
+ def f3(x: Bop2) = x match { case Seq('b', 'o', 'b') => true } // fail
+
+ // final, invariant type parameter, should be disallowed
+ final class Bop3[T]
+ def f4[T](x: Bop3[T]) = x match { case Seq('b', 'o', 'b') => true } // fail
+}
diff --git a/test/files/neg/patmatexhaust.check b/test/files/neg/patmatexhaust.check
index 1c46b6c9e5..ca769300c0 100644
--- a/test/files/neg/patmatexhaust.check
+++ b/test/files/neg/patmatexhaust.check
@@ -15,8 +15,8 @@ missing combination Qult Qult
def ma3(x:Mult) = (x,x) match { // not exhaustive
^
patmatexhaust.scala:49: warning: match is not exhaustive!
-missing combination Gu
missing combination Gp
+missing combination Gu
def ma4(x:Deep) = x match { // missing cases: Gu, Gp
^
diff --git a/test/files/neg/t0528neg.scala b/test/files/neg/t0528neg.scala
index 911745b763..30d20c95b1 100644
--- a/test/files/neg/t0528neg.scala
+++ b/test/files/neg/t0528neg.scala
@@ -3,7 +3,7 @@ trait Sequ[+A] {
}
class RichStr extends Sequ[Char] {
- // override to a primitve array
+ // override to a primitive array
def toArray: Array[Char] = new Array[Char](10)
}
diff --git a/test/files/neg/t0851.check b/test/files/neg/t0851.check
deleted file mode 100644
index 61d2a98632..0000000000
--- a/test/files/neg/t0851.check
+++ /dev/null
@@ -1,9 +0,0 @@
-t0851.scala:14: error: not enough arguments for method apply: (v1: Int,v2: String)java.lang.String in trait Function2.
-Unspecified value parameter v2.
- println(f(1))
- ^
-t0851.scala:22: error: not enough arguments for method apply: (v1: Int,v2: String)java.lang.String in trait Function2.
-Unspecified value parameter v2.
- println(fn(1))
- ^
-two errors found
diff --git a/test/files/neg/t0851.scala b/test/files/neg/t0851.scala
deleted file mode 100644
index b28be2c697..0000000000
--- a/test/files/neg/t0851.scala
+++ /dev/null
@@ -1,25 +0,0 @@
-package test
-
-// This gives now type errors about missing parameters, which seems OK to me.
-// The tests just make sure it does not crash
-
-object test1 {
- case class Foo[T,T2](f : (T,T2) => String) extends (((T,T2)) => String){
- def apply(t : T) = (s:T2) => f(t,s)
- def apply(p : (T,T2)) = f(p._1,p._2)
- }
- implicit def g[T](f : (T,String) => String) = Foo(f)
- def main(args : Array[String]) : Unit = {
- val f = (x:Int,s:String) => s + x
- println(f(1))
- ()
- }
-}
-object Main {
- def main(args : Array[String]) {
- val fn = (a : Int, str : String) => "a: " + a + ", str: " + str
- implicit def fx[T](f : (T,String) => String) = (x:T) => f(x,null)
- println(fn(1))
- ()
- }
-}
diff --git a/test/files/neg/t2179.check b/test/files/neg/t2179.check
index e454e117b5..aa94fabe1f 100644
--- a/test/files/neg/t2179.check
+++ b/test/files/neg/t2179.check
@@ -1,9 +1,9 @@
-t2179.scala:2: error: inferred type arguments [scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]{def sameElements[B >: Any](that: Iterable[B]): Boolean}]; def reverse: scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}; protected def thisCollection: Seq[Double]{def companion: scala.collection.generic.GenericCompanion[Seq[Any]]}; def dropRight(n: Int): scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}; def takeRight(n: Int): scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}; def slice(start: Int,end: Int): scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}; def take(n: Int): scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}; def drop(n: Int): scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}}] do not conform to method reduceLeft's type parameter bounds [B >: List[Double]]
+t2179.scala:2: error: inferred type arguments [scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]; protected def thisCollection: Seq[Double]{def companion: scala.collection.generic.GenericCompanion[Seq[Any]]}}] do not conform to method reduceLeft's type parameter bounds [B >: List[Double]]
(Nil:List[List[Double]]).reduceLeft((_: Any, _: Any) => Nil.indices.map(_ => 0d))
^
t2179.scala:2: error: type mismatch;
found : (Any, Any) => scala.collection.immutable.IndexedSeq[Double]
- required: (scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]{def sameElements[B >: Any](that: Iterable[B]): Boolean}]; def reverse: scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}; protected def thisCollection: Seq[Double]{def companion: scala.collection.generic.GenericCompanion[Seq[Any]]}; def dropRight(n: Int): scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}; def takeRight(n: Int): scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}; def slice(start: Int,end: Int): scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}; def take(n: Int): scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}; def drop(n: Int): scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}}, List[Double]) => scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]{def sameElements[B >: Any](that: Iterable[B]): Boolean}]; def reverse: scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}; protected def thisCollection: Seq[Double]{def companion: scala.collection.generic.GenericCompanion[Seq[Any]]}; def dropRight(n: Int): scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}; def takeRight(n: Int): scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}; def slice(start: Int,end: Int): scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}; def take(n: Int): scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}; def drop(n: Int): scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}}
+ required: (scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]; protected def thisCollection: Seq[Double]{def companion: scala.collection.generic.GenericCompanion[Seq[Any]]}}, List[Double]) => scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]; protected def thisCollection: Seq[Double]{def companion: scala.collection.generic.GenericCompanion[Seq[Any]]}}
(Nil:List[List[Double]]).reduceLeft((_: Any, _: Any) => Nil.indices.map(_ => 0d))
^
two errors found
diff --git a/test/files/neg/t2386.check b/test/files/neg/t2386.check
new file mode 100644
index 0000000000..2caa46c731
--- /dev/null
+++ b/test/files/neg/t2386.check
@@ -0,0 +1,4 @@
+t2386.scala:2: error: could not find implicit value for evidence parameter of type scala.reflect.ClassManifest[Array[_ >: java.lang.String with Int]]
+ val a = Array(Array(1, 2), Array("a","b"))
+ ^
+one error found
diff --git a/test/files/neg/t2386.scala b/test/files/neg/t2386.scala
new file mode 100644
index 0000000000..56146cc5c3
--- /dev/null
+++ b/test/files/neg/t2386.scala
@@ -0,0 +1,3 @@
+object Test {
+ val a = Array(Array(1, 2), Array("a","b"))
+}
diff --git a/test/files/neg/t2918.check b/test/files/neg/t2918.check
new file mode 100644
index 0000000000..e67f24ec57
--- /dev/null
+++ b/test/files/neg/t2918.check
@@ -0,0 +1,7 @@
+t2918.scala:2: error: cyclic aliasing or subtyping involving type A
+ def g[X, A[X] <: A[X]](x: A[X]) = x
+ ^
+t2918.scala:2: error: A does not take type parameters
+ def g[X, A[X] <: A[X]](x: A[X]) = x
+ ^
+two errors found
diff --git a/test/files/neg/t2918.scala b/test/files/neg/t2918.scala
new file mode 100755
index 0000000000..ff2be39ae0
--- /dev/null
+++ b/test/files/neg/t2918.scala
@@ -0,0 +1,3 @@
+object Test {
+ def g[X, A[X] <: A[X]](x: A[X]) = x
+}
diff --git a/test/files/neg/t3006.check b/test/files/neg/t3006.check
new file mode 100644
index 0000000000..9a90d32b28
--- /dev/null
+++ b/test/files/neg/t3006.check
@@ -0,0 +1,6 @@
+t3006.scala:8: error: type mismatch;
+ found : java.lang.String("H")
+ required: Int
+ println(A(3) + "H")
+ ^
+one error found
diff --git a/test/files/neg/t3006.scala b/test/files/neg/t3006.scala
new file mode 100755
index 0000000000..f476c1717d
--- /dev/null
+++ b/test/files/neg/t3006.scala
@@ -0,0 +1,10 @@
+object Test extends Application {
+ case class A(x: Int);
+
+ class Foo(a: A) { println("Foo created!"); def +(x: Int) = new A(this.a.x + x); }
+
+ implicit def aToFoo(x: A) = new Foo(x);
+
+ println(A(3) + "H")
+
+}
diff --git a/test/files/neg/t3015.check b/test/files/neg/t3015.check
new file mode 100644
index 0000000000..32809b0669
--- /dev/null
+++ b/test/files/neg/t3015.check
@@ -0,0 +1,11 @@
+t3015.scala:7: error: scrutinee is incompatible with pattern type;
+ found : _$1 where type _$1
+ required: java.lang.String
+ val b(foo) = "foo"
+ ^
+t3015.scala:7: error: type mismatch;
+ found : _$1(in value foo) where type _$1(in value foo) <: java.lang.String
+ required: (some other)_$1(in value foo) where type (some other)_$1(in value foo)
+ val b(foo) = "foo"
+ ^
+two errors found
diff --git a/test/files/neg/t3015.scala b/test/files/neg/t3015.scala
new file mode 100644
index 0000000000..0bd53e7a03
--- /dev/null
+++ b/test/files/neg/t3015.scala
@@ -0,0 +1,8 @@
+class UnApp[P] {
+ def unapply(a: P): Option[P] = Some(a)
+}
+
+object Test extends Application {
+ val b: UnApp[_] = new UnApp[String]
+ val b(foo) = "foo"
+}
diff --git a/test/files/neg/t3115.check b/test/files/neg/t3115.check
new file mode 100644
index 0000000000..04f64eec3f
--- /dev/null
+++ b/test/files/neg/t3115.check
@@ -0,0 +1,10 @@
+t3115.scala:6: error: object Math in object sc is deprecated:
+ println(sc.Math)
+ ^
+t3115.scala:7: error: object Math in package scala is deprecated: use scala.math package instead
+ println(scala.Math)
+ ^
+t3115.scala:8: error: object Math in package scala is deprecated: use scala.math package instead
+ scala.Math.Pi
+ ^
+three errors found
diff --git a/test/files/neg/t3115.flags b/test/files/neg/t3115.flags
new file mode 100644
index 0000000000..bf8f88334b
--- /dev/null
+++ b/test/files/neg/t3115.flags
@@ -0,0 +1 @@
+-deprecation -Yfatal-warnings \ No newline at end of file
diff --git a/test/files/neg/t3115.scala b/test/files/neg/t3115.scala
new file mode 100755
index 0000000000..4aeeb4063e
--- /dev/null
+++ b/test/files/neg/t3115.scala
@@ -0,0 +1,9 @@
+object sc {
+ @deprecated("") object Math
+}
+
+object Test {
+ println(sc.Math)
+ println(scala.Math)
+ scala.Math.Pi
+}
diff --git a/test/files/neg/t3118.check b/test/files/neg/t3118.check
new file mode 100644
index 0000000000..da00f1c330
--- /dev/null
+++ b/test/files/neg/t3118.check
@@ -0,0 +1,7 @@
+t3118.scala:6: error: value C is not a member of O1
+ println(x.C()) // should not be accessible
+ ^
+t3118.scala:7: error: type C is not a member of O1
+ println(new x.C) // is correctly not accessible
+ ^
+two errors found
diff --git a/test/files/neg/t3118.scala b/test/files/neg/t3118.scala
new file mode 100644
index 0000000000..9be24c1ed4
--- /dev/null
+++ b/test/files/neg/t3118.scala
@@ -0,0 +1,8 @@
+class O1 {
+ private[this] case class C()
+
+ val x = new O1
+
+ println(x.C()) // should not be accessible
+ println(new x.C) // is correctly not accessible
+}
diff --git a/test/files/neg/t3222.check b/test/files/neg/t3222.check
new file mode 100644
index 0000000000..6170827cc9
--- /dev/null
+++ b/test/files/neg/t3222.check
@@ -0,0 +1,13 @@
+t3222.scala:1: error: not found: type B
+@throws(classOf[B])
+ ^
+t3222.scala:4: error: not found: type D
+ def foo(@throws(classOf[D]) x: Int) {}
+ ^
+t3222.scala:3: error: not found: type C
+ @throws(classOf[C])
+ ^
+t3222.scala:6: error: not found: type E
+ @throws(classOf[E])
+ ^
+four errors found
diff --git a/test/files/neg/t3222.scala b/test/files/neg/t3222.scala
new file mode 100644
index 0000000000..448292e8a7
--- /dev/null
+++ b/test/files/neg/t3222.scala
@@ -0,0 +1,9 @@
+@throws(classOf[B])
+class ExceptionTest {
+ @throws(classOf[C])
+ def foo(@throws(classOf[D]) x: Int) {}
+
+ @throws(classOf[E])
+ type t = String
+}
+
diff --git a/test/files/neg/unit2anyref.check b/test/files/neg/unit2anyref.check
index 7af4564ffb..2616fd35f9 100644
--- a/test/files/neg/unit2anyref.check
+++ b/test/files/neg/unit2anyref.check
@@ -1,10 +1,8 @@
unit2anyref.scala:2: error: type mismatch;
found : Unit
required: AnyRef
-Note that implicit conversions are not applicable because they are ambiguous:
- both method any2stringadd in object Predef of type (x: Any)scala.runtime.StringAdd
- and method any2ArrowAssoc in object Predef of type [A](x: A)ArrowAssoc[A]
- are possible conversion functions from Unit to AnyRef
+Note: primitive types are not implicitly converted to AnyRef.
+You can safely force boxing by casting x.asInstanceOf[AnyRef].
val x: AnyRef = () // this should not succeed.
^
one error found
diff --git a/test/files/pos/annotations.scala b/test/files/pos/annotations.scala
index d1bd6ba264..0819379d86 100644
--- a/test/files/pos/annotations.scala
+++ b/test/files/pos/annotations.scala
@@ -1,4 +1,5 @@
class ann(i: Int) extends Annotation
+class cfann(x: String) extends ClassfileAnnotation
// annotations on abstract types
abstract class C1[@serializable @cloneable +T, U, V[_]]
@@ -35,6 +36,10 @@ object Test {
// annotation on annotation constructor
@(ann @ann(100))(200) def foo() = 300
+
+ // #2984
+ private final val NAMESPACE = "/info"
+ @cfann(x = NAMESPACE + "/index") def index = "success"
}
// test forward references to getters / setters
@@ -84,3 +89,22 @@ trait BeanF {
def isG(): Boolean
def setG(nb: Boolean): Unit
}
+
+
+class Ann3(arr: Array[String]) extends ClassfileAnnotation
+class Ann4(i: Int) extends ClassfileAnnotation
+class Ann5(value: Class[_]) extends ClassfileAnnotation
+
+object Test3 {
+ final val i = 1083
+ final val cls = classOf[String]
+}
+
+class Test4 {
+ @Ann3(arr = Array("dlkfj", "DSF"))
+ @Ann4(i = 2908)
+ @Ann4(i = Test3.i)
+ @Ann5(value = classOf[Int])
+ @Ann5(Test3.cls)
+ def foo {}
+}
diff --git a/test/files/pos/bug0646.scala b/test/files/pos/bug0646.scala
index 64214f65b1..a56e857223 100644
--- a/test/files/pos/bug0646.scala
+++ b/test/files/pos/bug0646.scala
@@ -10,7 +10,7 @@ object xfor {
</bks>;
new NodeSeq { val theSeq = books.child } match {
- case t @ <title>Blabla</title> => t
+ case t @ Seq(<title>Blabla</title>) => t
}
//val n: NodeSeq = new NodeSeq { val theSeq = books.child }
diff --git a/test/files/pos/bug2310.scala b/test/files/pos/bug2310.scala
new file mode 100644
index 0000000000..68912b4961
--- /dev/null
+++ b/test/files/pos/bug2310.scala
@@ -0,0 +1,38 @@
+import scala.Stream._
+
+object consistencyError {
+ /* this gives an error:
+ Consistency problem compiling (virtual file)!
+ Trying to call method body%1(List(scala.collection.immutable.Stream[A])) with arguments (List(tp2, temp6, temp5))
+ case (l #:: ls, rs) => None
+ ^
+ scala.tools.nsc.symtab.Types$TypeError: too many arguments for method body%1: (val rs: scala.collection.immutable.Stream[A])None.type
+
+ two errors found
+ vss(0) =
+ args = List(tp2, temp6, temp5)
+ vss(1) = value rs, value ls, value l
+ args = List(tp2, temp6, temp5)
+ targets(0) = FinalState(,scala.None)
+ targets(1) = FinalState(,scala.None)
+ labels(1) = method body%1
+ labels(0) = method body%0
+ bx = 1
+ label.tpe = (val rs: scala.collection.immutable.Stream[A])None.type
+ */
+ def crash[A](lefts: Stream[A], rights: Stream[A]) = (lefts, rights) match {
+ case (Stream.Empty, Stream.Empty) => None
+ case (l #:: ls, rs) => None
+ }
+
+ // These work
+ // def works1[A](lefts: Stream[A]) = lefts match {
+ // case Stream.Empty => None
+ // case l #:: ls => None
+ // }
+ //
+ // def works2[A](lefts: Stream[A], rights: Stream[A]) = (lefts, rights) match {
+ // case (Stream.Empty, Stream.Empty) => None
+ // case (ls, rs) => None
+ // }
+}
diff --git a/test/files/pos/bug3097.flags b/test/files/pos/bug3097.flags
new file mode 100644
index 0000000000..570b15929d
--- /dev/null
+++ b/test/files/pos/bug3097.flags
@@ -0,0 +1 @@
+-unchecked -Yfatal-warnings
diff --git a/test/files/pos/bug3097.scala b/test/files/pos/bug3097.scala
new file mode 100644
index 0000000000..a034b960f7
--- /dev/null
+++ b/test/files/pos/bug3097.scala
@@ -0,0 +1,31 @@
+package seal
+
+sealed trait ISimpleValue
+
+sealed trait IListValue extends ISimpleValue {
+ def items: List[IAtomicValue[_]]
+}
+sealed trait IAtomicValue[O] extends ISimpleValue {
+ def data: O
+}
+
+sealed trait IAbstractDoubleValue[O] extends IAtomicValue[O] { }
+sealed trait IDoubleValue extends IAbstractDoubleValue[Double]
+
+case class ListValue(val items: List[IAtomicValue[_]]) extends IListValue
+class DoubleValue(val data: Double) extends IDoubleValue {
+ def asDouble = data
+}
+
+object Test {
+ /**
+ * @param args the command line arguments
+ */
+ def main(args: Array[String]): Unit = {
+ val v: ISimpleValue = new DoubleValue(1)
+ v match {
+ case m: IListValue => println("list")
+ case a: IAtomicValue[_] => println("atomic")
+ }
+ }
+}
diff --git a/test/files/pos/bug3136.scala b/test/files/pos/bug3136.scala
new file mode 100644
index 0000000000..33d42c2f3c
--- /dev/null
+++ b/test/files/pos/bug3136.scala
@@ -0,0 +1,19 @@
+class Type
+class Symbol
+case class PolyType(tps: List[Symbol], res: Type) extends Type
+class OtherType extends Type
+
+// case class NullaryMethodType(tp: Type) extends Type
+
+object NullaryMethodType {
+ def apply(resTpe: Type): Type = PolyType(List(), resTpe)
+ def unapply(tp: Type): Option[(Type)] = None
+}
+
+object Test {
+ def TEST(tp: Type): String =
+ tp match {
+ case PolyType(ps1, PolyType(ps2, res @ PolyType(a, b))) => "1"+tp // couldn't find a simpler version that still crashes
+ case NullaryMethodType(meh) => "2"+meh
+ }
+}
diff --git a/test/files/pos/bug3175.scala b/test/files/pos/bug3175.scala
new file mode 100644
index 0000000000..89bbf8b5fc
--- /dev/null
+++ b/test/files/pos/bug3175.scala
@@ -0,0 +1,7 @@
+object Test {
+ def f(g:{val update:Unit}) = g.update
+
+ def main(args: Array[String]): Unit = {
+
+ }
+}
diff --git a/test/files/pos/bug432.scala b/test/files/pos/bug432.scala
index 8e3097ac9d..087fd70aba 100644
--- a/test/files/pos/bug432.scala
+++ b/test/files/pos/bug432.scala
@@ -1,2 +1,2 @@
-case class Tata
+case class Tata()
object Tata
diff --git a/test/files/pos/bug715.cmds b/test/files/pos/bug715.cmds
new file mode 100644
index 0000000000..2836967fca
--- /dev/null
+++ b/test/files/pos/bug715.cmds
@@ -0,0 +1,2 @@
+scalac meredith_1.scala
+scalac runner_2.scala
diff --git a/test/files/pos/manifest1.scala b/test/files/pos/manifest1.scala
index 4d3b3bfa48..8901aa7437 100644
--- a/test/files/pos/manifest1.scala
+++ b/test/files/pos/manifest1.scala
@@ -13,8 +13,9 @@ object Test {
abstract class C { type T = String; val x: T }
val c = new C { val x = "abc" }
foo(c.x)
- abstract class D { type T; val x: T }
- val d: D = new D { type T = String; val x = "x" }
+ abstract class D { type T; implicit val m: Manifest[T]; val x: T }
+ val stringm = implicitly[Manifest[String]]
+ val d: D = new D { type T = String; val m = stringm; val x = "x" }
+ import d.m
foo(d.x)
-
}
diff --git a/test/files/pos/scan.scala b/test/files/pos/scan.scala
new file mode 100644
index 0000000000..47e0a7d976
--- /dev/null
+++ b/test/files/pos/scan.scala
@@ -0,0 +1,23 @@
+
+
+
+
+object Test {
+
+ def main(args: Array[String]) {
+ val lst = List(1, 2, 3, 4, 5)
+
+ assert(lst.scanLeft(0)(_ + _) == List(0, 1, 3, 6, 10, 15))
+ assert(lst.scanRight(0)(_ + _) == List(15, 14, 12, 9, 5, 0))
+
+ val emp = List[Int]()
+ assert(emp.scanLeft(0)(_ + _) == List(0))
+ assert(emp.scanRight(0)(_ + _) == List(0))
+
+ val stream = Stream(1, 2, 3, 4, 5)
+ assert(stream.scanLeft(0)(_ + _) == Stream(0, 1, 3, 6, 10, 15))
+
+ assert(Stream.from(1).scanLeft(0)(_ + _).take(5) == Stream(0, 1, 3, 6, 10))
+ }
+
+} \ No newline at end of file
diff --git a/test/files/pos/spec-List.scala b/test/files/pos/spec-List.scala
index ad864abd7c..c5bc3aa5fd 100644
--- a/test/files/pos/spec-List.scala
+++ b/test/files/pos/spec-List.scala
@@ -23,10 +23,10 @@ import annotation.tailrec
* @author Martin Odersky and others
* @version 2.8
*/
-sealed abstract class List[@specialized +A] extends LinearSeq[A]
+sealed trait List[@specialized +A] extends LinearSeq[A]
with Product
with GenericTraversableTemplate[A, List]
- with LinearSeqLike[A, List[A]] {
+ with LinearSeqOptimized[A, List[A]] {
override def companion: GenericCompanion[List] = List
import scala.collection.{Iterable, Traversable, Seq}
@@ -144,18 +144,12 @@ sealed abstract class List[@specialized +A] extends LinearSeq[A]
/** Create a new list which contains all elements of this list
* followed by all elements of Traversable `that'
*/
- override def ++[B >: A, That](that: Traversable[B])(implicit bf: CanBuildFrom[List[A], B, That]): That = {
+ override def ++[B >: A, That](xs: TraversableOnce[B])(implicit bf: CanBuildFrom[List[A], B, That]): That = {
val b = bf(this)
- if (b.isInstanceOf[ListBuffer[_]]) (this ::: that.toList).asInstanceOf[That]
- else super.++(that)
+ if (b.isInstanceOf[ListBuffer[_]]) (this ::: xs.toList).asInstanceOf[That]
+ else super.++(xs)
}
- /** Create a new list which contains all elements of this list
- * followed by all elements of Iterator `that'
- */
- override def ++[B >: A, That](that: Iterator[B])(implicit bf: CanBuildFrom[List[A], B, That]): That =
- this ++ that.toList
-
/** Overrides the method in Iterable for efficiency.
*
* @return the list itself
@@ -654,7 +648,7 @@ object List extends SeqFactory[List] {
*
* @param arr the array to convert
* @param start the first index to consider
- * @param len the lenght of the range to convert
+ * @param len the length of the range to convert
* @return a list that contains the same elements than <code>arr</code>
* in the same order
*/
diff --git a/test/files/pos/spec-arrays.scala b/test/files/pos/spec-arrays.scala
index c1f253a39d..96c75dd8de 100644
--- a/test/files/pos/spec-arrays.scala
+++ b/test/files/pos/spec-arrays.scala
@@ -30,7 +30,7 @@ final class IntArray(arr: Array[Int]) extends AbsArray[Int] {
def length: Int = arr.length
}
-final class GenericArray[T](arr: Array[T]) extends AbsArray[T] {
+final class ArraySeq[T](arr: Array[T]) extends AbsArray[T] {
def apply(idx: Int): T = arr(idx)
def update(idx: Int, elem: T) = arr(idx) = elem
def length: Int = arr.length
@@ -96,7 +96,7 @@ class ScalaSpec2Test extends Test {
}
class ScalaWrapTest extends Test {
- val arr: AbsArray[Int] = new GenericArray(new Array[Int](1000))
+ val arr: AbsArray[Int] = new ArraySeq(new Array[Int](1000))
def sum(): Int = {
var acc = 0
@@ -116,7 +116,7 @@ class ScalaWrapTest extends Test {
}
class ScalaGenTest extends Test {
- val arr: AbsArray[Integer] = new GenericArray(new Array[Integer](1000))
+ val arr: AbsArray[Integer] = new ArraySeq(new Array[Integer](1000))
for (i <- 0 until arr.length) arr(i) = new Integer(0)
def sum(): Int = {
diff --git a/test/files/pos/spec-partially.flags b/test/files/pos/spec-partially.flags
new file mode 100644
index 0000000000..973517e1c9
--- /dev/null
+++ b/test/files/pos/spec-partially.flags
@@ -0,0 +1 @@
+-Yspecialize
diff --git a/test/files/pos/spec-partially.scala b/test/files/pos/spec-partially.scala
new file mode 100644
index 0000000000..90778e42a8
--- /dev/null
+++ b/test/files/pos/spec-partially.scala
@@ -0,0 +1,5 @@
+/** Test case for partially specialized classes. see #2880. */
+
+class Arc[State, @specialized T](label: T, to: State)
+
+
diff --git a/test/files/pos/super.cmds b/test/files/pos/super.cmds
new file mode 100644
index 0000000000..8f3f8a4172
--- /dev/null
+++ b/test/files/pos/super.cmds
@@ -0,0 +1,2 @@
+javac Super_1.java
+scalac Super_2.scala
diff --git a/test/files/pos/switchUnbox.flags b/test/files/pos/switchUnbox.flags
index ec1ad20e3a..cdf5f84ede 100644
--- a/test/files/pos/switchUnbox.flags
+++ b/test/files/pos/switchUnbox.flags
@@ -1 +1 @@
--Xsqueeze:on
+-Ysqueeze:on
diff --git a/test/files/pos/t0816.scala b/test/files/pos/t0816.scala
new file mode 100644
index 0000000000..0128a0ad72
--- /dev/null
+++ b/test/files/pos/t0816.scala
@@ -0,0 +1,12 @@
+abstract class Atest(val data: String)
+
+case class Btest(override val data: String, val b: Boolean) extends Atest(data)
+
+case class Ctest(override val data: String) extends Btest(data, true)
+
+class testCaseClass {
+ def test(x: Atest) = x match {
+ case Ctest(data) => Console.println("C")
+ case Btest(data, b) => Console.println("B")
+ }
+}
diff --git a/test/files/pos/t0971.java b/test/files/pos/t0971.java
deleted file mode 100644
index 160dc2c5af..0000000000
--- a/test/files/pos/t0971.java
+++ /dev/null
@@ -1,4 +0,0 @@
-class A {
- int y = 1, z;
- static Object x = new java.util.HashMap<Object , Object > () ;
-}
diff --git a/test/files/pos/t0999.scala b/test/files/pos/t0999.scala
deleted file mode 100644
index c384820af1..0000000000
--- a/test/files/pos/t0999.scala
+++ /dev/null
@@ -1,5 +0,0 @@
-object A {
- val d: Double = Math.sqrt(5 match {
- case x: Double => x
- })
-}
diff --git a/test/files/pos/t1029.cmds b/test/files/pos/t1029.cmds
new file mode 100644
index 0000000000..06b863dc03
--- /dev/null
+++ b/test/files/pos/t1029.cmds
@@ -0,0 +1,2 @@
+scalac Test_1.scala
+scalac Test_2.scala
diff --git a/test/files/pos/t1035.scala b/test/files/pos/t1035.scala
new file mode 100644
index 0000000000..a280a415d2
--- /dev/null
+++ b/test/files/pos/t1035.scala
@@ -0,0 +1,32 @@
+//A fatal error or Scala compiler
+// Scala compiler version 2.7.1-final -- (c) 2002-2010 LAMP/EPFL
+// Carlos Loria cloria@artinsoft.com
+// 7/10/2008
+
+class A {
+ var name:String = _
+ def getName() = name
+ def this(name:String, age:Int){this();this.name=name}
+
+}
+
+class B(name:String) extends A(name,0){
+}
+
+class D {
+
+ object A {
+ def unapply(p:A) = Some(p.getName)
+ }
+
+ object B {
+ def unapply(p:B) = Some(p.getName)
+ }
+ def foo(p:Any) = p match {
+ case B(n) => println("B")
+ case A(n) => println("A")
+
+
+ }
+
+}
diff --git a/test/files/pos/t1164.scala b/test/files/pos/t1164.scala
index b238bf54d9..ca780c9a26 100644
--- a/test/files/pos/t1164.scala
+++ b/test/files/pos/t1164.scala
@@ -12,7 +12,7 @@ object test {
def matchAndGetArgFromFoo[a]( e:Foo[a]):a = {e match { case Foo(x) => x }}
- // Try the same thing as above but use function as arguemnt to Bar
+ // Try the same thing as above but use function as argument to Bar
// constructor
type FunIntToA [a] = (Int) => a
diff --git a/test/files/pos/t1380.flags b/test/files/pos/t1380.flags
deleted file mode 100644
index f0b0ef7f51..0000000000
--- a/test/files/pos/t1380.flags
+++ /dev/null
@@ -1 +0,0 @@
--cp pending/pos/t1380/gnujaxp.jar
diff --git a/test/files/pos/t1380/gnujaxp.jar.desired.sha1 b/test/files/pos/t1380/gnujaxp.jar.desired.sha1
deleted file mode 100644
index c155c2aaa2..0000000000
--- a/test/files/pos/t1380/gnujaxp.jar.desired.sha1
+++ /dev/null
@@ -1 +0,0 @@
-ee000286d00c5209d5644462c1cfea87fc8b1342 ?gnujaxp.jar
diff --git a/test/files/pos/t1380/hallo.scala b/test/files/pos/t1380/hallo.scala
deleted file mode 100644
index 27ecd9fb8b..0000000000
--- a/test/files/pos/t1380/hallo.scala
+++ /dev/null
@@ -1,3 +0,0 @@
-object hallo {
- def main(args:Array[String]) = println("hallo")
-}
diff --git a/test/files/pos/t1751.cmds b/test/files/pos/t1751.cmds
new file mode 100644
index 0000000000..d4a4898ffd
--- /dev/null
+++ b/test/files/pos/t1751.cmds
@@ -0,0 +1,3 @@
+javac SuiteClasses.java
+scalac A2_1.scala
+scalac A1_2.scala
diff --git a/test/files/pos/t1756.scala b/test/files/pos/t1756.scala
index 4f7202114c..d5d3ddc624 100755
--- a/test/files/pos/t1756.scala
+++ b/test/files/pos/t1756.scala
@@ -15,7 +15,7 @@ expected type from x+, because the lhs x is still typed as a Poly[A].
This means that the argument of the implicit conversion is typechecked
with expected type A with Poly[A]. And no solution is found.
-To solve this, I added a fallback scheme similar to implicit arguents:
+To solve this, I added a fallback scheme similar to implicit arguments:
When an implicit view that adds a method matching given arguments and result
type fails, try again without the result type.
*/
diff --git a/test/files/pos/t1782.cmds b/test/files/pos/t1782.cmds
new file mode 100644
index 0000000000..61f3d3788e
--- /dev/null
+++ b/test/files/pos/t1782.cmds
@@ -0,0 +1,2 @@
+javac Ann.java Days.java ImplementedBy.java
+scalac Test_1.scala
diff --git a/test/files/pos/t1836/J.java b/test/files/pos/t1836/J.java
new file mode 100644
index 0000000000..a009a59e21
--- /dev/null
+++ b/test/files/pos/t1836/J.java
@@ -0,0 +1 @@
+public abstract class J<T> { protected J(T id) { } }
diff --git a/test/files/pos/t1836/S.scala b/test/files/pos/t1836/S.scala
new file mode 100644
index 0000000000..88ce1063e9
--- /dev/null
+++ b/test/files/pos/t1836/S.scala
@@ -0,0 +1 @@
+class S extends J("")
diff --git a/test/files/pos/t1942.cmds b/test/files/pos/t1942.cmds
new file mode 100644
index 0000000000..c14311042a
--- /dev/null
+++ b/test/files/pos/t1942.cmds
@@ -0,0 +1,2 @@
+scalac A_1.scala
+scalac Test_2.scala
diff --git a/test/files/pos/t1996.scala b/test/files/pos/t1996.scala
new file mode 100644
index 0000000000..2730128196
--- /dev/null
+++ b/test/files/pos/t1996.scala
@@ -0,0 +1,19 @@
+object forbug {
+ val l1 = List(List(ValDef(new A)), List(ValDef(new A)))
+ for ((e1s, e2s) <- l1.zip(l1);
+ (e1, e2) <- e1s.zip(e2s)) {
+ e1.a.doSome(20)
+// ()
+ }
+}
+
+
+class A {
+ def doSome(a: Int): this.type = {
+ println(a)
+ this
+ }
+}
+
+case class ValDef(a: A)
+
diff --git a/test/files/pos/t2421c.scala b/test/files/pos/t2421c.scala
new file mode 100644
index 0000000000..755e6a39f0
--- /dev/null
+++ b/test/files/pos/t2421c.scala
@@ -0,0 +1,17 @@
+object Test {
+ class A
+ class B
+ class C
+ class F[X]
+
+ def f(implicit aa: F[A]) = println(aa)
+
+ implicit def a : F[A] = new F[A]()
+
+ // generalised from t2421b to verify we check enough
+ class G[X]
+ implicit def g[X] = new G[X]()
+ implicit def b[X <: B](implicit mx: G[X]) = new F[X]()
+
+ f
+} \ No newline at end of file
diff --git a/test/files/pos/t2433/A.java b/test/files/pos/t2433/A.java
new file mode 100755
index 0000000000..340690c402
--- /dev/null
+++ b/test/files/pos/t2433/A.java
@@ -0,0 +1,4 @@
+class A223 extends B223.Inner {
+ static class Inner {}
+ void foo() {}
+} \ No newline at end of file
diff --git a/test/files/pos/t2433/B.java b/test/files/pos/t2433/B.java
new file mode 100755
index 0000000000..151dd71ca1
--- /dev/null
+++ b/test/files/pos/t2433/B.java
@@ -0,0 +1,4 @@
+class B223 {
+ static class Inner {}
+ void m(A223.Inner x) {}
+} \ No newline at end of file
diff --git a/test/files/pos/t2433/Test.scala b/test/files/pos/t2433/Test.scala
new file mode 100755
index 0000000000..02fd89b646
--- /dev/null
+++ b/test/files/pos/t2433/Test.scala
@@ -0,0 +1,3 @@
+object Test {
+ (new A223).foo()
+}
diff --git a/test/files/pos/t2464.cmds b/test/files/pos/t2464.cmds
new file mode 100644
index 0000000000..ca733ef23d
--- /dev/null
+++ b/test/files/pos/t2464.cmds
@@ -0,0 +1,3 @@
+javac JavaOne.java
+scalac ScalaOne_1.scala
+scalac t2464_2.scala
diff --git a/test/files/pos/t2610.scala b/test/files/pos/t2610.scala
new file mode 100644
index 0000000000..8dd4cde66e
--- /dev/null
+++ b/test/files/pos/t2610.scala
@@ -0,0 +1,17 @@
+package mada; package defects; package tests
+
+package object bbb {
+ def bar = ()
+ aaa.foo // value foo is not a member of package mada.defects.tests.aaa
+}
+
+package object aaa {
+ def foo = ()
+}
+
+/* compiles successfully if placed here..
+package object bbb {
+ def bar = ()
+ aaa.foo // value foo is not a member of package mada.defects.tests.aaa
+}
+*/ \ No newline at end of file
diff --git a/test/files/pos/t2660.scala b/test/files/pos/t2660.scala
new file mode 100644
index 0000000000..b1908b201b
--- /dev/null
+++ b/test/files/pos/t2660.scala
@@ -0,0 +1,25 @@
+package hoho
+
+class G
+
+class H extends G
+
+class A[T](x: T) {
+
+ def this(y: G, z: T) = {
+ this(z)
+ print(1)
+ }
+
+ def this(z: H, h: T) = {
+ this(h)
+ print(2)
+ }
+}
+
+object T {
+ def main(args: Array[String]) {
+ implicit def g2h(g: G): H = new H
+ new A(new H, 23)
+ }
+} \ No newline at end of file
diff --git a/test/files/pos/t2691.scala b/test/files/pos/t2691.scala
new file mode 100644
index 0000000000..ba2e52f1fe
--- /dev/null
+++ b/test/files/pos/t2691.scala
@@ -0,0 +1,9 @@
+object Breakdown {
+ def unapplySeq(x: Int): Some[List[String]] = Some(List("", "there"))
+}
+object Test {
+ 42 match {
+ case Breakdown("") => // needed to trigger bug
+ case Breakdown("", who) => println ("hello " + who)
+ }
+} \ No newline at end of file
diff --git a/test/files/pos/t2726.cmds b/test/files/pos/t2726.cmds
new file mode 100644
index 0000000000..5fcb18bfbb
--- /dev/null
+++ b/test/files/pos/t2726.cmds
@@ -0,0 +1,2 @@
+scalac SQLBuilder_1.scala
+scalac test_2.scala
diff --git a/test/files/pos/t2741/2741-1.scala b/test/files/pos/t2741/2741-1.scala
new file mode 100644
index 0000000000..91c120ec1b
--- /dev/null
+++ b/test/files/pos/t2741/2741-1.scala
@@ -0,0 +1,13 @@
+sealed trait Kleisli[M[_], A, B]
+
+trait PartialApplyKA[T[_[_], _, _], M[_], A] {
+ type Apply[B] = T[M, A, B]
+}
+
+trait MA[M[_], A]
+
+trait MAs {
+ val a: MA[PartialApplyKA[Kleisli, List, String]#Apply, Int] = null
+}
+
+object Scalaz extends MAs
diff --git a/test/files/pos/t2741/2741-2.scala b/test/files/pos/t2741/2741-2.scala
new file mode 100644
index 0000000000..41f6a64260
--- /dev/null
+++ b/test/files/pos/t2741/2741-2.scala
@@ -0,0 +1,5 @@
+// object Test compiles jointly, but not separately.
+object Test {
+ import Scalaz._
+ Scalaz.a
+} \ No newline at end of file
diff --git a/test/files/pos/t2795.scala b/test/files/pos/t2795.scala
index c355a10c54..a4e1b7db83 100644
--- a/test/files/pos/t2795.scala
+++ b/test/files/pos/t2795.scala
@@ -5,6 +5,7 @@ trait Element[T] {
trait Config {
type T <: Element[T]
+ implicit val m: ClassManifest[T]
// XXX Following works fine:
// type T <: Element[_]
}
diff --git a/test/files/pos/t2797.scala b/test/files/pos/t2797.scala
new file mode 100644
index 0000000000..4323664e91
--- /dev/null
+++ b/test/files/pos/t2797.scala
@@ -0,0 +1,9 @@
+class MyVector[A] {
+ def map[B](f: A => B): MyVector[B] = error("")
+}
+
+object Test {
+ def unzip[B, C](_this: MyVector[(B, C)]): (MyVector[B], MyVector[C]) = {
+ (_this.map{ bc => bc._1 }, _this.map{ bc => bc._2 })
+ }
+} \ No newline at end of file
diff --git a/test/files/pos/t2867.scala b/test/files/pos/t2867.scala
deleted file mode 100644
index 0434a380b9..0000000000
--- a/test/files/pos/t2867.scala
+++ /dev/null
@@ -1 +0,0 @@
-case class A(l: List[_]*)
diff --git a/test/files/pos/t2868.cmds b/test/files/pos/t2868.cmds
new file mode 100644
index 0000000000..ed8124a9e0
--- /dev/null
+++ b/test/files/pos/t2868.cmds
@@ -0,0 +1,3 @@
+javac Jann.java Nest.java
+scalac pick_1.scala
+scalac test_2.scala
diff --git a/test/files/pos/t2868/Jann.java b/test/files/pos/t2868/Jann.java
new file mode 100644
index 0000000000..f5b68de7b0
--- /dev/null
+++ b/test/files/pos/t2868/Jann.java
@@ -0,0 +1,5 @@
+public @interface Jann {
+ public String str();
+ public Nest inn();
+ public int[] arr();
+}
diff --git a/test/files/pos/t2868/Nest.java b/test/files/pos/t2868/Nest.java
new file mode 100644
index 0000000000..53652291ad
--- /dev/null
+++ b/test/files/pos/t2868/Nest.java
@@ -0,0 +1,3 @@
+public @interface Nest {
+ public int value();
+}
diff --git a/test/files/pos/t2868/pick_1.scala b/test/files/pos/t2868/pick_1.scala
new file mode 100644
index 0000000000..e91728ec2f
--- /dev/null
+++ b/test/files/pos/t2868/pick_1.scala
@@ -0,0 +1,7 @@
+class ann(s: String) extends StaticAnnotation
+class pick {
+ final val s = "bang!"
+ @ann("bang!") def foo = 1
+ @Jann(str = "bang!", inn = new Nest(1), arr = Array(1, 2)) def bar = 2
+ @Jann(str = "bang!", inn = new Nest(1), arr = Array(1, 2)) def baz = 3
+}
diff --git a/test/files/pos/t2868/test_2.scala b/test/files/pos/t2868/test_2.scala
new file mode 100644
index 0000000000..f11ef0fae2
--- /dev/null
+++ b/test/files/pos/t2868/test_2.scala
@@ -0,0 +1,6 @@
+class test {
+ val l = (new pick).s
+ val u = (new pick).foo
+ val c = (new pick).bar
+ val k = (new pick).baz
+}
diff --git a/test/files/pos/t2913.scala b/test/files/pos/t2913.scala
new file mode 100755
index 0000000000..11d8b92053
--- /dev/null
+++ b/test/files/pos/t2913.scala
@@ -0,0 +1,53 @@
+class A {
+ def foo(a: Int) = 0
+}
+
+class RichA {
+ def foo(a: String) = 0
+ def foo(a: String, b: String) = 0
+ def foo() = 0
+}
+
+object Test {
+
+ implicit def AToRichA(a: A) = new RichA
+
+ val a = new A
+ a.foo()
+ a.foo(1)
+
+ a.foo("") // Without implicits, a type error regarding invalid argument types is generated at `""`. This is
+ // the same position as an argument, so the 'second try' typing with an Implicit View is tried,
+ // and AToRichA(a).foo("") is found.
+ //
+ // My reading of the spec "7.3 Views" is that `a.foo` denotes a member of `a`, so the view should
+ // not be triggered.
+ //
+ // But perhaps the implementation was changed to solve See https://lampsvn.epfl.ch/trac/scala/ticket/1756
+
+ a.foo("a", "b") // Without implicits, a type error regarding invalid arity is generated at `foo(<error>"", "")`.
+ // Typers#tryTypedApply:3274 only checks if the error is as the same position as `foo`, `"a"`, or `"b"`.
+ // None of these po
+}
+
+// t0851 is essentially the same:
+object test1 {
+ case class Foo[T,T2](f : (T,T2) => String) extends (((T,T2)) => String){
+ def apply(t : T) = (s:T2) => f(t,s)
+ def apply(p : (T,T2)) = f(p._1,p._2)
+ }
+ implicit def g[T](f : (T,String) => String) = Foo(f)
+ def main(args : Array[String]) : Unit = {
+ val f = (x:Int,s:String) => s + x
+ println(f(1))
+ ()
+ }
+}
+object Main {
+ def main(args : Array[String]) {
+ val fn = (a : Int, str : String) => "a: " + a + ", str: " + str
+ implicit def fx[T](f : (T,String) => String) = (x:T) => f(x,null)
+ println(fn(1))
+ ()
+ }
+}
diff --git a/test/files/pos/t294.cmds b/test/files/pos/t294.cmds
new file mode 100644
index 0000000000..62c9a5a068
--- /dev/null
+++ b/test/files/pos/t294.cmds
@@ -0,0 +1,3 @@
+javac Ann.java Ann2.java
+scalac Test_1.scala
+scalac Test_2.scala
diff --git a/test/files/pos/t2940/Cycle.java b/test/files/pos/t2940/Cycle.java
new file mode 100644
index 0000000000..eef6c23b5e
--- /dev/null
+++ b/test/files/pos/t2940/Cycle.java
@@ -0,0 +1,3 @@
+public interface Cycle<T extends Cycle<?>> {
+ void doStuff();
+} \ No newline at end of file
diff --git a/test/files/pos/t2940/Error.scala b/test/files/pos/t2940/Error.scala
new file mode 100644
index 0000000000..bf5a6bd0df
--- /dev/null
+++ b/test/files/pos/t2940/Error.scala
@@ -0,0 +1,12 @@
+abstract class Error {
+ val c: Cycle[_]
+}
+
+object Test {
+ trait Quux[T] extends Cycle[Quux[T]]
+ val x = new Quux[Int] { def doStuff() { } }
+
+ def main(args: Array[String]): Unit = {
+
+ }
+}
diff --git a/test/files/pos/t2956/BeanDefinitionVisitor.java b/test/files/pos/t2956/BeanDefinitionVisitor.java
new file mode 100644
index 0000000000..2ff5daa253
--- /dev/null
+++ b/test/files/pos/t2956/BeanDefinitionVisitor.java
@@ -0,0 +1,6 @@
+import java.util.Map;
+public class BeanDefinitionVisitor {
+ @SuppressWarnings("unchecked")
+ protected void visitMap(Map<?, ?> mapVal) {
+ }
+}
diff --git a/test/files/pos/t2956/t2956.scala b/test/files/pos/t2956/t2956.scala
new file mode 100755
index 0000000000..eb6e817465
--- /dev/null
+++ b/test/files/pos/t2956/t2956.scala
@@ -0,0 +1,7 @@
+import scala.collection.JavaConversions._
+
+class Outer {
+ protected class Inner extends BeanDefinitionVisitor {
+ protected def visitMap(mapVal: Map[_, _]): Unit = ()
+ }
+} \ No newline at end of file
diff --git a/test/files/pos/t2994a.scala b/test/files/pos/t2994a.scala
new file mode 100644
index 0000000000..cb4a389e2f
--- /dev/null
+++ b/test/files/pos/t2994a.scala
@@ -0,0 +1,27 @@
+object Naturals {
+ trait NAT {
+ type a[s[_ <: NAT] <: NAT, z <: NAT] <: NAT
+ type v = a[SUCC, ZERO]
+ }
+ final class ZERO extends NAT {
+ type a[s[_ <: NAT] <: NAT, z <: NAT] = z
+ }
+ final class SUCC[n <: NAT] extends NAT {
+ type a[s[_ <: NAT] <: NAT, z <: NAT] = s[n#a[s, z]]
+ }
+ type _0 = ZERO
+ type _1 = SUCC[_0]
+ type _2 = SUCC[_1]
+ type _3 = SUCC[_2]
+ type _4 = SUCC[_3]
+ type _5 = SUCC[_4]
+ type _6 = SUCC[_5]
+
+
+ // crashes scala-2.8.0 beta1
+ trait MUL[n <: NAT, m <: NAT] extends NAT {
+ trait curry[n[_[_], _], s[_]] { type f[z <: NAT] = n[s, z] }
+ type a[s[_ <: NAT] <: NAT, z <: NAT] = n#a[curry[m#a, s]#f, z]
+ }
+
+} \ No newline at end of file
diff --git a/test/files/pos/t2994b.scala b/test/files/pos/t2994b.scala
new file mode 100644
index 0000000000..c9d9cc812b
--- /dev/null
+++ b/test/files/pos/t2994b.scala
@@ -0,0 +1,7 @@
+object Test {
+ trait Bar[X[_]]
+ trait Baz[S[_] <: Bar[S]] {
+ type Apply[T]
+ }
+ trait Foo[V[_] <: Bar[V]] extends Bar[Baz[V]#Apply]
+} \ No newline at end of file
diff --git a/test/files/pos/t3037.scala b/test/files/pos/t3037.scala
new file mode 100644
index 0000000000..b71ffe0418
--- /dev/null
+++ b/test/files/pos/t3037.scala
@@ -0,0 +1,13 @@
+package test
+
+object A {
+ println(("a" match {
+ case "a" => 1
+ case _ => "a"
+ }).asInstanceOf[Object])
+ def foo[T](x: T) = x
+ var x: Int = 1
+ var y: Long = 1L
+ x = foo(x)
+ y = foo(y)
+}
diff --git a/test/files/pos/t3071.scala b/test/files/pos/t3071.scala
new file mode 100644
index 0000000000..7e14432941
--- /dev/null
+++ b/test/files/pos/t3071.scala
@@ -0,0 +1,7 @@
+class A (val i: Int) {
+ def copy (i: Int = this.i): A = new A(i)
+}
+
+class B (val j: Int) extends A(1) {
+ override def copy (j: Int = this.j): B = new B(j)
+}
diff --git a/test/files/pos/t3076/C2.scala b/test/files/pos/t3076/C2.scala
new file mode 100644
index 0000000000..d08f9ee81d
--- /dev/null
+++ b/test/files/pos/t3076/C2.scala
@@ -0,0 +1,4 @@
+class C2 {
+ def m1() { new T { } }
+ def m2() { new T { } }
+}
diff --git a/test/files/pos/t3076/T.scala b/test/files/pos/t3076/T.scala
new file mode 100644
index 0000000000..b710a29343
--- /dev/null
+++ b/test/files/pos/t3076/T.scala
@@ -0,0 +1,2 @@
+trait T { private val z = new C1 }
+private class C1
diff --git a/test/files/pos/t3079.scala b/test/files/pos/t3079.scala
new file mode 100644
index 0000000000..fa732ea516
--- /dev/null
+++ b/test/files/pos/t3079.scala
@@ -0,0 +1,17 @@
+sealed trait Identity[A] {
+ val value: A
+}
+
+trait Coerce[A, B] {
+ def unwrap: (A => B)
+}
+
+object Coerce {
+ def IdentityCoerce[B] = new Coerce[Identity[B], B] {
+ // java.lang.Error: A in trait Identity cannot be instantiated from ?x$1.type
+ def unwrap = _.value
+
+ // Providing the type of _ works around the problem.
+ //def unwrap = (_: Identity[B]).value
+ }
+} \ No newline at end of file
diff --git a/test/files/pos/t3152.scala b/test/files/pos/t3152.scala
new file mode 100644
index 0000000000..a20428dbee
--- /dev/null
+++ b/test/files/pos/t3152.scala
@@ -0,0 +1,20 @@
+trait Applicative[M[_]]
+
+sealed trait MA[M[_], A] {
+ def sequence[N[_], B](implicit a: A <:< N[B], n: Applicative[N]): N[M[B]] = error("stub")
+ // def sequence3[N[_], B]()(implicit a: A <:< N[B], n: Applicative[N]): N[M[B]] = error("stub")
+}
+
+object test {
+ implicit def ListMA[A](l: List[A]): MA[List, A] = error("stub")
+ implicit val ao: Applicative[Option] = error("stub")
+
+ /* This compiles OK:
+ (Nil: List[Option[Int]]).sequence3(): Option[List[Int]]
+ */
+
+ // BUG: error: immutable is not an enclosing class
+ // !!! No line number is reported with the error
+ (Nil: List[Option[Int]]).sequence: Option[List[Int]]
+ (List[Option[Int]]()).sequence: Option[List[Int]]
+} \ No newline at end of file
diff --git a/test/files/pos/t425.scala b/test/files/pos/t425.scala
new file mode 100644
index 0000000000..e50c50ac35
--- /dev/null
+++ b/test/files/pos/t425.scala
@@ -0,0 +1,11 @@
+object Temp{
+ case class A(x: Int)
+ case class B(override val x: Int, y: Double) extends A(x)
+
+ val b: A = B(5, 3.3)
+ b match {
+ case B(x, y) => Console.println(y)
+ case A(x) => Console.println(x)
+ }
+}
+
diff --git a/test/files/positions/Unsupported2.scala b/test/files/positions/Unsupported2.scala
new file mode 100644
index 0000000000..e21df5ef0e
--- /dev/null
+++ b/test/files/positions/Unsupported2.scala
@@ -0,0 +1,5 @@
+object Unsupported2 {
+ for (k <- 0 until xs.xize)
+ for(i = 0 until (xs.size)) {
+ }
+}
diff --git a/test/files/res/bug687.check b/test/files/res/bug687.check
index ee9520d1ea..353101c38b 100644
--- a/test/files/res/bug687.check
+++ b/test/files/res/bug687.check
@@ -1,11 +1,10 @@
-
nsc>
-nsc> bug687/QueryB.scala:3: error: name clash between defined and inherited member:
+nsc>
+bug687/QueryB.scala:3: error: name clash between defined and inherited member:
method equals:(o: java.lang.Object)Boolean and
method equals:(x$1: Any)Boolean in class Any
have same type after erasure: (o: java.lang.Object)Boolean
override def equals(o : Object) = false;
^
-
nsc>
nsc>
diff --git a/test/files/run/Course-2002-13.scala b/test/files/run/Course-2002-13.scala
index 27551b735b..c016d41a90 100644
--- a/test/files/run/Course-2002-13.scala
+++ b/test/files/run/Course-2002-13.scala
@@ -66,7 +66,7 @@ object Terms {
override def toString() =
a + (if (ts.isEmpty) "" else ts.mkString("(", ",", ")"));
def map(s: Subst): Term = Con(a, ts map (t => t map s));
- def tyvars = (ts flatMap (t => t.tyvars)).removeDuplicates;
+ def tyvars = (ts flatMap (t => t.tyvars)).distinct;
}
private var count = 0;
@@ -113,7 +113,7 @@ object Programs {
case class Clause(lhs: Term, rhs: List[Term]) {
def tyvars =
- (lhs.tyvars ::: (rhs flatMap (t => t.tyvars))).removeDuplicates;
+ (lhs.tyvars ::: (rhs flatMap (t => t.tyvars))).distinct;
def newInstance = {
var s: Subst = List();
for (val a <- tyvars) { s = Binding(a, newVar(a)) :: s }
diff --git a/test/files/run/ReplacementMatching.scala b/test/files/run/ReplacementMatching.scala
new file mode 100644
index 0000000000..05040d98a3
--- /dev/null
+++ b/test/files/run/ReplacementMatching.scala
@@ -0,0 +1,47 @@
+
+
+
+import util.matching._
+
+
+
+
+object Test {
+
+ def main(args: Array[String]) {
+ replacementMatching
+ groupsMatching
+ }
+
+ def replacementMatching {
+ val regex = """\$\{(.+?)\}""".r
+ val replaced = regex.replaceAllIn("Replacing: ${main}. And another method: ${foo}.",
+ (m: util.matching.Regex.Match) => {
+ val identifier = m.group(1)
+ identifier
+ })
+ assert(replaced == "Replacing: main. And another method: foo.")
+
+ val regex3 = """\$\{(.+?)\}""".r
+ val replaced3 = regex3.replaceSomeIn("Replacing: ${main}. And another: ${foo}.", (m: util.matching.Regex.Match) => {
+ val id = m.group(1)
+ if (id.startsWith("m")) Some(id) else None
+ })
+ assert(replaced3 == "Replacing: main. And another: ${foo}.")
+ }
+
+ def groupsMatching {
+ val Date = """(\d+)/(\d+)/(\d+)""".r
+ for (Regex.Groups(a, b, c) <- Date findFirstMatchIn "1/1/2001 marks the start of the millenium. 31/12/2000 doesn't.") {
+ assert(a == "1")
+ assert(b == "1")
+ assert(c == "2001")
+ }
+ for (Regex.Groups(a, b, c) <- (Date findAllIn "1/1/2001 marks the start of the millenium. 31/12/2000 doesn't.").matchData) {
+ assert(a == "1" || a == "31")
+ assert(b == "1" || b == "12")
+ assert(c == "2001" || c == "2000")
+ }
+ }
+
+}
diff --git a/test/files/run/arraycopy.scala b/test/files/run/arraycopy.scala
new file mode 100644
index 0000000000..bb06200dc7
--- /dev/null
+++ b/test/files/run/arraycopy.scala
@@ -0,0 +1,31 @@
+
+
+object Test {
+ def main(args: Array[String]) {
+ val a = new Array[Int](10)
+ val b = new Array[Any](10)
+ for (i <- 0 until 10) b(i) = i
+
+ Array.copy(b, 3, a, 3, 7)
+ assert(a.toSeq == List(0, 0, 0, 3, 4, 5, 6, 7, 8, 9))
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/files/run/arybufgrow.scala b/test/files/run/arybufgrow.scala
index 4dccd962f2..9e18435243 100644
--- a/test/files/run/arybufgrow.scala
+++ b/test/files/run/arybufgrow.scala
@@ -2,8 +2,8 @@ import scala.collection.mutable._;
object Test extends Application {
val buf = new ArrayBuffer[String];
- for(val i <- List.range(0,1000)) {
- buf + "hello";
+ for (i <- List.range(0,1000)) {
+ buf += "hello";
}
Console.println("1000 = " + buf.length);
diff --git a/test/files/run/bigDecimalCache.scala b/test/files/run/bigDecimalCache.scala
new file mode 100644
index 0000000000..c0c709a50f
--- /dev/null
+++ b/test/files/run/bigDecimalCache.scala
@@ -0,0 +1,9 @@
+object Test {
+ def main(args: Array[String]): Unit = {
+ val bd5a = BigDecimal(5)
+ val mc = java.math.MathContext.DECIMAL32
+ val bd5b = BigDecimal(5,mc)
+
+ assert(bd5b.mc == mc)
+ }
+}
diff --git a/test/files/run/bug1074.check b/test/files/run/bug1074.check
index ecff8510ed..ccf1cb1551 100644
--- a/test/files/run/bug1074.check
+++ b/test/files/run/bug1074.check
@@ -1,3 +1,3 @@
-q0 = Set(kl, jk, cd, fg, a, ef, gh, de, hj, b, lm, mn)
+q0 = Set(kl, jk, cd, fg, ef, gh, a, de, hj, b, lm, mn)
q1 = Set() 0
q2 = Set() 0
diff --git a/test/files/run/bug1697.scala b/test/files/run/bug1697.scala
deleted file mode 100644
index 01590dd405..0000000000
--- a/test/files/run/bug1697.scala
+++ /dev/null
@@ -1,19 +0,0 @@
-class Term
-case class Num(n: Int) extends Term
-case class Add(x: Term, y: Term) extends Term
-
-object Value {
- def unapply(term: Any): Boolean = true
-}
-
-object Test {
- def main(args: Array[String]) {
- val term = Add(Num(1), Add(Num(2), Num(3)))
- val res = term match {
- case Add(Num(x), Num(y)) => "Add(Num, Num)"
- case Add(Value(), y) => "Add(Value, ?)"
- case _ => "?"
- }
- assert(res == "Add(Value, ?)")
- }
-}
diff --git a/test/files/run/bug3126.scala b/test/files/run/bug3126.scala
new file mode 100644
index 0000000000..36322bf896
--- /dev/null
+++ b/test/files/run/bug3126.scala
@@ -0,0 +1,9 @@
+object Test {
+ case class C(x: Int)
+ val v: Some[Int] = null
+
+ def main(args: Array[String]): Unit = {
+ try C.unapply(null) catch { case _: MatchError => }
+ try v match { case Some(1) => } catch { case _: MatchError => }
+ }
+}
diff --git a/test/files/run/bug3175.check b/test/files/run/bug3175.check
new file mode 100644
index 0000000000..12246140f4
--- /dev/null
+++ b/test/files/run/bug3175.check
@@ -0,0 +1,11 @@
+10
+15
+3
+3
+3
+5
+5
+5
+100
+jabooboo
+hi mom
diff --git a/test/files/run/bug3175.scala b/test/files/run/bug3175.scala
new file mode 100644
index 0000000000..78660d4085
--- /dev/null
+++ b/test/files/run/bug3175.scala
@@ -0,0 +1,55 @@
+/** A bit down the road this test will examine
+ * the bytecode.
+ */
+object Test {
+ def len(x:{ def length: Int }) = x.length
+ def f1(x:{ def apply(x: Int): Long }) = x(0)
+ def f2(x:{ def apply(x: Int): Byte }) = x(0)
+ def f3(x:{ def apply(x: Int): String }) = x(0).length
+
+ def f4(x:{ def update(x: Int, y: Long): Unit }, y: Long) = x(0) = y
+ def f5(x:{ def update(x: Int, y: Byte): Unit }, y: Byte) = x(0) = y
+ def f6(x:{ def update(x: Int, y: String): Unit }, y: String) = x(0) = y
+
+ def f7(x: { def length: Any }) = x.length
+
+ def f8(x: { def apply(x: Int): Any }) = x(0)
+ def f9(x: { def apply(x: Int): Int }) = x(0)
+ def f10(x: { def apply(x: Int): Long }) = x(0)
+
+ // update has some interesting special cases
+ def f11(x:{ def update(x: Int, y: Long): Any }, y: Long) = x(0) = y
+ def f12(x:{ def update(x: Int, y: String): AnyVal }, y: String) = x(0) = y
+ def f13(x:{ def update(x: Int, y: String): AnyRef }, y: String) = x(0) = y
+
+ // doesn't work yet, see #3197
+ // def fclone(x:{ def clone(): AnyRef }) = x.clone()
+
+ def main(args: Array[String]): Unit = {
+ val longs = Array(5L)
+ val bytes = Array(5: Byte)
+ val strs = Array("abcde", "fghjij")
+
+ println(len(Array(1,2,3)) + len(Array(4.0,5.0f)) + len(Array("abc", 5)) + len("bop"))
+ println(f1(longs) + f2(bytes) + f3(strs))
+
+ f4(longs, 1)
+ f5(bytes, 1)
+ f6(strs, "a")
+
+ println(f1(longs) + f2(bytes) + f3(strs))
+
+ println(f7(Array(1,2,3)))
+ println(f7("def"))
+
+ println(f8(Array(5)))
+ println(f9(Array(5)))
+ println(f10(Array(5)))
+
+ f11(longs, 100L)
+ f12(strs, "jabooboo")
+ println(longs(0))
+ println(strs(0))
+ f13(new { def update(x: Int, y: String): List[Int] = { println("hi mom") ; Nil } }, "irrelevant")
+ }
+}
diff --git a/test/files/run/bug594.scala b/test/files/run/bug594.scala
index 0c3be3d5de..f923a3cd2a 100644
--- a/test/files/run/bug594.scala
+++ b/test/files/run/bug594.scala
@@ -2,7 +2,7 @@ object Test {
def main(args: Array[String]): Unit = {
val array = Array("one", "two", "three")
val firstTwo: Array[String] = array.slice(0,2)
- for(val x <- firstTwo)
+ for (x <- firstTwo)
Console.println(x)
}
}
diff --git a/test/files/run/bug751.scala b/test/files/run/bug751.scala
new file mode 100644
index 0000000000..294d3af5c2
--- /dev/null
+++ b/test/files/run/bug751.scala
@@ -0,0 +1,6 @@
+object Test {
+ def main(args: Array[String]): Unit = {
+ val map = Map(1 -> "a", 2 -> "b", 3 -> "c")
+ assert(map.filterKeys(_ % 2 == 0).isInstanceOf[scala.collection.immutable.Map[_,_]])
+ }
+}
diff --git a/test/files/run/bytecodecs.scala b/test/files/run/bytecodecs.scala
new file mode 100644
index 0000000000..bf8a0f8ed3
--- /dev/null
+++ b/test/files/run/bytecodecs.scala
@@ -0,0 +1,39 @@
+import scala.reflect.generic.ByteCodecs._
+
+object Test {
+
+ def test8to7(xs: Array[Byte]) {
+ val ys = encode8to7(xs)
+ decode7to8(ys, ys.length)
+ assert(ys.take(xs.length).deep == xs.deep,
+ "test8to7("+xs.deep+") failed, result = "+ys.take(xs.length).deep)
+ }
+
+ def testAll(xs: Array[Byte]) {
+ val ys = encode(xs)
+ decode(ys)
+ assert(ys.take(xs.length).deep == xs.deep,
+ "testAll("+xs.deep+") failed, result = "+ys.take(xs.length).deep)
+ }
+
+ def test(inputs: Array[Byte]*) {
+ for (input <- inputs) {
+ test8to7(input)
+ testAll(input)
+ }
+ }
+
+ def main(args: Array[String]) {
+ test(
+ Array(1, 2, 3),
+ Array(1, 2, 3, 4, 5, 6, 7),
+ Array(1, -2, 0, -3, -5, -6, -7),
+ Array(1, 3, -1, -128, 0, 0, -128, 1, 2, 3))
+ val rand = new scala.util.Random()
+ for (i <- 1 until 5000) {
+ var xs = new Array[Byte](i)
+ rand.nextBytes(xs)
+ test(xs)
+ }
+ }
+}
diff --git a/test/files/run/caseClassEquality.scala b/test/files/run/caseClassEquality.scala
new file mode 100644
index 0000000000..c11d7ad0d1
--- /dev/null
+++ b/test/files/run/caseClassEquality.scala
@@ -0,0 +1,36 @@
+object Test {
+ abstract class A1
+ case class C1(x: Int) extends A1
+ class C2(x: Int) extends C1(x) {
+ override def productPrefix = "Shazbot!"
+ }
+ class C3(x: Int) extends C1(x) {
+ override def canEqual(other: Any) = other.isInstanceOf[C3]
+ override def equals(other: Any) = other match {
+ case ob: C3 => x == ob.x
+ case _ => false
+ }
+ }
+
+ case class CS1(xs: Any*)
+ class CS2(xs: Seq[_]*) extends CS1(xs: _*)
+ class CS3(xs: IndexedSeq[Int]*) extends CS2(xs: _*)
+
+ case class H1(x: Int, y: Double)
+ class H2(x: Double, y: Int) extends H1(y, x)
+
+ def main(args: Array[String]): Unit = {
+ assert(C1(5) == new C2(5))
+ assert(new C2(5) == C1(5))
+ assert(C1(5).hashCode == new C2(5).hashCode)
+ assert(new C2(5).hashCode == C1(5).hashCode)
+
+ assert(C1(5) != new C3(5))
+ assert(new C3(5) != C1(5))
+
+ assert(CS1(List(1d,2d), Seq[Float](3f, 4f)) == new CS3(IndexedSeq(1,2), IndexedSeq(3, 4)))
+
+ assert(H1(5, 10d) == new H2(10d, 5))
+ assert(H1(5, 10d).hashCode == new H2(10d, 5).hashCode)
+ }
+}
diff --git a/test/files/run/colltest1.check b/test/files/run/colltest1.check
index b49d328be4..7377174281 100644
--- a/test/files/run/colltest1.check
+++ b/test/files/run/colltest1.check
@@ -72,11 +72,11 @@ new test starting with List()
9: List(2, 3, 4, 5, 6, 7, 8, 9, 10)
1
List(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
-new test starting with IndexedSeq()
-10: IndexedSeq(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
-9: IndexedSeq(2, 3, 4, 5, 6, 7, 8, 9, 10)
+new test starting with Vector()
+10: Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
+9: Vector(2, 3, 4, 5, 6, 7, 8, 9, 10)
1
-IndexedSeq(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
+Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
new test starting with Vector()
10: Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
9: Vector(2, 3, 4, 5, 6, 7, 8, 9, 10)
@@ -95,15 +95,15 @@ ArrayBuffer(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
true
false
true
-Map(O -> O, W -> W, H -> H, P -> P, G -> G, V -> V, I -> I, A -> A, F -> F, U -> U, N -> N, X -> X, Z -> Z, S -> S, D -> D, K -> K, R -> R, C -> C, B -> B, L -> L, Q -> Q, M -> M, J -> J, Y -> Y, T -> T, E -> E)
-Map(O -> O, W -> W, H -> H, P -> P, G -> G, V -> V, I -> I, A -> A, F -> F, U -> U, N -> N, X -> X, Z -> Z, S -> S, D -> D, K -> K, R -> R, C -> C, B -> B, L -> L, Q -> Q, M -> M, J -> J, Y -> Y, T -> T, E -> E)
-Map(O -> O, W -> W, H -> H, P -> P, V -> V, G -> G, I -> I, A -> A, F -> F, U -> U, N -> N, X -> X, Z -> Z, S -> S, D -> D, K -> K, R -> R, C -> C, B -> B, L -> L, Q -> Q, M -> M, J -> J, Y -> Y, T -> T, E -> E)
-Map(O -> O, W -> W, H -> H, P -> P, V -> V, G -> G, I -> I, A -> A, F -> F, U -> U, N -> N, X -> X, Z -> Z, S -> S, D -> D, K -> K, R -> R, C -> C, B -> B, L -> L, Q -> Q, M -> M, J -> J, Y -> Y, T -> T, E -> E)
-Map(O -> O, W -> W, H -> H, P -> P, G -> G, V -> V, I -> I, A -> A, F -> F, U -> U, N -> N, X -> X, Z -> Z, S -> S, D -> D, K -> K, R -> R, C -> C, B -> B, L -> L, Q -> Q, M -> M, J -> J, Y -> Y, T -> T, E -> E)
-Map(O -> O, W -> W, H -> H, P -> P, G -> G, V -> V, I -> I, A -> A, F -> F, U -> U, N -> N, X -> X, Z -> Z, S -> S, D -> D, K -> K, R -> R, C -> C, B -> B, L -> L, Q -> Q, M -> M, J -> J, Y -> Y, T -> T, E -> E)
-Map(A -> A, B -> B, C -> C, D -> D, E -> E, F -> F, G -> G, H -> H, I -> I, J -> J, K -> K, L -> L, M -> M, N -> N, O -> O, P -> P, Q -> Q, R -> R, S -> S, T -> T, U -> U, V -> V, W -> W, X -> X, Y -> Y, Z -> Z)
-Map(A -> A, B -> B, C -> C, D -> D, E -> E, F -> F, G -> G, H -> H, I -> I, J -> J, K -> K, L -> L, M -> M, N -> N, O -> O, P -> P, Q -> Q, R -> R, S -> S, T -> T, U -> U, V -> V, W -> W, X -> X, Y -> Y, Z -> Z)
-Map(O -> O, W -> W, H -> H, P -> P, V -> V, G -> G, I -> I, A -> A, F -> F, U -> U, N -> N, X -> X, Z -> Z, S -> S, D -> D, K -> K, R -> R, C -> C, B -> B, L -> L, Q -> Q, M -> M, J -> J, Y -> Y, T -> T, E -> E)
-Map(O -> O, W -> W, H -> H, P -> P, V -> V, G -> G, I -> I, A -> A, F -> F, U -> U, N -> N, X -> X, Z -> Z, S -> S, D -> D, K -> K, R -> R, C -> C, B -> B, L -> L, Q -> Q, M -> M, J -> J, Y -> Y, T -> T, E -> E)
-Map(O -> O, W -> W, H -> H, P -> P, G -> G, V -> V, I -> I, A -> A, F -> F, U -> U, N -> N, X -> X, Z -> Z, S -> S, D -> D, K -> K, R -> R, C -> C, B -> B, L -> L, Q -> Q, M -> M, J -> J, Y -> Y, T -> T, E -> E)
-Map(O -> O, W -> W, H -> H, P -> P, G -> G, V -> V, I -> I, A -> A, F -> F, U -> U, N -> N, X -> X, Z -> Z, S -> S, D -> D, K -> K, R -> R, C -> C, B -> B, L -> L, Q -> Q, M -> M, J -> J, Y -> Y, T -> T, E -> E)
+List((A,A), (B,B), (C,C), (D,D), (E,E), (F,F), (G,G), (H,H), (I,I), (J,J), (K,K), (L,L), (M,M), (N,N), (O,O), (P,P), (Q,Q), (R,R), (S,S), (T,T), (U,U), (V,V), (W,W), (X,X), (Y,Y), (Z,Z))
+List((A,A), (B,B), (C,C), (D,D), (E,E), (F,F), (G,G), (H,H), (I,I), (J,J), (K,K), (L,L), (M,M), (N,N), (O,O), (P,P), (Q,Q), (R,R), (S,S), (T,T), (U,U), (V,V), (W,W), (X,X), (Y,Y), (Z,Z))
+List((A,A), (B,B), (C,C), (D,D), (E,E), (F,F), (G,G), (H,H), (I,I), (J,J), (K,K), (L,L), (M,M), (N,N), (O,O), (P,P), (Q,Q), (R,R), (S,S), (T,T), (U,U), (V,V), (W,W), (X,X), (Y,Y), (Z,Z))
+List((A,A), (B,B), (C,C), (D,D), (E,E), (F,F), (G,G), (H,H), (I,I), (J,J), (K,K), (L,L), (M,M), (N,N), (O,O), (P,P), (Q,Q), (R,R), (S,S), (T,T), (U,U), (V,V), (W,W), (X,X), (Y,Y), (Z,Z))
+List((A,A), (B,B), (C,C), (D,D), (E,E), (F,F), (G,G), (H,H), (I,I), (J,J), (K,K), (L,L), (M,M), (N,N), (O,O), (P,P), (Q,Q), (R,R), (S,S), (T,T), (U,U), (V,V), (W,W), (X,X), (Y,Y), (Z,Z))
+List((A,A), (B,B), (C,C), (D,D), (E,E), (F,F), (G,G), (H,H), (I,I), (J,J), (K,K), (L,L), (M,M), (N,N), (O,O), (P,P), (Q,Q), (R,R), (S,S), (T,T), (U,U), (V,V), (W,W), (X,X), (Y,Y), (Z,Z))
+List((A,A), (B,B), (C,C), (D,D), (E,E), (F,F), (G,G), (H,H), (I,I), (J,J), (K,K), (L,L), (M,M), (N,N), (O,O), (P,P), (Q,Q), (R,R), (S,S), (T,T), (U,U), (V,V), (W,W), (X,X), (Y,Y), (Z,Z))
+List((A,A), (B,B), (C,C), (D,D), (E,E), (F,F), (G,G), (H,H), (I,I), (J,J), (K,K), (L,L), (M,M), (N,N), (O,O), (P,P), (Q,Q), (R,R), (S,S), (T,T), (U,U), (V,V), (W,W), (X,X), (Y,Y), (Z,Z))
+List((A,A), (B,B), (C,C), (D,D), (E,E), (F,F), (G,G), (H,H), (I,I), (J,J), (K,K), (L,L), (M,M), (N,N), (O,O), (P,P), (Q,Q), (R,R), (S,S), (T,T), (U,U), (V,V), (W,W), (X,X), (Y,Y), (Z,Z))
+List((A,A), (B,B), (C,C), (D,D), (E,E), (F,F), (G,G), (H,H), (I,I), (J,J), (K,K), (L,L), (M,M), (N,N), (O,O), (P,P), (Q,Q), (R,R), (S,S), (T,T), (U,U), (V,V), (W,W), (X,X), (Y,Y), (Z,Z))
+List((A,A), (B,B), (C,C), (D,D), (E,E), (F,F), (G,G), (H,H), (I,I), (J,J), (K,K), (L,L), (M,M), (N,N), (O,O), (P,P), (Q,Q), (R,R), (S,S), (T,T), (U,U), (V,V), (W,W), (X,X), (Y,Y), (Z,Z))
+List((A,A), (B,B), (C,C), (D,D), (E,E), (F,F), (G,G), (H,H), (I,I), (J,J), (K,K), (L,L), (M,M), (N,N), (O,O), (P,P), (Q,Q), (R,R), (S,S), (T,T), (U,U), (V,V), (W,W), (X,X), (Y,Y), (Z,Z))
diff --git a/test/files/run/colltest1.scala b/test/files/run/colltest1.scala
index f12c234f74..557282cb8d 100644
--- a/test/files/run/colltest1.scala
+++ b/test/files/run/colltest1.scala
@@ -80,7 +80,7 @@ object Test extends Application {
val tenPlus = ten map (_ + 1)
assert((ten zip tenPlus) forall { case (x, y) => x + 1 == y })
val dble = ten flatMap (x => List(x, x))
- assert(dble.removeDuplicates == ten)
+ assert(dble.distinct == ten)
assert(ten.length == 10)
assert(ten(0) == 1 && ten(9) == 10)
assert((ten lengthCompare 10) == 0 && (ten lengthCompare 1) > 0 && (ten lengthCompare 11) < 0)
@@ -122,7 +122,7 @@ object Test extends Application {
assert((ten diff (ten filter (_ % 2 == 0))) == (ten filterNot (_ % 2 == 0)))
assert((ten intersect ten) == ten)
assert((ten intersect List(5)) == List(5))
- assert((ten ++ ten).removeDuplicates == ten)
+ assert((ten ++ ten).distinct == ten)
assert(ten.patch(3, List(4, 5, 6, 7), 4) == ten)
assert(ten.patch(0, List(1, 2, 3), 9) == List(1, 2, 3, 10))
assert(empty.padTo(10, 7) == Array.fill(10)(7).toSeq)
@@ -170,7 +170,7 @@ object Test extends Application {
m += (("D" -> "D"), ("E" -> "E"), ("F" -> "F"))
m ++= List(("G" -> "G"), ("H" -> "H"), ("I" -> "I"))
m ++= ('J' to 'Z') map (x => (x.toString -> x.toString))
- println(m)
+ println(m.toList.sorted)
assert(!m.isEmpty)
assert(m.keySet forall (k => (m get k) == Some(k)))
assert(m.keySet forall (k => (m apply k) == k))
@@ -185,7 +185,7 @@ object Test extends Application {
assert(mm.isEmpty, mm)
def m3 = empty ++ m1
assert(m1 == m3)
- println(m3)
+ println(m3.toList.sorted)
val m4 = m3 filterNot { case (k, v) => k != "A" }
assert(m4.size == 1, m4)
}
diff --git a/test/files/run/constrained-types.check b/test/files/run/constrained-types.check
index f18ff6e3c9..cc00a7c46b 100644
--- a/test/files/run/constrained-types.check
+++ b/test/files/run/constrained-types.check
@@ -121,7 +121,7 @@ y: java.lang.String = hello
-----
val x = 3 : Int @Annot(e+f+g+h) //should have a graceful error message
-<console>:5: error: not found: value e
+<console>:6: error: not found: value e
val x = 3 : Int @Annot(e+f+g+h) //should have a graceful error message
^
diff --git a/test/files/run/elidable.check b/test/files/run/elidable.check
new file mode 100644
index 0000000000..4ce04f0040
--- /dev/null
+++ b/test/files/run/elidable.check
@@ -0,0 +1 @@
+Good for me, I was not elided.
diff --git a/test/files/run/elidable.flags b/test/files/run/elidable.flags
new file mode 100644
index 0000000000..93fd3d5317
--- /dev/null
+++ b/test/files/run/elidable.flags
@@ -0,0 +1 @@
+-Xelide-below 900
diff --git a/test/files/run/elidable.scala b/test/files/run/elidable.scala
new file mode 100644
index 0000000000..2a527efc4b
--- /dev/null
+++ b/test/files/run/elidable.scala
@@ -0,0 +1,16 @@
+import annotation._
+import elidable._
+
+object Test {
+ @elidable(FINEST) def f1() = assert(false, "Should have been elided.")
+ @elidable(INFO) def f2() = assert(false, "Should have been elided.")
+ @elidable(SEVERE) def f3() = println("Good for me, I was not elided.")
+ @elidable(INFO) def f4 = assert(false, "Should have been elided (no parens).")
+
+ def main(args: Array[String]): Unit = {
+ f1()
+ f2()
+ f3()
+ f4
+ }
+}
diff --git a/test/files/run/equality.scala b/test/files/run/equality.scala
index 5b9ad207da..6498b232e1 100644
--- a/test/files/run/equality.scala
+++ b/test/files/run/equality.scala
@@ -1,6 +1,8 @@
// a quickly assembled test of equality. Needs work.
object Test
{
+ import scala.runtime.ScalaRunTime.hash
+
def makeFromInt(x: Int) = List(
x.toByte, x.toShort, x.toInt, x.toLong, x.toFloat, x.toDouble, BigInt(x), BigDecimal(x)
) ::: (
diff --git a/test/files/run/hashCodeBoxesRunTime.scala b/test/files/run/hashCodeBoxesRunTime.scala
index 3eacacb663..ba1a30f5fb 100644
--- a/test/files/run/hashCodeBoxesRunTime.scala
+++ b/test/files/run/hashCodeBoxesRunTime.scala
@@ -5,7 +5,7 @@ object Test
import java.{ lang => jl }
import scala.runtime.BoxesRunTime.{ hashFromNumber, hashFromObject }
- def allSame[T](xs: List[T]) = assert(xs.removeDuplicates.size == 1, "failed: " + xs)
+ def allSame[T](xs: List[T]) = assert(xs.distinct.size == 1, "failed: " + xs)
def mkNumbers(x: Int): List[Number] =
List(x.toByte, x.toShort, x, x.toLong, x.toFloat, x.toDouble)
diff --git a/test/files/run/hashCodeDistribution.scala b/test/files/run/hashCodeDistribution.scala
index dbb6e833bd..5be9d1db6d 100644
--- a/test/files/run/hashCodeDistribution.scala
+++ b/test/files/run/hashCodeDistribution.scala
@@ -8,7 +8,7 @@ object Test {
val hashCodes =
for (x <- 0 until COUNT; y <- 0 until COUNT) yield C(x,y).hashCode
- val uniques = hashCodes.removeDuplicates
+ val uniques = hashCodes.distinct
val collisionRate = (totalCodes - uniques.size) * 1000 / totalCodes
assert(collisionRate < 5, "Collision rate too high: %d / 1000".format(collisionRate))
diff --git a/test/files/run/hashhash.scala b/test/files/run/hashhash.scala
new file mode 100644
index 0000000000..4a34ab12e0
--- /dev/null
+++ b/test/files/run/hashhash.scala
@@ -0,0 +1,15 @@
+object Test
+{
+ class A { val x1 = this.## ; val x2 = super.## }
+ val myA = new A
+ assert(myA.x1 == myA.x2)
+
+ def confirmSame(x: Any) = assert(x.## == x.hashCode, "%s.## != %s.hashCode".format(x, x))
+ def confirmDifferent(x: Any) = assert(x.## != x.hashCode, "%s.## == %s.hashCode (but should not)".format(x, x))
+
+ def main(args: Array[String]): Unit = {
+ /** Just a little sanity check, not to be confused with a unit test. */
+ List(5, 5.5f, "abc", new AnyRef, new A, ()) foreach confirmSame
+ List(5.0f, 1.0d, -(5.0f), (-1.0d)) foreach confirmDifferent
+ }
+}
diff --git a/test/files/run/iterators.check b/test/files/run/iterators.check
index cd1b79144a..bb139c1610 100644
--- a/test/files/run/iterators.check
+++ b/test/files/run/iterators.check
@@ -7,7 +7,7 @@ test check_drop was successful
test check_foreach was successful
test check_forall was successful
test check_fromArray was successful
-test check_collect was successful
+test check_toSeq was successful
test check_indexOf was successful
test check_findIndexOf was successful
diff --git a/test/files/run/iterators.scala b/test/files/run/iterators.scala
index 5879d38df3..5f77289343 100644
--- a/test/files/run/iterators.scala
+++ b/test/files/run/iterators.scala
@@ -83,8 +83,8 @@ object Test {
xs0.length + xs1.length + xs2.length + xs3.length + xs4.length
}
- def check_collect: String =
- List(1, 2, 3, 4, 5).iterator.collect.mkString("x")
+ def check_toSeq: String =
+ List(1, 2, 3, 4, 5).iterator.toSeq.mkString("x")
def check_indexOf: String = {
val i = List(1, 2, 3, 4, 5).indexOf(4)
@@ -93,8 +93,8 @@ object Test {
}
def check_findIndexOf: String = {
- val i = List(1, 2, 3, 4, 5).findIndexOf { x: Int => x >= 4 }
- val j = List(1, 2, 3, 4, 5).findIndexOf { x: Int => x >= 16 }
+ val i = List(1, 2, 3, 4, 5).indexWhere { x: Int => x >= 4 }
+ val j = List(1, 2, 3, 4, 5).indexWhere { x: Int => x >= 16 }
"" + i + "x" + j
}
@@ -124,7 +124,7 @@ object Test {
check_success("check_foreach", check_foreach, 190)
check_success("check_forall", check_forall, 0)
check_success("check_fromArray",check_fromArray, 14)
- check_success("check_collect", check_collect, "1x2x3x4x5")
+ check_success("check_toSeq", check_toSeq, "1x2x3x4x5")
check_success("check_indexOf", check_indexOf, "3x-1")
check_success("check_findIndexOf", check_findIndexOf, "3x-1")
println()
diff --git a/test/files/run/lists.scala b/test/files/run/lists.scala
index 695d5a0336..6c9b55961e 100644
--- a/test/files/run/lists.scala
+++ b/test/files/run/lists.scala
@@ -126,8 +126,8 @@ object Test1 extends TestCase("ctor") with Assert {
assertEquals("check_forall", true, b1 & b2)
}
{
- val ys1 = xs1 remove { e => e % 2 != 0 }
- val ys2 = xs4 remove { e => e < 5 }
+ val ys1 = xs1 filterNot { e => e % 2 != 0 }
+ val ys2 = xs4 filterNot { e => e < 5 }
assertEquals("check_remove", 3, ys1.length + ys2.length)
}
{
diff --git a/test/files/run/names-defaults.check b/test/files/run/names-defaults.check
index 47d09a5083..60c7637e3d 100644
--- a/test/files/run/names-defaults.check
+++ b/test/files/run/names-defaults.check
@@ -81,6 +81,7 @@ get: 20
get: 20
20
0
+1
dlkfj0dlkfj102
lskf2dkflj2
dlkd5nixda10nixdadklfj1dklfj
@@ -119,3 +120,4 @@ klfj1
blublu1
my text
List(1, 2)
+3
diff --git a/test/files/run/names-defaults.scala b/test/files/run/names-defaults.scala
index 121ddcb3bc..8557047875 100644
--- a/test/files/run/names-defaults.scala
+++ b/test/files/run/names-defaults.scala
@@ -135,6 +135,10 @@ object Test extends Application {
println(bn4())
println(bn4(a = 0))
+ class t2929(x: => Int = 1) {
+ def foo = x
+ }
+ println((new t2929()).foo)
// constructors
val a1 = new A(b = "dlkfj")(d = 102)
@@ -252,6 +256,9 @@ object Test extends Application {
def test11[T[P]](x: T[T[List[T[X forSome { type X }]]]] = List(1,2)) = x
// (cannot call f using the default, List(1,2) doesn't match the param type)
+ def multinest = { def bar(x: Int = 1) = { def bar(x: Int = 2) = x; bar() + x }; bar() }
+ println(multinest)
+
// #2290
def spawn(a: Int, b: => Unit) = { () }
@@ -289,6 +296,14 @@ object Test extends Application {
class C extends A
}
+ object t3178 {
+ def foo(x: String) = x
+ def foo(x: Int) = x
+ def bar(foo: Int) = foo
+ bar(foo = 1)
+ }
+
+
// DEFINITIONS
def test1(a: Int, b: String) = println(a +": "+ b)
def test2(u: Int, v: Int)(k: String, l: Int) = println(l +": "+ k +", "+ (u + v))
diff --git a/test/files/run/programmatic-main.check b/test/files/run/programmatic-main.check
new file mode 100644
index 0000000000..82118f8ece
--- /dev/null
+++ b/test/files/run/programmatic-main.check
@@ -0,0 +1,26 @@
+parser
+namer
+packageobjects
+typer
+superaccessors
+pickler
+refchecks
+selectiveanf
+liftcode
+selectivecps
+uncurry
+tailcalls
+explicitouter
+erasure
+lazyvals
+lambdalift
+constructors
+flatten
+mixin
+cleanup
+icode
+inliner
+closelim
+dce
+jvm
+terminal
diff --git a/test/files/run/programmatic-main.scala b/test/files/run/programmatic-main.scala
new file mode 100644
index 0000000000..9c7d0b7095
--- /dev/null
+++ b/test/files/run/programmatic-main.scala
@@ -0,0 +1,12 @@
+import scala.tools.nsc._
+import io.Path
+
+object Test {
+ val cwd = Option(System.getProperty("partest.cwd")) getOrElse "."
+ val basedir = Path(cwd).parent / "lib" path
+ val baseargs = Array("-usejavacp", "-bootclasspath", basedir + "/scala-library.jar", "-cp", basedir + "/scala-compiler.jar")
+
+ def main(args: Array[String]): Unit = {
+ Main process (baseargs ++ Array("-Xshow-phases"))
+ }
+}
diff --git a/test/files/run/range.scala b/test/files/run/range.scala
index 65d33a6134..02b48fad7c 100644
--- a/test/files/run/range.scala
+++ b/test/files/run/range.scala
@@ -44,6 +44,9 @@ object Test {
assert(NumericRange.inclusive(1, 10, 1) sameElements (1 to 10))
assert(NumericRange.inclusive(1, 100, 3) sameElements (1 to 100 by 3))
+ // #2518
+ assert((3L to 7 by 2) sameElements List(3L, 5L, 7L))
+
rangeForeach(1 to 10);
rangeForeach(1 until 10);
rangeForeach(10 to 1 by -1);
diff --git a/test/files/run/regularpatmat.check b/test/files/run/regularpatmat.check
deleted file mode 100644
index 3417d9a98a..0000000000
--- a/test/files/run/regularpatmat.check
+++ /dev/null
@@ -1,126 +0,0 @@
-pretest
-passed ok
-testWR_1
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-testWR_2
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-testWR_3
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-testWR_4
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-testWR_5
-passed ok
-passed ok
-passed ok
-testWR_6
-passed ok
-passed ok
-testWR_7
-passed ok
-testWR_8
-passed ok
-testWS
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-testWT
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-testWV
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-testBK
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-testBM
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-BN preTest: true
-testBN
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-testBO
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-testMZ - bugs #132 #133b #180 #195 #196 #398 #406 #441
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
-passed ok
diff --git a/test/files/run/spec-absfun.flags b/test/files/run/spec-absfun.flags
new file mode 100644
index 0000000000..3a910a936c
--- /dev/null
+++ b/test/files/run/spec-absfun.flags
@@ -0,0 +1 @@
+-Yspecialize \ No newline at end of file
diff --git a/test/files/run/spec-absfun.scala b/test/files/run/spec-absfun.scala
new file mode 100644
index 0000000000..ab16e8febc
--- /dev/null
+++ b/test/files/run/spec-absfun.scala
@@ -0,0 +1,43 @@
+
+/** Test inheritance. See #3085.
+ * Anonymous functions extend AbstractFunction1[SpecializedPair[Int], Unit]. The
+ * specialized type SpecializedPair$mcI$sp should not leak into the superclass because
+ * the definition of apply would vary covariantly, and erasure won't consider it an
+ * override of the abstract apply, leading to an AbstractMethodError at runtime.
+ */
+
+object Test {
+
+ private val Max = 1000
+
+ def main(args: Array[String]) {
+ notSpecialized()
+ specialized()
+ }
+
+ def notSpecialized() {
+ val pairs = for { i <- 1 to Max; j <- 1 to i } yield new Pair(i, j)
+ val time0 = System.nanoTime
+ pairs foreach { p => p.first * p.second }
+ val time1 = System.nanoTime
+// println(time1 - time0)
+ }
+
+ def specialized() {
+ val pairs = for { i <- 1 to Max; j <- 1 to i } yield new SpecializedPair(i, j)
+ val time0 = System.nanoTime
+ pairs foreach { p => p.first * p.second }
+ val time1 = System.nanoTime
+// println(time1 - time0)
+ }
+}
+
+class Pair[A](_first: A, _second: A) {
+ def first = _first
+ def second = _second
+}
+
+class SpecializedPair[@specialized("Int") A](_first: A, _second: A) {
+ def first = _first
+ def second = _second
+}
diff --git a/test/files/run/spec-matrix.check b/test/files/run/spec-matrix.check
new file mode 100644
index 0000000000..72e8ffc0db
--- /dev/null
+++ b/test/files/run/spec-matrix.check
@@ -0,0 +1 @@
+*
diff --git a/test/files/run/spec-matrix.flags b/test/files/run/spec-matrix.flags
new file mode 100644
index 0000000000..3a910a936c
--- /dev/null
+++ b/test/files/run/spec-matrix.flags
@@ -0,0 +1 @@
+-Yspecialize \ No newline at end of file
diff --git a/test/files/run/spec-matrix.scala b/test/files/run/spec-matrix.scala
new file mode 100644
index 0000000000..212a800672
--- /dev/null
+++ b/test/files/run/spec-matrix.scala
@@ -0,0 +1,70 @@
+/** Test matrix multiplication with specialization.
+ */
+
+class Matrix[@specialized A: ClassManifest](val rows: Int, val cols: Int) {
+ private val arr: Array[Array[A]] = new Array[Array[A]](rows, cols)
+
+ def apply(i: Int, j: Int): A = {
+ if (i < 0 || i >= rows || j < 0 || j >= cols)
+ throw new NoSuchElementException("Indexes out of bounds: " + (i, j))
+
+ arr(i)(j)
+ }
+
+ def update(i: Int, j: Int, e: A) {
+ arr(i)(j) = e
+ }
+
+ def rowsIterator: Iterator[Array[A]] = new Iterator[Array[A]] {
+ var idx = 0;
+ def hasNext = idx < rows
+ def next = {
+ idx += 1
+ arr(idx - 1)
+ }
+ }
+}
+
+object Test {
+ def main(args: Array[String]) {
+ val m = randomMatrix(200, 100)
+ val n = randomMatrix(100, 200)
+
+ mult(m, n)
+ println("*")
+ }
+
+ def randomMatrix(n: Int, m: Int) = {
+ val r = new util.Random(10)
+ val x = new Matrix[Int](n, m)
+ for (i <- 0 until n; j <- 0 until m)
+ x(i, j) = r.nextInt
+ x
+ }
+
+
+ def multManifest[@specialized("Int") T](m: Matrix[T], n: Matrix[T])(implicit cm: ClassManifest[T], num: Numeric[T]) {
+ val p = new Matrix[T](m.rows, n.cols)
+ import num._
+
+ for (i <- 0 until m.rows)
+ for (j <- 0 until n.cols) {
+ var sum = num.zero
+ for (k <- 0 until n.rows)
+ sum += m(i, k) * n(k, j)
+ p(i, j) = sum
+ }
+ }
+
+ def mult(m: Matrix[Int], n: Matrix[Int]) {
+ val p = new Matrix[Int](m.rows, n.cols)
+
+ for (i <- 0 until m.rows)
+ for (j <- 0 until n.cols) {
+ var sum = 0
+ for (k <- 0 until n.rows)
+ sum += m(i, k) * n(k, j)
+ p(i, j) = sum
+ }
+ }
+}
diff --git a/test/files/run/spec-patmatch.check b/test/files/run/spec-patmatch.check
new file mode 100644
index 0000000000..a6679fa1c7
--- /dev/null
+++ b/test/files/run/spec-patmatch.check
@@ -0,0 +1,19 @@
+bool
+byte
+short
+char
+int
+long
+double
+float
+default
+object instantiations:
+bool
+byte
+short
+char
+int
+long
+double
+float
+default
diff --git a/test/files/run/spec-patmatch.flags b/test/files/run/spec-patmatch.flags
new file mode 100644
index 0000000000..3a910a936c
--- /dev/null
+++ b/test/files/run/spec-patmatch.flags
@@ -0,0 +1 @@
+-Yspecialize \ No newline at end of file
diff --git a/test/files/run/spec-patmatch.scala b/test/files/run/spec-patmatch.scala
new file mode 100644
index 0000000000..92938836d8
--- /dev/null
+++ b/test/files/run/spec-patmatch.scala
@@ -0,0 +1,52 @@
+class Foo[@specialized A] {
+ def test(x: A) = println(x match {
+ case _: Boolean => "bool"
+ case _: Byte => "byte"
+ case _: Short => "short"
+ case _: Char => "char"
+ case i: Int => "int"
+ case l: Long => "long"
+ case d: Double => "double"
+ case e: Float => "float"
+ case _ => "default"
+ })
+}
+
+object Test {
+ def test[@specialized A] (x: A) = println(x match {
+ case _: Boolean => "bool"
+ case _: Byte => "byte"
+ case _: Short => "short"
+ case _: Char => "char"
+ case i: Int => "int"
+ case l: Long => "long"
+ case d: Double => "double"
+ case e: Float => "float"
+ case _ => "default"
+ })
+
+ def main(args: Array[String]) {
+ test(true)
+ test(42.toByte)
+ test(42.toShort)
+ test('b')
+ test(42)
+ test(42l)
+ test(42.0)
+ test(42.0f)
+ test(new Object)
+
+ println("object instantiations:")
+ (new Foo).test(true)
+ (new Foo).test(42.toByte)
+ (new Foo).test(42.toShort)
+ (new Foo).test('b')
+ (new Foo).test(42)
+ (new Foo).test(42l)
+ (new Foo).test(42.0)
+ (new Foo).test(42.0f)
+ (new Foo).test(new Object)
+
+ }
+
+}
diff --git a/test/files/run/t0017.check b/test/files/run/t0017.check
index 86c5fe56a8..3a72142467 100644
--- a/test/files/run/t0017.check
+++ b/test/files/run/t0017.check
@@ -1 +1 @@
-Array(GenericArray(1, 3), GenericArray(2, 4))
+Array(ArraySeq(1, 3), ArraySeq(2, 4))
diff --git a/test/files/run/t0528.scala b/test/files/run/t0528.scala
index 5a4755c947..df6d13a17a 100644
--- a/test/files/run/t0528.scala
+++ b/test/files/run/t0528.scala
@@ -3,7 +3,7 @@ trait Sequ[A] {
}
class RichStr extends Sequ[Char] {
- // override to a primitve array
+ // override to a primitive array
def toArray: Array[Char] = Array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9')
}
diff --git a/test/files/run/t1500.scala b/test/files/run/t1500.scala
index de79b84e75..ce6278cd05 100644
--- a/test/files/run/t1500.scala
+++ b/test/files/run/t1500.scala
@@ -18,10 +18,10 @@ object Test {
def main(args: Array[String]) = {
- val tool = new Interpreter(new Settings())
+ val settings = new Settings()
+ settings.classpath.value = System.getProperty("java.class.path")
+ val tool = new Interpreter(settings)
val global = tool.compiler
- // when running that compiler, give it a scala-library to the classpath
- global.settings.classpath.value = System.getProperty("java.class.path")
import global._
import definitions._
diff --git a/test/files/run/t1501.scala b/test/files/run/t1501.scala
index 851daae0bb..f1eb8f287d 100644
--- a/test/files/run/t1501.scala
+++ b/test/files/run/t1501.scala
@@ -28,12 +28,10 @@ object Test {
</code>.text
def main(args: Array[String]) = {
-
- val tool = new Interpreter(new Settings())
+ val settings = new Settings()
+ settings.classpath.value = System.getProperty("java.class.path")
+ val tool = new Interpreter(settings)
val global = tool.compiler
- // when running that compiler, give it a scala-library to the classpath
- global.settings.classpath.value = System.getProperty("java.class.path")
-
import global._
import definitions._
diff --git a/test/files/run/t1773.scala b/test/files/run/t1773.scala
index 81c6005f86..4a4aaba1f0 100644
--- a/test/files/run/t1773.scala
+++ b/test/files/run/t1773.scala
@@ -8,5 +8,5 @@ object Test extends Application
<a>{ if (true) "" else "I like turtles" }</a>
)
- for (x1 <- xs; x2 <- xs) assert (x1 == x2)
+ for (x1 <- xs; x2 <- xs) assert (x1 xml_== x2)
}
diff --git a/test/files/run/t2074.scala b/test/files/run/t2074.scala
deleted file mode 100644
index 60646be733..0000000000
--- a/test/files/run/t2074.scala
+++ /dev/null
@@ -1,3 +0,0 @@
-object Test extends Application {
- List.range(1,11).view.patch(5, List(100,101), 2)
-}
diff --git a/test/files/run/t2074_2.check b/test/files/run/t2074_2.check
index eb1f072de3..e4fc89b1ce 100644
--- a/test/files/run/t2074_2.check
+++ b/test/files/run/t2074_2.check
@@ -1,3 +1,3 @@
-IndexedSeqView(1, 2, 3)
-IndexedSeqView(1, 2, 3)
-IndexedSeqViewZ((1,1), (2,2), (3,3))
+SeqView(1, 2, 3)
+SeqView(1, 2, 3)
+SeqViewZ(...)
diff --git a/test/files/run/t2074_2.scala b/test/files/run/t2074_2.scala
index 7d1d8181d8..4624170f89 100644
--- a/test/files/run/t2074_2.scala
+++ b/test/files/run/t2074_2.scala
@@ -1,12 +1,15 @@
// replaced all occurrences of 'Vector' with 'IndexedSeq'
import scala.collection.immutable.IndexedSeq
-import scala.collection.IndexedSeqView
+import scala.collection.SeqView
object Test {
- val v = new IndexedSeqView[Int, IndexedSeq[Int]] {
+ val funWithCCE = List.range(1,11).view.patch(5, List(100,101), 2)
+
+ val v = new SeqView[Int, IndexedSeq[Int]] {
def underlying = IndexedSeq(1,2,3)
def apply(idx: Int) = underlying(idx)
def length = underlying.length
+ def iterator = underlying.iterator
}
val w = IndexedSeq(1, 2, 3).view
diff --git a/test/files/run/t2212.scala b/test/files/run/t2212.scala
new file mode 100644
index 0000000000..b9c0cd776b
--- /dev/null
+++ b/test/files/run/t2212.scala
@@ -0,0 +1,10 @@
+object Test {
+ def main(args: Array[String]) {
+ import collection.mutable._
+ val x4 = LinkedList[Int](1)
+ println(x4)
+ val y4 = LinkedList[Int](1)
+ println(y4)
+ println(x4 equals y4) // or (y4 equals x4)
+ }
+}
diff --git a/test/files/run/t2417.check b/test/files/run/t2417.check
new file mode 100644
index 0000000000..36c954be24
--- /dev/null
+++ b/test/files/run/t2417.check
@@ -0,0 +1,12 @@
+testing small Map that doesn't promote to HashMap...
+
+testing single-threaded HashMap use...
+
+testing HashMap.size from multiple threads...
+
+testing small Set that doesn't promote to HashSet...
+
+testing single-threaded HashSet use...
+
+testing HashSet.size from multiple threads...
+
diff --git a/test/files/run/t2417.scala b/test/files/run/t2417.scala
new file mode 100644
index 0000000000..31d4c143fa
--- /dev/null
+++ b/test/files/run/t2417.scala
@@ -0,0 +1,77 @@
+// #2417
+object Test {
+
+ def parallel(numThreads: Int)(block: => Unit) {
+ var failure: Throwable = null
+ val threads = Array.fromFunction(i => new Thread {
+ override def run {
+ try {
+ block
+ } catch {
+ case x => failure = x
+ }
+ }
+ })(numThreads)
+ for (t <- threads) t.start
+ for (t <- threads) t.join
+ if (failure != null) println("FAILURE: " + failure)
+ }
+
+ def testSet(initialSize: Int, numThreads: Int, passes: Int) {
+ val orig = Set.empty ++ (1 to initialSize)
+ parallel(numThreads) {
+ for (pass <- 0 until passes) {
+ var s = orig
+ for (e <- (initialSize to 1 by -1)) {
+ s -= e
+ val obs = s.size
+ if (obs != e - 1) {
+ throw new Exception("removed e=" + e + ", size was " + obs + ", s=" + s)
+ }
+ }
+ }
+ }
+ }
+
+ def testMap(initialSize: Int, numThreads: Int, passes: Int) {
+ val orig = Map.empty ++ ((1 to initialSize) map ((_,"v")))
+ parallel(numThreads) {
+ for (pass <- 0 until passes) {
+ var m = orig
+ for (e <- (initialSize to 1 by -1)) {
+ m -= e
+ val obs = m.size
+ if (obs != e - 1) {
+ throw new Exception("removed e=" + e + ", size was " + obs + ", m=" + m)
+ }
+ }
+ }
+ }
+ }
+
+ def main(args: Array[String]) {
+ println("testing small Map that doesn't promote to HashMap...")
+ testMap(4, 2, 1000000)
+ println()
+
+ println("testing single-threaded HashMap use...")
+ testMap(5, 1, 1000000)
+ println()
+
+ println("testing HashMap.size from multiple threads...")
+ testMap(5, 2, 1000000)
+ println()
+
+ println("testing small Set that doesn't promote to HashSet...")
+ testSet(4, 2, 1000000)
+ println()
+
+ println("testing single-threaded HashSet use...")
+ testSet(5, 1, 1000000)
+ println()
+
+ println("testing HashSet.size from multiple threads...")
+ testSet(5, 2, 1000000)
+ println()
+ }
+} \ No newline at end of file
diff --git a/test/files/run/t2526.scala b/test/files/run/t2526.scala
index 5f6d60546a..53f3059135 100644
--- a/test/files/run/t2526.scala
+++ b/test/files/run/t2526.scala
@@ -20,9 +20,8 @@ object Test {
assertForeach(keys, m.keysIterator)
assertForeach(keys, m.keySet)
- assertForeach(values, m.valuesIterable.iterator)
+ assertForeach(values, m.values.iterator)
assertForeach(values, m.valuesIterator)
- assertForeach(values, m.valuesIterable)
assertForeach(entries, m)
}
@@ -39,7 +38,7 @@ object Test {
/*
* Checks foreach of `actual` goes over all the elements in `expected`
- * We duplicate the method above because there is no common inteface between Traverable and
+ * We duplicate the method above because there is no common inteface between Traversable and
* Iterator and we want to avoid converting between collections to ensure that we test what
* we mean to test.
*/
diff --git a/test/files/run/t2867.scala b/test/files/run/t2867.scala
new file mode 100644
index 0000000000..25e55eaecd
--- /dev/null
+++ b/test/files/run/t2867.scala
@@ -0,0 +1,15 @@
+object Test {
+ case class A(l: List[_]*)
+
+ def main(args: Array[String]): Unit = {
+ /** Kind of sneaking a slightly different test in here as well as
+ * testing 2867. How subversive.
+ */
+ val xs1 = List(1, 2, 3)
+ val xs2 = List(1.0, 2.0, 3.0)
+ val xs3 = List[Any](1.0f, 2.0f, 3.0f)
+ val xs4 = List[Byte](1, 2, 3)
+
+ assert(A(List(xs1, xs2)) == A(List(xs3, xs4)))
+ }
+}
diff --git a/test/files/run/t2886.check b/test/files/run/t2886.check
new file mode 100644
index 0000000000..39ee46a3df
--- /dev/null
+++ b/test/files/run/t2886.check
@@ -0,0 +1 @@
+Function(List(LocalValue(NoSymbol,x,PrefixedType(SingleType(ThisType(Class(scala)),Field(scala.Predef,PrefixedType(ThisType(Class(scala)),Class(scala.Predef)))),TypeField(scala.Predef.String,PrefixedType(ThisType(Class(java.lang)),Class(java.lang.String)))))),Block(List(ValDef(LocalValue(NoSymbol,x$1,NoType),Ident(LocalValue(NoSymbol,x,PrefixedType(SingleType(ThisType(Class(scala)),Field(scala.Predef,PrefixedType(ThisType(Class(scala)),Class(scala.Predef)))),TypeField(scala.Predef.String,PrefixedType(ThisType(Class(java.lang)),Class(java.lang.String))))))), ValDef(LocalValue(NoSymbol,x$2,NoType),Ident(LocalValue(NoSymbol,x,PrefixedType(SingleType(ThisType(Class(scala)),Field(scala.Predef,PrefixedType(ThisType(Class(scala)),Class(scala.Predef)))),TypeField(scala.Predef.String,PrefixedType(ThisType(Class(java.lang)),Class(java.lang.String)))))))),Apply(Select(This(Class(Test)),Method(Test.test,MethodType(List(LocalValue(NoSymbol,name,PrefixedType(SingleType(ThisType(Class(scala)),Field(scala.Predef,PrefixedType(ThisType(Class(scala)),Class(scala.Predef)))),TypeField(scala.Predef.String,PrefixedType(ThisType(Class(java.lang)),Class(java.lang.String))))), LocalValue(NoSymbol,address,PrefixedType(SingleType(ThisType(Class(scala)),Field(scala.Predef,PrefixedType(ThisType(Class(scala)),Class(scala.Predef)))),TypeField(scala.Predef.String,PrefixedType(ThisType(Class(java.lang)),Class(java.lang.String)))))),PrefixedType(ThisType(Class(scala)),Class(scala.Null))))),List(Ident(LocalValue(NoSymbol,x$2,NoType)), Ident(LocalValue(NoSymbol,x$1,NoType)))))) \ No newline at end of file
diff --git a/test/files/run/t2886.scala b/test/files/run/t2886.scala
new file mode 100644
index 0000000000..eb392f0c58
--- /dev/null
+++ b/test/files/run/t2886.scala
@@ -0,0 +1,7 @@
+object Test {
+ def test(name: String, address: String) = null
+ def main(args: Array[String]) = {
+ val tree = scala.reflect.Code.lift((x:String) => test(address=x,name=x)).tree
+ println(tree)
+ }
+}
diff --git a/test/files/run/t2946/Parsers.scala b/test/files/run/t2946/Parsers.scala
new file mode 100644
index 0000000000..c0961034c4
--- /dev/null
+++ b/test/files/run/t2946/Parsers.scala
@@ -0,0 +1,4 @@
+class Parser {
+ def parse(t: Any): Unit = {
+ }
+}
diff --git a/test/files/run/t2946/ResponseCommon.scala b/test/files/run/t2946/ResponseCommon.scala
new file mode 100644
index 0000000000..fa9d8acccb
--- /dev/null
+++ b/test/files/run/t2946/ResponseCommon.scala
@@ -0,0 +1,14 @@
+trait ResponseCommon extends Parser {
+ private[this] var paramsParser: Parser = null
+ def withParamsParser(parser: Parser) = {paramsParser = parser; this}
+
+ class Foo {
+ println(paramsParser)
+ }
+
+ override abstract def parse(t: Any): Unit = t match {
+ case ("params", value: List[_]) => value.foreach {paramsParser.parse(_)}
+ case _ => super.parse(t)
+ }
+}
+
diff --git a/test/files/run/t2946/Test.scala b/test/files/run/t2946/Test.scala
new file mode 100644
index 0000000000..e9d9896a0e
--- /dev/null
+++ b/test/files/run/t2946/Test.scala
@@ -0,0 +1,7 @@
+class Test extends Parser with ResponseCommon
+
+object Test {
+ def main(args: Array[String]) {
+ new Test
+ }
+}
diff --git a/test/files/run/t3026.check b/test/files/run/t3026.check
new file mode 100644
index 0000000000..8c29b615fa
--- /dev/null
+++ b/test/files/run/t3026.check
@@ -0,0 +1,2 @@
+RED
+YELLOW
diff --git a/test/files/run/t3026.scala b/test/files/run/t3026.scala
new file mode 100755
index 0000000000..22dde9cc03
--- /dev/null
+++ b/test/files/run/t3026.scala
@@ -0,0 +1,8 @@
+object Test {
+ abstract class Colour
+ case object RED extends Colour
+ case object YELLOW extends Colour
+ val items = Array(RED, YELLOW)
+
+ def main(args: Array[String]): Unit = items foreach println
+}
diff --git a/test/files/run/t3112.check b/test/files/run/t3112.check
new file mode 100644
index 0000000000..a95644c82c
--- /dev/null
+++ b/test/files/run/t3112.check
@@ -0,0 +1,4 @@
+Vector()
+Vector()
+Vector()
+Vector() \ No newline at end of file
diff --git a/test/files/run/t3112.scala b/test/files/run/t3112.scala
new file mode 100644
index 0000000000..eb8eec6327
--- /dev/null
+++ b/test/files/run/t3112.scala
@@ -0,0 +1,11 @@
+// #3112
+object Test {
+
+ def main(args: Array[String]): Unit = {
+ println((Vector() ++ (0 until 32)) take 0) // works
+ println((Vector() ++ (0 until 33)) take 0) // error
+ println((Vector() ++ (0 until 32)) takeRight 0) // works
+ println((Vector() ++ (0 until 33)) takeRight 0) // error
+ }
+
+} \ No newline at end of file
diff --git a/test/files/run/t3158.check b/test/files/run/t3158.check
new file mode 100644
index 0000000000..ab1cb284d5
--- /dev/null
+++ b/test/files/run/t3158.check
@@ -0,0 +1 @@
+Array(<function1>)
diff --git a/test/files/run/t3158.scala b/test/files/run/t3158.scala
new file mode 100644
index 0000000000..c824b62e96
--- /dev/null
+++ b/test/files/run/t3158.scala
@@ -0,0 +1,9 @@
+object Test {
+ def main(args: Array[String]) {
+ println(args.map(_ => foo _).deep)
+ }
+
+ def foo(xs: String*) {
+ println(xs)
+ }
+}
diff --git a/test/files/run/t3186.check b/test/files/run/t3186.check
new file mode 100644
index 0000000000..c508d5366f
--- /dev/null
+++ b/test/files/run/t3186.check
@@ -0,0 +1 @@
+false
diff --git a/test/files/run/t3186.scala b/test/files/run/t3186.scala
new file mode 100644
index 0000000000..2534d4a164
--- /dev/null
+++ b/test/files/run/t3186.scala
@@ -0,0 +1,7 @@
+object Dist1 extends Enumeration { val Mile, Foot, Inch = Value }
+
+object Dist2 extends Enumeration { val Kilometer, Millimeter, Parsec = Value }
+
+object Test extends Application {
+ println(Dist1.Mile == Dist2.Kilometer)
+}
diff --git a/test/files/run/t3242.check b/test/files/run/t3242.check
new file mode 100644
index 0000000000..a145f6df8f
--- /dev/null
+++ b/test/files/run/t3242.check
@@ -0,0 +1,18 @@
+ append [num: 200] vec
+ remove [num: 200] vec
+ append [num: 400] vec
+ remove [num: 400] vec
+ append [num: 600] vec
+ remove [num: 600] vec
+ append [num: 800] vec
+ remove [num: 800] vec
+>> comparison done, num: 200
+ append [num: 2000] vec
+ remove [num: 2000] vec
+ append [num: 4000] vec
+ remove [num: 4000] vec
+ append [num: 6000] vec
+ remove [num: 6000] vec
+ append [num: 8000] vec
+ remove [num: 8000] vec
+>> comparison done, num: 2000
diff --git a/test/files/run/t3242.scala b/test/files/run/t3242.scala
new file mode 100644
index 0000000000..f8defaa5cd
--- /dev/null
+++ b/test/files/run/t3242.scala
@@ -0,0 +1,49 @@
+object Test {
+
+ def benchmarkA(num: Int) {
+
+ type A = Int
+
+ def updateM[M[_]](ms: M[A], update: (M[A], A)=>M[A]): M[A] = {
+ var is = ms
+ for (i <- 0 until num) is = update(is, i)
+ is
+ }
+
+ //
+ def vectorAppend: Vector[A] = updateM[Vector](Vector(), (as, a)=>{
+ val v = (as :+ a)
+ //println("==>append: i: "+i1+", v: "+v)
+ v
+ })
+ // this will crash, Vector bug!
+ def vectorRemove(vec: Vector[A]): Vector[A] = updateM[Vector](vec, (as, a)=>{
+ val v = (as filterNot{ _ == a})
+ //val v = (is filter{ _ != i})
+ //println("==>remove: i: "+a)
+ v
+ })
+
+ val ct = vectorAppend
+ println(" append [num: "+num+"] vec")
+ vectorRemove(ct)
+ println(" remove [num: "+num+"] vec")
+ } // BenchmarkA
+
+ def comparison(num: Int): Unit = {
+ for (i <- 1 until 5) benchmarkA(num*i)
+ println(">> comparison done, num: "+num);
+ }
+
+ def main(args: Array[String]): Unit = {
+ try {
+ //createBenchmarkA(23).testRun
+
+ comparison(200) // OK
+ comparison(2000) // this will crach
+
+ } catch {
+ case e: Exception => e.printStackTrace()
+ }
+ }
+}
diff --git a/test/files/run/t3242b.scala b/test/files/run/t3242b.scala
new file mode 100644
index 0000000000..7a296aac15
--- /dev/null
+++ b/test/files/run/t3242b.scala
@@ -0,0 +1,17 @@
+import scala.collection.immutable._
+
+object Test {
+
+ def test(n: Int) = {
+ var vb = new VectorBuilder[Int]
+ for (i <- 0 until n)
+ vb += i
+ val v = vb.result
+ assert(v == (0 until n), "not same as (0 until " + n + "): " + v)
+ }
+
+ def main(args: Array[String]): Unit = {
+ for (i <- 0 until 2000)
+ test(i)
+ }
+}
diff --git a/test/files/run/treePrint.check b/test/files/run/treePrint.check
new file mode 100644
index 0000000000..3360815ac1
--- /dev/null
+++ b/test/files/run/treePrint.check
@@ -0,0 +1,5 @@
+def foo = {
+ var q: Boolean = false;
+ val x = 5;
+ ((x == 5) || (!q)) || (true)
+}
diff --git a/test/files/run/treePrint.scala b/test/files/run/treePrint.scala
new file mode 100644
index 0000000000..ffe9a392d4
--- /dev/null
+++ b/test/files/run/treePrint.scala
@@ -0,0 +1,40 @@
+/** Testing compact tree printers.
+ */
+object Test {
+ import scala.tools.nsc._
+ import java.io.{ OutputStream, BufferedReader, StringReader, PrintWriter, Writer, OutputStreamWriter}
+
+ val code = """
+ def foo = {
+ var q: Boolean = false
+ val x = if (true) {
+ if (true) {
+ if (true) {
+ 5
+ }
+ else if (true) {
+ 5
+ } else {
+ 10
+ }
+ }
+ else 20
+ }
+ else 30
+
+ (x == 5) || !q || true
+ }
+ """
+
+ class NullOutputStream extends OutputStream { def write(b: Int) { } }
+
+ def main(args: Array[String]) {
+ val settings = new Settings
+ settings.classpath.value = System.getProperty("java.class.path")
+ settings.Ycompacttrees.value = true
+
+ val repl = new Interpreter(settings, new PrintWriter(new NullOutputStream))
+ repl.interpret("""def initialize = "Have to interpret something or we get errors." """)
+ println(repl mkTree code)
+ }
+}
diff --git a/test/files/run/unittest_collection.scala b/test/files/run/unittest_collection.scala
index 5d7ab97425..d45c23d4b5 100644
--- a/test/files/run/unittest_collection.scala
+++ b/test/files/run/unittest_collection.scala
@@ -96,7 +96,7 @@ object Test {
)
val tr = new TestResult()
ts.run(tr)
- for(val failure <- tr.failures) {
+ for (failure <- tr.failures) {
Console.println(failure)
}
}
diff --git a/test/files/run/unittest_iterator.scala b/test/files/run/unittest_iterator.scala
index 93aaa4a834..28a548160f 100644
--- a/test/files/run/unittest_iterator.scala
+++ b/test/files/run/unittest_iterator.scala
@@ -33,5 +33,18 @@ object Test
assertThat(1, (1 to 8).toList) { it.sliding(8, 8) withPartial false }
assertThat(2, List(9, 10, -1, -1, -1)) { it.sliding(5, 8) withPadding -1 }
assertThat(1, (1 to 5).toList) { it.sliding(5, 8) withPartial false }
+
+ // make sure it throws past th end
+ val thrown = try {
+ val it = List(1,2,3).sliding(2)
+ it.next
+ it.next
+ it.next
+ false
+ }
+ catch {
+ case _: NoSuchElementException => true
+ }
+ assert(thrown)
}
}
diff --git a/test/files/run/vector1.scala b/test/files/run/vector1.scala
index 320bef220c..e8785e2b16 100644
--- a/test/files/run/vector1.scala
+++ b/test/files/run/vector1.scala
@@ -22,7 +22,7 @@ object Test {
def vectorForward(label: String, n: Int): Vector[String] = {
var a: Vector[String] = Vector.empty
for (i <- 0 until n)
- a = a.appendBack(label + i)
+ a = a :+ (label + i)
assertVector(a, label, 0, n)
}
@@ -30,7 +30,7 @@ object Test {
def vectorBackward(label: String, n: Int): Vector[String] = {
var a: Vector[String] = Vector.empty
for (i <- 0 until n)
- a = a.appendFront(label + (n-1-i))
+ a = (label + (n-1-i)) +: a
assertVector(a, label, 0, n)
}
@@ -92,8 +92,8 @@ object Test {
def nextChunkSize = 3 //rand.nextInt(chunkLimit)
- def seqBack() = for (i <- 0 until Math.min(nextChunkSize, N-max)) { a = a.appendBack("a"+max); max += 1 }
- def seqFront() = for (i <- 0 until Math.min(nextChunkSize, min)) { min -= 1; a = a.appendFront("a"+min) }
+ def seqBack() = for (i <- 0 until Math.min(nextChunkSize, N-max)) { a = a :+ ("a"+max); max += 1 }
+ def seqFront() = for (i <- 0 until Math.min(nextChunkSize, min)) { min -= 1; a = ("a"+min) +: a }
try {
@@ -104,7 +104,7 @@ object Test {
} catch {
case ex =>
//println("----------------")
- a.debug
+ //a.debug
throw ex
}
diff --git a/test/files/run/viewtest.check b/test/files/run/viewtest.check
index ded3ac0e92..6e0fe81a67 100644
--- a/test/files/run/viewtest.check
+++ b/test/files/run/viewtest.check
@@ -1,17 +1,11 @@
-SeqViewZ((x,0))
+SeqViewZ(...)
ys defined
mapping 1
2
-mapping 1
-mapping 2
-mapping 3
-SeqViewMS(3, 4)
+SeqViewMS(...)
mapping 3
4
-mapping 1
-mapping 2
-mapping 3
-SeqViewM(2, 3, 4)
+SeqViewM(...)
mapping 1
mapping 2
mapping 3
diff --git a/test/files/run/viewtest.scala b/test/files/run/viewtest.scala
index 280ded57cf..833c0101e3 100755
--- a/test/files/run/viewtest.scala
+++ b/test/files/run/viewtest.scala
@@ -13,7 +13,7 @@ object Test extends Application {
println(ys.force)
val zs = Array(1, 2, 3).view
- val as: IndexedSeqView[Int, Array[Int]] = zs map (_ + 1)
+ val as: SeqView[Int, Array[Int]] = zs map (_ + 1)
val bs: Array[Int] = as.force
val cs = zs.reverse
cs(0) += 1
diff --git a/test/files/run/withIndex.scala b/test/files/run/withIndex.scala
index 3b9c9e84e5..910b1f1f9e 100644
--- a/test/files/run/withIndex.scala
+++ b/test/files/run/withIndex.scala
@@ -3,7 +3,7 @@ object Test {
val ary: Array[String] = Array("a", "b", "c")
val lst: List[String] = List("a", "b", "c")
val itr: Iterator[String] = lst.iterator
- val str: Stream[String] = Stream.fromIterator(lst.iterator)
+ val str: Stream[String] = lst.iterator.toStream
Console.println(ary.zipWithIndex.toList)
Console.println(lst.zipWithIndex.toList)
diff --git a/test/files/scalacheck/array.scala b/test/files/scalacheck/array.scala
index 2febca4447..03c0217180 100644
--- a/test/files/scalacheck/array.scala
+++ b/test/files/scalacheck/array.scala
@@ -4,36 +4,34 @@ import Gen._
import Arbitrary._
import util._
import Buildable._
+import scala.collection.mutable.ArraySeq
object Test extends Properties("Array") {
- val myGens: Seq[Gen[Array[_]]] = List(
- arbArray[Int],
- arbArray[Array[Int]],
- arbArray[List[String]],
- arbArray[String],
- arbArray[Boolean],
- arbArray[AnyVal](arbAnyVal)
- ) map (_.arbitrary)
+ /** At this moment the authentic scalacheck Array Builder/Arb bits are commented out.
+ */
+ implicit def arbArray[T](implicit a: Arbitrary[T], m: Manifest[T]): Arbitrary[Array[T]] =
+ Arbitrary(containerOf[List,T](arbitrary[T]) map (_.toArray))
+
+ val arrGen: Gen[Array[_]] = oneOf(
+ arbitrary[Array[Int]],
+ arbitrary[Array[Array[Int]]],
+ arbitrary[Array[List[String]]],
+ arbitrary[Array[String]],
+ arbitrary[Array[Boolean]],
+ arbitrary[Array[AnyVal]]
+ )
// inspired by #1857 and #2352
- property("eq/ne") =
- forAll(oneOf(myGens: _*)) { c1 =>
- forAll(oneOf(myGens: _*)) { c2 =>
- (c1 eq c2) || (c1 ne c2)
- }
- }
+ property("eq/ne") = forAll(arrGen, arrGen) { (c1, c2) =>
+ (c1 eq c2) || (c1 ne c2)
+ }
- def smallInt = choose(1, 10)
// inspired by #2299
- property("ofDim") = forAll(smallInt) { i1 =>
- forAll(smallInt) { i2 =>
- forAll(smallInt) { i3 =>
- val arr = Array.ofDim[String](i1, i2, i3)
- val flattened = arr flatMap (x => x) flatMap (x => x)
-
- flattened.length == i1 * i2 * i3
- }
- }
+ def smallInt = choose(1, 10)
+ property("ofDim") = forAll(smallInt, smallInt, smallInt) { (i1, i2, i3) =>
+ val arr = Array.ofDim[String](i1, i2, i3)
+ val flattened = arr flatMap (x => x) flatMap (x => x)
+ flattened.length == i1 * i2 * i3
}
}
diff --git a/test/files/scalacheck/eqeq.scala b/test/files/scalacheck/eqeq.scala
new file mode 100644
index 0000000000..60fe63c207
--- /dev/null
+++ b/test/files/scalacheck/eqeq.scala
@@ -0,0 +1,37 @@
+import org.scalacheck._
+import Prop._
+import Gen._
+
+object Test extends Properties("==") {
+ def equalObjectsEqualHashcodes(x: Any, y: Any) = (x != y) || (x == y && x.## == y.##)
+
+ // ticket #2087
+ property("short/char") = forAll { (x: Short) => {
+ val ch: Char = x.toChar
+ (x == ch) == (ch == x)
+ }
+ }
+
+ property("symmetry") = forAll { (x: AnyVal, y: AnyVal) => (x == y) == (y == x) }
+ property("transitivity") = forAll { (x: AnyVal, y: AnyVal, z: AnyVal) => x != y || y != z || x == z }
+
+ property("##") = forAll {
+ (x: Short) => {
+ val anyvals = List(x.toByte, x.toChar, x, x.toInt, x.toLong, x.toFloat, x.toDouble, BigInt(x), BigDecimal(x))
+ val shortAndLarger = anyvals drop 2
+
+ val result = (
+ ((anyvals, anyvals).zipped forall equalObjectsEqualHashcodes) &&
+ ((shortAndLarger, shortAndLarger).zipped forall (_ == _)) &&
+ ((shortAndLarger, shortAndLarger).zipped forall ((x, y) => (x: Any) == (y: Any)))
+ )
+ result
+ }
+ }
+ property("## 2") = forAll {
+ (dv: Double) => {
+ val fv = dv.toFloat
+ (fv != dv) || (fv.## == dv.##)
+ }
+ }
+}
diff --git a/test/files/scalacheck/list.scala b/test/files/scalacheck/list.scala
index 87ecd70a48..1caf35e872 100644
--- a/test/files/scalacheck/list.scala
+++ b/test/files/scalacheck/list.scala
@@ -7,14 +7,14 @@ object Test extends Properties("List") {
property("concat size") = forAll { (l1: List[Int], l2: List[Int]) => (l1.size + l2.size) == (l1 ::: l2).size }
property("reverse") = forAll { (l1: List[Int]) => l1.reverse.reverse == l1 }
- property("toSet") = forAll { (l1: List[Int]) => sorted(l1.toSet.toList) sameElements sorted(l1).removeDuplicates }
+ property("toSet") = forAll { (l1: List[Int]) => sorted(l1.toSet.toList) sameElements sorted(l1).distinct }
property("flatten") = forAll { (xxs: List[List[Int]]) => xxs.flatten.length == (xxs map (_.length) sum) }
property("startsWith/take") = forAll { (xs: List[Int], count: Int) => xs startsWith (xs take count) }
property("endsWith/takeRight") = forAll { (xs: List[Int], count: Int) => xs endsWith (xs takeRight count) }
property("fill") = forAll(choose(1, 100)) { count =>
forAll { (x: Int) =>
val xs = List.fill(count)(x)
- (xs.length == count) && (xs.removeDuplicates == List(x))
+ (xs.length == count) && (xs.distinct == List(x))
}
}
}
diff --git a/test/files/scalacheck/range.scala b/test/files/scalacheck/range.scala
new file mode 100644
index 0000000000..faa1f5d479
--- /dev/null
+++ b/test/files/scalacheck/range.scala
@@ -0,0 +1,205 @@
+import org.scalacheck._
+import Prop._
+import Gen._
+import Arbitrary._
+
+class Counter(r: Range) {
+ var cnt = 0L
+ var last: Option[Int] = None
+ val str = "Range["+r.start+", "+r.end+", "+r.step+(if (r.isInclusive) "]" else ")")
+ def apply(x: Int) = {
+ cnt += 1L
+ if (cnt % 500000000L == 0L) {
+ println("Working: %s %d %d" format (str, cnt, x))
+ }
+ if (cnt > (Int.MaxValue.toLong + 1) * 2)
+ error("Count exceeds maximum possible for an Int Range")
+ if ((r.step > 0 && last.exists(_ > x)) || (r.step < 0 && last.exists(_ < x)))
+ error("Range wrapped: %d %s" format (x, last.toString))
+ last = Some(x)
+ }
+}
+
+abstract class RangeTest(kind: String) extends Properties("Range "+kind) {
+ def myGen: Gen[Range]
+
+ val genRange = for {
+ start <- arbitrary[Int]
+ end <- arbitrary[Int]
+ step <- Gen.choose(1, (start - end).abs + 1)
+ } yield if (start < end) Range(start, end, step) else Range(start, end, -step)
+
+ val genReasonableSizeRange = for {
+ start <- choose(-Int.MinValue, Int.MaxValue)
+ end <- choose(-Int.MinValue, Int.MaxValue)
+ step <- choose(-Int.MaxValue, Int.MaxValue)
+ } yield Range(start, end, if (step == 0) 100 else step)
+
+ val genSmallRange = for {
+ start <- choose(-100, 100)
+ end <- choose(-100, 100)
+ step <- choose(1, 1)
+ } yield if (start < end) Range(start, end, step) else Range(start, end, -step)
+
+ val genRangeByOne = for {
+ start <- arbitrary[Int]
+ end <- arbitrary[Int]
+ if (end.toLong - start.toLong).abs <= 10000000L
+ } yield if (start < end) Range(start, end) else Range(end, start)
+
+ def str(r: Range) = "Range["+r.start+", "+r.end+", "+r.step+(if (r.isInclusive) "]" else ")")
+
+ def expectedSize(r: Range): Long = if (r.isInclusive) {
+ (r.end.toLong - r.start.toLong < 0, r.step < 0) match {
+ case (true, true) | (false, false) => (r.end.toLong - r.start.toLong).abs / r.step.abs.toLong + 1L
+ case _ => if (r.start == r.end) 1L else 0L
+ }
+ } else {
+ (r.end.toLong - r.start.toLong < 0, r.step < 0) match {
+ case (true, true) | (false, false) => (
+ (r.end.toLong - r.start.toLong).abs / r.step.abs.toLong
+ + (if ((r.end.toLong - r.start.toLong).abs % r.step.abs.toLong > 0L) 1L else 0L)
+ )
+ case _ => 0L
+ }
+ }
+
+ def within(r: Range, x: Int) = if (r.step > 0)
+ r.start <= x && (if (r.isInclusive) x <= r.end else x < r.end)
+ else
+ r.start >= x && (if (r.isInclusive) x >= r.end else x > r.end)
+
+ def multiple(r: Range, x: Int) = (x.toLong - r.start) % r.step == 0
+
+ property("foreach.step") = forAll(myGen) { r =>
+ var allValid = true
+ val cnt = new Counter(r)
+// println("--------------------")
+// println(r)
+ r foreach { x => cnt(x)
+// println(x + ", " + (x - r.start) + ", " + (x.toLong - r.start) + ", " + ((x.toLong - r.start) % r.step))
+ allValid &&= multiple(r, x)
+ }
+ allValid :| str(r)
+ }
+
+ property("foreach.inside.range") = forAll(myGen) { r =>
+ var allValid = true
+ var last: Option[Int] = None
+ val cnt = new Counter(r)
+ r foreach { x => cnt(x)
+ allValid &&= within(r, x)
+ }
+ allValid :| str(r)
+ }
+
+ property("foreach.visited.size") = forAll(myGen) { r =>
+ var visited = 0L
+ val cnt = new Counter(r)
+ r foreach { x => cnt(x)
+ visited += 1L
+ }
+// println("----------")
+// println(str(r))
+// println("size: " + r.size)
+// println("expected: " + expectedSize(r))
+// println("visited: " + visited)
+ (visited == expectedSize(r)) :| str(r)
+ }
+
+ property("length") = forAll(myGen suchThat (r => expectedSize(r).toInt == expectedSize(r))) { r =>
+ (r.length == expectedSize(r)) :| str(r)
+ }
+
+ property("isEmpty") = forAll(myGen suchThat (r => expectedSize(r).toInt == expectedSize(r))) { r =>
+ (r.isEmpty == (expectedSize(r) == 0L)) :| str(r)
+ }
+
+ property("contains") = forAll(myGen, arbInt.arbitrary) { (r, x) =>
+// println("----------------")
+// println(str(r))
+// println(x)
+// println("within: " + within(r, x))
+// println("multiple: " + multiple(r, x))
+// println("contains: " + r.contains(x))
+ ((within(r, x) && multiple(r, x)) == r.contains(x)) :| str(r)+": "+x
+ }
+
+ property("take") = forAll(myGen suchThat (r => expectedSize(r).toInt == expectedSize(r)), arbInt.arbitrary) { (r, x) =>
+ val t = r take x
+ (t.size == (0 max x min r.size) && t.start == r.start && t.step == r.step) :| str(r)+" / "+str(t)+": "+x
+ }
+
+ property("takeWhile") = forAll(myGen suchThat (r => expectedSize(r).toInt == expectedSize(r)), arbInt.arbitrary) { (r, x) =>
+ val t = (if (r.step > 0) r takeWhile (_ <= x) else r takeWhile(_ >= x))
+ if (r.size == 0) {
+ (t.size == 0) :| str(r)+" / "+str(t)+": "+x
+ } else {
+ val t2 = (if (r.step > 0) Range(r.start, x min r.last, r.step).inclusive else Range(r.start, x max r.last, r.step).inclusive)
+ (t.start == r.start && t.size == t2.size && t.step == r.step) :| str(r)+" / "+str(t)+" / "+str(t2)+": "+x
+ }
+ }
+
+ property("reverse.toSet.equal") = forAll(myGen) { r =>
+ val reversed = r.reverse
+ val aresame = r.toSet == reversed.toSet
+ if (!aresame) {
+ println(str(r))
+ println(r)
+ println(reversed)
+ println(r.toSet)
+ println(reversed.toSet)
+ }
+ aresame
+ }
+}
+
+object NormalRangeTest extends RangeTest("normal") {
+ override def myGen = genReasonableSizeRange
+ def genOne = for {
+ start <- arbitrary[Int]
+ end <- arbitrary[Int]
+ if (start.toLong - end.toLong).abs < Int.MaxValue.toLong
+ } yield Range(start, end, if (start < end) 1 else - 1)
+ property("by 1.size + 1 == inclusive.size") = forAll(genOne) { r =>
+ (r.size + 1 == r.inclusive.size) :| str(r)
+ }
+}
+
+object InclusiveRangeTest extends RangeTest("inclusive") {
+ override def myGen = for (r <- genReasonableSizeRange) yield r.inclusive
+}
+
+object ByOneRangeTest extends RangeTest("byOne") {
+ override def myGen = genSmallRange
+}
+
+object InclusiveByOneRangeTest extends RangeTest("inclusiveByOne") {
+ override def myGen = for (r <- genSmallRange) yield r.inclusive
+}
+
+object SmallValuesRange extends RangeTest("smallValues") {
+ override def myGen = genSmallRange
+}
+
+object Test extends Properties("Range") {
+ include(NormalRangeTest)
+ include(InclusiveRangeTest)
+ include(ByOneRangeTest)
+ include(InclusiveByOneRangeTest)
+}
+
+/* Mini-benchmark
+def testRange(i: Int, j: Int, k: Int) = {
+ var count = 0
+ for {
+ vi <- 0 to i
+ vj <- 0 to j
+ vk <- 0 to k
+ } { count += 1 }
+}
+
+testRange(10, 1000, 10000)
+testRange(10000, 1000, 10)
+*/
+
diff --git a/test/files/scalacheck/scan.scala b/test/files/scalacheck/scan.scala
new file mode 100644
index 0000000000..e9b25ce3df
--- /dev/null
+++ b/test/files/scalacheck/scan.scala
@@ -0,0 +1,17 @@
+import org.scalacheck._
+import Prop._
+import Gen._
+
+
+object Test extends Properties("TraversableLike.scanLeft") {
+ property("scanLeft") = forAll { (xs: List[Int], z: Int) => {
+ val sums = xs.scanLeft(z)(_ + _)
+ (xs.size == 0) || sums.zip(sums.tail).map(x => x._2 - x._1) == xs
+ }}
+}
+
+
+
+
+
+
diff --git a/test/files/scalap/caseClass/result.test b/test/files/scalap/caseClass/result.test
index cabf321a07..eb1ad74295 100644
--- a/test/files/scalap/caseClass/result.test
+++ b/test/files/scalap/caseClass/result.test
@@ -1,10 +1,9 @@
-case class CaseClass[A >: scala.Nothing <: scala.Seq[scala.Int]](i : A, s : scala.Predef.String) extends java.lang.Object with scala.ScalaObject with scala.Product {
+@scala.serializable
+case class CaseClass[A <: scala.Seq[scala.Int]](i : A, s : scala.Predef.String) extends java.lang.Object with scala.ScalaObject with scala.Product {
val i : A = { /* compiled code */ }
val s : scala.Predef.String = { /* compiled code */ }
def foo : scala.Int = { /* compiled code */ }
- def copy[A >: scala.Nothing <: scala.Seq[scala.Int]]() : CaseClass[A] = { /* compiled code */ }
- def copy$default$1[A >: scala.Nothing <: scala.Seq[scala.Int]] : A = { /* compiled code */ }
- def copy$default$2[A >: scala.Nothing <: scala.Seq[scala.Int]] : scala.Predef.String = { /* compiled code */ }
+ def copy[A <: scala.Seq[scala.Int]](i : A, s : scala.Predef.String) : CaseClass[A] = { /* compiled code */ }
override def hashCode() : scala.Int = { /* compiled code */ }
override def toString() : scala.Predef.String = { /* compiled code */ }
override def equals(x$1 : scala.Any) : scala.Boolean = { /* compiled code */ }
diff --git a/test/files/scalap/classPrivate/A.scala b/test/files/scalap/classPrivate/A.scala
new file mode 100644
index 0000000000..9f1bd34a6a
--- /dev/null
+++ b/test/files/scalap/classPrivate/A.scala
@@ -0,0 +1,9 @@
+class ClassPrivate {
+ private def foo = 1
+ private[ClassPrivate] def bar = 2
+ def baz = 3
+ class Outer {
+ private[ClassPrivate] def qux = 4
+ }
+ protected def quux = 5
+} \ No newline at end of file
diff --git a/test/files/scalap/classPrivate/result.test b/test/files/scalap/classPrivate/result.test
new file mode 100644
index 0000000000..0d12b779c3
--- /dev/null
+++ b/test/files/scalap/classPrivate/result.test
@@ -0,0 +1,10 @@
+class ClassPrivate extends java.lang.Object with scala.ScalaObject {
+ def this() = { /* compiled code */ }
+ def baz : scala.Int = { /* compiled code */ }
+ class Outer extends java.lang.Object with scala.ScalaObject {
+ def this() = { /* compiled code */ }
+ private[ClassPrivate] def qux : scala.Int = { /* compiled code */ }
+ }
+ protected def quux : scala.Int = { /* compiled code */ }
+ private[ClassPrivate] def bar : scala.Int = { /* compiled code */ }
+} \ No newline at end of file
diff --git a/test/files/scalap/classWithExistential/result.test b/test/files/scalap/classWithExistential/result.test
index 243f51e2ad..91afddaf0e 100644
--- a/test/files/scalap/classWithExistential/result.test
+++ b/test/files/scalap/classWithExistential/result.test
@@ -1,4 +1,4 @@
class ClassWithExistential extends java.lang.Object with scala.ScalaObject {
def this() = { /* compiled code */ }
- def foo[A >: scala.Nothing <: scala.Any, B >: scala.Nothing <: scala.Any] : scala.Function1[A, B forSome {type A >: scala.Nothing <: scala.Seq[scala.Int]; type B >: scala.Predef.String <: scala.Any}] = { /* compiled code */ }
-}
+ def foo[A, B] : scala.Function1[A, B forSome {type A <: scala.Seq[scala.Int]; type B >: scala.Predef.String}] = { /* compiled code */ }
+} \ No newline at end of file
diff --git a/test/files/scalap/covariantParam/result.test b/test/files/scalap/covariantParam/result.test
index ce480ee0cd..8acd9b497a 100644
--- a/test/files/scalap/covariantParam/result.test
+++ b/test/files/scalap/covariantParam/result.test
@@ -1,4 +1,4 @@
-class CovariantParam[+A >: scala.Nothing <: scala.Any] extends java.lang.Object with scala.ScalaObject {
+class CovariantParam[+A] extends java.lang.Object with scala.ScalaObject {
def this() = { /* compiled code */ }
- def foo[A >: scala.Nothing <: scala.Any](a : A) : scala.Int = { /* compiled code */ }
+ def foo[A](a : A) : scala.Int = { /* compiled code */ }
}
diff --git a/test/files/scalap/defaultParameter/A.scala b/test/files/scalap/defaultParameter/A.scala
new file mode 100644
index 0000000000..d3514952f4
--- /dev/null
+++ b/test/files/scalap/defaultParameter/A.scala
@@ -0,0 +1,3 @@
+trait DefaultParameter {
+ def foo(s: String = "hello"): Unit
+} \ No newline at end of file
diff --git a/test/files/scalap/defaultParameter/result.test b/test/files/scalap/defaultParameter/result.test
new file mode 100644
index 0000000000..38bf6ac4e3
--- /dev/null
+++ b/test/files/scalap/defaultParameter/result.test
@@ -0,0 +1,3 @@
+trait DefaultParameter extends java.lang.Object {
+ def foo(s : scala.Predef.String) : scala.Unit
+} \ No newline at end of file
diff --git a/test/files/scalap/typeAnnotations/A.scala b/test/files/scalap/typeAnnotations/A.scala
new file mode 100644
index 0000000000..ff2445edc9
--- /dev/null
+++ b/test/files/scalap/typeAnnotations/A.scala
@@ -0,0 +1,9 @@
+abstract class TypeAnnotations[@specialized R] {
+ @specialized val x = 10
+ @specialized type T
+
+ def compose[@specialized A](x: A, y: R): A = {
+ val y: A = x
+ x
+ }
+} \ No newline at end of file
diff --git a/test/files/scalap/typeAnnotations/result.test b/test/files/scalap/typeAnnotations/result.test
new file mode 100644
index 0000000000..b565d6185b
--- /dev/null
+++ b/test/files/scalap/typeAnnotations/result.test
@@ -0,0 +1,8 @@
+abstract class TypeAnnotations[@scala.specialized R] extends java.lang.Object with scala.ScalaObject {
+ def this() = { /* compiled code */ }
+ @scala.specialized
+ val x : scala.Int = { /* compiled code */ }
+ @scala.specialized
+ type T
+ def compose[@scala.specialized A](x : A, y : R) : A = { /* compiled code */ }
+} \ No newline at end of file
diff --git a/test/files/script/fact.scala b/test/files/script/fact.scala
index d48dac6f0f..d48dac6f0f 100644..100755
--- a/test/files/script/fact.scala
+++ b/test/files/script/fact.scala
diff --git a/test/files/script/loadAndExecute/lAndE1.scala b/test/files/script/loadAndExecute/lAndE1.scala
deleted file mode 100755
index b20d1a9428..0000000000
--- a/test/files/script/loadAndExecute/lAndE1.scala
+++ /dev/null
@@ -1,3 +0,0 @@
-object Bop {
- implicit def int2list(x: Int): List[String] = List("hello", "world")
-} \ No newline at end of file
diff --git a/test/files/script/loadAndExecute/lAndE2.scala b/test/files/script/loadAndExecute/lAndE2.scala
deleted file mode 100755
index ea15a04d86..0000000000
--- a/test/files/script/loadAndExecute/lAndE2.scala
+++ /dev/null
@@ -1 +0,0 @@
-import Bop._
diff --git a/test/files/script/loadAndExecute/loadAndExecute.check b/test/files/script/loadAndExecute/loadAndExecute.check
deleted file mode 100644
index ccd8cd6e37..0000000000
--- a/test/files/script/loadAndExecute/loadAndExecute.check
+++ /dev/null
@@ -1 +0,0 @@
-List(hello, world)
diff --git a/test/files/script/loadAndExecute/loadAndExecute.scala b/test/files/script/loadAndExecute/loadAndExecute.scala
deleted file mode 100755
index 2a9718382b..0000000000
--- a/test/files/script/loadAndExecute/loadAndExecute.scala
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-scala -nocompdaemon -i lAndE1.scala lAndE2.scala -e 'println(5: List[String])'
diff --git a/test/files/script/utf8.bat b/test/files/script/utf8.bat
deleted file mode 100755
index 8bc5c886f7..0000000000
--- a/test/files/script/utf8.bat
+++ /dev/null
@@ -1,11 +0,0 @@
-::#!
-:: utf8 - <description>.
-
-@echo off
-call scala -nocompdaemon %0 %*
-goto :eof
-::!#
-
-/*Comment Комментарий*/
-Console.println("QWERTY");
-Console.println("ЙЦУКЕН");
diff --git a/test/files/script/utf8.check b/test/files/script/utf8.check
deleted file mode 100644
index 29dc0518ff..0000000000
--- a/test/files/script/utf8.check
+++ /dev/null
@@ -1,2 +0,0 @@
-QWERTY
-ЙЦУКЕН
diff --git a/test/files/script/utf8.scala b/test/files/script/utf8.scala
deleted file mode 100755
index 5366562cee..0000000000
--- a/test/files/script/utf8.scala
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-# fact - A simple Scala script that prints out the factorial of
-# the argument specified on the command line.
-
-cygwin=false;
-case "`uname`" in
- CYGWIN*) cygwin=true ;;
-esac
-
-SOURCE="$0";
-if $cygwin; then
- if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null 2>/dev/null ;
-then
- format=mixed
- else
- format=windows
- fi
- SOURCE=`cygpath --$format "$SOURCE"`;
-fi
-
-export LC_CTYPE=en_US.UTF-8
-exec scala -nocompdaemon "$SOURCE" "$@"
-!#
-
-/*Comment Комментарий*/
-Console.println("QWERTY");
-Console.println("ЙЦУКЕН");