summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
Diffstat (limited to 'test/files')
-rw-r--r--test/files/buildmanager/freshnames/A.scala4
-rw-r--r--test/files/buildmanager/infer/A.scala2
-rw-r--r--test/files/buildmanager/overloaded_1/A.scala2
-rw-r--r--test/files/buildmanager/t2559/D.scala2
-rw-r--r--test/files/buildmanager/t2562/A.scala2
-rw-r--r--test/files/buildmanager/t2562/B.scala2
-rw-r--r--test/files/buildmanager/t2562/t2562.changes/A2.scala2
-rw-r--r--test/files/buildmanager/t3133/A.java6
-rw-r--r--test/files/continuations-neg/function0.scala8
-rw-r--r--test/files/continuations-neg/function2.scala8
-rw-r--r--test/files/continuations-neg/function3.scala8
-rw-r--r--test/files/continuations-neg/infer0.scala6
-rw-r--r--test/files/continuations-neg/infer2.check2
-rw-r--r--test/files/continuations-neg/infer2.scala12
-rw-r--r--test/files/continuations-neg/lazy.scala14
-rw-r--r--test/files/continuations-neg/t2285.scala4
-rw-r--r--test/files/continuations-neg/t2949.scala2
-rw-r--r--test/files/continuations-neg/t3628.scala2
-rw-r--r--test/files/continuations-neg/trycatch2.scala2
-rwxr-xr-xtest/files/continuations-run/basics.scala6
-rw-r--r--test/files/continuations-run/function1.scala8
-rw-r--r--test/files/continuations-run/function4.scala8
-rw-r--r--test/files/continuations-run/function5.scala8
-rw-r--r--test/files/continuations-run/function6.scala10
-rw-r--r--test/files/continuations-run/ifelse0.scala6
-rw-r--r--test/files/continuations-run/ifelse1.scala6
-rw-r--r--test/files/continuations-run/ifelse2.scala6
-rw-r--r--test/files/continuations-run/ifelse3.scala10
-rw-r--r--test/files/continuations-run/infer1.scala10
-rw-r--r--test/files/continuations-run/match0.scala6
-rw-r--r--test/files/continuations-run/match1.scala6
-rw-r--r--test/files/continuations-run/match2.scala8
-rw-r--r--test/files/continuations-run/t3199.scala40
-rw-r--r--test/files/continuations-run/t3199b.scala6
-rw-r--r--test/files/continuations-run/t3223.scala6
-rw-r--r--test/files/continuations-run/t3225.scala6
-rw-r--r--test/files/continuations-run/trycatch0.scala4
-rw-r--r--test/files/continuations-run/trycatch1.scala2
-rw-r--r--test/files/continuations-run/while0.scala6
-rw-r--r--test/files/continuations-run/while1.scala6
-rw-r--r--test/files/continuations-run/while2.scala6
-rw-r--r--test/files/detach-run/actor/actor.scala2
-rw-r--r--test/files/jvm/actor-sync-send-timeout.scala4
-rw-r--r--test/files/jvm/actor-uncaught-exception.scala54
-rw-r--r--test/files/jvm/actor-uncaught-exception2.scala54
-rw-r--r--test/files/jvm/backendBugUnapply.scala8
-rw-r--r--test/files/jvm/console.scala2
-rw-r--r--test/files/jvm/deprecation/Test_1.scala2
-rw-r--r--test/files/jvm/future-termination.scala26
-rw-r--r--test/files/jvm/inner.scala2
-rw-r--r--test/files/jvm/interpreter.check6
-rw-r--r--test/files/jvm/interpreter.scala8
-rw-r--r--test/files/jvm/methvsfield.java6
-rw-r--r--test/files/jvm/natives.scala6
-rw-r--r--test/files/jvm/protectedacc.scala16
-rw-r--r--test/files/jvm/serialization.scala28
-rw-r--r--test/files/jvm/t1461.scala2
-rw-r--r--test/files/jvm/t1464/MyTrait.scala2
-rw-r--r--test/files/jvm/t1600.scala24
-rw-r--r--test/files/jvm/t2570/Test.scala2
-rw-r--r--test/files/jvm/t3003/Test_1.scala2
-rw-r--r--test/files/jvm/t560bis.scala4
-rw-r--r--test/files/jvm/throws-annot.scala10
-rw-r--r--test/files/jvm/typerep.scala2
-rw-r--r--test/files/jvm/unittest_io_Jvm.check2
-rw-r--r--test/files/jvm/unittest_io_Jvm.scala2
-rw-r--r--test/files/jvm/unittest_xml.scala8
-rw-r--r--test/files/jvm/varargs/JavaClass.java2
-rw-r--r--test/files/jvm/varargs/VaClass.scala4
-rw-r--r--test/files/jvm/xml01.scala48
-rw-r--r--test/files/jvm/xml02.scala10
-rw-r--r--test/files/jvm/xmlattr.scala6
-rw-r--r--test/files/jvm/xmlmore.scala2
-rw-r--r--test/files/jvm/xmlpull.scala4
-rw-r--r--test/files/jvm/xmlstuff.scala42
-rw-r--r--test/files/neg/abstract-class-2.scala4
-rw-r--r--test/files/neg/abstract-inaccessible.scala2
-rw-r--r--test/files/neg/accesses.scala2
-rw-r--r--test/files/neg/array-not-seq.scala4
-rw-r--r--test/files/neg/check-dead.scala12
-rw-r--r--test/files/neg/checksensible.scala24
-rw-r--r--test/files/neg/choices.scala2
-rw-r--r--test/files/neg/exhausting.scala8
-rw-r--r--test/files/neg/forward.scala8
-rw-r--r--test/files/neg/found-req-variance.scala14
-rw-r--r--test/files/neg/gadts1.check2
-rw-r--r--test/files/neg/gadts1.scala4
-rw-r--r--test/files/neg/implicits.scala8
-rw-r--r--test/files/neg/java-access-neg/J.java4
-rw-r--r--test/files/neg/java-access-neg/S2.scala8
-rw-r--r--test/files/neg/lazy-override.scala2
-rw-r--r--test/files/neg/lazyvals.scala4
-rw-r--r--test/files/neg/lubs.scala2
-rw-r--r--test/files/neg/migration28.scala6
-rw-r--r--test/files/neg/null-unsoundness.scala2
-rw-r--r--test/files/neg/object-not-a-value.scala2
-rw-r--r--test/files/neg/overload-msg.scala2
-rw-r--r--test/files/neg/overloaded-implicit.scala8
-rw-r--r--test/files/neg/override-object-no.scala2
-rw-r--r--test/files/neg/pat_unreachable.scala2
-rw-r--r--test/files/neg/patmat-type-check.scala12
-rw-r--r--test/files/neg/patmatexhaust.scala22
-rw-r--r--test/files/neg/patternalts.scala2
-rw-r--r--test/files/neg/protected-constructors.scala2
-rw-r--r--test/files/neg/saito.scala4
-rw-r--r--test/files/neg/sensitive.scala6
-rw-r--r--test/files/neg/spec-overrides.scala2
-rw-r--r--test/files/neg/structural.scala28
-rw-r--r--test/files/neg/switch.scala16
-rw-r--r--test/files/neg/t0117.scala2
-rw-r--r--test/files/neg/t0152.scala2
-rw-r--r--test/files/neg/t0218.check2
-rw-r--r--test/files/neg/t0218.scala4
-rw-r--r--test/files/neg/t0503.scala2
-rw-r--r--test/files/neg/t0764.scala2
-rw-r--r--test/files/neg/t0816.scala2
-rw-r--r--test/files/neg/t1011.scala2
-rw-r--r--test/files/neg/t1112.scala6
-rw-r--r--test/files/neg/t112706A.check2
-rw-r--r--test/files/neg/t112706A.scala2
-rw-r--r--test/files/neg/t1183.scala4
-rw-r--r--test/files/neg/t1477.scala2
-rw-r--r--test/files/neg/t1523.scala4
-rw-r--r--test/files/neg/t1623.scala4
-rw-r--r--test/files/neg/t1705.scala2
-rw-r--r--test/files/neg/t1878.scala8
-rw-r--r--test/files/neg/t2148.scala4
-rw-r--r--test/files/neg/t2421b.scala2
-rw-r--r--test/files/neg/t2441.scala4
-rw-r--r--test/files/neg/t2641.scala6
-rw-r--r--test/files/neg/t2870.check2
-rw-r--r--test/files/neg/t2870.scala6
-rw-r--r--test/files/neg/t2910.scala4
-rw-r--r--test/files/neg/t2918.check6
-rw-r--r--test/files/neg/t2918.scala2
-rw-r--r--test/files/neg/t3015.check4
-rw-r--r--test/files/neg/t3015.scala2
-rw-r--r--test/files/neg/t3118.scala4
-rw-r--r--test/files/neg/t3224.scala18
-rw-r--r--test/files/neg/t3399.scala4
-rw-r--r--test/files/neg/t3453.scala6
-rw-r--r--test/files/neg/t3507.scala2
-rw-r--r--test/files/neg/t3683b.scala2
-rw-r--r--test/files/neg/t3714-neg.scala2
-rw-r--r--test/files/neg/t3736.scala4
-rw-r--r--test/files/neg/t3757/B.scala2
-rw-r--r--test/files/neg/t3776.check2
-rw-r--r--test/files/neg/t3776.scala2
-rw-r--r--test/files/neg/t3816.scala6
-rw-r--r--test/files/neg/t3987.scala2
-rw-r--r--test/files/neg/t4079/t4079_1.scala6
-rw-r--r--test/files/neg/t4174.scala2
-rw-r--r--test/files/neg/t4196.scala4
-rw-r--r--test/files/neg/t4217.check2
-rw-r--r--test/files/neg/t4217.scala2
-rw-r--r--test/files/neg/t4221.scala2
-rw-r--r--test/files/neg/t4417.scala4
-rw-r--r--test/files/neg/t4431.scala2
-rw-r--r--test/files/neg/t4457_1.scala2
-rw-r--r--test/files/neg/t4457_2.scala2
-rw-r--r--test/files/neg/t4851/J.java6
-rw-r--r--test/files/neg/t4851/J2.java4
-rw-r--r--test/files/neg/t4851/S.scala4
-rw-r--r--test/files/neg/t4877.scala2
-rw-r--r--test/files/neg/t5120.scala2
-rw-r--r--test/files/neg/t520.scala2
-rw-r--r--test/files/neg/t558.scala2
-rw-r--r--test/files/neg/t563.scala2
-rw-r--r--test/files/neg/t576.scala8
-rw-r--r--test/files/neg/t588.scala8
-rw-r--r--test/files/neg/t591.scala22
-rw-r--r--test/files/neg/t608.scala2
-rw-r--r--test/files/neg/t692.check2
-rw-r--r--test/files/neg/t692.scala6
-rw-r--r--test/files/neg/t693.check2
-rw-r--r--test/files/neg/t693.scala2
-rw-r--r--test/files/neg/t715.scala2
-rw-r--r--test/files/neg/t783.scala2
-rw-r--r--test/files/neg/t798.scala2
-rw-r--r--test/files/neg/t836.scala2
-rw-r--r--test/files/neg/t856.scala2
-rw-r--r--test/files/neg/t876.scala6
-rw-r--r--test/files/neg/t877.scala2
-rw-r--r--test/files/neg/t944.scala6
-rw-r--r--test/files/neg/tailrec.scala16
-rw-r--r--test/files/neg/tcpoly_infer_ticket1162.scala4
-rw-r--r--test/files/neg/tcpoly_ticket2101.scala8
-rw-r--r--test/files/neg/tcpoly_typealias.scala6
-rw-r--r--test/files/neg/tcpoly_variance_enforce.scala16
-rw-r--r--test/files/neg/type-diagnostics.scala4
-rw-r--r--test/files/neg/unit-returns-value.scala2
-rw-r--r--test/files/neg/varargs.scala12
-rw-r--r--test/files/neg/variances.check4
-rw-r--r--test/files/neg/variances.scala14
-rw-r--r--test/files/neg/viewtest.scala6
-rw-r--r--test/files/pos/List1.scala2
-rw-r--r--test/files/pos/MailBox.scala4
-rw-r--r--test/files/pos/Transactions.scala18
-rw-r--r--test/files/pos/array-interfaces.scala2
-rw-r--r--test/files/pos/arrays2.scala4
-rw-r--r--test/files/pos/builders.scala10
-rw-r--r--test/files/pos/caseclass-productN.scala8
-rw-r--r--test/files/pos/channels.scala6
-rw-r--r--test/files/pos/clsrefine.scala4
-rw-r--r--test/files/pos/collectGenericCC.scala6
-rw-r--r--test/files/pos/context.scala6
-rw-r--r--test/files/pos/cyclics-pos.scala14
-rw-r--r--test/files/pos/depmet_implicit_chaining_zw.scala2
-rw-r--r--test/files/pos/depmet_implicit_norm_ret.scala18
-rw-r--r--test/files/pos/depmet_implicit_oopsla_session.scala12
-rw-r--r--test/files/pos/depmet_implicit_oopsla_session_2.scala8
-rw-r--r--test/files/pos/depmet_implicit_oopsla_session_simpler.scala4
-rw-r--r--test/files/pos/depmet_implicit_oopsla_zipwith.scala6
-rw-r--r--test/files/pos/depmet_implicit_tpbetareduce.scala4
-rw-r--r--test/files/pos/elidable-tparams.scala2
-rw-r--r--test/files/pos/gadt-gilles.scala2
-rw-r--r--test/files/pos/gadts2.scala4
-rw-r--r--test/files/pos/generic-sigs.scala4
-rw-r--r--test/files/pos/gosh.scala16
-rw-r--r--test/files/pos/gui.scala8
-rw-r--r--test/files/pos/hk-infer.scala2
-rw-r--r--test/files/pos/hkarray.scala2
-rw-r--r--test/files/pos/hkrange.scala2
-rw-r--r--test/files/pos/imp2-pos.scala2
-rw-r--r--test/files/pos/implicit-infix-ops.scala6
-rw-r--r--test/files/pos/implicits.scala34
-rw-r--r--test/files/pos/imports-pos.scala4
-rw-r--r--test/files/pos/infer2-pos.scala2
-rw-r--r--test/files/pos/inferbroadtype.scala2
-rw-r--r--test/files/pos/inliner2.scala8
-rw-r--r--test/files/pos/java-access-pos/J.java4
-rw-r--r--test/files/pos/java-access-pos/S1.scala10
-rw-r--r--test/files/pos/javaReadsSigs/fromjava.java8
-rw-r--r--test/files/pos/lambdalift.scala2
-rw-r--r--test/files/pos/listpattern.scala2
-rw-r--r--test/files/pos/looping-jsig.scala8
-rw-r--r--test/files/pos/michel6.scala2
-rw-r--r--test/files/pos/needstypeearly.scala4
-rw-r--r--test/files/pos/nothing_manifest_disambig.scala6
-rw-r--r--test/files/pos/nullary.scala4
-rw-r--r--test/files/pos/nullary_poly.scala4
-rw-r--r--test/files/pos/override-object-yes.scala4
-rw-r--r--test/files/pos/partialfun.scala2
-rw-r--r--test/files/pos/pat_gilles.scala2
-rw-r--r--test/files/pos/propagate.scala2
-rw-r--r--test/files/pos/return_thistype.scala6
-rw-r--r--test/files/pos/scala-singleton.scala14
-rw-r--r--test/files/pos/scoping1.scala2
-rw-r--r--test/files/pos/selftails.scala6
-rw-r--r--test/files/pos/seq-ordering.scala2
-rw-r--r--test/files/pos/signatures/Test.java2
-rw-r--r--test/files/pos/signatures/sig.scala2
-rw-r--r--test/files/pos/spec-Function1.scala4
-rw-r--r--test/files/pos/spec-arrays.scala30
-rw-r--r--test/files/pos/spec-asseenfrom.scala2
-rw-r--r--test/files/pos/spec-cyclic.scala8
-rw-r--r--test/files/pos/spec-funs.scala2
-rw-r--r--test/files/pos/spec-params.scala6
-rw-r--r--test/files/pos/spec-sealed.scala4
-rw-r--r--test/files/pos/spec-short.scala6
-rw-r--r--test/files/pos/spec-t3497.scala2
-rw-r--r--test/files/pos/spec-tailcall.scala4
-rw-r--r--test/files/pos/spec-traits.scala10
-rw-r--r--test/files/pos/spec-vector.scala2
-rw-r--r--test/files/pos/spec.scala10
-rw-r--r--test/files/pos/strings.scala2
-rw-r--r--test/files/pos/sudoku.scala10
-rw-r--r--test/files/pos/super/Super_1.java2
-rw-r--r--test/files/pos/t0031.scala2
-rw-r--r--test/files/pos/t0066.scala2
-rw-r--r--test/files/pos/t0069.scala2
-rw-r--r--test/files/pos/t0227.scala2
-rw-r--r--test/files/pos/t0288/Foo.scala2
-rw-r--r--test/files/pos/t0288/Outer.java2
-rw-r--r--test/files/pos/t0305.scala2
-rw-r--r--test/files/pos/t0438.scala4
-rw-r--r--test/files/pos/t0453.scala2
-rw-r--r--test/files/pos/t0599.scala2
-rw-r--r--test/files/pos/t0625.scala2
-rw-r--r--test/files/pos/t0646.scala4
-rw-r--r--test/files/pos/t0770.scala2
-rw-r--r--test/files/pos/t0774/unrelated.scala4
-rw-r--r--test/files/pos/t0786.scala12
-rw-r--r--test/files/pos/t1000.scala2
-rw-r--r--test/files/pos/t1035.scala12
-rw-r--r--test/files/pos/t1048.scala4
-rw-r--r--test/files/pos/t1059.scala2
-rw-r--r--test/files/pos/t1071.scala2
-rw-r--r--test/files/pos/t1090.scala2
-rw-r--r--test/files/pos/t1107/O.scala4
-rw-r--r--test/files/pos/t1107/T.scala2
-rw-r--r--test/files/pos/t1123.scala2
-rw-r--r--test/files/pos/t1164.scala28
-rw-r--r--test/files/pos/t1168.scala2
-rw-r--r--test/files/pos/t1210a.scala4
-rw-r--r--test/files/pos/t122.scala2
-rw-r--r--test/files/pos/t1236.scala2
-rw-r--r--test/files/pos/t1237.scala6
-rw-r--r--test/files/pos/t1254/t1254.java2
-rw-r--r--test/files/pos/t1263/test.scala2
-rw-r--r--test/files/pos/t1272.scala4
-rw-r--r--test/files/pos/t1292.scala2
-rw-r--r--test/files/pos/t1318.scala2
-rw-r--r--test/files/pos/t1385.scala2
-rw-r--r--test/files/pos/t1480.scala4
-rwxr-xr-xtest/files/pos/t1545.scala4
-rw-r--r--test/files/pos/t1560.scala8
-rw-r--r--test/files/pos/t1565.scala2
-rw-r--r--test/files/pos/t1591b.scala6
-rw-r--r--test/files/pos/t1711/Seq.scala2
-rw-r--r--test/files/pos/t1722-A.scala4
-rwxr-xr-xtest/files/pos/t1722/Test.scala2
-rwxr-xr-xtest/files/pos/t1722/Top.scala4
-rw-r--r--test/files/pos/t1737/A.java3
-rw-r--r--test/files/pos/t1737/B.java1
-rw-r--r--test/files/pos/t1737/c.scala4
-rw-r--r--test/files/pos/t1745/J.java6
-rwxr-xr-xtest/files/pos/t1756.scala12
-rw-r--r--test/files/pos/t1761.scala2
-rw-r--r--test/files/pos/t1798.scala2
-rw-r--r--test/files/pos/t1840/J.java4
-rw-r--r--test/files/pos/t1974.scala6
-rw-r--r--test/files/pos/t2023.scala4
-rw-r--r--test/files/pos/t2060.scala2
-rw-r--r--test/files/pos/t2081.scala2
-rw-r--r--test/files/pos/t2082.scala16
-rw-r--r--test/files/pos/t2130-2.scala2
-rw-r--r--test/files/pos/t2133.scala2
-rw-r--r--test/files/pos/t2168.scala4
-rw-r--r--test/files/pos/t2171.scala2
-rw-r--r--test/files/pos/t2261.scala2
-rw-r--r--test/files/pos/t2281.scala4
-rw-r--r--test/files/pos/t2305.scala4
-rw-r--r--test/files/pos/t2310.scala12
-rw-r--r--test/files/pos/t2399.scala6
-rw-r--r--test/files/pos/t2413/TestScalac.scala2
-rw-r--r--test/files/pos/t2421.scala6
-rw-r--r--test/files/pos/t2421_delitedsl.scala10
-rw-r--r--test/files/pos/t2421b_pos.scala2
-rwxr-xr-xtest/files/pos/t2429.scala4
-rw-r--r--test/files/pos/t2444.scala6
-rw-r--r--test/files/pos/t2464/ScalaOne_1.scala2
-rw-r--r--test/files/pos/t247.scala2
-rwxr-xr-xtest/files/pos/t2504.scala2
-rwxr-xr-xtest/files/pos/t2545.scala4
-rw-r--r--test/files/pos/t2569/Child.scala6
-rw-r--r--test/files/pos/t2569/Parent.java6
-rw-r--r--test/files/pos/t262.scala4
-rw-r--r--test/files/pos/t2665.scala2
-rw-r--r--test/files/pos/t2669.scala2
-rw-r--r--test/files/pos/t2691.scala2
-rw-r--r--test/files/pos/t2726/SQLBuilder_1.scala4
-rw-r--r--test/files/pos/t2910.scala6
-rwxr-xr-xtest/files/pos/t2913.scala6
-rw-r--r--test/files/pos/t2939.scala4
-rw-r--r--test/files/pos/t2940/Error.scala4
-rw-r--r--test/files/pos/t2994a.scala4
-rw-r--r--test/files/pos/t3020.scala2
-rw-r--r--test/files/pos/t3079.scala4
-rw-r--r--test/files/pos/t3106.scala2
-rw-r--r--test/files/pos/t3136.scala2
-rw-r--r--test/files/pos/t3174b.scala6
-rw-r--r--test/files/pos/t3175-pos.scala6
-rw-r--r--test/files/pos/t3177.scala14
-rw-r--r--test/files/pos/t3234.scala2
-rw-r--r--test/files/pos/t3274.scala6
-rw-r--r--test/files/pos/t3312.scala2
-rw-r--r--test/files/pos/t3349/AbstractTupleSet.java2
-rw-r--r--test/files/pos/t3411.scala2
-rw-r--r--test/files/pos/t3429/A.scala4
-rw-r--r--test/files/pos/t3430.scala2
-rw-r--r--test/files/pos/t3440.scala2
-rw-r--r--test/files/pos/t3521/DoubleValue.java2
-rw-r--r--test/files/pos/t3528.scala2
-rw-r--r--test/files/pos/t3568.scala2
-rw-r--r--test/files/pos/t3578.scala2
-rw-r--r--test/files/pos/t3582.scala2
-rw-r--r--test/files/pos/t3636.scala4
-rw-r--r--test/files/pos/t3670.scala2
-rw-r--r--test/files/pos/t3671.scala2
-rw-r--r--test/files/pos/t3731.scala2
-rw-r--r--test/files/pos/t3837.scala4
-rw-r--r--test/files/pos/t3856.scala2
-rw-r--r--test/files/pos/t3864/tuples_1.scala16
-rw-r--r--test/files/pos/t3866.scala2
-rw-r--r--test/files/pos/t3898.scala2
-rw-r--r--test/files/pos/t3927.scala2
-rw-r--r--test/files/pos/t3938/Parent.java2
-rw-r--r--test/files/pos/t3938/UseParent.scala2
-rw-r--r--test/files/pos/t3972.scala2
-rw-r--r--test/files/pos/t4020.scala6
-rw-r--r--test/files/pos/t4202.scala2
-rw-r--r--test/files/pos/t4220.scala2
-rw-r--r--test/files/pos/t4243.scala10
-rw-r--r--test/files/pos/t4266.scala12
-rw-r--r--test/files/pos/t4269.scala6
-rw-r--r--test/files/pos/t4275.scala2
-rw-r--r--test/files/pos/t430-feb09.scala4
-rw-r--r--test/files/pos/t4432.scala4
-rw-r--r--test/files/pos/t4457_1.scala2
-rw-r--r--test/files/pos/t4501.scala2
-rw-r--r--test/files/pos/t460.scala6
-rw-r--r--test/files/pos/t4603/S.scala2
-rw-r--r--test/files/pos/t4716.scala2
-rw-r--r--test/files/pos/t4840.scala2
-rw-r--r--test/files/pos/t4853.scala2
-rw-r--r--test/files/pos/t5127.scala2
-rw-r--r--test/files/pos/t516.scala4
-rw-r--r--test/files/pos/t573.scala10
-rw-r--r--test/files/pos/t577.scala10
-rw-r--r--test/files/pos/t599.scala2
-rw-r--r--test/files/pos/t602.scala2
-rw-r--r--test/files/pos/t613.scala4
-rw-r--r--test/files/pos/t616.scala2
-rw-r--r--test/files/pos/t651.scala4
-rw-r--r--test/files/pos/t675.scala6
-rw-r--r--test/files/pos/t690.scala2
-rw-r--r--test/files/pos/t711.scala2
-rw-r--r--test/files/pos/t715/meredith_1.scala16
-rw-r--r--test/files/pos/t757.scala4
-rw-r--r--test/files/pos/t758.scala10
-rw-r--r--test/files/pos/t767.scala2
-rw-r--r--test/files/pos/t788.scala2
-rw-r--r--test/files/pos/t802.scala8
-rw-r--r--test/files/pos/t807.scala2
-rw-r--r--test/files/pos/t927.scala2
-rw-r--r--test/files/pos/t946.scala2
-rw-r--r--test/files/pos/tcpoly_boundedmonad.scala18
-rw-r--r--test/files/pos/tcpoly_bounds1.scala4
-rw-r--r--test/files/pos/tcpoly_checkkinds_mix.scala6
-rw-r--r--test/files/pos/tcpoly_gm.scala6
-rw-r--r--test/files/pos/tcpoly_higherorder_bound_method.scala2
-rw-r--r--test/files/pos/tcpoly_infer_explicit_tuple_wrapper.scala4
-rw-r--r--test/files/pos/tcpoly_late_method_params.scala2
-rw-r--r--test/files/pos/tcpoly_method.scala2
-rw-r--r--test/files/pos/tcpoly_overloaded.scala14
-rw-r--r--test/files/pos/tcpoly_poly.scala2
-rw-r--r--test/files/pos/tcpoly_return_overriding.scala2
-rw-r--r--test/files/pos/tcpoly_seq.scala44
-rw-r--r--test/files/pos/tcpoly_seq_typealias.scala40
-rw-r--r--test/files/pos/ted.scala2
-rw-r--r--test/files/pos/test5.scala4
-rw-r--r--test/files/pos/test5refine.scala4
-rw-r--r--test/files/pos/testCoercionThis.scala6
-rw-r--r--test/files/pos/thistypes.scala2
-rw-r--r--test/files/pos/ticket0137.scala6
-rw-r--r--test/files/pos/traits.scala4
-rw-r--r--test/files/pos/typealias_dubious.scala10
-rw-r--r--test/files/pos/typealiases.scala14
-rw-r--r--test/files/pos/unapplyNeedsMemberType.scala2
-rw-r--r--test/files/pos/unapplySeq.scala2
-rw-r--r--test/files/pos/unapplyVal.scala4
-rw-r--r--test/files/pos/virtpatmat_castbinder.scala2
-rw-r--r--test/files/pos/virtpatmat_exist1.scala2
-rw-r--r--test/files/pos/virtpatmat_exist2.scala10
-rw-r--r--test/files/pos/virtpatmat_exist3.scala4
-rw-r--r--test/files/pos/virtpatmat_gadt_array.scala10
-rw-r--r--test/files/positions/Anon.scala2
-rw-r--r--test/files/positions/Enclosing1.scala2
-rw-r--r--test/files/positions/ExcludedPrefix1.scala16
-rw-r--r--test/files/positions/Overlap3.scala2
-rw-r--r--test/files/positions/Scaladoc2.scala4
-rw-r--r--test/files/positions/Scaladoc3.scala2
-rw-r--r--test/files/positions/Scaladoc4.scala2
-rw-r--r--test/files/positions/Scaladoc6.scala2
-rw-r--r--test/files/presentation/akka/src/com/eaio/uuid/UUIDGen.java10
-rw-r--r--test/files/presentation/akka/src/pi.scala2
-rw-r--r--test/files/presentation/callcc-interpreter/src/CallccInterpreter.scala4
-rw-r--r--test/files/presentation/ide-bug-1000475/src/Foo.scala2
-rw-r--r--test/files/presentation/ide-bug-1000531/src/CrashOnLoad.scala4
-rw-r--r--test/files/presentation/implicit-member/src/ImplicitMember.scala4
-rw-r--r--test/files/presentation/ping-pong/src/PingPong.scala14
-rw-r--r--test/files/presentation/random/src/Random.scala16
-rw-r--r--test/files/presentation/timeofday/src/timeofday.scala10
-rw-r--r--test/files/res/t597/Test.scala2
-rw-r--r--test/files/res/t722/Parser.scala2
-rw-r--r--test/files/res/t735/ScalaExpressions.scala2
-rw-r--r--test/files/res/t743/BracesXXX.scala2
-rw-r--r--test/files/res/t743/ParserXXX.scala6
-rw-r--r--test/files/res/t785/ScalaNewTyper.scala2
-rw-r--r--test/files/res/t831/NewScalaParserXXX.scala18
-rw-r--r--test/files/run/Course-2002-02.scala8
-rw-r--r--test/files/run/Course-2002-05.scala2
-rw-r--r--test/files/run/Course-2002-08.scala2
-rw-r--r--test/files/run/OrderingTest.scala8
-rw-r--r--test/files/run/ReplacementMatching.scala10
-rw-r--r--test/files/run/ReverseSeqView.scala4
-rw-r--r--test/files/run/UnrolledBuffer.scala44
-rw-r--r--test/files/run/absoverride.scala10
-rw-r--r--test/files/run/arrayclone.scala24
-rw-r--r--test/files/run/arraycopy.scala2
-rw-r--r--test/files/run/arrayview.scala2
-rw-r--r--test/files/run/bigDecimalCache.scala4
-rw-r--r--test/files/run/bigDecimalTest.scala2
-rw-r--r--test/files/run/boolexprs.scala2
-rw-r--r--test/files/run/bugs.scala2
-rw-r--r--test/files/run/caseClassEquality.scala12
-rw-r--r--test/files/run/castsingleton.scala2
-rw-r--r--test/files/run/checked.scala6
-rw-r--r--test/files/run/classof.scala4
-rw-r--r--test/files/run/code.scala2
-rw-r--r--test/files/run/collections-toSelf.scala2
-rw-r--r--test/files/run/collections.scala4
-rw-r--r--test/files/run/colltest1.scala8
-rw-r--r--test/files/run/comparable-comparator.scala8
-rw-r--r--test/files/run/concat-two-strings.scala2
-rw-r--r--test/files/run/constrained-types.check4
-rw-r--r--test/files/run/constrained-types.scala4
-rw-r--r--test/files/run/ctor-order.scala2
-rw-r--r--test/files/run/distinct.scala2
-rw-r--r--test/files/run/elidable-noflags.scala2
-rw-r--r--test/files/run/elidable.scala2
-rw-r--r--test/files/run/emptypf.scala4
-rw-r--r--test/files/run/equality.scala10
-rw-r--r--test/files/run/exceptions-2.scala42
-rw-r--r--test/files/run/existentials.scala4
-rw-r--r--test/files/run/finally.scala12
-rw-r--r--test/files/run/flat-flat-flat.scala2
-rw-r--r--test/files/run/forvaleq.scala30
-rw-r--r--test/files/run/gadts.scala4
-rw-r--r--test/files/run/getClassTest.scala10
-rw-r--r--test/files/run/global-showdef.scala8
-rw-r--r--test/files/run/groupby.scala6
-rw-r--r--test/files/run/hashCodeBoxesRunTime.scala12
-rw-r--r--test/files/run/hashhash.scala2
-rw-r--r--test/files/run/indexedSeq.scala4
-rw-r--r--test/files/run/infix.scala2
-rw-r--r--test/files/run/inliner-infer.scala6
-rw-r--r--test/files/run/inner-obj-auto.scala440
-rw-r--r--test/files/run/io-position.scala8
-rw-r--r--test/files/run/iq.scala24
-rw-r--r--test/files/run/is-valid-num.scala2
-rw-r--r--test/files/run/issue192.scala32
-rw-r--r--test/files/run/iterator3444.scala12
-rw-r--r--test/files/run/iterators.scala6
-rw-r--r--test/files/run/java-erasure.scala2
-rw-r--r--test/files/run/json.scala16
-rw-r--r--test/files/run/kmpSliceSearch.scala8
-rw-r--r--test/files/run/lazy-exprs.scala16
-rw-r--r--test/files/run/lazy-locals.scala10
-rw-r--r--test/files/run/lazy-override-run.scala4
-rw-r--r--test/files/run/lazy-traits.scala74
-rw-r--r--test/files/run/lift-and-unlift.scala10
-rw-r--r--test/files/run/lists-run.scala8
-rw-r--r--test/files/run/manifests.scala46
-rw-r--r--test/files/run/mapConserve.scala6
-rw-r--r--test/files/run/mapValues.scala2
-rw-r--r--test/files/run/map_java_conversions.scala24
-rw-r--r--test/files/run/matchbytes.scala2
-rw-r--r--test/files/run/matchintasany.scala2
-rw-r--r--test/files/run/matchnull.scala2
-rw-r--r--test/files/run/misc.scala2
-rw-r--r--test/files/run/missingparams.scala4
-rw-r--r--test/files/run/mock.scala6
-rw-r--r--test/files/run/nodebuffer-array.scala4
-rw-r--r--test/files/run/null-and-intersect.scala6
-rw-r--r--test/files/run/null-hash.scala2
-rw-r--r--test/files/run/number-parsing.scala4
-rw-r--r--test/files/run/numbereq.scala14
-rw-r--r--test/files/run/origins.scala2
-rw-r--r--test/files/run/packrat1.scala8
-rw-r--r--test/files/run/packrat2.scala14
-rw-r--r--test/files/run/packrat3.scala12
-rw-r--r--test/files/run/parmap-ops.scala12
-rw-r--r--test/files/run/patch-boundary.scala4
-rw-r--r--test/files/run/patmat-exprs.scala6
-rw-r--r--test/files/run/patmat-seqs.scala10
-rw-r--r--test/files/run/patmatnew.scala4
-rw-r--r--test/files/run/pc-conversions.scala34
-rw-r--r--test/files/run/pf-catch.scala6
-rw-r--r--test/files/run/primitive-sigs-2.scala2
-rw-r--r--test/files/run/priorityQueue.scala66
-rw-r--r--test/files/run/private-inline.scala16
-rw-r--r--test/files/run/programmatic-main.scala2
-rw-r--r--test/files/run/proxy.scala6
-rw-r--r--test/files/run/range.scala24
-rw-r--r--test/files/run/records.scala6
-rw-r--r--test/files/run/repl-backticks.scala10
-rw-r--r--test/files/run/repl-suppressed-warnings.scala2
-rw-r--r--test/files/run/run-bug4840.scala8
-rw-r--r--test/files/run/runtime-richChar.scala10
-rw-r--r--test/files/run/scan.scala8
-rw-r--r--test/files/run/seqlike-kmp.scala6
-rw-r--r--test/files/run/sequenceComparisons.scala40
-rw-r--r--test/files/run/serialize-stream.scala4
-rw-r--r--test/files/run/slice-strings.scala6
-rw-r--r--test/files/run/streamWithFilter.scala2
-rw-r--r--test/files/run/streams.scala2
-rw-r--r--test/files/run/stringbuilder.scala14
-rw-r--r--test/files/run/structural.scala52
-rw-r--r--test/files/run/sysprops.scala10
-rw-r--r--test/files/run/t0017.scala2
-rw-r--r--test/files/run/t0325.scala8
-rw-r--r--test/files/run/t0421.scala10
-rw-r--r--test/files/run/t0508.scala2
-rw-r--r--test/files/run/t0631.scala2
-rw-r--r--test/files/run/t0677.scala2
-rw-r--r--test/files/run/t0807.scala2
-rw-r--r--test/files/run/t0883.scala12
-rw-r--r--test/files/run/t1005.scala2
-rw-r--r--test/files/run/t1141.scala2
-rw-r--r--test/files/run/t1167.scala6
-rw-r--r--test/files/run/t1220.scala2
-rw-r--r--test/files/run/t1300.scala4
-rw-r--r--test/files/run/t1309.scala2
-rw-r--r--test/files/run/t1323.scala4
-rw-r--r--test/files/run/t1333.scala4
-rw-r--r--test/files/run/t1423.scala2
-rw-r--r--test/files/run/t1427.scala2
-rw-r--r--test/files/run/t1500.scala24
-rw-r--r--test/files/run/t1501.scala20
-rw-r--r--test/files/run/t1537.scala6
-rw-r--r--test/files/run/t1591.scala6
-rw-r--r--test/files/run/t1718.scala4
-rw-r--r--test/files/run/t1766.scala12
-rw-r--r--test/files/run/t1773.scala2
-rw-r--r--test/files/run/t1829.scala2
-rw-r--r--test/files/run/t2029.scala4
-rw-r--r--test/files/run/t2074_2.scala2
-rw-r--r--test/files/run/t2087-and-2400.scala6
-rw-r--r--test/files/run/t2124.scala2
-rw-r--r--test/files/run/t2125.scala4
-rw-r--r--test/files/run/t2276.scala2
-rw-r--r--test/files/run/t2308a.scala4
-rw-r--r--test/files/run/t2354.scala2
-rw-r--r--test/files/run/t2417.scala18
-rw-r--r--test/files/run/t2512.scala4
-rw-r--r--test/files/run/t2514.scala4
-rw-r--r--test/files/run/t2526.scala16
-rw-r--r--test/files/run/t2552.scala14
-rw-r--r--test/files/run/t2636.scala12
-rw-r--r--test/files/run/t266.scala4
-rw-r--r--test/files/run/t2721.scala4
-rw-r--r--test/files/run/t2755.scala6
-rw-r--r--test/files/run/t2800.scala8
-rw-r--r--test/files/run/t2849.scala6
-rw-r--r--test/files/run/t2867.scala6
-rw-r--r--test/files/run/t2958.scala4
-rwxr-xr-xtest/files/run/t3026.scala2
-rw-r--r--test/files/run/t3038.scala14
-rw-r--r--test/files/run/t3038c/A_1.scala4
-rw-r--r--test/files/run/t3038d.scala10
-rw-r--r--test/files/run/t3050.scala4
-rw-r--r--test/files/run/t3112.scala2
-rw-r--r--test/files/run/t3150.scala2
-rw-r--r--test/files/run/t3158.scala2
-rw-r--r--test/files/run/t3175.scala26
-rw-r--r--test/files/run/t3232.scala6
-rw-r--r--test/files/run/t3269.scala2
-rw-r--r--test/files/run/t3273.scala2
-rw-r--r--test/files/run/t3361.scala2
-rw-r--r--test/files/run/t3395.scala6
-rw-r--r--test/files/run/t3397.scala2
-rw-r--r--test/files/run/t3493.scala4
-rw-r--r--test/files/run/t3496.scala4
-rw-r--r--test/files/run/t3502.scala6
-rw-r--r--test/files/run/t3509.scala4
-rw-r--r--test/files/run/t3511.scala18
-rw-r--r--test/files/run/t3516.scala2
-rw-r--r--test/files/run/t3518.scala2
-rw-r--r--test/files/run/t3530.scala6
-rw-r--r--test/files/run/t3540.scala2
-rw-r--r--test/files/run/t3563.scala6
-rw-r--r--test/files/run/t3580.scala6
-rw-r--r--test/files/run/t3603.scala8
-rw-r--r--test/files/run/t3613.scala6
-rw-r--r--test/files/run/t3619.scala2
-rw-r--r--test/files/run/t363.scala2
-rw-r--r--test/files/run/t3647.scala4
-rw-r--r--test/files/run/t3714.scala2
-rw-r--r--test/files/run/t3719.scala4
-rw-r--r--test/files/run/t3822.scala8
-rw-r--r--test/files/run/t3829.scala10
-rw-r--r--test/files/run/t3855.scala2
-rw-r--r--test/files/run/t3877.scala16
-rw-r--r--test/files/run/t3887.scala2
-rw-r--r--test/files/run/t3888.scala4
-rw-r--r--test/files/run/t3897/J_2.java4
-rw-r--r--test/files/run/t3897/a_2.scala6
-rw-r--r--test/files/run/t3932.scala4
-rw-r--r--test/files/run/t3964.scala6
-rw-r--r--test/files/run/t3970.scala4
-rw-r--r--test/files/run/t3980.scala2
-rw-r--r--test/files/run/t3984.scala2
-rw-r--r--test/files/run/t4013.scala4
-rw-r--r--test/files/run/t4013b.scala2
-rw-r--r--test/files/run/t4024.scala4
-rw-r--r--test/files/run/t4054.scala2
-rw-r--r--test/files/run/t4062.scala2
-rw-r--r--test/files/run/t4072.scala4
-rw-r--r--test/files/run/t408.scala2
-rw-r--r--test/files/run/t4110.scala2
-rw-r--r--test/files/run/t4119/J.java2
-rw-r--r--test/files/run/t4119/S.scala2
-rw-r--r--test/files/run/t4122.scala2
-rw-r--r--test/files/run/t4148.scala2
-rw-r--r--test/files/run/t4238/J_1.java4
-rw-r--r--test/files/run/t4288.scala2
-rw-r--r--test/files/run/t4294.scala2
-rw-r--r--test/files/run/t4317/S_3.scala2
-rw-r--r--test/files/run/t4387.scala4
-rw-r--r--test/files/run/t4396.scala2
-rw-r--r--test/files/run/t4426.scala6
-rw-r--r--test/files/run/t4461.scala2
-rw-r--r--test/files/run/t4532.check6
-rw-r--r--test/files/run/t4532.scala10
-rw-r--r--test/files/run/t4535.scala10
-rw-r--r--test/files/run/t4560.scala2
-rw-r--r--test/files/run/t4570.scala4
-rw-r--r--test/files/run/t4608.scala4
-rw-r--r--test/files/run/t4617.scala2
-rw-r--r--test/files/run/t4656.scala2
-rw-r--r--test/files/run/t4671.check4
-rw-r--r--test/files/run/t4671.scala2
-rw-r--r--test/files/run/t4680.scala4
-rw-r--r--test/files/run/t4697.scala2
-rw-r--r--test/files/run/t4752.scala4
-rw-r--r--test/files/run/t4753.scala2
-rw-r--r--test/files/run/t4761.scala2
-rw-r--r--test/files/run/t4894.scala8
-rw-r--r--test/files/run/t4895.scala6
-rw-r--r--test/files/run/t576.scala6
-rw-r--r--test/files/run/t603.scala2
-rw-r--r--test/files/run/t744.scala2
-rw-r--r--test/files/run/t874.scala2
-rw-r--r--test/files/run/t920.scala2
-rw-r--r--test/files/run/tailcalls.scala16
-rw-r--r--test/files/run/takeAndDrop.scala4
-rw-r--r--test/files/run/tcpoly_monads.scala8
-rw-r--r--test/files/run/tcpoly_parseridioms.scala44
-rw-r--r--test/files/run/transform.scala2
-rw-r--r--test/files/run/transpose.scala4
-rw-r--r--test/files/run/treePrint.scala8
-rw-r--r--test/files/run/triple-quoted-expr.scala8
-rw-r--r--test/files/run/try-2.scala12
-rw-r--r--test/files/run/try.scala6
-rw-r--r--test/files/run/tuple-match.scala4
-rw-r--r--test/files/run/tuple-zipped.scala16
-rw-r--r--test/files/run/typealias_overriding.scala8
-rw-r--r--test/files/run/unapply.scala6
-rw-r--r--test/files/run/unittest_collection.scala6
-rw-r--r--test/files/run/unittest_iterator.scala12
-rw-r--r--test/files/run/vector1.scala24
-rw-r--r--test/files/run/view-headoption.scala4
-rw-r--r--test/files/run/view-iterator-stream.scala8
-rwxr-xr-xtest/files/run/viewtest.scala4
-rw-r--r--test/files/run/virtpatmat_apply.scala2
-rw-r--r--test/files/run/virtpatmat_casting.scala6
-rw-r--r--test/files/run/virtpatmat_literal.scala24
-rw-r--r--test/files/run/virtpatmat_partial.scala2
-rw-r--r--test/files/run/virtpatmat_typed.scala8
-rw-r--r--test/files/run/virtpatmat_unapply.scala14
-rw-r--r--test/files/run/xml-loop-bug.scala2
-rw-r--r--test/files/scalacheck/CheckEither.scala24
-rw-r--r--test/files/scalacheck/HashTrieSplit.scala2
-rw-r--r--test/files/scalacheck/Unrolled.scala6
-rw-r--r--test/files/scalacheck/array.scala6
-rw-r--r--test/files/scalacheck/list.scala2
-rw-r--r--test/files/scalacheck/parallel-collections/IntOperators.scala2
-rw-r--r--test/files/scalacheck/parallel-collections/PairOperators.scala42
-rw-r--r--test/files/scalacheck/parallel-collections/PairValues.scala2
-rw-r--r--test/files/scalacheck/parallel-collections/ParallelArrayCheck.scala14
-rw-r--r--test/files/scalacheck/parallel-collections/ParallelArrayTest.scala2
-rw-r--r--test/files/scalacheck/parallel-collections/ParallelArrayViewCheck.scala22
-rw-r--r--test/files/scalacheck/parallel-collections/ParallelHashMapCheck.scala26
-rw-r--r--test/files/scalacheck/parallel-collections/ParallelHashSetCheck.scala22
-rw-r--r--test/files/scalacheck/parallel-collections/ParallelHashTrieCheck.scala32
-rw-r--r--test/files/scalacheck/parallel-collections/ParallelIterableCheck.scala82
-rw-r--r--test/files/scalacheck/parallel-collections/ParallelMapCheck1.scala6
-rw-r--r--test/files/scalacheck/parallel-collections/ParallelRangeCheck.scala18
-rw-r--r--test/files/scalacheck/parallel-collections/ParallelSeqCheck.scala60
-rw-r--r--test/files/scalacheck/parallel-collections/ParallelSetCheck.scala6
-rw-r--r--test/files/scalacheck/parallel-collections/ParallelVectorCheck.scala10
-rw-r--r--test/files/scalacheck/parallel-collections/pc.scala14
-rw-r--r--test/files/scalacheck/primitive-eqeq.scala10
-rw-r--r--test/files/scalacheck/substringTests.scala4
-rw-r--r--test/files/scalap/caseClass/A.scala2
-rw-r--r--test/files/scalap/caseObject/A.scala2
-rw-r--r--test/files/scalap/cbnParam/A.scala2
-rw-r--r--test/files/specialized/arrays-traits.scala6
-rw-r--r--test/files/specialized/arrays.scala16
-rw-r--r--test/files/specialized/fft.scala26
-rw-r--r--test/files/specialized/spec-ame.scala10
-rw-r--r--test/files/specialized/spec-init.scala2
-rw-r--r--test/files/specialized/spec-matrix.scala12
-rw-r--r--test/files/specialized/spec-overrides.scala2
-rw-r--r--test/files/specialized/spec-patmatch.scala2
-rw-r--r--test/files/specialized/spec-super.scala6
-rw-r--r--test/files/specialized/spec-t3896.scala4
-rw-r--r--test/files/specialized/td3651.scala2
790 files changed, 2851 insertions, 2859 deletions
diff --git a/test/files/buildmanager/freshnames/A.scala b/test/files/buildmanager/freshnames/A.scala
index 88ea44b3c7..e8ab26ca1e 100644
--- a/test/files/buildmanager/freshnames/A.scala
+++ b/test/files/buildmanager/freshnames/A.scala
@@ -1,11 +1,11 @@
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)
}
diff --git a/test/files/buildmanager/infer/A.scala b/test/files/buildmanager/infer/A.scala
index 5e0e268122..46b5391609 100644
--- a/test/files/buildmanager/infer/A.scala
+++ b/test/files/buildmanager/infer/A.scala
@@ -1,5 +1,5 @@
class Foo(flag: Boolean) {
- val classpath =
+ val classpath =
if (flag)
new AClasspath
else
diff --git a/test/files/buildmanager/overloaded_1/A.scala b/test/files/buildmanager/overloaded_1/A.scala
index c070faf978..33b63b8006 100644
--- a/test/files/buildmanager/overloaded_1/A.scala
+++ b/test/files/buildmanager/overloaded_1/A.scala
@@ -3,7 +3,7 @@ trait As {
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/t2559/D.scala b/test/files/buildmanager/t2559/D.scala
index 4b8422db04..906b69a3e7 100644
--- a/test/files/buildmanager/t2559/D.scala
+++ b/test/files/buildmanager/t2559/D.scala
@@ -1,5 +1,5 @@
object D {
- def x(a: A) =
+ def x(a: A) =
a match {
case _: B => ()
case _: C => ()
diff --git a/test/files/buildmanager/t2562/A.scala b/test/files/buildmanager/t2562/A.scala
index 2208585eed..740cd1e868 100644
--- a/test/files/buildmanager/t2562/A.scala
+++ b/test/files/buildmanager/t2562/A.scala
@@ -1,6 +1,6 @@
object A
{
- def x0 = B.x0
+ 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
index 6f658954e1..a524e5cc84 100644
--- a/test/files/buildmanager/t2562/B.scala
+++ b/test/files/buildmanager/t2562/B.scala
@@ -1,6 +1,6 @@
object B
{
- def x0 = A.x1
+ 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
index 743609eb18..c560e1e816 100644
--- a/test/files/buildmanager/t2562/t2562.changes/A2.scala
+++ b/test/files/buildmanager/t2562/t2562.changes/A2.scala
@@ -1,6 +1,6 @@
object A
{
- def x0 = B.x0
+ def x0 = B.x0
def x1 = B.x1
def x2 = B.x2
def x3 = "3"
diff --git a/test/files/buildmanager/t3133/A.java b/test/files/buildmanager/t3133/A.java
index 9cf4d96bd4..c4e7f3af0e 100644
--- a/test/files/buildmanager/t3133/A.java
+++ b/test/files/buildmanager/t3133/A.java
@@ -1,7 +1,7 @@
public class A {
- class Foo {}
-
+ class Foo {}
+
public A(Foo a) {}
-
+
private void bar(Foo z) {}
}
diff --git a/test/files/continuations-neg/function0.scala b/test/files/continuations-neg/function0.scala
index 4112ee3835..6ef0d98b90 100644
--- a/test/files/continuations-neg/function0.scala
+++ b/test/files/continuations-neg/function0.scala
@@ -4,13 +4,13 @@ import scala.util.continuations._
object Test {
-
+
def main(args: Array[String]): Any = {
-
+
val f = () => shift { k: (Int=>Int) => k(7) }
val g: () => Int = f
-
+
println(reset(g()))
}
-
+
} \ No newline at end of file
diff --git a/test/files/continuations-neg/function2.scala b/test/files/continuations-neg/function2.scala
index ae0fda509d..402c6dcad8 100644
--- a/test/files/continuations-neg/function2.scala
+++ b/test/files/continuations-neg/function2.scala
@@ -4,13 +4,13 @@ import scala.util.continuations._
object Test {
-
+
def main(args: Array[String]): Any = {
-
+
val f = () => 7
val g: () => Int @cps[Int] = f
-
+
println(reset(g()))
}
-
+
} \ No newline at end of file
diff --git a/test/files/continuations-neg/function3.scala b/test/files/continuations-neg/function3.scala
index 0c3f1667e5..c4acc4c2e9 100644
--- a/test/files/continuations-neg/function3.scala
+++ b/test/files/continuations-neg/function3.scala
@@ -4,12 +4,12 @@ import scala.util.continuations._
object Test {
-
+
def main(args: Array[String]): Any = {
-
+
val g: () => Int = () => shift { k: (Int=>Int) => k(7) }
-
+
println(reset(g()))
}
-
+
} \ No newline at end of file
diff --git a/test/files/continuations-neg/infer0.scala b/test/files/continuations-neg/infer0.scala
index 894d5228b1..9cf69c5d35 100644
--- a/test/files/continuations-neg/infer0.scala
+++ b/test/files/continuations-neg/infer0.scala
@@ -4,11 +4,11 @@ import scala.util.continuations._
object Test {
-
+
def test(x: => Int @cpsParam[String,Int]) = 7
-
+
def main(args: Array[String]): Any = {
test(8)
}
-
+
} \ No newline at end of file
diff --git a/test/files/continuations-neg/infer2.check b/test/files/continuations-neg/infer2.check
index d92bc9c572..59eb670bc3 100644
--- a/test/files/continuations-neg/infer2.check
+++ b/test/files/continuations-neg/infer2.check
@@ -1,4 +1,4 @@
infer2.scala:14: error: illegal answer type modification: scala.util.continuations.cpsParam[String,Int] andThen scala.util.continuations.cpsParam[String,Int]
- test { sym(); sym() }
+ test { sym(); sym() }
^
one error found
diff --git a/test/files/continuations-neg/infer2.scala b/test/files/continuations-neg/infer2.scala
index a890ac1fc4..eaffbc17fc 100644
--- a/test/files/continuations-neg/infer2.scala
+++ b/test/files/continuations-neg/infer2.scala
@@ -4,16 +4,16 @@ import scala.util.continuations._
object Test {
-
+
def test(x: => Int @cpsParam[String,Int]) = 7
-
+
def sym() = shift { k: (Int => String) => 9 }
-
-
+
+
def main(args: Array[String]): Any = {
- test { sym(); sym() }
+ test { sym(); sym() }
}
-
+
}
diff --git a/test/files/continuations-neg/lazy.scala b/test/files/continuations-neg/lazy.scala
index 3c8169dd46..a2fad83be8 100644
--- a/test/files/continuations-neg/lazy.scala
+++ b/test/files/continuations-neg/lazy.scala
@@ -1,16 +1,16 @@
-import scala.util.continuations._
-
-object Test {
+import scala.util.continuations._
+
+object Test {
def foo() = {
lazy val x = shift((k:Unit=>Unit)=>k())
println(x)
}
-
- def main(args: Array[String]) {
+
+ def main(args: Array[String]) {
reset {
foo()
}
- }
-
+ }
+
} \ No newline at end of file
diff --git a/test/files/continuations-neg/t2285.scala b/test/files/continuations-neg/t2285.scala
index f3c7f4c89c..b906dc455a 100644
--- a/test/files/continuations-neg/t2285.scala
+++ b/test/files/continuations-neg/t2285.scala
@@ -5,7 +5,7 @@ import scala.util.continuations._
object Test {
def bar() = shift { k: (String => String) => k("1") }
-
+
def foo() = reset { bar(); 7 }
-
+
}
diff --git a/test/files/continuations-neg/t2949.scala b/test/files/continuations-neg/t2949.scala
index ce27c7c0e8..2d426a4d89 100644
--- a/test/files/continuations-neg/t2949.scala
+++ b/test/files/continuations-neg/t2949.scala
@@ -8,7 +8,7 @@ object Test {
def reify[A, B](x : A @cpsParam[List[A], B]) = reset{ List(x) }
def main(args: Array[String]): Unit = println(reify {
- val x = reflect[Int, Int](List(1,2,3))
+ val x = reflect[Int, Int](List(1,2,3))
val y = reflect[Int, Int](List(2,4,8))
x * y
})
diff --git a/test/files/continuations-neg/t3628.scala b/test/files/continuations-neg/t3628.scala
index c56e7752c4..3fdd32a034 100644
--- a/test/files/continuations-neg/t3628.scala
+++ b/test/files/continuations-neg/t3628.scala
@@ -3,7 +3,7 @@ import scala.actors.Actor._
object Test {
val impl: Actor = actor {
loop {
- react {
+ react {
case 1 => impl ! 2
}
}
diff --git a/test/files/continuations-neg/trycatch2.scala b/test/files/continuations-neg/trycatch2.scala
index 761cee52ac..d61419169b 100644
--- a/test/files/continuations-neg/trycatch2.scala
+++ b/test/files/continuations-neg/trycatch2.scala
@@ -7,7 +7,7 @@ object Test {
def fatal[T]: T = throw new Exception
def cpsIntStringInt = shift { k:(Int=>String) => k(3); 7 }
def cpsIntIntString = shift { k:(Int=>Int) => k(3); "7" }
-
+
def foo1 = try {
fatal[Int]
cpsIntStringInt
diff --git a/test/files/continuations-run/basics.scala b/test/files/continuations-run/basics.scala
index 9df209b11c..b63710bc64 100755
--- a/test/files/continuations-run/basics.scala
+++ b/test/files/continuations-run/basics.scala
@@ -14,10 +14,10 @@ object Test {
}
def main(args: Array[String]) = {
-
+
println(reset(m0()))
println(reset(m1()))
-
+
}
-
+
}
diff --git a/test/files/continuations-run/function1.scala b/test/files/continuations-run/function1.scala
index 3b39722e3a..fbd413ed9d 100644
--- a/test/files/continuations-run/function1.scala
+++ b/test/files/continuations-run/function1.scala
@@ -4,13 +4,13 @@ import scala.util.continuations._
object Test {
-
+
def main(args: Array[String]): Any = {
-
+
val f = () => shift { k: (Int=>Int) => k(7) }
val g: () => Int @cps[Int] = f
-
+
println(reset(g()))
}
-
+
} \ No newline at end of file
diff --git a/test/files/continuations-run/function4.scala b/test/files/continuations-run/function4.scala
index b73eedb02c..2ccd0b4ff2 100644
--- a/test/files/continuations-run/function4.scala
+++ b/test/files/continuations-run/function4.scala
@@ -4,12 +4,12 @@ import scala.util.continuations._
object Test {
-
+
def main(args: Array[String]): Any = {
-
+
val g: () => Int @cps[Int] = () => shift { k: (Int=>Int) => k(7) }
-
+
println(reset(g()))
}
-
+
} \ No newline at end of file
diff --git a/test/files/continuations-run/function5.scala b/test/files/continuations-run/function5.scala
index a689ccf243..fe528e14e7 100644
--- a/test/files/continuations-run/function5.scala
+++ b/test/files/continuations-run/function5.scala
@@ -4,12 +4,12 @@ import scala.util.continuations._
object Test {
-
+
def main(args: Array[String]): Any = {
-
+
val g: () => Int @cps[Int] = () => 7
-
+
println(reset(g()))
}
-
+
} \ No newline at end of file
diff --git a/test/files/continuations-run/function6.scala b/test/files/continuations-run/function6.scala
index 1a2792370a..54a6ffcc93 100644
--- a/test/files/continuations-run/function6.scala
+++ b/test/files/continuations-run/function6.scala
@@ -4,13 +4,13 @@ import scala.util.continuations._
object Test {
-
+
def main(args: Array[String]): Any = {
-
+
val g: PartialFunction[Int, Int @cps[Int]] = { case x => 7 }
-
+
println(reset(g(2)))
-
+
}
-
+
} \ No newline at end of file
diff --git a/test/files/continuations-run/ifelse0.scala b/test/files/continuations-run/ifelse0.scala
index e34b86ee84..2facab4b98 100644
--- a/test/files/continuations-run/ifelse0.scala
+++ b/test/files/continuations-run/ifelse0.scala
@@ -4,15 +4,15 @@ import scala.util.continuations._
object Test {
-
+
def test(x:Int) = if (x <= 7)
shift { k: (Int=>Int) => k(k(k(x))) }
else
shift { k: (Int=>Int) => k(x) }
-
+
def main(args: Array[String]): Any = {
println(reset(1 + test(7)))
println(reset(1 + test(8)))
}
-
+
} \ No newline at end of file
diff --git a/test/files/continuations-run/ifelse1.scala b/test/files/continuations-run/ifelse1.scala
index 2ccc1ed730..c624b84b75 100644
--- a/test/files/continuations-run/ifelse1.scala
+++ b/test/files/continuations-run/ifelse1.scala
@@ -4,12 +4,12 @@ import scala.util.continuations._
object Test {
-
+
def test1(x:Int) = if (x <= 7)
shift { k: (Int=>Int) => k(k(k(x))) }
else
x
-
+
def test2(x:Int) = if (x <= 7)
x
else
@@ -21,5 +21,5 @@ object Test {
println(reset(1 + test2(7)))
println(reset(1 + test2(8)))
}
-
+
} \ No newline at end of file
diff --git a/test/files/continuations-run/ifelse2.scala b/test/files/continuations-run/ifelse2.scala
index 536e350190..506acc4d00 100644
--- a/test/files/continuations-run/ifelse2.scala
+++ b/test/files/continuations-run/ifelse2.scala
@@ -4,13 +4,13 @@ import scala.util.continuations._
object Test {
-
+
def test(x:Int) = if (x <= 7)
shift { k: (Unit=>Unit) => println("abort") }
-
+
def main(args: Array[String]): Any = {
println(reset{ test(7); println("alive") })
println(reset{ test(8); println("alive") })
}
-
+
} \ No newline at end of file
diff --git a/test/files/continuations-run/ifelse3.scala b/test/files/continuations-run/ifelse3.scala
index 5dbd079d1c..54566a421c 100644
--- a/test/files/continuations-run/ifelse3.scala
+++ b/test/files/continuations-run/ifelse3.scala
@@ -4,18 +4,18 @@ import scala.util.continuations._
object Test {
-
+
def util(x: Boolean) = shift { k: (Boolean=>Int) => k(x) }
-
+
def test(x:Int) = if (util(x <= 7))
x - 1
else
x + 1
-
-
+
+
def main(args: Array[String]): Any = {
println(reset(test(7)))
println(reset(test(8)))
}
-
+
} \ No newline at end of file
diff --git a/test/files/continuations-run/infer1.scala b/test/files/continuations-run/infer1.scala
index a6c6c07215..10822508e7 100644
--- a/test/files/continuations-run/infer1.scala
+++ b/test/files/continuations-run/infer1.scala
@@ -4,9 +4,9 @@ import scala.util.continuations._
object Test {
-
+
def test(x: => Int @cpsParam[String,Int]) = 7
-
+
def test2() = {
val x = shift { k: (Int => String) => 9 }
x
@@ -14,9 +14,9 @@ object Test {
def test3(x: => Int @cpsParam[Int,Int]) = 7
-
+
def util() = shift { k: (String => String) => "7" }
-
+
def main(args: Array[String]): Any = {
test { shift { k: (Int => String) => 9 } }
test { shift { k: (Int => String) => 9 }; 2 }
@@ -29,5 +29,5 @@ object Test {
test3 { { test3(0); 2 } }
}
-
+
} \ No newline at end of file
diff --git a/test/files/continuations-run/match0.scala b/test/files/continuations-run/match0.scala
index bd36238d7f..b65d343c07 100644
--- a/test/files/continuations-run/match0.scala
+++ b/test/files/continuations-run/match0.scala
@@ -4,15 +4,15 @@ import scala.util.continuations._
object Test {
-
+
def test(x:Int) = x match {
case 7 => shift { k: (Int=>Int) => k(k(k(x))) }
case 8 => shift { k: (Int=>Int) => k(x) }
}
-
+
def main(args: Array[String]): Any = {
println(reset(1 + test(7)))
println(reset(1 + test(8)))
}
-
+
} \ No newline at end of file
diff --git a/test/files/continuations-run/match1.scala b/test/files/continuations-run/match1.scala
index ea4e219666..20671f26ba 100644
--- a/test/files/continuations-run/match1.scala
+++ b/test/files/continuations-run/match1.scala
@@ -4,15 +4,15 @@ import scala.util.continuations._
object Test {
-
+
def test(x:Int) = x match {
case 7 => shift { k: (Int=>Int) => k(k(k(x))) }
case _ => x
}
-
+
def main(args: Array[String]): Any = {
println(reset(1 + test(7)))
println(reset(1 + test(8)))
}
-
+
} \ No newline at end of file
diff --git a/test/files/continuations-run/match2.scala b/test/files/continuations-run/match2.scala
index 8d4f04870f..8b0fb946df 100644
--- a/test/files/continuations-run/match2.scala
+++ b/test/files/continuations-run/match2.scala
@@ -4,23 +4,23 @@ import scala.util.continuations._
object Test {
-
+
def test1() = {
val (a, b) = shift { k: (((String,String)) => String) => k("A","B") }
b
}
case class Elem[T,U](a: T, b: U)
-
+
def test2() = {
val Elem(a,b) = shift { k: (Elem[String,String] => String) => k(Elem("A","B")) }
b
}
-
+
def main(args: Array[String]): Any = {
println(reset(test1()))
println(reset(test2()))
}
-
+
} \ No newline at end of file
diff --git a/test/files/continuations-run/t3199.scala b/test/files/continuations-run/t3199.scala
index 3fd2f1959a..7b54793e05 100644
--- a/test/files/continuations-run/t3199.scala
+++ b/test/files/continuations-run/t3199.scala
@@ -1,20 +1,20 @@
-import _root_.scala.collection.Seq
-import _root_.scala.util.control.Exception
-import _root_.scala.util.continuations._
-
-object Test {
-
- trait AbstractResource[+R <: AnyRef] {
- def reflect[B] : R @cpsParam[B,Either[Throwable, B]] = shift(acquireFor)
- def acquireFor[B](f : R => B) : Either[Throwable, B] = {
- import Exception._
- catching(List(classOf[Throwable]) : _*) either (f(null.asInstanceOf[R]))
- }
- }
-
- def main(args: Array[String]) : Unit = {
- val x = new AbstractResource[String] { }
- val result = x.acquireFor( x => 7 )
- println(result)
- }
- }
+import _root_.scala.collection.Seq
+import _root_.scala.util.control.Exception
+import _root_.scala.util.continuations._
+
+object Test {
+
+ trait AbstractResource[+R <: AnyRef] {
+ def reflect[B] : R @cpsParam[B,Either[Throwable, B]] = shift(acquireFor)
+ def acquireFor[B](f : R => B) : Either[Throwable, B] = {
+ import Exception._
+ catching(List(classOf[Throwable]) : _*) either (f(null.asInstanceOf[R]))
+ }
+ }
+
+ def main(args: Array[String]) : Unit = {
+ val x = new AbstractResource[String] { }
+ val result = x.acquireFor( x => 7 )
+ println(result)
+ }
+ }
diff --git a/test/files/continuations-run/t3199b.scala b/test/files/continuations-run/t3199b.scala
index 950c584153..2122c963ac 100644
--- a/test/files/continuations-run/t3199b.scala
+++ b/test/files/continuations-run/t3199b.scala
@@ -1,11 +1,11 @@
object Test {
-
+
def test() = {
java.util.Arrays.asList(Array(1,2,3):_*)
}
-
+
def main(args: Array[String]) = {
println(test())
}
-
+
} \ No newline at end of file
diff --git a/test/files/continuations-run/t3223.scala b/test/files/continuations-run/t3223.scala
index 4e510178e6..efed1ff581 100644
--- a/test/files/continuations-run/t3223.scala
+++ b/test/files/continuations-run/t3223.scala
@@ -2,16 +2,16 @@ import scala.util.continuations._
object Test {
def foo(x:Int) = {
- try {
+ try {
throw new Exception
shiftUnit0[Int,Int](7)
} catch {
- case ex =>
+ case ex =>
val g = (a:Int)=>a
9
}
}
-
+
def main(args: Array[String]) {
println(reset(foo(0)))
}
diff --git a/test/files/continuations-run/t3225.scala b/test/files/continuations-run/t3225.scala
index ecfde279cf..5b6259c43f 100644
--- a/test/files/continuations-run/t3225.scala
+++ b/test/files/continuations-run/t3225.scala
@@ -31,10 +31,10 @@ object Test {
}
def blaX[A] = shift { k:(Bla=>A) => k(new Bla) }
-
+
def fooX[A] = blaX[A].x
def fooY[A] = blaX[A].y[A]
-
+
def testPoly() = {
println(reset(blaX[Bla]).x)
println(reset(blaX[Int].x))
@@ -52,5 +52,5 @@ object Test {
testMono()
testPoly()
}
-
+
}
diff --git a/test/files/continuations-run/trycatch0.scala b/test/files/continuations-run/trycatch0.scala
index 74a078b5ef..ec39863f3f 100644
--- a/test/files/continuations-run/trycatch0.scala
+++ b/test/files/continuations-run/trycatch0.scala
@@ -3,7 +3,7 @@
import scala.util.continuations._
object Test {
-
+
def foo = try {
shift((k: Int=>Int) => k(7))
} catch {
@@ -17,7 +17,7 @@ object Test {
case ex =>
shiftUnit0[Int,Int](9)
}
-
+
def main(args: Array[String]): Unit = {
println(reset { foo + 3 })
println(reset { bar + 3 })
diff --git a/test/files/continuations-run/trycatch1.scala b/test/files/continuations-run/trycatch1.scala
index ade13794e3..10dfd30bb2 100644
--- a/test/files/continuations-run/trycatch1.scala
+++ b/test/files/continuations-run/trycatch1.scala
@@ -5,7 +5,7 @@ import scala.util.continuations._
object Test {
def fatal: Int = throw new Exception()
-
+
def foo1 = try {
fatal
shift((k: Int=>Int) => k(7))
diff --git a/test/files/continuations-run/while0.scala b/test/files/continuations-run/while0.scala
index 9735f9d2c3..46005a4a77 100644
--- a/test/files/continuations-run/while0.scala
+++ b/test/files/continuations-run/while0.scala
@@ -4,9 +4,9 @@ import scala.util.continuations._
object Test {
-
+
def foo(): Int @cps[Unit] = 2
-
+
def test(): Unit @cps[Unit] = {
var x = 0
while (x < 9000) { // pick number large enough to require tail-call opt
@@ -18,5 +18,5 @@ object Test {
def main(args: Array[String]): Any = {
reset(test())
}
-
+
} \ No newline at end of file
diff --git a/test/files/continuations-run/while1.scala b/test/files/continuations-run/while1.scala
index fb5dc0079a..fd41ab36ee 100644
--- a/test/files/continuations-run/while1.scala
+++ b/test/files/continuations-run/while1.scala
@@ -4,9 +4,9 @@ import scala.util.continuations._
object Test {
-
+
def foo(): Int @cps[Unit] = shift { k => println("up"); k(2); println("down") }
-
+
def test(): Unit @cps[Unit] = {
var x = 0
while (x < 9) {
@@ -18,5 +18,5 @@ object Test {
def main(args: Array[String]): Any = {
reset(test())
}
-
+
} \ No newline at end of file
diff --git a/test/files/continuations-run/while2.scala b/test/files/continuations-run/while2.scala
index f36288929e..63f9cb99fe 100644
--- a/test/files/continuations-run/while2.scala
+++ b/test/files/continuations-run/while2.scala
@@ -4,10 +4,10 @@ import scala.util.continuations._
object Test {
-
+
def foo1(): Int @cps[Unit] = 2
def foo2(): Int @cps[Unit] = shift { k => println("up"); k(2); println("down") }
-
+
def test(): Unit @cps[Unit] = {
var x = 0
while (x < 9000) { // pick number large enough to require tail-call opt
@@ -19,5 +19,5 @@ object Test {
def main(args: Array[String]): Any = {
reset(test())
}
-
+
} \ No newline at end of file
diff --git a/test/files/detach-run/actor/actor.scala b/test/files/detach-run/actor/actor.scala
index 18a6dc38fd..23a10d6982 100644
--- a/test/files/detach-run/actor/actor.scala
+++ b/test/files/detach-run/actor/actor.scala
@@ -115,7 +115,7 @@ object Env {
}
in.close()
} catch {
- case e: FileNotFoundException => println(e)
+ case e: FileNotFoundException => println(e)
})
out.close()
}
diff --git a/test/files/jvm/actor-sync-send-timeout.scala b/test/files/jvm/actor-sync-send-timeout.scala
index ed330900b2..21e624bd0a 100644
--- a/test/files/jvm/actor-sync-send-timeout.scala
+++ b/test/files/jvm/actor-sync-send-timeout.scala
@@ -2,9 +2,9 @@ import scala.actors.Actor
/* This test is a regression test for SI-4759.
*/
-object Test {
+object Test {
val Runs = 5
-
+
def main(args: Array[String]) = {
var i = 0
while (i < Runs) {
diff --git a/test/files/jvm/actor-uncaught-exception.scala b/test/files/jvm/actor-uncaught-exception.scala
index 882362272d..5ae66de640 100644
--- a/test/files/jvm/actor-uncaught-exception.scala
+++ b/test/files/jvm/actor-uncaught-exception.scala
@@ -4,60 +4,60 @@ class MyException(msg: String) extends Exception(msg) {
override def fillInStackTrace() = this
}
-object Test {
+object Test {
- case object StartError extends Actor {
- def act() {
+ case object StartError extends Actor {
+ def act() {
try {
- throw new MyException("I don't want to run!")
+ throw new MyException("I don't want to run!")
} catch {
case e: Throwable if (!e.isInstanceOf[scala.util.control.ControlThrowable] &&
!e.isInstanceOf[MyException]) =>
e.printStackTrace()
}
- }
- }
+ }
+ }
- case object MessageError extends Actor {
- def act() {
+ case object MessageError extends Actor {
+ def act() {
try {
- react {
- case _ => throw new MyException("No message for me!")
- }
+ react {
+ case _ => throw new MyException("No message for me!")
+ }
} catch {
case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] =>
e.printStackTrace()
}
- }
- }
+ }
+ }
- case object Supervisor extends Actor {
- def act() {
+ case object Supervisor extends Actor {
+ def act() {
try {
- trapExit = true
+ trapExit = true
link(StartError)
link(MessageError)
- StartError.start()
+ StartError.start()
MessageError.start()
- Actor.loop {
- react {
+ Actor.loop {
+ react {
case Exit(actor, reason) =>
println("OK")
if (actor == StartError)
MessageError ! 'ping
else
exit()
- }
- }
+ }
+ }
} catch {
case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] =>
e.printStackTrace()
}
- }
- }
+ }
+ }
- def main(args: Array[String]) {
- Supervisor.start()
- }
-}
+ def main(args: Array[String]) {
+ Supervisor.start()
+ }
+}
diff --git a/test/files/jvm/actor-uncaught-exception2.scala b/test/files/jvm/actor-uncaught-exception2.scala
index 36b6f0c52e..0364cbeb03 100644
--- a/test/files/jvm/actor-uncaught-exception2.scala
+++ b/test/files/jvm/actor-uncaught-exception2.scala
@@ -4,60 +4,60 @@ class MyException(msg: String) extends Exception(msg) {
override def fillInStackTrace() = this
}
-object Test {
+object Test {
- case object StartError extends Actor {
- def act() {
+ case object StartError extends Actor {
+ def act() {
try {
- throw new MyException("I don't want to run!")
+ throw new MyException("I don't want to run!")
} catch {
case e: Throwable if (!e.isInstanceOf[scala.util.control.ControlThrowable] &&
!e.isInstanceOf[MyException]) =>
e.printStackTrace()
}
- }
- }
+ }
+ }
- case object MessageError extends Actor {
- def act() {
+ case object MessageError extends Actor {
+ def act() {
try {
- react {
- case _ => throw new MyException("No message for me!")
- }
+ react {
+ case _ => throw new MyException("No message for me!")
+ }
} catch {
case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] =>
e.printStackTrace()
}
- }
- }
+ }
+ }
- case object Supervisor extends Actor {
- def act() {
+ case object Supervisor extends Actor {
+ def act() {
try {
- trapExit = true
+ trapExit = true
link(StartError)
link(MessageError)
- StartError.start()
+ StartError.start()
MessageError.start()
- Actor.loop {
- react {
+ Actor.loop {
+ react {
case Exit(actor, reason) =>
println(reason)
if (actor == StartError)
MessageError ! 'ping
else
exit()
- }
- }
+ }
+ }
} catch {
case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] =>
e.printStackTrace()
}
- }
- }
+ }
+ }
- def main(args: Array[String]) {
- Supervisor.start()
- }
-}
+ def main(args: Array[String]) {
+ Supervisor.start()
+ }
+}
diff --git a/test/files/jvm/backendBugUnapply.scala b/test/files/jvm/backendBugUnapply.scala
index b4d029f478..45ee6f7d4f 100644
--- a/test/files/jvm/backendBugUnapply.scala
+++ b/test/files/jvm/backendBugUnapply.scala
@@ -1,16 +1,16 @@
-object Test {
+object Test {
import scala.xml.{Node,UnprefixedAttribute}
-
+
def domatch(x:Node) =
x match {
case Node("foo", UnprefixedAttribute("bar", z, _), _*) => z
case _ => null
}
-
+
def main(args: Array[String]): Unit = {
println(domatch(<foo bar="baz"><hi/></foo>))
println(domatch(<foo bingo="donkey"><hi/></foo>))
- //
+ //
// assert(domatch(<foo bar="baz"><hi/></foo>).toString == "baz")
// assert(domatch(<foo bar="baz2"><hi/></foo>) == null)//, domatch(<foo bar="baz2"><hi/></foo>))
}
diff --git a/test/files/jvm/console.scala b/test/files/jvm/console.scala
index 0ac43f2d26..75449416aa 100644
--- a/test/files/jvm/console.scala
+++ b/test/files/jvm/console.scala
@@ -9,6 +9,6 @@ object Test extends App {
flush
println("..")
println(1)
- printf("Argument nr. %d has value %1.2f\n",
+ printf("Argument nr. %d has value %1.2f\n",
1, 10.0/3)
}
diff --git a/test/files/jvm/deprecation/Test_1.scala b/test/files/jvm/deprecation/Test_1.scala
index 0a5b607037..b68a40c94b 100644
--- a/test/files/jvm/deprecation/Test_1.scala
+++ b/test/files/jvm/deprecation/Test_1.scala
@@ -7,7 +7,7 @@ class Test {
val i = new d.Inner
val w = i.buz()
}
-
+
@deprecated("no longer!", "") class Inner {
@deprecated("uncool", "") def f: Int = 1
@deprecated("this one as well!", "") var g = -1
diff --git a/test/files/jvm/future-termination.scala b/test/files/jvm/future-termination.scala
index 688de60c3b..f51642cb7a 100644
--- a/test/files/jvm/future-termination.scala
+++ b/test/files/jvm/future-termination.scala
@@ -1,19 +1,19 @@
-import scala.actors.Futures
-
-/* Test that unevaluated futures do not prevent program termination */
-
-object Test {
- def main(args: Array[String]) {
+import scala.actors.Futures
+
+/* Test that unevaluated futures do not prevent program termination */
+
+object Test {
+ def main(args: Array[String]) {
try {
- val meaningOfLife = Futures.future {
- Thread.sleep(5000) // pretend this is a harder problem than it is
- println("I have the answer!")
- 42
- }
- println("I can't wait that long, bye.")
+ val meaningOfLife = Futures.future {
+ Thread.sleep(5000) // pretend this is a harder problem than it is
+ println("I have the answer!")
+ 42
+ }
+ println("I can't wait that long, bye.")
} catch {
case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] =>
e.printStackTrace()
}
- }
+ }
}
diff --git a/test/files/jvm/inner.scala b/test/files/jvm/inner.scala
index d0d2226de6..156d9e69a8 100644
--- a/test/files/jvm/inner.scala
+++ b/test/files/jvm/inner.scala
@@ -14,7 +14,7 @@ class A {
trait Itf {
def method1(x: Int): Int
-
+
trait Itf2 extends Itf {
def method2: Unit
}
diff --git a/test/files/jvm/interpreter.check b/test/files/jvm/interpreter.check
index ede74fb26f..607e2bcaff 100644
--- a/test/files/jvm/interpreter.check
+++ b/test/files/jvm/interpreter.check
@@ -73,7 +73,7 @@ fish: S = fish
scala> // Test that arrays pretty print nicely.
-scala> val arr = Array("What's", "up", "doc?")
+scala> val arr = Array("What's", "up", "doc?")
arr: Array[String] = Array(What's, up, doc?)
scala> // Test that arrays pretty print nicely, even when we give them type Any
@@ -338,10 +338,10 @@ You typed two blank lines. Starting a new command.
scala> // defining and using quoted names should work (ticket #323)
-scala> def `match` = 1
+scala> def `match` = 1
match: Int
-scala> val x = `match`
+scala> val x = `match`
x: Int = 1
scala>
diff --git a/test/files/jvm/interpreter.scala b/test/files/jvm/interpreter.scala
index 752a129950..f0bc8b5818 100644
--- a/test/files/jvm/interpreter.scala
+++ b/test/files/jvm/interpreter.scala
@@ -29,7 +29,7 @@ val atom = new scala.xml.Atom()
class S(override val toString : String)
val fish = new S("fish")
// Test that arrays pretty print nicely.
-val arr = Array("What's", "up", "doc?")
+val arr = Array("What's", "up", "doc?")
// Test that arrays pretty print nicely, even when we give them type Any
val arrInt : Any = Array(1,2,3)
// Test that nested arrays are pretty-printed correctly
@@ -132,8 +132,8 @@ there
// defining and using quoted names should work (ticket #323)
-def `match` = 1
-val x = `match`
+def `match` = 1
+val x = `match`
// multiple classes defined on one line
sealed class Exp; class Fact extends Exp; class Term extends Exp
@@ -153,6 +153,6 @@ def f(e: Exp) = e match {{ // non-exhaustive warning here
interp.interpret("\"after reset\"")
interp.interpret("plusOne(5) // should be undefined now")
}
-
+
appendix()
}
diff --git a/test/files/jvm/methvsfield.java b/test/files/jvm/methvsfield.java
index dadc98669a..c1b2b87b48 100644
--- a/test/files/jvm/methvsfield.java
+++ b/test/files/jvm/methvsfield.java
@@ -1,11 +1,11 @@
// This should be compiled with javac and saved
// in ../lib/methvsfield.jar .
-class MethVsField
+class MethVsField
{
int three = 3;
- int three()
- {
+ int three()
+ {
return 3;
}
}
diff --git a/test/files/jvm/natives.scala b/test/files/jvm/natives.scala
index 14ee4e1c1b..ba868dc85e 100644
--- a/test/files/jvm/natives.scala
+++ b/test/files/jvm/natives.scala
@@ -1,16 +1,16 @@
object Test {
//println("java.library.path=" + System.getProperty("java.library.path"))
-
+
val sysWordSize = System.getProperty("sun.arch.data.model", "32")
val sysType = System.getProperty("os.name")
-
+
val libName =
if (sysType == "Mac OS X")
"natives"
else
"natives-" + sysWordSize
-
+
System.loadLibrary(libName)
@native
diff --git a/test/files/jvm/protectedacc.scala b/test/files/jvm/protectedacc.scala
index 89e70b90d8..f213e0da19 100644
--- a/test/files/jvm/protectedacc.scala
+++ b/test/files/jvm/protectedacc.scala
@@ -16,7 +16,7 @@ object Test {
val ji = new p.b.JavaInteraction(Array('a', 'b', 'c'));
(new ji.Inner).m;
-
+
(new p.b.OuterObj.Inner).m
}
}
@@ -36,13 +36,13 @@ package p {
def getA: this.type = this;
}
-
+
/** Test type members */
trait HighlighterXXX {
type Node;
protected def highlight(node : Node) : Unit;
}
-
+
/** Test type parameters */
abstract class PolyA[a] {
protected def m(x: a): Unit;
@@ -119,22 +119,22 @@ package p {
val inc = meth2(1)_;
Console.println("100 = " + inc("10"));
-
+
getA.x;
}
}
}
-
+
trait ScalaAutoEditXXX extends HighlighterXXX {
- trait NodeImpl {
+ trait NodeImpl {
def self : Node;
highlight(self);
}
}
-
+
abstract class X[T] extends PolyA[T] {
- trait Inner extends B {
+ trait Inner extends B {
def self: T;
def self2: Node;
def getB: Inner;
diff --git a/test/files/jvm/serialization.scala b/test/files/jvm/serialization.scala
index af842f3e78..9391b60e46 100644
--- a/test/files/jvm/serialization.scala
+++ b/test/files/jvm/serialization.scala
@@ -295,7 +295,7 @@ object Test3_mutable {
ab1 ++= List("one", "two")
val _ab1: ArrayBuffer[String] = read(write(ab1))
check(ab1, _ab1)
-
+
// ArrayBuilder
val abu1 = ArrayBuilder.make[Long]
val _abu1: ArrayBuilder[ClassManifest[Long]] = read(write(abu1))
@@ -304,12 +304,12 @@ object Test3_mutable {
val abu2 = ArrayBuilder.make[Float]
val _abu2: ArrayBuilder[ClassManifest[Float]] = read(write(abu2))
check(abu2, _abu2)
-
+
// ArraySeq
val aq1 = ArraySeq(1, 2, 3)
val _aq1: ArraySeq[Int] = read(write(aq1))
check(aq1, _aq1)
-
+
// ArrayStack
val as1 = new ArrayStack[Int]
as1 ++= List(20, 2, 3).iterator
@@ -537,7 +537,7 @@ class WithTransient extends Serializable {
@transient private lazy val a2 = 2
@transient object B extends Serializable
@transient private object C extends Serializable
-
+
def test = {
println(a1)
println(a2)
@@ -583,50 +583,50 @@ object Test {
// Test classes in package "scala.collection.parallel" and subpackages
object Test9_parallel {
import scala.collection.parallel._
-
+
try {
println()
-
+
// UnrolledBuffer
val ub = new collection.mutable.UnrolledBuffer[String]
ub ++= List("one", "two")
val _ub: collection.mutable.UnrolledBuffer[String] = read(write(ub))
check(ub, _ub)
-
+
// mutable.ParArray
val pa = mutable.ParArray("abc", "def", "etc")
val _pa: mutable.ParArray[String] = read(write(pa))
check(pa, _pa)
-
+
// mutable.ParHashMap
val mpm = mutable.ParHashMap(1 -> 2, 2 -> 4)
val _mpm: mutable.ParHashMap[Int, Int] = read(write(mpm))
check(mpm, _mpm)
-
+
// mutable.ParHashSet
val mps = mutable.ParHashSet(1, 2, 3)
val _mps: mutable.ParHashSet[Int] = read(write(mps))
check(mps, _mps)
-
+
// immutable.ParRange
val pr1 = immutable.ParRange(0, 4, 1, true)
val _pr1: immutable.ParRange = read(write(pr1))
check(pr1, _pr1)
-
+
val pr2 = immutable.ParRange(0, 4, 1, false)
val _pr2: immutable.ParRange = read(write(pr2))
check(pr2, _pr2)
-
+
// immutable.ParHashMap
val ipm = immutable.ParHashMap(5 -> 1, 10 -> 2)
val _ipm: immutable.ParHashMap[Int, Int] = read(write(ipm))
check(ipm, _ipm)
-
+
// immutable.ParHashSet
val ips = immutable.ParHashSet("one", "two")
val _ips: immutable.ParHashSet[String] = read(write(ips))
check(ips, _ips)
-
+
} catch {
case e: Exception =>
println("Error in Test5_parallel: " + e)
diff --git a/test/files/jvm/t1461.scala b/test/files/jvm/t1461.scala
index f0e3cea6cd..a963ec6a12 100644
--- a/test/files/jvm/t1461.scala
+++ b/test/files/jvm/t1461.scala
@@ -3,7 +3,7 @@ object Test {
def main(args: Array[String]) {
val jl = classOf[Foo].getMethod("jl", classOf[Baz[_]])
jl.getGenericParameterTypes // works fine
-
+
val l = classOf[Foo].getMethod("l", classOf[Baz[_]])
// By debugger inspection l.signature is (Ltest/Baz<J>;)V
l.getGenericParameterTypes // throws GenericSignatureFormatError
diff --git a/test/files/jvm/t1464/MyTrait.scala b/test/files/jvm/t1464/MyTrait.scala
index 0b8ccc412b..014ddf86c3 100644
--- a/test/files/jvm/t1464/MyTrait.scala
+++ b/test/files/jvm/t1464/MyTrait.scala
@@ -1,5 +1,5 @@
trait MyTrait {
type K
def findChildByClass[T <: K with MyTrait]: Unit
-
+
}
diff --git a/test/files/jvm/t1600.scala b/test/files/jvm/t1600.scala
index 79391b7e76..7e23687425 100644
--- a/test/files/jvm/t1600.scala
+++ b/test/files/jvm/t1600.scala
@@ -4,23 +4,23 @@
* changes on deserialization.
*/
object Test {
-
+
import collection._
def main(args: Array[String]) {
for (i <- Seq(0, 1, 2, 10, 100)) {
def entries = (0 until i).map(i => (new Foo, i)).toList
def elements = entries.map(_._1)
-
+
val maps = Seq[Map[Foo, Int]](new mutable.HashMap, new mutable.LinkedHashMap,
immutable.HashMap.empty).map(_ ++ entries)
test[Map[Foo, Int]](maps, entries.size, assertMap _)
-
+
val sets = Seq[Set[Foo]](new mutable.HashSet, new mutable.LinkedHashSet,
immutable.HashSet.empty).map(_ ++ elements)
test[Set[Foo]](sets, entries.size, assertSet _)
}
}
-
+
private def test[A <: AnyRef](collections: Seq[A], expectedSize: Int, assertFunction: (A, Int) => Unit) {
for (collection <- collections) {
assertFunction(collection, expectedSize)
@@ -28,19 +28,19 @@ object Test {
val bytes = toBytes(collection)
Foo.hashCodeModifier = 1
val deserializedCollection = toObject[A](bytes)
-
+
assertFunction(deserializedCollection, expectedSize)
assert(deserializedCollection.getClass == collection.getClass,
"collection class should remain the same after deserialization ("+deserializedCollection.getClass+" != "+collection.getClass+")")
Foo.hashCodeModifier = 0
}
}
-
+
private def toObject[A](bytes: Array[Byte]): A = {
val in = new java.io.ObjectInputStream(new java.io.ByteArrayInputStream(bytes))
in.readObject.asInstanceOf[A]
}
-
+
private def toBytes(o: AnyRef): Array[Byte] = {
val bos = new java.io.ByteArrayOutputStream
val out = new java.io.ObjectOutputStream(bos)
@@ -48,7 +48,7 @@ object Test {
out.close
bos.toByteArray
}
-
+
private def assertMap[A, B](map: Map[A, B], expectedSize: Int) {
assert(expectedSize == map.size, "expected map size: " + expectedSize + ", actual size: " + map.size)
map.foreach { case (k, v) =>
@@ -56,19 +56,19 @@ object Test {
assert(map(k) == v)
}
}
-
+
private def assertSet[A](set: Set[A], expectedSize: Int) {
assert(expectedSize == set.size, "expected set size: " + expectedSize + ", actual size: " + set.size)
set.foreach { e => assert(set.contains(e), "contains should return true for element in the set, element: " + e) }
}
-
+
object Foo {
- /* Used to simulate a hashCode change caused by deserializing an instance with an
+ /* Used to simulate a hashCode change caused by deserializing an instance with an
* identity-based hashCode in another JVM.
*/
var hashCodeModifier = 0
}
-
+
@serializable
class Foo {
override def hashCode = System.identityHashCode(this) + Foo.hashCodeModifier
diff --git a/test/files/jvm/t2570/Test.scala b/test/files/jvm/t2570/Test.scala
index d7b7632e22..7944aedae6 100644
--- a/test/files/jvm/t2570/Test.scala
+++ b/test/files/jvm/t2570/Test.scala
@@ -1,3 +1,3 @@
class Test2 extends Test1[Test3[Test4]]
class Test4
-object Test extends Application {} \ No newline at end of file
+object Test extends Application {} \ No newline at end of file
diff --git a/test/files/jvm/t3003/Test_1.scala b/test/files/jvm/t3003/Test_1.scala
index 8ec08bebc6..38af66a25a 100644
--- a/test/files/jvm/t3003/Test_1.scala
+++ b/test/files/jvm/t3003/Test_1.scala
@@ -9,7 +9,7 @@ object Test {
. map(f => f.getAnnotations.toList)
. filterNot (_.isEmpty) // there are extra fields under -Xcheckinit
)
-
+
println(xs)
}
}
diff --git a/test/files/jvm/t560bis.scala b/test/files/jvm/t560bis.scala
index 13bf4b1ae0..b04303c8a0 100644
--- a/test/files/jvm/t560bis.scala
+++ b/test/files/jvm/t560bis.scala
@@ -5,14 +5,14 @@ import scala.xml._;
case Seq(a,b,c,d @ _*) => Console.println("cool!")
case _ => Console.println("bah")
}
- def foo(args: List[String]) =
+ def foo(args: List[String]) =
Elem(null,"bla",Null, TopScope, (args map {x => Text(x)}):_*) match {
case Elem(_,_,_,_,Text("1"),_*) =>
Console.println("cool!")
case _ =>
Console.println("bah")
}
-
+
def main(args: Array[String]) = {
val li = List("1","2","3","4")
bar(li)
diff --git a/test/files/jvm/throws-annot.scala b/test/files/jvm/throws-annot.scala
index 90b58b9976..b679b6c121 100644
--- a/test/files/jvm/throws-annot.scala
+++ b/test/files/jvm/throws-annot.scala
@@ -43,24 +43,24 @@ object TestThrows {
/** Test the top-level mirror that is has the annotations. */
object TL {
-
+
@throws(classOf[IOException])
def read(): Int = 0
-
+
@throws(classOf[ClassCastException])
@throws(classOf[IOException])
def readWith2(): Int = 0
-
+
@throws(classOf[IOException])
@Deprecated
@throws(classOf[NullPointerException])
def readMixed(): Int = 0
-
+
@Deprecated
@throws(classOf[IOException])
@throws(classOf[NullPointerException])
def readMixed2(): Int = 0
-
+
@Deprecated
def readNoEx(): Int = 0
}
diff --git a/test/files/jvm/typerep.scala b/test/files/jvm/typerep.scala
index e56b63bafc..49a216c05c 100644
--- a/test/files/jvm/typerep.scala
+++ b/test/files/jvm/typerep.scala
@@ -109,7 +109,7 @@ object testFuncs {
def f5(f: Int => Int, x: Int) = f(x)
println(getType(f5 _))
println(getType(f5(f1, 1)))
- println
+ println
}
class Foo {
diff --git a/test/files/jvm/unittest_io_Jvm.check b/test/files/jvm/unittest_io_Jvm.check
index bcfce8cbdb..d6e855f939 100644
--- a/test/files/jvm/unittest_io_Jvm.check
+++ b/test/files/jvm/unittest_io_Jvm.check
@@ -1,5 +1,5 @@
lines.size = 5
-
+
This is a file
it is split on several lines.
diff --git a/test/files/jvm/unittest_io_Jvm.scala b/test/files/jvm/unittest_io_Jvm.scala
index 7c8ef131bc..1484774fb3 100644
--- a/test/files/jvm/unittest_io_Jvm.scala
+++ b/test/files/jvm/unittest_io_Jvm.scala
@@ -3,7 +3,7 @@ import scala.io.Source
object Test {
def main(args: Array[String]) {
val lines = Source.fromString(
- """|
+ """|
|This is a file
|it is split on several lines.
|
diff --git a/test/files/jvm/unittest_xml.scala b/test/files/jvm/unittest_xml.scala
index 7163ce2d88..c03695f5c6 100644
--- a/test/files/jvm/unittest_xml.scala
+++ b/test/files/jvm/unittest_xml.scala
@@ -24,8 +24,8 @@ object Test {
var x: MetaData = Null
var s: NamespaceBinding = TopScope
- // testing method def apply(uri:String, scp:NamespaceBinding, k:String): Seq[Node]
- // def apply(k:String): Seq[Node]
+ // testing method def apply(uri:String, scp:NamespaceBinding, k:String): Seq[Node]
+ // def apply(k:String): Seq[Node]
assert(null == x("za://foo.com", s, "bar" ), "absent element (prefixed) 1")
assert(null == x("bar"), "absent element (unprefix) 1")
@@ -53,8 +53,8 @@ object Test {
val z = <foo bar="gar"/>
val z2 = <foo/>
- assert(Text("gar") == domatch(z), "attribute extractor 1")
- assert(new Atom(3) == domatch(z2), "attribute extractor 2")
+ assert(Text("gar") == domatch(z), "attribute extractor 1")
+ assert(new Atom(3) == domatch(z2), "attribute extractor 2")
}
}
diff --git a/test/files/jvm/varargs/JavaClass.java b/test/files/jvm/varargs/JavaClass.java
index 9851e1b78b..536e9a38fb 100644
--- a/test/files/jvm/varargs/JavaClass.java
+++ b/test/files/jvm/varargs/JavaClass.java
@@ -4,7 +4,7 @@
public class JavaClass {
public static <T> void varargz(int i, T... v) {
}
-
+
public static void callSomeAnnotations() {
VaClass va = new VaClass();
va.vs(4, "", "", "");
diff --git a/test/files/jvm/varargs/VaClass.scala b/test/files/jvm/varargs/VaClass.scala
index 6343f9c6f6..8e9cbdbb3f 100644
--- a/test/files/jvm/varargs/VaClass.scala
+++ b/test/files/jvm/varargs/VaClass.scala
@@ -5,9 +5,9 @@ import annotation.varargs
class VaClass {
-
+
@varargs def vs(a: Int, b: String*) = println(a + b.length)
@varargs def vi(a: Int, b: Int*) = println(a + b.sum)
@varargs def vt[T](a: Int, b: T*) = println(a + b.length)
-
+
}
diff --git a/test/files/jvm/xml01.scala b/test/files/jvm/xml01.scala
index ef320e218b..2fab650637 100644
--- a/test/files/jvm/xml01.scala
+++ b/test/files/jvm/xml01.scala
@@ -16,7 +16,7 @@ object Test extends App {
val c = new Node {
def label = "hello"
- override def hashCode() =
+ override def hashCode() =
Utility.hashCode(prefix, label, attributes.hashCode(), scope.hashCode(), child);
def child = Elem(null, "world", e, sc);
//def attributes = e;
@@ -35,8 +35,8 @@ object Test extends App {
val x2p = XML.load(i)
assert(x2p == Elem(null, "book" , e, sc,
- Elem(null, "author", e, sc,Text("Peter Buneman")),
- Elem(null, "author", e, sc,Text("Dan Suciu")),
+ 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"))))
val xmlFile2 = "<bib><book><author>Peter Buneman</author><author>Dan Suciu</author><title>Data on ze web</title></book><book><author>John Mitchell</author><title>Foundations of Programming Languages</title></book></bib>";
@@ -49,11 +49,11 @@ object Test extends App {
assert(parsedxml1 \ "world" sameElements List(Elem(null,"world", e, sc)))
- assert(
+ assert(
(parsedxml2 \ "_") sameElements List(
Elem(null,"book", e, sc,
- Elem(null,"author", e, sc, Text("Peter Buneman")),
- Elem(null,"author", e, sc, Text("Dan Suciu")),
+ 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"))),
Elem(null,"book",e,sc,
Elem(null,"author",e,sc,Text("John Mitchell")),
@@ -61,11 +61,11 @@ object Test extends App {
)
assert((parsedxml2 \ "author").isEmpty)
- assert(
+ assert(
(parsedxml2 \ "book") sameElements List(
Elem(null,"book",e,sc,
- Elem(null,"author", e, sc, Text("Peter Buneman")),
- Elem(null,"author", e, sc, Text("Dan Suciu")),
+ 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"))),
Elem(null,"book",e,sc,
Elem(null,"author", e, sc, Text("John Mitchell")),
@@ -73,20 +73,20 @@ object Test extends App {
)
)
- assert(
+ assert(
(parsedxml2 \ "_" \ "_") sameElements List(
- Elem(null,"author", e, sc, Text("Peter Buneman")),
- Elem(null,"author", e, sc, Text("Dan Suciu")),
+ 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")),
Elem(null,"author", e, sc, Text("John Mitchell")),
Elem(null,"title" , e, sc, Text("Foundations of Programming Languages"))
)
)
- assert(
+ assert(
(parsedxml2 \ "_" \ "author") sameElements List(
- Elem(null,"author", e, sc, Text("Peter Buneman")),
- Elem(null,"author", e, sc, Text("Dan Suciu")),
+ Elem(null,"author", e, sc, Text("Peter Buneman")),
+ Elem(null,"author", e, sc, Text("Dan Suciu")),
Elem(null,"author", e, sc, Text("John Mitchell"))
)
)
@@ -95,15 +95,15 @@ object Test extends App {
Console.println("xpath \\\\ DESCENDANTS");
- assert(
+ assert(
(parsedxml2 \\ "author") sameElements List(
- Elem(null,"author", e, sc, Text("Peter Buneman")),
- Elem(null,"author", e, sc, Text("Dan Suciu")),
+ Elem(null,"author", e, sc, Text("Peter Buneman")),
+ Elem(null,"author", e, sc, Text("Dan Suciu")),
Elem(null,"author", e, sc, Text("John Mitchell"))
)
)
- assert(
+ assert(
(parsedxml2 \\ "title") sameElements List(
Elem(null,"title", e, sc, Text("Data on ze web")),
Elem(null,"title", e, sc, Text("Foundations of Programming Languages")))
@@ -114,19 +114,19 @@ object Test extends App {
(parsedxml2 \\ "book" ){ n:Node => (n \ "title") xml_== "Data on ze web" }
)
- assert(
+ assert(
((new NodeSeq { val theSeq = List( parsedxml2 ) }) \\ "_") sameElements List(
Elem(null,"bib",e,sc,
Elem(null,"book",e,sc,
- Elem(null, "author", e, sc, Text("Peter Buneman")),
- Elem(null, "author", e, sc, Text("Dan Suciu")),
+ 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"))),
Elem(null,"book",e,sc,
Elem(null,"author",e,sc,Text("John Mitchell")),
Elem(null,"title",e,sc,Text("Foundations of Programming Languages")))),
Elem(null,"book",e,sc,
- Elem(null,"author",e,sc,Text("Peter Buneman")),
- Elem(null,"author",e,sc,Text("Dan Suciu")),
+ 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"))),
Elem(null,"author",e,sc,Text("Peter Buneman")),
Elem(null,"author",e,sc,Text("Dan Suciu")),
diff --git a/test/files/jvm/xml02.scala b/test/files/jvm/xml02.scala
index fb790d5926..b830a0e694 100644
--- a/test/files/jvm/xml02.scala
+++ b/test/files/jvm/xml02.scala
@@ -36,26 +36,26 @@ object Test {
val z = ax \ "@{the namespace from outer space}foo"
assert((ax \ "@{the namespace from outer space}foo") xml_== "baz")
assert((cx \ "@{the namespace from outer space}foo") xml_== "baz")
-
+
try {
ax \ "@"
assert(false)
} catch {
- case _: IllegalArgumentException =>
+ case _: IllegalArgumentException =>
}
try {
ax \ "@{"
assert(false)
} catch {
- case _: IllegalArgumentException =>
+ case _: IllegalArgumentException =>
}
try {
ax \ "@{}"
assert(false)
} catch {
- case _: IllegalArgumentException =>
+ case _: IllegalArgumentException =>
}
-
+
}
}
diff --git a/test/files/jvm/xmlattr.scala b/test/files/jvm/xmlattr.scala
index 2668819c9d..d214642eb6 100644
--- a/test/files/jvm/xmlattr.scala
+++ b/test/files/jvm/xmlattr.scala
@@ -7,7 +7,7 @@ object Test {
AttributeWithOptionTest()
AttributeOutputTest()
}
-
+
object UnprefixedAttributeTest {
def apply() {
val x = new UnprefixedAttribute("foo","bar", Null)
@@ -15,13 +15,13 @@ object Test {
println(Text("bar") == x("foo"))
println(None == x.get("no_foo"))
println(null == x("no_foo"))
-
+
val y = x.remove("foo")
println(Null == y)
val z = new UnprefixedAttribute("foo", null:NodeSeq, x)
println(None == z.get("foo"))
-
+
var appended = x append x append x append x
var len = 0; while (appended ne Null) {
appended = appended.next
diff --git a/test/files/jvm/xmlmore.scala b/test/files/jvm/xmlmore.scala
index 1381cdf837..04d0a6c759 100644
--- a/test/files/jvm/xmlmore.scala
+++ b/test/files/jvm/xmlmore.scala
@@ -11,7 +11,7 @@ Ours is the portal of hope, come as you are."
Mevlana Celaleddin Rumi]]>
val nazim = <foo>{myBreak}</foo> // shows use of unparsed
-
+
Console println com
Console println pi
Console println crz // this guy will escaped, and rightly so
diff --git a/test/files/jvm/xmlpull.scala b/test/files/jvm/xmlpull.scala
index d2bb72a071..9ba7d4cf02 100644
--- a/test/files/jvm/xmlpull.scala
+++ b/test/files/jvm/xmlpull.scala
@@ -5,7 +5,7 @@ import scala.io.Source
object Test {
val src = Source.fromString("<hello><world/>!</hello>")
-
+
def main(args: Array[String]) {
var er = new XMLEventReader(src)
er.next match {
@@ -28,4 +28,4 @@ object Test {
//println("6")
}
}
-
+
diff --git a/test/files/jvm/xmlstuff.scala b/test/files/jvm/xmlstuff.scala
index f2ad0307b1..45234c7139 100644
--- a/test/files/jvm/xmlstuff.scala
+++ b/test/files/jvm/xmlstuff.scala
@@ -26,7 +26,7 @@ object Test {
<baz bazValue="8"/>
<bar value="5" gi='go'/>
</foo>;
-
+
val pelems_1 = for (x <- p \ "bar"; y <- p \ "baz" ) yield {
Text(x.attributes("value").toString + y.attributes("bazValue").toString+ "!")
};
@@ -35,14 +35,14 @@ object Test {
assert(Text("8") sameElements (p \\ "@bazValue"))
- val books =
+ val books =
<bks>
<book><title>Blabla</title></book>
<book><title>Blubabla</title></book>
<book><title>Baaaaaaalabla</title></book>
</bks>;
- val reviews =
+ val reviews =
<reviews>
<entry><title>Blabla</title>
<remarks>
@@ -72,32 +72,32 @@ object Test {
));
// example
- println(
+ println(
for (t @ <book><title>Blabla</title></book> <- new NodeSeq { val theSeq = books.child }.toList)
yield t
);
- val phoneBook =
+ val phoneBook =
<phonebook>
<descr>
- This is the <b>phonebook</b> of the
+ This is the <b>phonebook</b> of the
<a href="http://acme.org">ACME</a> corporation.
</descr>
<entry>
- <name>John</name>
+ <name>John</name>
<phone where="work"> +41 21 693 68 67</phone>
<phone where="mobile">+41 79 602 23 23</phone>
</entry>
</phonebook>;
- val addrBook =
+ val addrBook =
<addrbook>
<descr>
- This is the <b>addressbook</b> of the
+ This is the <b>addressbook</b> of the
<a href="http://acme.org">ACME</a> corporation.
</descr>
<entry>
- <name>John</name>
+ <name>John</name>
<street> Elm Street</street>
<city>Dolphin City</city>
</entry>
@@ -113,7 +113,7 @@ object Test {
</result>
));
-
+
/* namespaces */
// begin tmp
println("namespaces")
@@ -135,9 +135,9 @@ object Test {
import scala.xml.dtd.ELEMENTS
import scala.xml.dtd.ContentModel._
vtor.setContentModel(
- ELEMENTS(
+ ELEMENTS(
Sequ(
- Letter(ElemName("bar")),
+ Letter(ElemName("bar")),
Star(Letter(ElemName("baz"))) )));
}
@@ -146,11 +146,11 @@ object Test {
{
import scala.xml.dtd.MIXED
import scala.xml.dtd.ContentModel._
-
+
vtor.setContentModel(
MIXED(
- Alt(Letter(ElemName("bar")),
- Letter(ElemName("baz")),
+ Alt(Letter(ElemName("bar")),
+ Letter(ElemName("baz")),
Letter(ElemName("bal")))));
}
@@ -162,20 +162,20 @@ object Test {
vtor.setContentModel(null)
vtor.setMetaData(List())
assert(!vtor( <foo bar="hello"/> ))
-
- {
- import scala.xml.dtd._
+
+ {
+ import scala.xml.dtd._
vtor setMetaData List(AttrDecl("bar", "CDATA", IMPLIED))
}
assert(!vtor(<foo href="http://foo.com" bar="hello"/>))
assert(vtor(<foo bar="hello"/>))
- {
+ {
import scala.xml.dtd._
vtor.setMetaData(List(AttrDecl("bar","CDATA",REQUIRED)))
}
assert(!vtor( <foo href="http://foo.com" /> ))
assert( vtor( <foo bar="http://foo.com" /> ))
-
+
}
}
diff --git a/test/files/neg/abstract-class-2.scala b/test/files/neg/abstract-class-2.scala
index 19f74f3da6..be45a09343 100644
--- a/test/files/neg/abstract-class-2.scala
+++ b/test/files/neg/abstract-class-2.scala
@@ -1,7 +1,7 @@
class P {
trait S1
val p = new P
-
+
trait S2 {
def f(x: p.S1): Int
}
@@ -10,5 +10,5 @@ class P {
class P2 extends P {
object O2 extends S2 {
def f(x: S1) = 5
- }
+ }
}
diff --git a/test/files/neg/abstract-inaccessible.scala b/test/files/neg/abstract-inaccessible.scala
index 3c80f30522..7eaaf2d620 100644
--- a/test/files/neg/abstract-inaccessible.scala
+++ b/test/files/neg/abstract-inaccessible.scala
@@ -1,6 +1,6 @@
package foo {
private[foo] trait Bippy { }
-
+
trait YourTrait {
def implementMe(f: Int => (String, Bippy)): Unit
def overrideMe[T <: Bippy](x: T): T = x
diff --git a/test/files/neg/accesses.scala b/test/files/neg/accesses.scala
index b1df6c0e6c..290291586c 100644
--- a/test/files/neg/accesses.scala
+++ b/test/files/neg/accesses.scala
@@ -6,7 +6,7 @@ abstract class A {
private[p1] def f4(): Unit
protected[p1] def f5(): Unit
}
-
+
abstract class OK1 extends A {
private[p1] def f2(): Unit
protected[p2] def f3(): Unit
diff --git a/test/files/neg/array-not-seq.scala b/test/files/neg/array-not-seq.scala
index 07a2898d88..5f367bdd85 100644
--- a/test/files/neg/array-not-seq.scala
+++ b/test/files/neg/array-not-seq.scala
@@ -9,9 +9,9 @@ object Test {
case _: Array[_] => true
case _ => false
}
-
+
def f4(x: Any) = x.isInstanceOf[Traversable[_]]
-
+
def f5(x1: Any, x2: Any, x3: AnyRef) = (x1, x2, x3) match {
case (Some(_: Seq[_]), Nil, _) => 1
case (None, List(_: List[_], _), _) => 2
diff --git a/test/files/neg/check-dead.scala b/test/files/neg/check-dead.scala
index 2d5bccb21d..aadd788814 100644
--- a/test/files/neg/check-dead.scala
+++ b/test/files/neg/check-dead.scala
@@ -5,11 +5,11 @@ object Other {
class NoDeads {
def y1(arg: Any) = println("foo")
def z1 = y1(throw new Exception) // should warn
-
+
def y2[T](arg: T) = println("foo")
def z2 = y2(throw new Exception) // should warn
-
- def y3[T](arg: => T) = println("foo")
+
+ def y3[T](arg: => T) = println("foo")
def z3 = y3(throw new Exception) // should not warn: by name arg
def nowarn1 = synchronized { throw new Exception } // should not warn: synchronized should be by name
@@ -22,9 +22,9 @@ class NoDeads {
val i = 10 + 2
i
}
-
+
def nowarn4: String = Other.oops("don't warn about me") // should not warn
-
+
def yeswarn1 = synchronized {
throw new Exception // should warn
5 * 5
@@ -32,6 +32,6 @@ class NoDeads {
def yeswarn2: Int = synchronized {
throw new Exception // should warn
return 5
- }
+ }
}
diff --git a/test/files/neg/checksensible.scala b/test/files/neg/checksensible.scala
index b6083f75e4..27ee908153 100644
--- a/test/files/neg/checksensible.scala
+++ b/test/files/neg/checksensible.scala
@@ -9,7 +9,7 @@ final class Zing {
// 7 warnings
class RefEqTest {
object Shmoopie
-
+
(new AnyRef) eq (new AnyRef)
(new AnyRef) ne (new AnyRef)
Shmoopie eq (new AnyRef)
@@ -22,10 +22,10 @@ class RefEqTest {
// 13 warnings
class EqEqValTest {
var c = 0
-
+
(c = 1) == 0
0 == (c = 1)
-
+
1 == "abc"
1 == ("abc": Any) // doesn't warn because an Any may be a boxed Int
1 == (1: Any) // as above
@@ -34,12 +34,12 @@ class EqEqValTest {
true == new java.lang.Boolean(true) // none of these should warn
new java.lang.Boolean(true) == true
-
+
new AnyRef == 1
1 == new AnyRef // doesn't warn because it could be...
1 == (new java.lang.Integer(1)) // ...something like this
1 == (new java.lang.Boolean(true))
-
+
1 != true
() == true
() == ()
@@ -47,13 +47,13 @@ class EqEqValTest {
() == scala.runtime.BoxedUnit.UNIT // these should warn for always being true/false
scala.runtime.BoxedUnit.UNIT != ()
(scala.runtime.BoxedUnit.UNIT: java.io.Serializable) != () // shouldn't warn
-
+
(1 != println)
(1 != 'sym)
}
// 12 warnings
-class EqEqRefTest {
+class EqEqRefTest {
val ref = new Bop
((x: Int) => x + 1) == null
Bep == ((_: Int) + 1)
@@ -67,9 +67,9 @@ class EqEqRefTest {
// final classes with default equals
val x1 = new Bip
- val x2 = new Bop
+ val x2 = new Bop
(x1 == x2)
-
+
class C1 { }
class C2 extends C1 { }
final class Z1 extends C2 { }
@@ -84,14 +84,14 @@ class EqEqRefTest {
c3 != "abc"
// this should warn when feeling chatty
c3 != z1
-
+
// non-warners
(null: AnyRef) == (null: AnyRef)
(x1 <= x2)
-
+
def main(args: Array[String]) = {
val in = new java.io.FileInputStream(args(0))
- var c = 0
+ var c = 0
while ((c = in.read) != -1)
print(c.toChar)
diff --git a/test/files/neg/choices.scala b/test/files/neg/choices.scala
index 8827494874..fe9236f10f 100644
--- a/test/files/neg/choices.scala
+++ b/test/files/neg/choices.scala
@@ -1,5 +1,5 @@
object Test {
def main(args: Array[String]): Unit = {
-
+
}
}
diff --git a/test/files/neg/exhausting.scala b/test/files/neg/exhausting.scala
index 0741d7467b..14b05695aa 100644
--- a/test/files/neg/exhausting.scala
+++ b/test/files/neg/exhausting.scala
@@ -3,7 +3,7 @@ object Test {
case object Bar1 extends Foo[Int]
case object Bar2 extends Foo[String]
case object Bar3 extends Foo[Any]
-
+
def ex1[T](xs: List[T]) = xs match {
case ys: List[_] => "ok"
}
@@ -16,7 +16,7 @@ object Test {
def ex3[T](xx: (Foo[T], Foo[T])) = xx match {
case (_: Foo[_], _: Foo[_]) => ()
}
-
+
def fail1[T](xs: List[T]) = xs match {
case Nil => "ok"
case x :: y :: Nil => "ok"
@@ -38,8 +38,8 @@ object Test {
case (Bar2, Bar3) => ()
case (Bar3, _) => ()
}
-
+
def main(args: Array[String]): Unit = {
-
+
}
}
diff --git a/test/files/neg/forward.scala b/test/files/neg/forward.scala
index d5c0851f09..3774fa838f 100644
--- a/test/files/neg/forward.scala
+++ b/test/files/neg/forward.scala
@@ -5,20 +5,20 @@ object Test {
{
def f: Int = x;
val x: Int = f;
- }
+ }
{
def f: Int = g;
val x: Int = f;
def g: Int = x;
- }
+ }
{
def f: Int = g;
var x: Int = f;
def g: Int = x;
- }
+ }
{
def f: Int = g;
Console.println("foo");
def g: Int = f;
- }
+ }
}
diff --git a/test/files/neg/found-req-variance.scala b/test/files/neg/found-req-variance.scala
index 024b24c367..fd3b11160e 100644
--- a/test/files/neg/found-req-variance.scala
+++ b/test/files/neg/found-req-variance.scala
@@ -27,7 +27,7 @@ object Test {
def f7 = Set[Inv[C]]() + new Inv[A]
def f8 = Set[Inv[C]]() + new Inv[B]
def f9 = Set[Inv[C]]() + new Inv[C]
-
+
def g1 = Set[Multi[A, B, C]]() + new MultiCov[A]
def g2 = Set[Multi[A, B, C]]() + new MultiCov[B]
def g3 = Set[Multi[A, B, C]]() + new MultiCov[C]
@@ -43,12 +43,12 @@ object Functions {
object Set1 {
def f[T, R](x: FF1[T, R]) = ()
def h[T, R] : FF1[T, R] = sys.error("")
-
+
def ff1 = f[B, B](h[A, A]) // fail
def ff2 = f[B, B](h[B, A]) // fail
def ff3 = f[B, B](h[C, A]) // fail
def ff4 = f[B, B](h[A, B]) // suggest
- def ff5 = f[B, B](h[B, B]) // ok
+ def ff5 = f[B, B](h[B, B]) // ok
def ff6 = f[B, B](h[C, B]) // suggest
def ff7 = f[B, B](h[A, C]) // suggest
def ff8 = f[B, B](h[B, C]) // ok
@@ -57,7 +57,7 @@ object Functions {
object Set2 {
def f[T, R](x: FF2[T, R]) = ()
def h[T, R] : FF2[T, R] = sys.error("")
-
+
def ff1 = f[B, B](h[A, A]) // suggest
def ff2 = f[B, B](h[B, A]) // suggest
def ff3 = f[B, B](h[C, A]) // fail
@@ -74,7 +74,7 @@ object Functions {
// object TypeAlias {
// type LL[T] = List[T]
// val LL = List
-//
+//
// def f1 = Set[LL[B]]() + LL[A](new A)
// def f2 = Set[LL[B]]() + LL[C](new C)
// }
@@ -82,12 +82,12 @@ object Functions {
object Javas {
def f[T](x: java.util.List[T]) = ()
def g[T](x: java.util.Comparator[T]) = ()
-
+
def g1 = f[AnyRef](new java.util.ArrayList[String] { })
def g2 = g[String](Ordering.fromLessThan[AnyRef](_.toString < _.toString))
}
-object Misc {
+object Misc {
// original motivation
class Data[A <: AnyVal]
class MyData extends Data[Int] { }
diff --git a/test/files/neg/gadts1.check b/test/files/neg/gadts1.check
index f19b58c5db..44d2b114d6 100644
--- a/test/files/neg/gadts1.check
+++ b/test/files/neg/gadts1.check
@@ -1,7 +1,7 @@
gadts1.scala:15: error: type mismatch;
found : Test.Double
required: a
- case NumTerm(n) => c.x = Double(1.0)
+ case NumTerm(n) => c.x = Double(1.0)
^
gadts1.scala:20: error: class Cell of type Test.Cell does not take type parameters.
case Cell[a](x: Int) => c.x = 5
diff --git a/test/files/neg/gadts1.scala b/test/files/neg/gadts1.scala
index 08403e6eec..1fb6e57e2d 100644
--- a/test/files/neg/gadts1.scala
+++ b/test/files/neg/gadts1.scala
@@ -11,8 +11,8 @@ class IntTerm(n: Int) extends NumTerm(n) with Term[Int]
def f[a](t:Term[a], c:Cell[a]): Unit = {
- t match {
- case NumTerm(n) => c.x = Double(1.0)
+ t match {
+ case NumTerm(n) => c.x = Double(1.0)
}
t match {
// presently testing that this gets past the parser: eventually
diff --git a/test/files/neg/implicits.scala b/test/files/neg/implicits.scala
index 846591e22d..e908fb03e8 100644
--- a/test/files/neg/implicits.scala
+++ b/test/files/neg/implicits.scala
@@ -4,14 +4,14 @@ class Super
object Super {
implicit def pos2int(p: Pos): Int = 0
-}
+}
object Sub extends Super {
class Plus(x: Any) {
def +(y: String): String = x.toString + y
}
implicit def any2plus(x: Any): Plus = new Plus(x)
-}
+}
object Test {
import Super._
@@ -33,7 +33,7 @@ object test2 {
val set = HEmpty + 3 + "3"
implicit def select[T](t: HSome[T,_]) = t.head
implicit def selectTail[L](t: HSome[_,L]) = t.tail
-
+
def foo(x: Int) = 3
foo(set)
}
@@ -55,4 +55,4 @@ class Mxml {
}
-}
+}
diff --git a/test/files/neg/java-access-neg/J.java b/test/files/neg/java-access-neg/J.java
index b6bc3363a1..4f2024673c 100644
--- a/test/files/neg/java-access-neg/J.java
+++ b/test/files/neg/java-access-neg/J.java
@@ -4,11 +4,11 @@ public abstract class J {
public J() { }
J(int x1) { }
protected J(int x1, int x2) { }
-
+
abstract void packageAbstract();
protected abstract void protectedAbstract();
public abstract void publicAbstract();
-
+
void packageConcrete() { return; }
protected void protectedConcrete() { return; }
public void publicConcrete() { return; }
diff --git a/test/files/neg/java-access-neg/S2.scala b/test/files/neg/java-access-neg/S2.scala
index b082bb7174..dd0af8d39d 100644
--- a/test/files/neg/java-access-neg/S2.scala
+++ b/test/files/neg/java-access-neg/S2.scala
@@ -12,7 +12,7 @@ class S1 extends J {
override private[b] def packageAbstract() = () // fail
override protected[b] def protectedAbstract() = ()
override def publicAbstract() = ()
-
+
override private[b] def packageConcrete() = () // fail
override protected[b] def protectedConcrete() = ()
override def publicConcrete() = ()
@@ -32,7 +32,7 @@ class S3 extends J {
protected[b] def packageAbstract() = () // fail
protected[b] def protectedAbstract() = ()
def publicAbstract() = ()
-
+
override protected[b] def packageConcrete() = () // fail
override protected[b] def protectedConcrete() = ()
override def publicConcrete() = ()
@@ -43,7 +43,7 @@ class S4 extends J {
private[a] def packageAbstract() = () // fail
protected[a] def protectedAbstract() = ()
def publicAbstract() = ()
-
+
override private[a] def packageConcrete() = () // fail
override protected[a] def protectedConcrete() = ()
override def publicConcrete() = ()
@@ -54,7 +54,7 @@ class S5 extends J {
def packageAbstract() = () // fail
def protectedAbstract() = ()
def publicAbstract() = ()
-
+
override def packageConcrete() = () // fail
override def protectedConcrete() = ()
override def publicConcrete() = ()
diff --git a/test/files/neg/lazy-override.scala b/test/files/neg/lazy-override.scala
index f41d7f038b..a0f6e3bd73 100644
--- a/test/files/neg/lazy-override.scala
+++ b/test/files/neg/lazy-override.scala
@@ -5,7 +5,7 @@
lazy val y: Int = { print("/*A.y*/"); 2 }
}
-
+
class B extends A {
// lazy overrides strict val
override lazy val x: Int = { print("/*B.x*/"); 3 }
diff --git a/test/files/neg/lazyvals.scala b/test/files/neg/lazyvals.scala
index f92534f506..bbc4fe114a 100644
--- a/test/files/neg/lazyvals.scala
+++ b/test/files/neg/lazyvals.scala
@@ -1,7 +1,7 @@
/** Test which should fail compilation */
class Lazy {
-
+
// no abstract lazy values
lazy val t: Int
@@ -31,7 +31,7 @@ object T2 {
lazy val y: Int = { print("/*A.y*/"); 2 }
}
-
+
class B extends A {
// lazy overrides strict val
override lazy val x: Int = { print("/*B.x*/"); 3 }
diff --git a/test/files/neg/lubs.scala b/test/files/neg/lubs.scala
index 3524fa4d87..639117f7bf 100644
--- a/test/files/neg/lubs.scala
+++ b/test/files/neg/lubs.scala
@@ -18,7 +18,7 @@ object test2 {
class D extends A { type T = D }
def f = if (1 == 2) new C else new D
-
+
val x1: A { type T } = f
val x2: A { type T >: Null <: A } = f
val x3: A { type T >: Null <: A { type T >: Null <: A } } = f
diff --git a/test/files/neg/migration28.scala b/test/files/neg/migration28.scala
index facc9b36d2..ba73eea436 100644
--- a/test/files/neg/migration28.scala
+++ b/test/files/neg/migration28.scala
@@ -1,9 +1,9 @@
object Test {
import scala.collection.mutable._
-
+
List(1,2,3,4,5).scanRight(0)(_+_)
-
+
def main(args: Array[String]): Unit = {
-
+
}
}
diff --git a/test/files/neg/null-unsoundness.scala b/test/files/neg/null-unsoundness.scala
index dbb8744597..3f7e42fe17 100644
--- a/test/files/neg/null-unsoundness.scala
+++ b/test/files/neg/null-unsoundness.scala
@@ -12,4 +12,4 @@ object Test extends A with App {
type A = C
y = 42
}
-
+
diff --git a/test/files/neg/object-not-a-value.scala b/test/files/neg/object-not-a-value.scala
index 207b271df2..2f894a33df 100644
--- a/test/files/neg/object-not-a-value.scala
+++ b/test/files/neg/object-not-a-value.scala
@@ -1,6 +1,6 @@
object Test {
import java.util._
-
+
def main(args: Array[String]): Unit = {
List(1) map (_ + 1)
}
diff --git a/test/files/neg/overload-msg.scala b/test/files/neg/overload-msg.scala
index 8715c156a2..896722262d 100644
--- a/test/files/neg/overload-msg.scala
+++ b/test/files/neg/overload-msg.scala
@@ -1,4 +1,4 @@
// type parameter shadows actual type, massive overload error confuses.
-class A(x: Int) {
+class A(x: Int) {
def f[Int](y: Int) = x + y
}
diff --git a/test/files/neg/overloaded-implicit.scala b/test/files/neg/overloaded-implicit.scala
index 68b1ceaa30..9ab66cf560 100644
--- a/test/files/neg/overloaded-implicit.scala
+++ b/test/files/neg/overloaded-implicit.scala
@@ -1,15 +1,15 @@
object Test {
implicit def imp1[T](x: List[T]): Map[T, T] = Map()
implicit def imp1[T](x: Set[T]): Map[T, T] = Map()
-
+
def f[T <% Map[Int, Int]](x: T): Double = 1.0d
// not parameterized, no warning
- implicit def imp2(x: List[Int]): String = "a"
+ implicit def imp2(x: List[Int]): String = "a"
implicit def imp2(x: Set[Int]): String = "b"
-
+
def g[T <% String](x: T): Double = 2.0d
-
+
def main(args: Array[String]): Unit = {
// println(f(List(1)))
println(g(List(1)))
diff --git a/test/files/neg/override-object-no.scala b/test/files/neg/override-object-no.scala
index 745cdb2332..45961e4fa6 100644
--- a/test/files/neg/override-object-no.scala
+++ b/test/files/neg/override-object-no.scala
@@ -25,7 +25,7 @@ package case1 {
trait Quux4 extends Quux3 { override object Bar } // err
}
-// type parameter as-seen-from business
+// type parameter as-seen-from business
package case2 {
// invariance (see pos for the covariant case)
class Bar[T]
diff --git a/test/files/neg/pat_unreachable.scala b/test/files/neg/pat_unreachable.scala
index c5f71790a8..fc0fd41920 100644
--- a/test/files/neg/pat_unreachable.scala
+++ b/test/files/neg/pat_unreachable.scala
@@ -8,7 +8,7 @@ object Test extends App {
case Seq(x, y, _*) => x::y::Nil
case Seq(x, y) => List(x, y)
}
-
+
def not_unreachable(xs:Seq[Char]) = xs match {
case Seq(x, y, _*) => x::y::Nil
case Seq(x) => List(x)
diff --git a/test/files/neg/patmat-type-check.scala b/test/files/neg/patmat-type-check.scala
index 26d0409fa0..cc35089430 100644
--- a/test/files/neg/patmat-type-check.scala
+++ b/test/files/neg/patmat-type-check.scala
@@ -1,15 +1,15 @@
object Test
{
def s1 = "bob".toList match { case Seq('b', 'o', 'b') => true } // list ok
-
+
// not final, allowed
- class Bop
+ 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 }
@@ -17,7 +17,7 @@ object Test
// free type parameter, allowed
final class Bop3[T]
def f4[T](x: Bop3[T]) = 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
@@ -25,7 +25,7 @@ object Test
// 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
def f4[T](x: Bop3[Char]) = x match { case Seq('b', 'o', 'b') => true } // fail
}
diff --git a/test/files/neg/patmatexhaust.scala b/test/files/neg/patmatexhaust.scala
index 45aed558da..9297e09d0d 100644
--- a/test/files/neg/patmatexhaust.scala
+++ b/test/files/neg/patmatexhaust.scala
@@ -22,14 +22,14 @@ class TestSealedExhaustive { // compile only
def ma3(x:Mult) = (x,x) match { // not exhaustive
case (Kult(_), Qult()) => // Kult missing
- //case Pair(Kult(_), Kult(_)) =>
+ //case Pair(Kult(_), Kult(_)) =>
case (Qult(), Kult(_)) => // Qult missing
- //case Pair(Qult(), Qult()) =>
+ //case Pair(Qult(), Qult()) =>
}
def ma3u(x:Mult) = ((x,x) : @unchecked) match { // not exhaustive, but not checked!
- case (Kult(_), Qult()) =>
- case (Qult(), Kult(_)) =>
+ case (Kult(_), Qult()) =>
+ case (Qult(), Kult(_)) =>
}
sealed abstract class Deep
@@ -37,22 +37,22 @@ class TestSealedExhaustive { // compile only
case object Ga extends Deep
sealed class Gp extends Deep
case object Gu extends Gp
-
+
def zma3(x:Deep) = x match { // exhaustive!
case _ =>
}
def zma4(x:Deep) = x match { // exhaustive!
- case Ga =>
+ case Ga =>
case _ =>
}
def ma4(x:Deep) = x match { // missing cases: Gu, Gp
- case Ga =>
+ case Ga =>
}
def ma5(x:Deep) = x match { // Gp
case Gu =>
- case _ if 1 == 0 =>
+ case _ if 1 == 0 =>
case Ga =>
}
@@ -65,7 +65,7 @@ class TestSealedExhaustive { // compile only
case 1::2::Nil =>
case _ =>
}
-
+
sealed class B
case class B1() extends B
case object B2 extends B
@@ -76,7 +76,7 @@ class TestSealedExhaustive { // compile only
case B1() => true // missing B, which is not abstract so must be included
case B2 => true
}
-
+
object ob1 {
sealed abstract class C
sealed abstract class C1 extends C
@@ -89,7 +89,7 @@ class TestSealedExhaustive { // compile only
case C2 | C4 => true
}
}
-
+
object ob2 {
sealed abstract class C
abstract class C1 extends C
diff --git a/test/files/neg/patternalts.scala b/test/files/neg/patternalts.scala
index 539df43201..56b682b0ec 100644
--- a/test/files/neg/patternalts.scala
+++ b/test/files/neg/patternalts.scala
@@ -1,5 +1,5 @@
object Test {
List(1) match {
case List(x) | List() => Console.println(x)
- }
+ }
}
diff --git a/test/files/neg/protected-constructors.scala b/test/files/neg/protected-constructors.scala
index 2838caf09c..f2662ee67c 100644
--- a/test/files/neg/protected-constructors.scala
+++ b/test/files/neg/protected-constructors.scala
@@ -8,7 +8,7 @@ package dingus {
package hungus {
import dingus._
-
+
object P {
class Bar1 extends Foo1("abc")
class Bar2 extends Foo2("abc")
diff --git a/test/files/neg/saito.scala b/test/files/neg/saito.scala
index b4fcd598e4..bfabb4edf4 100644
--- a/test/files/neg/saito.scala
+++ b/test/files/neg/saito.scala
@@ -2,13 +2,13 @@ class B {}
class A { self: B =>
def m(): B = {
this
- }
+ }
}
object Exec{
def main(args: Array[String]): Unit = {
val a: A = new A; // should not be allowed
- val b: B = a.m();
+ val b: B = a.m();
}
}
diff --git a/test/files/neg/sensitive.scala b/test/files/neg/sensitive.scala
index f435a385e1..fa1b940844 100644
--- a/test/files/neg/sensitive.scala
+++ b/test/files/neg/sensitive.scala
@@ -5,8 +5,8 @@ object Admin extends Certificate;
class SecurityViolationException extends Exception
object Sensitive {
- def makeSensitive(credentials: Certificate): Sensitive =
- if (credentials == Admin) new Sensitive()
+ def makeSensitive(credentials: Certificate): Sensitive =
+ if (credentials == Admin) new Sensitive()
else throw new SecurityViolationException
}
class Sensitive private () {
@@ -16,4 +16,4 @@ object Attacker {
val x = Sensitive.makeSensitive(null)
val y = new Sensitive()
}
-
+
diff --git a/test/files/neg/spec-overrides.scala b/test/files/neg/spec-overrides.scala
index 713ce27bd3..f77dadea5d 100644
--- a/test/files/neg/spec-overrides.scala
+++ b/test/files/neg/spec-overrides.scala
@@ -15,7 +15,7 @@ class FX2 extends P {
object Test extends App {
val fx = new FX
val p = new P
-
+
println(fx.a(3))
println((fx: P).a(3))
println((fx: P).a(3.0))
diff --git a/test/files/neg/structural.scala b/test/files/neg/structural.scala
index d783399317..bfca37b22a 100644
--- a/test/files/neg/structural.scala
+++ b/test/files/neg/structural.scala
@@ -1,54 +1,54 @@
object Test extends App {
-
+
def f(x: { type D; def m: D }): Null = null
-
+
class Tata
-
+
abstract class Toto[A <: Object] {
type B <: Object
-
+
def f1[C <: Object](x: Object{ type D <: Object; def m[E >: Null <: Object](x: A): Object; val x: A }) = x.m[Tata](x.x) //fail
def f2[C <: Object](x: Object{ type D <: Object; def m[E >: Null <: Object](x: B): Object; val x: B }) = x.m[Tata](x.x) //fail
def f3[C <: Object](x: Object{ type D <: Object; def m[E >: Null <: Object](x: C): Object; val x: C }) = x.m[Tata](x.x) //fail
def f4[C <: Object](x: Object{ type D <: Object; def m[E >: Null <: Object](x: D): Object; val x: D }) = x.m[Tata](x.x) //fail
def f5[C <: Object](x: Object{ type D <: Object; def m[E >: Null <: Object](x: E): Object; val x: Tata }) = x.m[Tata](x.x) //suceed
-
+
def f6[C <: Object](x: Object{ type D <: Object; def m[E >: Null <: Object](x: Object): A }) = x.m[Tata](null) //suceed
def f7[C <: Object](x: Object{ type D <: Object; def m[E >: Null <: Object](x: Object): B }) = x.m[Tata](null) //suceed
def f8[C <: Object](x: Object{ type D <: Object; def m[E >: Null <: Object](x: Object): C }) = x.m[Tata](null) //suceed
def f9[C <: Object](x: Object{ type D <: Object; def m[E >: Null <: Object](x: Object): D }) = x.m[Tata](null) //fail
def f0[C <: Object](x: Object{ type D <: Object; def m[E >: Null <: Object](x: Object): E }) = x.m[Tata](null) //suceed
-
+
}
-
+
val tata = new Tata
val toto = new Toto[Tata] {
type B = Tata
}
-
+
//toto.f1[Tata](new Object{ type D = Tata; def m[E >: Null <: Object](x: Tata): Object = null; val x = tata })
//toto.f2[Tata](new Object{ type D = Tata; def m[E >: Null <: Object](x: Tata): Object = null; val x = tata })
//toto.f3[Tata](new Object{ type D = Tata; def m[E >: Null <: Object](x: Tata): Object = null; val x = tata })
//toto.f4[Tata](new Object{ type D = Tata; def m[E >: Null <: Object](x: D): Object = null; val x = tata })
toto.f5[Tata](new Object{ type D = Tata; def m[E >: Null <: Object](x: E): Object = null; val x: Test.Tata = tata })
-
+
toto.f6[Tata](new Object{ type D = Tata; def m[E >: Null <: Object](x: Object): Tata = null })
toto.f7[Tata](new Object{ type D = Tata; def m[E >: Null <: Object](x: Object): Tata = null })
toto.f8[Tata](new Object{ type D = Tata; def m[E >: Null <: Object](x: Object): Tata = null })
//toto.f9[Tata](new Object{ type D = Tata; def m[E >: Null <: Object](x: Object): D = null })
toto.f0[Tata](new Object{ type D = Tata; def m[E >: Null <: Object](x: Object): E = null })
-
+
/* Bug #1246 */
type Summable[T] = { def +(v : T) : T }
def sum[T <: Summable[T]](xs : List[T]) = xs.reduceLeft[T](_ + _)
-
+
/* Bug #1004 & #967 */
type S1 = { def f(p: this.type): Unit }
val s1 = new { def f(p: this.type): Unit = () }
-
+
type S2 = { type T; def f(p: T): Unit }
//val s2: S2 = new { type T = A; def f(p: T): Unit = () }
-
+
def s3[U >: Null <: Object](p: { def f(p: U): Unit; def u: U }) = ()
-
+
}
diff --git a/test/files/neg/switch.scala b/test/files/neg/switch.scala
index da7c867ba0..a3dfd869d6 100644
--- a/test/files/neg/switch.scala
+++ b/test/files/neg/switch.scala
@@ -16,44 +16,44 @@ object Main {
case 'f' | 'g' => true
case _ => false
}
-
+
def succ2(c: Char) = (c: @switch) match {
case 'A' | 'B' | 'C' => true
case Other.C2 => true
case Other.C4 => true
case _ => false
}
-
+
// has a guard
def fail1(c: Char) = (c: @switch) match {
case 'A' | 'B' | 'C' => true
case x if x == 'A' => true
case _ => false
}
-
+
// throwing in @unchecked on the next two to make sure
// multiple annotations are processed correctly
-
+
// thinks a val in an object is constant... so naive
def fail2(c: Char) = (c: @switch @unchecked) match {
case 'A' => true
case Other.C1 => true
case _ => false
}
-
+
// more naivete
def fail3(c: Char) = (c: @unchecked @switch) match {
case 'A' => true
case Other.C3 => true
case _ => false
}
-
+
// guard case done correctly
def succ3(c: Char) = (c: @switch) match {
case 'A' | 'B' | 'C' => true
case x => x == 'A'
}
-
+
// some ints just to mix it up a bit
def succ4(x: Int, y: Int) = ((x+y): @switch) match {
case 1 => 5
@@ -62,5 +62,5 @@ object Main {
case 4 => 50
case 5|6|7|8 => 100
case _ => -1
- }
+ }
}
diff --git a/test/files/neg/t0117.scala b/test/files/neg/t0117.scala
index ec34ac0e4e..c73227d26d 100644
--- a/test/files/neg/t0117.scala
+++ b/test/files/neg/t0117.scala
@@ -3,4 +3,4 @@ trait B extends A { println(super[A].a) }
object Test extends App {
new B {}
}
-
+
diff --git a/test/files/neg/t0152.scala b/test/files/neg/t0152.scala
index d86d59e974..dc77ac31a3 100644
--- a/test/files/neg/t0152.scala
+++ b/test/files/neg/t0152.scala
@@ -8,6 +8,6 @@ trait PlusOne extends Value[Int] {
object Test extends App {
object boom extends Value[java.lang.String]("foo") with PlusOne
-
+
println(boom.value) // class cast exception!
}
diff --git a/test/files/neg/t0218.check b/test/files/neg/t0218.check
index a22583d23b..6bb759156f 100644
--- a/test/files/neg/t0218.check
+++ b/test/files/neg/t0218.check
@@ -1,4 +1,4 @@
t0218.scala:10: error: class type required but APQ.this.P found
- List(new PP)
+ List(new PP)
^
one error found
diff --git a/test/files/neg/t0218.scala b/test/files/neg/t0218.scala
index 319be82a7a..3d1f52e39a 100644
--- a/test/files/neg/t0218.scala
+++ b/test/files/neg/t0218.scala
@@ -1,4 +1,4 @@
-trait APQ {
+trait APQ {
class Placement {
}
@@ -7,6 +7,6 @@ trait APQ {
type PP = P
def pq(numQueens: Int, numRows: Int) : List[Placement] = {
- List(new PP)
+ List(new PP)
}
}
diff --git a/test/files/neg/t0503.scala b/test/files/neg/t0503.scala
index 322e1ad132..a9b5dcb1dd 100644
--- a/test/files/neg/t0503.scala
+++ b/test/files/neg/t0503.scala
@@ -1,3 +1,3 @@
val x = new { } with { }
-trait A
+trait A
val y = new { } with A
diff --git a/test/files/neg/t0764.scala b/test/files/neg/t0764.scala
index daeeb21d91..9aebe04b79 100644
--- a/test/files/neg/t0764.scala
+++ b/test/files/neg/t0764.scala
@@ -9,6 +9,6 @@ trait Node extends NotNull { outer =>
class Main[NextType <: Node](value: Node { type T = NextType })
extends Top[Node { type T = NextType }] {
-
+
new Main[AType]( (value: AType).prepend )
}
diff --git a/test/files/neg/t0816.scala b/test/files/neg/t0816.scala
index 0128a0ad72..738a634166 100644
--- a/test/files/neg/t0816.scala
+++ b/test/files/neg/t0816.scala
@@ -6,7 +6,7 @@ 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 Ctest(data) => Console.println("C")
case Btest(data, b) => Console.println("B")
}
}
diff --git a/test/files/neg/t1011.scala b/test/files/neg/t1011.scala
index 7dc3f49469..57a6ad7b45 100644
--- a/test/files/neg/t1011.scala
+++ b/test/files/neg/t1011.scala
@@ -3,7 +3,7 @@ import scala.xml._;
abstract class Test {
//val entity : String;
- def primitiveHeader : NodeSeq =
+ def primitiveHeader : NodeSeq =
Group({
<dl><code>{Text(entity)}</code>
<code>{Text(entity)}</code>
diff --git a/test/files/neg/t1112.scala b/test/files/neg/t1112.scala
index 1a88629faf..b2a374c785 100644
--- a/test/files/neg/t1112.scala
+++ b/test/files/neg/t1112.scala
@@ -1,13 +1,13 @@
// checks that error doesn't crash the compiler
-// (due to isFunctionType normalizing Type1 to a function type,
+// (due to isFunctionType normalizing Type1 to a function type,
// but then the code that used that test not using the normalized type for further operations)
class Test {
type Type1 = () => Unit
-
+
def call(p: Int)(f: => Type1) = {
f()
}
-
+
def run = {
call(0,() => System.out.println("here we are"))
}
diff --git a/test/files/neg/t112706A.check b/test/files/neg/t112706A.check
index ad403ab134..30d0c3ec91 100644
--- a/test/files/neg/t112706A.check
+++ b/test/files/neg/t112706A.check
@@ -1,6 +1,6 @@
t112706A.scala:5: error: constructor cannot be instantiated to expected type;
found : (T1, T2)
required: String
- case Tuple2(node,_) =>
+ case Tuple2(node,_) =>
^
one error found
diff --git a/test/files/neg/t112706A.scala b/test/files/neg/t112706A.scala
index 11304720bc..b7799af96d 100644
--- a/test/files/neg/t112706A.scala
+++ b/test/files/neg/t112706A.scala
@@ -2,7 +2,7 @@ package test;
trait Test {
def foo(p : List[Tuple2[String,String]]) = {
for (t <- p) t._1 match {
- case Tuple2(node,_) =>
+ case Tuple2(node,_) =>
}
}
}
diff --git a/test/files/neg/t1183.scala b/test/files/neg/t1183.scala
index 23868ab401..024c4abd54 100644
--- a/test/files/neg/t1183.scala
+++ b/test/files/neg/t1183.scala
@@ -9,7 +9,7 @@ object Test {
case class Bar(i:Int)
}
-
+
class Test717 {
val foo1 = new Foo(1)
@@ -27,7 +27,7 @@ object Test {
class Baz
object Bam
object Bar
-
+
def unapply(s : String) : Option[Bar] = Some(new Bar(s))
}
diff --git a/test/files/neg/t1477.scala b/test/files/neg/t1477.scala
index a9a6d678ca..ab13f14b06 100644
--- a/test/files/neg/t1477.scala
+++ b/test/files/neg/t1477.scala
@@ -8,7 +8,7 @@ object Test extends App {
type V <: D
val y: V#T = new B { }
}
-
+
trait Middle extends C {
type V <: (D with U)
}
diff --git a/test/files/neg/t1523.scala b/test/files/neg/t1523.scala
index 219fb0c060..b8754f4e15 100644
--- a/test/files/neg/t1523.scala
+++ b/test/files/neg/t1523.scala
@@ -1,5 +1,5 @@
-object test {
+object test {
def bug(x: Any) = x
-
+
def go() = bug("a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a")
}
diff --git a/test/files/neg/t1623.scala b/test/files/neg/t1623.scala
index f5189aa4ca..d02fc2ed9e 100644
--- a/test/files/neg/t1623.scala
+++ b/test/files/neg/t1623.scala
@@ -1,7 +1,7 @@
package test
-trait A
-trait B
+trait A
+trait B
class BImpl extends B {
this: A =>
diff --git a/test/files/neg/t1705.scala b/test/files/neg/t1705.scala
index fabdca0ec6..bf1fcea815 100644
--- a/test/files/neg/t1705.scala
+++ b/test/files/neg/t1705.scala
@@ -17,7 +17,7 @@ object crashing {
}
}
}
-/*
+/*
Infinite loop in Typer.addLocals. Printing all calls to it:
diff --git a/test/files/neg/t1878.scala b/test/files/neg/t1878.scala
index 683dcb6b41..5278fbb7bd 100644
--- a/test/files/neg/t1878.scala
+++ b/test/files/neg/t1878.scala
@@ -1,13 +1,13 @@
object Test extends App {
- // illegal
+ // illegal
val err1 = "" match { case Seq(f @ _*, ',') => f }
-
+
// no error
val List(List(arg1, _*), _) = List(List(1,2,3), List(4,5,6))
-
+
// illegal
val List(List(_*, arg2), _) = List(List(1,2,3), List(4,5,6))
-
+
// illegal - bug #1764
null match {
case <p> { _* } </p> =>
diff --git a/test/files/neg/t2148.scala b/test/files/neg/t2148.scala
index 25788be84a..c0521d9864 100644
--- a/test/files/neg/t2148.scala
+++ b/test/files/neg/t2148.scala
@@ -1,6 +1,6 @@
-class A {
+class A {
var i = 0
- trait A1 extends A {
+ trait A1 extends A {
i += 1
}
}
diff --git a/test/files/neg/t2421b.scala b/test/files/neg/t2421b.scala
index d8159a8c37..a8d22f285e 100644
--- a/test/files/neg/t2421b.scala
+++ b/test/files/neg/t2421b.scala
@@ -12,6 +12,6 @@ object Test {
f
}
-/* bug:
+/* bug:
error: type arguments [Test2.A] do not conform to method b's type parameter bounds [X <: Test2.B]
*/ \ No newline at end of file
diff --git a/test/files/neg/t2441.scala b/test/files/neg/t2441.scala
index 6784ebb333..a8c9e728a2 100644
--- a/test/files/neg/t2441.scala
+++ b/test/files/neg/t2441.scala
@@ -1,5 +1,5 @@
trait X
-trait A {
+trait A {
def f: Option[X]
def g: Option[X]
}
@@ -8,7 +8,7 @@ object B {
}
class B extends A {
private class Bippy
-
+
override def f = Some(new B.Y)
override def g: Option[X] = Some(new B.Y)
}
diff --git a/test/files/neg/t2641.scala b/test/files/neg/t2641.scala
index bc048e039e..626d5d7852 100644
--- a/test/files/neg/t2641.scala
+++ b/test/files/neg/t2641.scala
@@ -8,7 +8,7 @@ abstract class ManagedSeqStrict[+A]
with GenericTraversableTemplate[A, ManagedSeqStrict]
{
override def companion: GenericCompanion[ManagedSeqStrict] = null
-
+
override def foreach[U](f: A => U): Unit = ()
}
@@ -17,9 +17,9 @@ trait ManagedSeq[+A, +Coll]
with TraversableView[A, ManagedSeqStrict[A]]
with TraversableViewLike[A, ManagedSeqStrict[A], ManagedSeq[A]]
{ self =>
-
+
override def underlying = throw new Exception("no underlying")
-
+
//trait Transformed[+B] extends ManagedSeq[B] with super.Transformed[B]
trait Transformed[+B] extends ManagedSeq[B, Coll] with super.Transformed[B]
diff --git a/test/files/neg/t2870.check b/test/files/neg/t2870.check
index 759af53626..6577577d3f 100644
--- a/test/files/neg/t2870.check
+++ b/test/files/neg/t2870.check
@@ -2,6 +2,6 @@ t2870.scala:1: error: not found: type Jar
class Jars(jar: Jar)
^
t2870.scala:6: error: illegal cyclic reference involving value <import>
- val scala = fromClasspathString(javaClassPath)
+ val scala = fromClasspathString(javaClassPath)
^
two errors found
diff --git a/test/files/neg/t2870.scala b/test/files/neg/t2870.scala
index 4de19242e3..59fba3e76d 100644
--- a/test/files/neg/t2870.scala
+++ b/test/files/neg/t2870.scala
@@ -1,9 +1,9 @@
class Jars(jar: Jar)
-object Jars {
+object Jars {
import scala.util.Properties.javaClassPath
- val scala = fromClasspathString(javaClassPath)
-
+ val scala = fromClasspathString(javaClassPath)
+
def fromClasspathString(s: String): Jars = null
}
diff --git a/test/files/neg/t2910.scala b/test/files/neg/t2910.scala
index d9a781032c..fa51038dcd 100644
--- a/test/files/neg/t2910.scala
+++ b/test/files/neg/t2910.scala
@@ -10,7 +10,7 @@ object Junk {
val z = 0
lazy val s = "abc"
}
-
+
def test4() {
lazy val x = {
x
@@ -35,5 +35,5 @@ object Test {
lazy val f: Int = g
var x: Int = f
lazy val g: Int = x
- }
+ }
}
diff --git a/test/files/neg/t2918.check b/test/files/neg/t2918.check
index aae3045e8a..263beab518 100644
--- a/test/files/neg/t2918.check
+++ b/test/files/neg/t2918.check
@@ -1,10 +1,10 @@
t2918.scala:2: error: illegal cyclic reference involving type A
- def g[X, A[X] <: A[X]](x: A[X]) = x
+ def g[X, A[X] <: A[X]](x: A[X]) = x
^
t2918.scala:2: error: cyclic aliasing or subtyping involving type A
- def g[X, A[X] <: A[X]](x: A[X]) = x
+ 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
+ def g[X, A[X] <: A[X]](x: A[X]) = x
^
three errors found
diff --git a/test/files/neg/t2918.scala b/test/files/neg/t2918.scala
index ff2be39ae0..03477ccfbf 100644
--- a/test/files/neg/t2918.scala
+++ b/test/files/neg/t2918.scala
@@ -1,3 +1,3 @@
object Test {
- def g[X, A[X] <: A[X]](x: A[X]) = x
+ def g[X, A[X] <: A[X]](x: A[X]) = x
}
diff --git a/test/files/neg/t3015.check b/test/files/neg/t3015.check
index 43ce1dc122..0b394e23d6 100644
--- a/test/files/neg/t3015.check
+++ b/test/files/neg/t3015.check
@@ -1,11 +1,11 @@
t3015.scala:7: error: scrutinee is incompatible with pattern type;
found : _$1 where type +_$1
required: String
- val b(foo) = "foo"
+ val b(foo) = "foo"
^
t3015.scala:7: error: type mismatch;
found : String with _$1(in object Test) where type +_$1(in object Test)
required: (some other)_$1(in object Test) where type +(some other)_$1(in object Test)
- val b(foo) = "foo"
+ val b(foo) = "foo"
^
two errors found
diff --git a/test/files/neg/t3015.scala b/test/files/neg/t3015.scala
index adfa15b388..9af8f30c65 100644
--- a/test/files/neg/t3015.scala
+++ b/test/files/neg/t3015.scala
@@ -4,5 +4,5 @@ class UnApp[P] {
object Test extends App {
val b: UnApp[_] = new UnApp[String]
- val b(foo) = "foo"
+ val b(foo) = "foo"
}
diff --git a/test/files/neg/t3118.scala b/test/files/neg/t3118.scala
index 9be24c1ed4..75f3b8f50c 100644
--- a/test/files/neg/t3118.scala
+++ b/test/files/neg/t3118.scala
@@ -1,8 +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/t3224.scala b/test/files/neg/t3224.scala
index 589e1db4aa..774de3335a 100644
--- a/test/files/neg/t3224.scala
+++ b/test/files/neg/t3224.scala
@@ -1,16 +1,16 @@
object Texts{
- def textL[T](list: List[T]) = {
- list match{
- case List() => "Empty"
- case List(_) => "One"
+ def textL[T](list: List[T]) = {
+ list match{
+ case List() => "Empty"
+ case List(_) => "One"
case List(_*) => "Many"
}
}
- def textA[T](array: Array[T]) = {
- array match{
- case Array() => "Empty"
- case Array(_) => "One"
+ def textA[T](array: Array[T]) = {
+ array match{
+ case Array() => "Empty"
+ case Array(_) => "One"
case Array(_*) => "Many"
}
}
@@ -23,7 +23,7 @@ object Test extends App {
array.toList
}
-
+
println(Texts textL List()); println(Texts textL List(1)); println(Texts textL List(1, 1));
println(Texts textL Array()); println(Texts textL Array(1)); println(Texts textL Array(1, 1))
diff --git a/test/files/neg/t3399.scala b/test/files/neg/t3399.scala
index 3edaa0724f..b1fe4e5ee2 100644
--- a/test/files/neg/t3399.scala
+++ b/test/files/neg/t3399.scala
@@ -10,7 +10,7 @@ object Nats {
type FoldR[Init <: Type, Type, F <: Fold[Nat, Type]] =
F#Apply[Succ[N], N#FoldR[Init, Type, F]]
}
-
+
type Add[A <: Nat, B <: Nat] = A#FoldR[B, Nat, Inc]
trait Fold[-Elem, Value] {
type Apply[N <: Elem, Acc <: Value] <: Value
@@ -18,7 +18,7 @@ object Nats {
type Inc = Fold[Any, Nat] {
type Apply[N <: Any, Acc <: Nat] = Succ[Acc]
}
-
+
type _1 = Succ[_0]
implicitly[ Add[_1, _1] =:= _1]
} \ No newline at end of file
diff --git a/test/files/neg/t3453.scala b/test/files/neg/t3453.scala
index 090b777151..0f1c6e0282 100644
--- a/test/files/neg/t3453.scala
+++ b/test/files/neg/t3453.scala
@@ -25,7 +25,7 @@ object O {
class T2a {
import O._
-
+
def x: B = {
val aToB = 3
// ok: doesn't compile, because aToB method requires 'T.this.' prefix
@@ -39,7 +39,7 @@ class T2a {
class T2b {
import O.aToB
-
+
def x: B = {
val aToB = 3
// ok: doesn't compile, because aToB method requires 'T.this.' prefix
@@ -53,7 +53,7 @@ class T2b {
class T3 {
implicit def aToB(a: A): B = new B
-
+
def x: B = {
val aToB = 3
// ok: doesn't compile, because aToB method requires 'T.this.' prefix
diff --git a/test/files/neg/t3507.scala b/test/files/neg/t3507.scala
index 9a8c7c5462..32688d3934 100644
--- a/test/files/neg/t3507.scala
+++ b/test/files/neg/t3507.scala
@@ -8,7 +8,7 @@ class A {
object Test {
var a: A = new A // mutable
val c /*: object _1.b.c forSome { val _1: A } */ = a.m // widening using existential
-
+
def mani[T: Manifest](x: T) = ()
mani/*[object _1.b.c]*/(c) // kaboom in manifestOfType / TreeGen.mkAttributedQualifier
// --> _1 is not in scope here
diff --git a/test/files/neg/t3683b.scala b/test/files/neg/t3683b.scala
index 646e418121..fbf75b6856 100644
--- a/test/files/neg/t3683b.scala
+++ b/test/files/neg/t3683b.scala
@@ -8,7 +8,7 @@ case class Z[T >: Bar <: Foo](
z1: W[T]
) extends W[T]
-object Main {
+object Main {
// should fail for including X()
def f1(w: W[Bar]): Int = {
w match {
diff --git a/test/files/neg/t3714-neg.scala b/test/files/neg/t3714-neg.scala
index 753b367ec0..4b56f9348c 100644
--- a/test/files/neg/t3714-neg.scala
+++ b/test/files/neg/t3714-neg.scala
@@ -29,7 +29,7 @@ object Test {
case BreakImpl(x) => x
case _ => -1
}
-
+
def main(args: Array[String]) {
val break = BreakImpl(22)
assert(f1(break) == 22)
diff --git a/test/files/neg/t3736.scala b/test/files/neg/t3736.scala
index cf0920912a..1efa397928 100644
--- a/test/files/neg/t3736.scala
+++ b/test/files/neg/t3736.scala
@@ -7,14 +7,14 @@ object Test {
def f5 = super.!=(new AnyRef)
def f6 = super.##
}
-
+
// Ill-advised overloads to be sure...
class B {
def ##(x: String) = true
def ==(x1: String, xs: List[_]) = true
def !=(x1: String, xs: List[_]) = true
}
-
+
class C extends B {
override def ##(x: String) = super.##(x)
override def ==(x1: String, xs: List[_]) = super.==(x1, xs)
diff --git a/test/files/neg/t3757/B.scala b/test/files/neg/t3757/B.scala
index 7c78fb634e..68766a9f6e 100644
--- a/test/files/neg/t3757/B.scala
+++ b/test/files/neg/t3757/B.scala
@@ -1,5 +1,5 @@
package b
-class B extends a.A {
+class B extends a.A {
override def foo = "B"
} \ No newline at end of file
diff --git a/test/files/neg/t3776.check b/test/files/neg/t3776.check
index 0dfe129596..4a5284cf0f 100644
--- a/test/files/neg/t3776.check
+++ b/test/files/neg/t3776.check
@@ -1,4 +1,4 @@
t3776.scala:8: error: value someOperation is not a member of _$1
- def parsedAs[T](v: T) = MyParser.parse(pattern, a).get someOperation v
+ def parsedAs[T](v: T) = MyParser.parse(pattern, a).get someOperation v
^
one error found
diff --git a/test/files/neg/t3776.scala b/test/files/neg/t3776.scala
index 6e368165aa..454f914316 100644
--- a/test/files/neg/t3776.scala
+++ b/test/files/neg/t3776.scala
@@ -5,6 +5,6 @@ object MyParser extends RegexParsers with PackratParsers {
object Test {
class ParsedAs(a: String) (implicit pattern: MyParser.Parser[_]) {
- def parsedAs[T](v: T) = MyParser.parse(pattern, a).get someOperation v
+ def parsedAs[T](v: T) = MyParser.parse(pattern, a).get someOperation v
}
}
diff --git a/test/files/neg/t3816.scala b/test/files/neg/t3816.scala
index 31b0825f1d..b7f3fde699 100644
--- a/test/files/neg/t3816.scala
+++ b/test/files/neg/t3816.scala
@@ -1,7 +1,7 @@
class B {
def ::(a: List[Int]) {
a match {
- case x::xs =>
+ case x::xs =>
case _ =>
}
}
@@ -32,11 +32,11 @@ object Test {
}
}
- var foo = 0
+ var foo = 0
def testFail2( x: Any ) = {
x match {
case Some( `foo` ) =>
case _ =>
}
- }
+ }
}
diff --git a/test/files/neg/t3987.scala b/test/files/neg/t3987.scala
index 1226d80228..c97d57b38f 100644
--- a/test/files/neg/t3987.scala
+++ b/test/files/neg/t3987.scala
@@ -1,7 +1,7 @@
class Gox {
object Zed { }
class Zed { }
-}
+}
object Test {
type GoxZed = t#Zed forSome { type t <: Gox }
diff --git a/test/files/neg/t4079/t4079_1.scala b/test/files/neg/t4079/t4079_1.scala
index cbae864788..8dc73556c7 100644
--- a/test/files/neg/t4079/t4079_1.scala
+++ b/test/files/neg/t4079/t4079_1.scala
@@ -9,7 +9,7 @@ trait ComposeT[F[_],G[_]] {
case class Compose[F[_],G[_]]() {
def Functor(implicit f: Functor[F], g: Functor[G]): Functor[ComposeT[F,G]#Apply] =
new Functor[ComposeT[F,G]#Apply] {
- def map[A,B](c: ComposeT[F,G]#Apply[A], h: A => B) =
+ def map[A,B](c: ComposeT[F,G]#Apply[A], h: A => B) =
f.map(c, (x:G[A]) => g.map(x,h))
}
}
@@ -19,10 +19,10 @@ object Cat {
}
object Functors {
- implicit val List = new Functor[List] {
+ implicit val List = new Functor[List] {
def map[A,B](fa: List[A], f: A => B): List[B] = fa map f
}
- implicit val Option = new Functor[Option] {
+ implicit val Option = new Functor[Option] {
def map[A,B](fa: Option[A], f: A => B): Option[B] = fa map f
}
}
diff --git a/test/files/neg/t4174.scala b/test/files/neg/t4174.scala
index b4a5ab29da..f5242950c2 100644
--- a/test/files/neg/t4174.scala
+++ b/test/files/neg/t4174.scala
@@ -2,7 +2,7 @@ class C
object Test {
def foo(c: C) = 0
-
+
def main(args: Array[String]): Unit = {
foo(new C { override def bar = 1 })
}
diff --git a/test/files/neg/t4196.scala b/test/files/neg/t4196.scala
index 06e1f28d54..ac00b19bee 100644
--- a/test/files/neg/t4196.scala
+++ b/test/files/neg/t4196.scala
@@ -1,6 +1,6 @@
object Weird {
- { (s: String) =>
+ { (s: String) =>
val foo = Some(s); // to illustrate that vals are printed in the error
- foo
+ foo
}.apply("first param") ("spurious param")
} \ No newline at end of file
diff --git a/test/files/neg/t4217.check b/test/files/neg/t4217.check
index 6c49ec3354..e8cd5fd69e 100644
--- a/test/files/neg/t4217.check
+++ b/test/files/neg/t4217.check
@@ -1,4 +1,4 @@
t4217.scala:2: error: 'case' expected but '}' found.
- 42 match { }
+ 42 match { }
^
one error found
diff --git a/test/files/neg/t4217.scala b/test/files/neg/t4217.scala
index 0817df2cb7..9343a9be54 100644
--- a/test/files/neg/t4217.scala
+++ b/test/files/neg/t4217.scala
@@ -1,3 +1,3 @@
object A extends App {
- 42 match { }
+ 42 match { }
}
diff --git a/test/files/neg/t4221.scala b/test/files/neg/t4221.scala
index 0a8b8add18..c979f7936e 100644
--- a/test/files/neg/t4221.scala
+++ b/test/files/neg/t4221.scala
@@ -1,5 +1,5 @@
class Cl {
- class Sub[TheSub <: Sub[TheSub]]
+ class Sub[TheSub <: Sub[TheSub]]
}
case class Wrapper[T](v: T)
diff --git a/test/files/neg/t4417.scala b/test/files/neg/t4417.scala
index 3f6ddc8153..7f104e58bf 100644
--- a/test/files/neg/t4417.scala
+++ b/test/files/neg/t4417.scala
@@ -2,12 +2,12 @@
-class Pixel[@specialized T] protected (var v: T)
+class Pixel[@specialized T] protected (var v: T)
object Pixel {
type Pixel1d = Pixel[Double]
-
+
def apply(v: Double): Pixel1d = new Pixel1d(v)
}
diff --git a/test/files/neg/t4431.scala b/test/files/neg/t4431.scala
index 5fbb239e04..91e4abfe36 100644
--- a/test/files/neg/t4431.scala
+++ b/test/files/neg/t4431.scala
@@ -7,7 +7,7 @@ object Test {
// this earns a VerifyError.
trait C { def wait (): Unit }
class D { }
-
+
def main(args: Array[String]): Unit = {
new B with A { }
new BB
diff --git a/test/files/neg/t4457_1.scala b/test/files/neg/t4457_1.scala
index 11f12379f6..91d9bc9f51 100644
--- a/test/files/neg/t4457_1.scala
+++ b/test/files/neg/t4457_1.scala
@@ -22,7 +22,7 @@ object ImplicitConvAmbiguity2 {
def aFunc[A](a: NQ[A]) = new BB[A]
def bFunc[T](e1: N[T]) = {}
-
+
def typeMe1 {
val x = aFunc(4F)
bFunc(x)
diff --git a/test/files/neg/t4457_2.scala b/test/files/neg/t4457_2.scala
index f3a170f1f2..b2e7505cf2 100644
--- a/test/files/neg/t4457_2.scala
+++ b/test/files/neg/t4457_2.scala
@@ -22,7 +22,7 @@ object ImplicitConvAmbiguity2 {
def aFunc[A](a: NQ[A]) = new BB[A]
def bFunc[T](e1: N[T]) = {}
-
+
def typeMe2 {
val x = aFunc(4F)
bFunc(x)
diff --git a/test/files/neg/t4851/J.java b/test/files/neg/t4851/J.java
index 9c35b8a16e..dbf8b8288e 100644
--- a/test/files/neg/t4851/J.java
+++ b/test/files/neg/t4851/J.java
@@ -1,14 +1,14 @@
public class J {
Object x;
-
+
public J(Object x) {
this.x = x;
}
-
+
public J(int x1, int x2, int x3, int x4, int x5, int x6) {
this.x = null;
}
-
+
public String toString() {
return "J:" + x.getClass();
}
diff --git a/test/files/neg/t4851/J2.java b/test/files/neg/t4851/J2.java
index 82954d9489..c3a7231315 100644
--- a/test/files/neg/t4851/J2.java
+++ b/test/files/neg/t4851/J2.java
@@ -1,10 +1,10 @@
public class J2<T> {
T x;
-
+
public <T> J(T x) {
this.x = x;
}
-
+
public String toString() {
return "J2:" + x.getClass();
}
diff --git a/test/files/neg/t4851/S.scala b/test/files/neg/t4851/S.scala
index deb42980ab..1550892967 100644
--- a/test/files/neg/t4851/S.scala
+++ b/test/files/neg/t4851/S.scala
@@ -5,7 +5,7 @@ object Test {
val y1 = Some(1, 2, 3)
val y2 = new Some(1, 2, 3)
-
+
val z1 = new J2
val z2 = new J2()
val z3 = new J2(())
@@ -15,7 +15,7 @@ object Test {
println(x2)
println(x3)
println(y1)
-
+
println(z1)
println(z2)
println(z3)
diff --git a/test/files/neg/t4877.scala b/test/files/neg/t4877.scala
index 5d97877518..9cad156f84 100644
--- a/test/files/neg/t4877.scala
+++ b/test/files/neg/t4877.scala
@@ -13,7 +13,7 @@ class B {
def bar(x: Int): Mom
def bippy(): List[Mom]
}
-
+
val x: Bippy = new AnyRef {
type Mom = String
def bar(x: Int) = 55
diff --git a/test/files/neg/t5120.scala b/test/files/neg/t5120.scala
index f28b2cfb4f..c7063b7d15 100644
--- a/test/files/neg/t5120.scala
+++ b/test/files/neg/t5120.scala
@@ -6,7 +6,7 @@ class Cell[T](x0: T) {
object Test {
val str: Cell[String] = new Cell("a")
val other: Cell[Int] = new Cell(0)
-
+
def main(args: Array[String]): Unit = {
List(str, other) foreach (_.x1 = new AnyRef)
str.x1.length
diff --git a/test/files/neg/t520.scala b/test/files/neg/t520.scala
index 076aca3122..949a509518 100644
--- a/test/files/neg/t520.scala
+++ b/test/files/neg/t520.scala
@@ -4,6 +4,6 @@ object test {
assert(keyword != null);
}
- def verifyKeyword(source : java.io.File, pos : Int) =
+ def verifyKeyword(source : java.io.File, pos : Int) =
verifyKeyword("", source, pos);
}
diff --git a/test/files/neg/t558.scala b/test/files/neg/t558.scala
index 58b030347c..4941a06c3b 100644
--- a/test/files/neg/t558.scala
+++ b/test/files/neg/t558.scala
@@ -11,7 +11,7 @@ abstract class NewModel {
val parent : SymbolURL;
final val top = parent.top;
final val source = top.file;
-
+
}
abstract class RootURL extends SymbolURL {
final val top : RootURL = this;
diff --git a/test/files/neg/t563.scala b/test/files/neg/t563.scala
index 204ad3cbdd..d367e2a73c 100644
--- a/test/files/neg/t563.scala
+++ b/test/files/neg/t563.scala
@@ -1,6 +1,6 @@
object Test {
def map[A,R](a : List[A], f : A => R) : List[R] = a.map(f);
-
+
def split(sn : Iterable[List[Option[Int]]]) : Unit =
for (n <- sn)
map(n,ptr => Option(ptr.get));
diff --git a/test/files/neg/t576.scala b/test/files/neg/t576.scala
index fd83217a45..fa7ee6019f 100644
--- a/test/files/neg/t576.scala
+++ b/test/files/neg/t576.scala
@@ -4,16 +4,16 @@ abstract class BaseListXXX {
type Node <: BaseNode;
abstract class BaseNode {
}
-}
+}
trait PriorityTreeXXX extends BaseListXXX {
type Node <: BasicTreeNode;
-
+
trait BasicTreeNode extends BaseNode {
- def sibling: Node;
+ def sibling: Node;
def insert(dir : Int, node : Node) = {
if (true) sibling.insert(node);
//else insert(node);
-
+
}
def insert(node : Node) : Unit = {}
}
diff --git a/test/files/neg/t588.scala b/test/files/neg/t588.scala
index f30937377e..1bc6d2680f 100644
--- a/test/files/neg/t588.scala
+++ b/test/files/neg/t588.scala
@@ -1,15 +1,15 @@
abstract class Test0 {
- def visit(f: Int => Unit): Boolean
+ def visit(f: Int => Unit): Boolean
def visit(f: Int => String): Boolean
}
trait Test {
type TypeA <: TraitA;
type TypeB <: TypeA with TraitB;
-
+
def f(node : TypeA) : Unit;
def f(brac : TypeB) : Unit;
-
+
trait TraitA;
trait TraitB;
-
+
}
diff --git a/test/files/neg/t591.scala b/test/files/neg/t591.scala
index 0f0b02395c..5f2397e6a9 100644
--- a/test/files/neg/t591.scala
+++ b/test/files/neg/t591.scala
@@ -1,17 +1,17 @@
abstract class BaseList {
type Node <: BaseNode;
-
-
+
+
abstract class BaseNode {
protected def self : Node;
private[BaseList] def self00 = self;
def dirty : Unit = {}
def replaceWith(node : Node) = {}
}
-
+
implicit def baseNode2Node(bnode : BaseNode): Node = bnode.self00;
-
+
}
@@ -20,22 +20,22 @@ trait BaseFlow extends BaseList {
type Flow <: FlowBase;
type Output <: OutputBase;
type Input <: InputBase;
-
+
abstract class FlowBase {
-
+
}
trait OutputBase extends FlowBase {
-
+
}
trait InputBase extends FlowBase {
-
+
}
-
+
trait BFNode extends BaseNode {
private var input : Input = _;
private var output : Output = _;
-
+
def input_=(in : Input) = {}
-
+
}
}
diff --git a/test/files/neg/t608.scala b/test/files/neg/t608.scala
index 34dc4c0352..1f12764dd1 100644
--- a/test/files/neg/t608.scala
+++ b/test/files/neg/t608.scala
@@ -2,7 +2,7 @@ trait CrashDueToTypeError {
def id[a](x :a) :a = x
trait Bifunctor {
- type a; // content
+ type a; // content
type s <: Bifunctor
// uncomment this-vvvvvvvvvvvvvvvvvvvvvvvvvvvv, and it compiles
diff --git a/test/files/neg/t692.check b/test/files/neg/t692.check
index 25dda7bd1b..12b7d40ba5 100644
--- a/test/files/neg/t692.check
+++ b/test/files/neg/t692.check
@@ -11,7 +11,7 @@ t692.scala:13: error: class Foo takes type parameters
case class BarType[T3 <: Foo](tpeT : RefType[T3]) extends ClassType[Bar[T3],Foo](FooType);
^
t692.scala:14: error: class Foo takes type parameters
- implicit def typeOfBar[T4 <: Foo](implicit elem : RefType[T4]) : RefType[Bar[T4]] =
+ implicit def typeOfBar[T4 <: Foo](implicit elem : RefType[T4]) : RefType[Bar[T4]] =
^
t692.scala:15: error: type mismatch;
found : test3.this.BarType[T4]
diff --git a/test/files/neg/t692.scala b/test/files/neg/t692.scala
index 24e1d2fea3..f230a6bacf 100644
--- a/test/files/neg/t692.scala
+++ b/test/files/neg/t692.scala
@@ -5,15 +5,15 @@ abstract class test3 {
abstract class RefType[C <: AnyRef] extends Type[C];
case class ObjectType() extends RefType[AnyRef];
abstract class ClassType[C <: Z, Z <: AnyRef](zuper : RefType[Z]) extends RefType[C];
-
+
case class FooType() extends ClassType[Foo,AnyRef](ObjectType());
implicit def typeOfFoo = FooType();
case class BarType[T3 <: Foo](tpeT : RefType[T3]) extends ClassType[Bar[T3],Foo](FooType);
- implicit def typeOfBar[T4 <: Foo](implicit elem : RefType[T4]) : RefType[Bar[T4]] =
+ implicit def typeOfBar[T4 <: Foo](implicit elem : RefType[T4]) : RefType[Bar[T4]] =
BarType(elem);
-
+
class Foo[A <: AnyRef];
class Bar[A <: Foo](implicit tpeA : Type[A]) extends Foo;
diff --git a/test/files/neg/t693.check b/test/files/neg/t693.check
index 25bd141501..62325b5c60 100644
--- a/test/files/neg/t693.check
+++ b/test/files/neg/t693.check
@@ -1,4 +1,4 @@
t693.scala:4: error: x is already defined as value x
- val x : Int = 10;
+ val x : Int = 10;
^
one error found
diff --git a/test/files/neg/t693.scala b/test/files/neg/t693.scala
index 3a9e6247a8..d2074bee38 100644
--- a/test/files/neg/t693.scala
+++ b/test/files/neg/t693.scala
@@ -1,5 +1,5 @@
abstract class test4 {
trait Type;
val x : Type = null;
- val x : Int = 10;
+ val x : Int = 10;
}
diff --git a/test/files/neg/t715.scala b/test/files/neg/t715.scala
index 87b2525a63..a5ccd567f9 100644
--- a/test/files/neg/t715.scala
+++ b/test/files/neg/t715.scala
@@ -1,4 +1,4 @@
-package test;
+package test;
trait B {
type Node <: NodeImpl;
trait NodeImpl {
diff --git a/test/files/neg/t783.scala b/test/files/neg/t783.scala
index 59f7c7f97d..5d20bc6d24 100644
--- a/test/files/neg/t783.scala
+++ b/test/files/neg/t783.scala
@@ -18,7 +18,7 @@ object Main extends App {
def globalInit : Global;
final def globalInit0 = globalInit.asInstanceOf[global.type];
}
-
+
object global0 extends Global {
object analyzer extends Analyzer {
type Global = global0.type;
diff --git a/test/files/neg/t798.scala b/test/files/neg/t798.scala
index a2bf66d19b..b4a1939444 100644
--- a/test/files/neg/t798.scala
+++ b/test/files/neg/t798.scala
@@ -4,5 +4,5 @@ trait Test[Bracks <: Bracks] {
class C[T]
val bracks : Bracks;
val singletons = f(bracks);
-
+
}
diff --git a/test/files/neg/t836.scala b/test/files/neg/t836.scala
index 3633b816c6..de23cf5387 100644
--- a/test/files/neg/t836.scala
+++ b/test/files/neg/t836.scala
@@ -10,7 +10,7 @@ abstract class A {
}
class B extends A {
- type MyObj = ObjImpl
+ type MyObj = ObjImpl
val myString: S = "hello"
val realString: String = myString // error: type missmatch
}
diff --git a/test/files/neg/t856.scala b/test/files/neg/t856.scala
index fea216bfad..e50084b6bd 100644
--- a/test/files/neg/t856.scala
+++ b/test/files/neg/t856.scala
@@ -1,4 +1,4 @@
-trait Complex extends Product2[Double,Double]
+trait Complex extends Product2[Double,Double]
class ComplexRect(val _1:Double, _2:Double) extends Complex {
override def toString = "ComplexRect("+_1+","+_2+")"
diff --git a/test/files/neg/t876.scala b/test/files/neg/t876.scala
index 1f6a90dff3..fb1461a7d3 100644
--- a/test/files/neg/t876.scala
+++ b/test/files/neg/t876.scala
@@ -11,11 +11,11 @@ object AssertionError extends AnyRef with App
class Manager
{
final class B {}
-
+
val map = new HashMap[A, B]
}
-
-
+
+
def test[T](f: => T) { f }
test {
diff --git a/test/files/neg/t877.scala b/test/files/neg/t877.scala
index 5e132a1dd4..8cb98279db 100644
--- a/test/files/neg/t877.scala
+++ b/test/files/neg/t877.scala
@@ -1,3 +1,3 @@
-class A
+class A
trait Foo extends A(22A, Bug!) {}
diff --git a/test/files/neg/t944.scala b/test/files/neg/t944.scala
index dc80e5f49f..352269a80b 100644
--- a/test/files/neg/t944.scala
+++ b/test/files/neg/t944.scala
@@ -1,6 +1,6 @@
object TooManyArgsFunction {
- val f = (a1:Int, a2:Int, a3:Int, a4:Int, a5:Int, a6:Int, a7:Int, a8:Int,
- a9:Int, a10:Int, a11:Int, a12:Int, a13:Int, a14:Int, a15:Int,
- a16:Int, a17:Int, a18:Int, a19:Int, a20:Int, a21:Int, a22:Int,
+ val f = (a1:Int, a2:Int, a3:Int, a4:Int, a5:Int, a6:Int, a7:Int, a8:Int,
+ a9:Int, a10:Int, a11:Int, a12:Int, a13:Int, a14:Int, a15:Int,
+ a16:Int, a17:Int, a18:Int, a19:Int, a20:Int, a21:Int, a22:Int,
a23:Int) => 1
}
diff --git a/test/files/neg/tailrec.scala b/test/files/neg/tailrec.scala
index e0ebde9863..5b9018ae89 100644
--- a/test/files/neg/tailrec.scala
+++ b/test/files/neg/tailrec.scala
@@ -9,21 +9,21 @@ object Winners {
@tailrec def loopsucc1(x: Int): Int = loopsucc1(x - 1)
@tailrec def loopsucc2[T](x: Int): Int = loopsucc2[T](x - 1)
-
+
def ding() {
object dong {
@tailrec def loopsucc3(x: Int): Int = loopsucc3(x)
}
()
}
-
+
def inner(q: Int) = {
@tailrec
def loopsucc4(x: Int): Int = loopsucc4(x + 1)
-
+
loopsucc4(q)
}
-
+
object innerBob {
@tailrec def loopsucc5(x: Int): Int = loopsucc5(x)
}
@@ -45,19 +45,19 @@ object Failures {
else n * facfail(n - 1)
}
-class Failures {
+class Failures {
// not private, not final
@tailrec def fail1(x: Int): Int = fail1(x)
-
+
// a typical between-chair-and-keyboard error
@tailrec final def fail2[T](xs: List[T]): List[T] = xs match {
case Nil => Nil
case x :: xs => x :: fail2[T](xs)
}
-
+
// unsafe
@tailrec final def fail3[T](x: Int): Int = fail3(x - 1)
-
+
// unsafe
class Tom[T](x: Int) {
@tailrec final def fail4[U](other: Tom[U], x: Int): Int = other.fail4[U](other, x - 1)
diff --git a/test/files/neg/tcpoly_infer_ticket1162.scala b/test/files/neg/tcpoly_infer_ticket1162.scala
index 0552b42a22..b88bd358d9 100644
--- a/test/files/neg/tcpoly_infer_ticket1162.scala
+++ b/test/files/neg/tcpoly_infer_ticket1162.scala
@@ -1,8 +1,8 @@
object Test {
- trait Expression[A,B]
+ trait Expression[A,B]
case class Lift[A,B,F[_]]() extends Expression[F[A],F[B]]
-
+
def simplify[A,B]: Expression[A,B] = Lift[A,B]()
}
diff --git a/test/files/neg/tcpoly_ticket2101.scala b/test/files/neg/tcpoly_ticket2101.scala
index 68f061ce70..3af07acfac 100644
--- a/test/files/neg/tcpoly_ticket2101.scala
+++ b/test/files/neg/tcpoly_ticket2101.scala
@@ -4,10 +4,10 @@ class T2[X] extends T[T2, X] // ill-typed
// Forall Y. T2[Y] <: T[T2, X]
// debugging before fix:
-// def isSubType0 -->
+// def isSubType0 -->
// case (PolyType(tparams1, res1), PolyType(tparams2, res2)) => println("<:<PT: "+((tparams1, res1), (tparams2, res2))) //@MDEBUG
// (tparams1.length == tparams2.length &&
-// List.forall2(tparams1, tparams2)
+// List.forall2(tparams1, tparams2)
// ((p1, p2) => p2.info.substSym(tparams2, tparams1) <:< p1.info) &&
// res1 <:< res2.substSym(tparams2, tparams1))
@@ -22,7 +22,7 @@ class T2[X] extends T[T2, X] // ill-typed
// (tparams1.length == tparams2.length &&
// {
// val tpsFresh = cloneSymbols(tparams1) // @M cloneSymbols(tparams2) should be equivalent -- TODO: check
-// List.forall2(tparams1, tparams2)
+// List.forall2(tparams1, tparams2)
// ((p1, p2) => p2.info.substSym(tparams2, tpsFresh) <:< p1.info.substSym(tparams1, tpsFresh)) &&
-// res1.substSym(tparams1, tpsFresh) <:< res2.substSym(tparams2, tpsFresh)
+// res1.substSym(tparams1, tpsFresh) <:< res2.substSym(tparams2, tpsFresh)
// })
diff --git a/test/files/neg/tcpoly_typealias.scala b/test/files/neg/tcpoly_typealias.scala
index 6c7f80cc0b..96e9349298 100644
--- a/test/files/neg/tcpoly_typealias.scala
+++ b/test/files/neg/tcpoly_typealias.scala
@@ -12,7 +12,7 @@ trait A3 {
trait FooCov[+x]
trait FooCon[-x]
-trait FooBound[+x <: String]
+trait FooBound[+x <: String]
trait BOk1 extends A {
type m[+x] = FooCov[x]
@@ -30,8 +30,8 @@ trait BOk4 extends A3 {
type m[+x] = FooCov[x] // weaker variance
}
-// there are two aspects to check:
- // does type alias signature (not considering RHS) correspond to abstract type member in super class
+// there are two aspects to check:
+ // does type alias signature (not considering RHS) correspond to abstract type member in super class
// does RHS correspond to the type alias sig
trait BInv extends A{
type m[x] = FooCov[x] // error: invariant x in alias def
diff --git a/test/files/neg/tcpoly_variance_enforce.scala b/test/files/neg/tcpoly_variance_enforce.scala
index ddff0e9f94..0db7b692f8 100644
--- a/test/files/neg/tcpoly_variance_enforce.scala
+++ b/test/files/neg/tcpoly_variance_enforce.scala
@@ -6,7 +6,7 @@ trait coll3[m[x]]
trait coll4[m[x <: y], y]
-class FooInvar[x]
+class FooInvar[x]
class FooContra[-x]
class FooCov[+x]
class FooString[+x <: String]
@@ -15,15 +15,15 @@ object fcollok extends coll[FooCov]
object fcollinv extends coll[FooInvar] // error
object fcollcon extends coll[FooContra] // error
object fcollwb extends coll[FooString] // error
-
+
object fcoll2ok extends coll2[FooCov] // error
object fcoll2inv extends coll2[FooInvar] // error
-object fcoll2con extends coll2[FooContra]
+object fcoll2con extends coll2[FooContra]
object fcoll2wb extends coll2[FooString] // error
-
-object fcoll3ok extends coll3[FooCov]
-object fcoll3inv extends coll3[FooInvar]
-object fcoll3con extends coll3[FooContra]
+
+object fcoll3ok extends coll3[FooCov]
+object fcoll3inv extends coll3[FooInvar]
+object fcoll3con extends coll3[FooContra]
object fcoll3wb extends coll3[FooString] // error
object fcoll4ok extends coll4[FooString, String]
@@ -33,7 +33,7 @@ object fcoll4_2 extends coll4[FooString, Any] // error
object test {
var ok: coll[FooCov] = _
-
+
def x: coll[FooInvar] = sys.error("foo") // error
def y: coll[FooContra] = sys.error("foo") // error
}
diff --git a/test/files/neg/type-diagnostics.scala b/test/files/neg/type-diagnostics.scala
index c4171328de..de7e7adc3c 100644
--- a/test/files/neg/type-diagnostics.scala
+++ b/test/files/neg/type-diagnostics.scala
@@ -6,14 +6,14 @@ object SetVsSet {
object TParamConfusion {
def strings(xs: List[String]) = xs
-
+
def f1[a <% Ordered[a]](x: List[a]) = {
def f2[b >: List[a] <% Ordered[b]](x: List[a], y: b): Int = {
def f3(xs: List[a], ys: List[a]) = -1
y match { case y1: List[a] => f3(x, y1) }
}
}
-
+
def f2[String](s: String) = strings(List(s))
}
diff --git a/test/files/neg/unit-returns-value.scala b/test/files/neg/unit-returns-value.scala
index 27a1111c5b..ecc981f217 100644
--- a/test/files/neg/unit-returns-value.scala
+++ b/test/files/neg/unit-returns-value.scala
@@ -3,7 +3,7 @@ object Test {
var b = false
if (b) return 5
}
-
+
// no warning
def g {
return println("hello")
diff --git a/test/files/neg/varargs.scala b/test/files/neg/varargs.scala
index be75e9b0a7..657750ec8f 100644
--- a/test/files/neg/varargs.scala
+++ b/test/files/neg/varargs.scala
@@ -7,21 +7,21 @@ import annotation.varargs
// Failing varargs annotation
object Test {
-
+
trait A {
def v1(a: Int, b: Array[String]) = a
}
-
+
trait B extends A {
@varargs def v1(a: Int, b: String*) = a + b.length
}
-
+
@varargs def nov(a: Int) = 0
@varargs def v(a: Int, b: String*) = a + b.length
@varargs def v2(a: Int, b: String*) = 0
def v2(a: Int, b: Array[String]) = 0
-
- def main(args: Array[String]) {
+
+ def main(args: Array[String]) {
}
-
+
}
diff --git a/test/files/neg/variances.check b/test/files/neg/variances.check
index b134a9a68c..4eaab56cef 100644
--- a/test/files/neg/variances.check
+++ b/test/files/neg/variances.check
@@ -1,8 +1,8 @@
variances.scala:4: error: covariant type A occurs in contravariant position in type test.Vector[A] of value x
- def append(x: Vector[A]): Vector[A]
+ def append(x: Vector[A]): Vector[A]
^
variances.scala:14: error: covariant type A occurs in contravariant position in type A of value a
- private[this] def setA(a : A) = this.a = a
+ private[this] def setA(a : A) = this.a = a
^
variances.scala:16: error: covariant type A occurs in invariant position in supertype test.C[A] with ScalaObject of object Baz
object Baz extends C[A]
diff --git a/test/files/neg/variances.scala b/test/files/neg/variances.scala
index f693480d1d..726bc35270 100644
--- a/test/files/neg/variances.scala
+++ b/test/files/neg/variances.scala
@@ -1,7 +1,7 @@
package test
trait Vector[+A] {
- def append(x: Vector[A]): Vector[A]
+ def append(x: Vector[A]): Vector[A]
private[this] def append3(x: Vector[A]): Vector[A] = append(x)
}
@@ -11,8 +11,8 @@ object Covariant {
class Foo[+A] {
private[this] var a : A = _
def getA : A = a
- private[this] def setA(a : A) = this.a = a
-
+ private[this] def setA(a : A) = this.a = a
+
object Baz extends C[A]
trait Convert[B] {
def b2a(b : B) : A
@@ -22,8 +22,8 @@ object Covariant {
class Foo2[+A] {
private[this] var a : A = _
def getA : A = a
- private[this] def setA(a : A) = this.a = a
-
+ private[this] def setA(a : A) = this.a = a
+
{
trait Convert[B] {
def b2a(b : B) : A
@@ -35,8 +35,8 @@ object Covariant {
class Foo3[+A] {
private[this] var a : A = _
def getA : A = a
- private[this] def setA(a : A) = this.a = a
-
+ private[this] def setA(a : A) = this.a = a
+
private[this] trait Convert[B] {
def b2a(b : B) : A
def doit(b : B) = setA(b2a(b))
diff --git a/test/files/neg/viewtest.scala b/test/files/neg/viewtest.scala
index 5e7d624d23..ddb7fa4a3b 100644
--- a/test/files/neg/viewtest.scala
+++ b/test/files/neg/viewtest.scala
@@ -37,7 +37,7 @@ object O {
}
}
- implicit def view3[a <% Ordered[a]](x: List[a]): Ordered[List[a]] =
+ implicit def view3[a <% Ordered[a]](x: List[a]): Ordered[List[a]] =
new Ordered[List[a]] {
def compareTo [b >: List[a] <% Ordered[b]](y: b): Int = y match {
case y1: List[a] => compareLists(x, y1)
@@ -72,7 +72,7 @@ class Node[a <% Ordered[a]](elem: a, l: Tree[a], r: Tree[a]) extends Tree[a] {
if (x == elem) this
else if (x < elem) new Node(elem, l insert x, r)
else new Node(elem, l, r insert x)
- def elements: List[a] =
+ def elements: List[a] =
l.elements ::: List(elem) ::: r.elements
}
@@ -86,7 +86,7 @@ case class Str(elem: String) extends Ordered[Str] {
object Test {
import O._
- private def toCharList(s: String): List[Char] =
+ private def toCharList(s: String): List[Char] =
if (s.length() == 0) List()
else s.charAt(0) :: toCharList(s.substring(1))
diff --git a/test/files/pos/List1.scala b/test/files/pos/List1.scala
index 1321d95c20..9d3a51f4e3 100644
--- a/test/files/pos/List1.scala
+++ b/test/files/pos/List1.scala
@@ -17,7 +17,7 @@ object lists {
def isEmpty = false;
def head = x;
def tail = xs;
- }
+ }
def foo = {
val intnil = Nil[Int];
diff --git a/test/files/pos/MailBox.scala b/test/files/pos/MailBox.scala
index 8e27bd362d..2a3f02df0b 100644
--- a/test/files/pos/MailBox.scala
+++ b/test/files/pos/MailBox.scala
@@ -24,7 +24,7 @@ class MailBox {
private val sent = new LinkedList[Any];
private var lastSent = sent;
private val receivers = new LinkedList[Receiver];
- private var lastReceiver = receivers;
+ private var lastReceiver = receivers;
def send(msg: Any): Unit = synchronized {
var r = receivers;
@@ -59,7 +59,7 @@ class MailBox {
}
f(msg)
}
-
+
def receiveWithin[a](msec: Long)(f: PartialFunction[Any, a]): a = {
val msg: Any = synchronized {
var s = sent;
diff --git a/test/files/pos/Transactions.scala b/test/files/pos/Transactions.scala
index ed989e178e..9b4388300b 100644
--- a/test/files/pos/Transactions.scala
+++ b/test/files/pos/Transactions.scala
@@ -28,7 +28,7 @@ class Transaction {
var next: Transaction = null
def this(hd: Transaction, tl: Transaction) = { this(); this.head = head; this.next = next }
-
+
def makeAbort() = synchronized {
while (status != Transaction.Aborted && status != Transaction.Committed) {
status = Transaction.Abortable
@@ -48,7 +48,7 @@ class Transaction {
case ex: AbortException => abort(); None
case ex: Throwable => abort(); throw ex
}
-
+
}
trait Transactional {
@@ -58,7 +58,7 @@ trait Transactional {
/** copy back snapshot */
def rollBack(): Unit
-
+
var readers: Transaction
var writer: Transaction
@@ -66,11 +66,11 @@ trait Transactional {
if (writer == null) null
else if (writer.status == Transaction.Running) writer
else {
- if (writer.status != Transaction.Committed) rollBack();
- writer = null;
- null
+ if (writer.status != Transaction.Committed) rollBack();
+ writer = null;
+ null
}
-
+
def getter(thisTrans: Transaction) {
if (writer == thisTrans) return
var r = readers
@@ -96,7 +96,7 @@ trait Transactional {
synchronized {
val w = currentWriter()
if (w != null)
- if (thisTrans.id < w.id) { w.makeAbort(); rollBack() }
+ if (thisTrans.id < w.id) { w.makeAbort(); rollBack() }
else throw new AbortException
var r = readers
while (r != null && r.head.status != Transaction.Running) { r = r.next; readers = r }
@@ -111,4 +111,4 @@ trait Transactional {
}
}
}
-
+
diff --git a/test/files/pos/array-interfaces.scala b/test/files/pos/array-interfaces.scala
index 70cafd2bb1..4955911078 100644
--- a/test/files/pos/array-interfaces.scala
+++ b/test/files/pos/array-interfaces.scala
@@ -1,7 +1,7 @@
object s {
def f(x: Cloneable) = ()
def g(x: java.io.Serializable) = ()
-
+
def main(args: Array[String]): Unit = {
f(args)
g(args)
diff --git a/test/files/pos/arrays2.scala b/test/files/pos/arrays2.scala
index 795c486e37..2d5409cbb8 100644
--- a/test/files/pos/arrays2.scala
+++ b/test/files/pos/arrays2.scala
@@ -11,8 +11,8 @@ object arrays2 {
// #2422
object arrays4 {
- val args = Array[String]("World")
- "Hello %1$s".format(args: _*)
+ val args = Array[String]("World")
+ "Hello %1$s".format(args: _*)
}
// #2461
diff --git a/test/files/pos/builders.scala b/test/files/pos/builders.scala
index 0b620769c0..51d8af88f8 100644
--- a/test/files/pos/builders.scala
+++ b/test/files/pos/builders.scala
@@ -18,16 +18,16 @@ object builders {
def += (elem: B) { buf += elem }
def result: List[B] = buf.toList
}
-/*
+/*
def fill[A, Dim1, Dim2, Coll](n1: Int, n2: Int, elem: A)(implicit b1: Builder[Coll, Dim1, A], b2: Builder[Coll, Dim2, Dim1]) = {
for (i <- 0 until n1) {
for (j <- 0 until n2) {
b1 += elem
- }
+ }
b2 += b1.result
}
b2.result
- }
+ }
*/
/*
implicit def arrayBuilder[A, B] = new Builder[Array[A], Array[B], B] {
@@ -35,7 +35,7 @@ object builders {
private val buf = new scala.collection.mutable.ListBuffer[B]
def += (elem: B) { buf += elem }
def result: Array[B] = buf.toArray
- }
+ }
*/
class Iter[A, C](elems: List[A]) {
def ++ [B >: A, D](xs: Iterable[B])(implicit b: Builder[C, D, B]): D = {
@@ -48,7 +48,7 @@ object builders {
b.result
}
}
-
+
def main(args : Array[String]) : Unit = {
val x1 = new Iter[Int, List[Int]](List(1, 2, 3))
// val x2 = new Iter[Int, Array[Int]](List(1, 2, 3))
diff --git a/test/files/pos/caseclass-productN.scala b/test/files/pos/caseclass-productN.scala
index a0964218ac..e2177856fd 100644
--- a/test/files/pos/caseclass-productN.scala
+++ b/test/files/pos/caseclass-productN.scala
@@ -2,17 +2,17 @@ object Test {
class A
class B extends A
class C extends B
-
+
case class Bippy[T](x: Int, y: List[T], z: T) { }
case class Bippy2[T](x: Int, y: List[T], z: T) { }
-
+
def bippies = List(
Bippy(5, List(new C), new B),
Bippy2(5, List(new B), new C)
)
-
+
def bmethod(x: B) = ()
-
+
def main(args: Array[String]): Unit = {
bippies flatMap (_._2) foreach bmethod
bippies map (_._3) foreach bmethod
diff --git a/test/files/pos/channels.scala b/test/files/pos/channels.scala
index eb26a2bcf6..0a2274c47a 100644
--- a/test/files/pos/channels.scala
+++ b/test/files/pos/channels.scala
@@ -6,7 +6,7 @@ case class ![a](chan: Channel[a], data: a)
/*
object Bang {
- def unapply[a](x: ![a]): Option[{Channel[a], a}] =
+ def unapply[a](x: ![a]): Option[{Channel[a], a}] =
Some(x.chan, x.data)
}
@@ -14,7 +14,7 @@ object Bang {
object Test extends App {
object IC extends Channel[Int]
def f[b](x: ![b]): Int = x match {
- case send: ![c] =>
+ case send: ![c] =>
send.chan match {
case IC => send.data
}
@@ -27,4 +27,4 @@ object Test2 extends App {
case IC ! x => x
}
}
-
+
diff --git a/test/files/pos/clsrefine.scala b/test/files/pos/clsrefine.scala
index 0a016dec07..b29c01db8b 100644
--- a/test/files/pos/clsrefine.scala
+++ b/test/files/pos/clsrefine.scala
@@ -25,9 +25,9 @@ object test {
val y1, y2 = 1;
}
val a: A { type X1 = Int; type X2 = Int } = b;
- val a1 = new A {
+ val a1 = new A {
type X1 = Int;
- type X2 = String;
+ type X2 = String;
val x1 = 1;
val x2 = "hello"
}
diff --git a/test/files/pos/collectGenericCC.scala b/test/files/pos/collectGenericCC.scala
index 5c51a50d71..8201c6a271 100644
--- a/test/files/pos/collectGenericCC.scala
+++ b/test/files/pos/collectGenericCC.scala
@@ -7,8 +7,8 @@ object Test {
r foreach ((a: A) => b += a)
b.result
}
-
- collect[Int, Vector[Int]](List(1,2,3,4))
+
+ collect[Int, Vector[Int]](List(1,2,3,4))
collect[Char, String](List('1','2','3','4'))
- collect[Char, Array[Char]](List('1','2','3','4'))
+ collect[Char, Array[Char]](List('1','2','3','4'))
} \ No newline at end of file
diff --git a/test/files/pos/context.scala b/test/files/pos/context.scala
index 4e11d07eb4..13f6bb43c5 100644
--- a/test/files/pos/context.scala
+++ b/test/files/pos/context.scala
@@ -12,10 +12,10 @@ class Context {
abstract class SymbolWrapper {
val context: Context;
import context._;
-
+
class Symbols {
self: context.symbols.type =>
-
+
abstract class Symbol {
def typ: types.Type;
def sym: Symbol = typ.sym;
@@ -29,7 +29,7 @@ abstract class TypeWrapper {
class Types {
self: context.types.type =>
-
+
abstract class Type {
def sym: symbols.Symbol;
def typ: Type = sym.typ;
diff --git a/test/files/pos/cyclics-pos.scala b/test/files/pos/cyclics-pos.scala
index 395e88815a..051bdd6ed8 100644
--- a/test/files/pos/cyclics-pos.scala
+++ b/test/files/pos/cyclics-pos.scala
@@ -1,26 +1,26 @@
trait Param[T]
trait Abs { type T }
trait Cyclic1[A <: Param[A]] // works
-trait Cyclic2[A <: Abs { type T <: A }]
-trait Cyclic3 { type A <: Abs { type T = A } }
+trait Cyclic2[A <: Abs { type T <: A }]
+trait Cyclic3 { type A <: Abs { type T = A } }
trait Cyclic4 { type A <: Param[A] } // works
-trait Cyclic5 { type AA <: Abs; type A <: AA { type T = A } }
+trait Cyclic5 { type AA <: Abs; type A <: AA { type T = A } }
trait IterableTemplate {
type Elem
type Constr <: IterableTemplate
type ConstrOf[A] = Constr { type Elem = A }
-
+
def iterator: Iterator[Elem]
-
+
def map [B] (f: Elem => B): ConstrOf[B]
-
+
def foreach(f: Elem => Unit) = iterator.foreach(f)
}
trait Iterable[A] extends IterableTemplate { self =>
- type Elem
+ type Elem
type Constr <: Iterable[A] { type Constr <: Iterable.this.Constr }
}
diff --git a/test/files/pos/depmet_implicit_chaining_zw.scala b/test/files/pos/depmet_implicit_chaining_zw.scala
index e3a145ab38..93da3b0f8e 100644
--- a/test/files/pos/depmet_implicit_chaining_zw.scala
+++ b/test/files/pos/depmet_implicit_chaining_zw.scala
@@ -15,7 +15,7 @@ object ZipWith {
type T = Stream[S] => zWith.T // dependent types replace the associated types functionality
}
- // can't use implicitly[ZipWith[Succ[Succ[Zero]], Int => String => Boolean]],
+ // can't use implicitly[ZipWith[Succ[Succ[Zero]], Int => String => Boolean]],
// since that will chop of the {type T = ... } refinement in adapt (pt = ZipWith[Succ[Succ[Zero]], Int => String => Boolean])
// this works
// def zipWith(implicit zw: ZipWith[Succ[Succ[Zero]], Int => String => Boolean]): zw.T = zw.x
diff --git a/test/files/pos/depmet_implicit_norm_ret.scala b/test/files/pos/depmet_implicit_norm_ret.scala
index 4cdb2931c6..bafd2f7c51 100644
--- a/test/files/pos/depmet_implicit_norm_ret.scala
+++ b/test/files/pos/depmet_implicit_norm_ret.scala
@@ -1,29 +1,29 @@
object Test{
def ?[S <: AnyRef](implicit w : S) : w.type = w
-
+
// fallback, lower priority (overloading rules apply: pick alternative in subclass lowest in subtyping lattice)
class ZipWithDefault {
implicit def ZeroZipWith[S] = new ZipWith[S] {
type T = Stream[S]
- }
+ }
}
-
+
object ZipWith extends ZipWithDefault {
// def apply[S: ZipWith](s : S) = ?[ZipWith[S]].zipWith(s) // TODO: bug return type should be inferred
def apply[S](s : S)(implicit zw: ZipWith[S]): zw.T = zw.zipWith(s)
implicit def SuccZipWith[S,R](implicit zWith : ZipWith[R]) = new ZipWith[S => R] {
type T = Stream[S] => zWith.T // dependent types replace the associated types functionality
- }
+ }
}
-
+
trait ZipWith[S] {
type T
def zipWith : S => T = error("")
}
-
+
// bug: inferred return type = (Stream[A]) => java.lang.Object with Test.ZipWith[B]{type T = Stream[B]}#T
// this seems incompatible with vvvvvvvvvvvvvvvvvvvvvv -- #3731
- def map[A,B](f : A => B) /* : Stream[A] => Stream[B]*/ = ZipWith(f)
- val tst: Stream[Int] = map{x: String => x.length}(Stream("a"))
-} \ No newline at end of file
+ def map[A,B](f : A => B) /* : Stream[A] => Stream[B]*/ = ZipWith(f)
+ val tst: Stream[Int] = map{x: String => x.length}(Stream("a"))
+} \ No newline at end of file
diff --git a/test/files/pos/depmet_implicit_oopsla_session.scala b/test/files/pos/depmet_implicit_oopsla_session.scala
index 21588a56ad..e2c67d7c32 100644
--- a/test/files/pos/depmet_implicit_oopsla_session.scala
+++ b/test/files/pos/depmet_implicit_oopsla_session.scala
@@ -11,19 +11,19 @@ object Sessions {
def run(p: Stop, dp: Stop): Unit = {}
}
- implicit def InDual[A, B](implicit sessionDIn: Session[B]) =
+ implicit def InDual[A, B](implicit sessionDIn: Session[B]) =
new Session[In[A, B]] {
type Dual = Out[A, sessionDIn.Dual]
- def run(p: In[A, B], dp: Dual): Unit =
+ def run(p: In[A, B], dp: Dual): Unit =
sessionDIn.run(p.func(dp.x), dp.y)
}
- implicit def OutDual[A, B](implicit sessionDOut: Session[B]) =
+ implicit def OutDual[A, B](implicit sessionDOut: Session[B]) =
new Session[Out[A, B]] {
type Dual = In[A, sessionDOut.Dual]
- def run(p: Out[A, B], dp: Dual): Unit =
+ def run(p: Out[A, B], dp: Dual): Unit =
sessionDOut.run(p.y, dp.func(p.x))
}
@@ -32,7 +32,7 @@ object Sessions {
sealed case class Out[+A, +B](x: A, y: B)
def addServer =
- In{x: Int =>
+ In{x: Int =>
In{y: Int => System.out.println("Thinking")
Out(x+y,
Stop())}}
@@ -48,7 +48,7 @@ object Sessions {
// def runSession[S, D](p: S, dp: D)(implicit s: Session[S]#HasDual[D]) =
// s.run(p, dp)
- //
+ //
// def runSession[S, D](p: S, dp: D)(implicit s: Session[S]{type Dual=D}) =
// s.run(p, dp)
diff --git a/test/files/pos/depmet_implicit_oopsla_session_2.scala b/test/files/pos/depmet_implicit_oopsla_session_2.scala
index 5c3b78e3f5..8d7daa6dc6 100644
--- a/test/files/pos/depmet_implicit_oopsla_session_2.scala
+++ b/test/files/pos/depmet_implicit_oopsla_session_2.scala
@@ -36,7 +36,7 @@ object Sessions {
implicit def InDual[Data, Cont](implicit cont: Session[Cont]) = new Session[In[Data, Cont]] {
type Dual = Out[Data, cont.Dual]
- def run(self: Self, dual: Dual): Unit =
+ def run(self: Self, dual: Dual): Unit =
cont.run(self.recv(dual.data), dual.cont)
}
@@ -46,13 +46,13 @@ object Sessions {
implicit def OutDual[Data, Cont](implicit cont: Session[Cont]) = new Session[Out[Data, Cont]] {
type Dual = In[Data, cont.Dual]
- def run(self: Self, dual: Dual): Unit =
+ def run(self: Self, dual: Dual): Unit =
cont.run(self.cont, dual.recv(self.data))
}
// a concrete session
def addServer =
- In{x: Int =>
+ In{x: Int =>
In{y: Int => System.out.println("Thinking")
Out(x+y,
Stop())}}
@@ -71,7 +71,7 @@ object Sessions {
// def runSession[S, D](p: S, dp: D)(implicit s: Session[S]#HasDual[D]) =
// s.run(p, dp)
- //
+ //
// def runSession[S, D](p: S, dp: D)(implicit s: Session[S]{type Dual=D}) =
// s.run(p, dp)
diff --git a/test/files/pos/depmet_implicit_oopsla_session_simpler.scala b/test/files/pos/depmet_implicit_oopsla_session_simpler.scala
index 37bc0958d3..d2986ef56f 100644
--- a/test/files/pos/depmet_implicit_oopsla_session_simpler.scala
+++ b/test/files/pos/depmet_implicit_oopsla_session_simpler.scala
@@ -14,7 +14,7 @@ object Sessions {
// can't write B <: Session{type Dual = BDual} due to limitations in type inference algorithm
// (type variables cannot occur on both sides of <:)
// using B#Dual instead of BDual is too imprecise, since it is disconnected from the actual argument that is passed for B
- // would be nice if we could introduce a universal quantification over BDual that is not part of the
+ // would be nice if we could introduce a universal quantification over BDual that is not part of the
// type parameter list
sealed case class In[A, B <: Session, BDual <: Session](recv: A => B)(implicit dual: B <:< Session{type Dual=BDual}) extends Session {
type Dual = Out[A, BDual]
@@ -29,7 +29,7 @@ object Sessions {
}
def addServer =
- In{x: Int =>
+ In{x: Int =>
In{y: Int => System.out.println("Thinking")
Out(x+y,
Stop())}}
diff --git a/test/files/pos/depmet_implicit_oopsla_zipwith.scala b/test/files/pos/depmet_implicit_oopsla_zipwith.scala
index c76d02c1ae..fe69802d26 100644
--- a/test/files/pos/depmet_implicit_oopsla_zipwith.scala
+++ b/test/files/pos/depmet_implicit_oopsla_zipwith.scala
@@ -15,7 +15,7 @@ object ZipWith {
def manyApp = n => xs => xs
}
- implicit def SuccZipWith[N, S, R](implicit zw: ZipWith[N, R]) =
+ implicit def SuccZipWith[N, S, R](implicit zw: ZipWith[N, R]) =
new ZipWith[Succ[N],S => R] {
type T = Stream[S] => zw.T
@@ -33,12 +33,12 @@ object ZipWith {
object Test {
def zWith[N, S](n: N, s: S)(implicit zw: ZipWith[N, S]): zw.T = zw.zipWith(n)(s)
- def zipWith0: Stream[Int] = zWith(Zero(),0)
+ def zipWith0: Stream[Int] = zWith(Zero(),0)
// (Stream[A]) => java.lang.Object with ZipWith[Zero,B]{type T = Stream[B]}#T
// should normalise to: Stream[A] => Stream[B]
def map[A, B](f: A => B) = zWith(Succ(Zero()),f)
-
+
def zipWith3[A, B, C, D](f: A => B => C => D) = //: Stream[A] => Stream[B] => Stream[C] => Stream[D] = // BUG why do we need a return type?
zWith(Succ(Succ(Succ(Zero()))),f)
} \ No newline at end of file
diff --git a/test/files/pos/depmet_implicit_tpbetareduce.scala b/test/files/pos/depmet_implicit_tpbetareduce.scala
index 35d260683b..c0b9b4e8e4 100644
--- a/test/files/pos/depmet_implicit_tpbetareduce.scala
+++ b/test/files/pos/depmet_implicit_tpbetareduce.scala
@@ -1,10 +1,10 @@
trait HOSeq {
trait Accumulator[+coll[x], elT]
trait Iterable[+t] {
- type m[+x]
+ type m[+x]
def accumulator[t]: Accumulator[m, t]
}
- implicit def listAccumulator[elT]: Accumulator[List, elT] = new Accumulator[List, elT] {}
+ implicit def listAccumulator[elT]: Accumulator[List, elT] = new Accumulator[List, elT] {}
trait List[+t] extends Iterable[t] {
type m[+x] = List[x]
def accumulator[t]: Accumulator[List, t] = listAccumulator[t]
diff --git a/test/files/pos/elidable-tparams.scala b/test/files/pos/elidable-tparams.scala
index 23b1cba615..e47951f61d 100644
--- a/test/files/pos/elidable-tparams.scala
+++ b/test/files/pos/elidable-tparams.scala
@@ -3,7 +3,7 @@ import elidable._
class ElidableCrashTest {
trait My
-
+
@elidable(MINIMUM) def foo[a >: My <: My]: scala.Unit = ()
foo[My] // crash
diff --git a/test/files/pos/gadt-gilles.scala b/test/files/pos/gadt-gilles.scala
index 662be9017d..309168c1e0 100644
--- a/test/files/pos/gadt-gilles.scala
+++ b/test/files/pos/gadt-gilles.scala
@@ -6,7 +6,7 @@ object Test {
val x: A[C with D] = new B[C, D] {}
val y: A[C with D] = x match { case b: B[u, v] => (new B[u, v] {}): A[u with v] } // OK
-
+
def f[T, U](p: A[T with U]): A[T with U] = p match { case b: B[u, v] => new A[u with v] {} } // Not OK
}
diff --git a/test/files/pos/gadts2.scala b/test/files/pos/gadts2.scala
index fc2a7e4333..2263cf13a6 100644
--- a/test/files/pos/gadts2.scala
+++ b/test/files/pos/gadts2.scala
@@ -9,8 +9,8 @@ object Test {
final case class NumTerm(val n: Number) extends Term[Number]
def f[a](t: Term[a], c: Cell[a]) {
- t match {
- case NumTerm(n) => c.x = MyDouble(1.0)
+ t match {
+ case NumTerm(n) => c.x = MyDouble(1.0)
}
}
diff --git a/test/files/pos/generic-sigs.scala b/test/files/pos/generic-sigs.scala
index 533163373b..40ec044656 100644
--- a/test/files/pos/generic-sigs.scala
+++ b/test/files/pos/generic-sigs.scala
@@ -4,7 +4,7 @@ object A {
def f3(x: Class[_ <: Int]) = x
def f4(x: Class[_ <: String with Int]) = x
def f5(x: Class[_ <: Int with String]) = x
-
+
class Bippy[T]
def f6(x: Int) = new Bippy[t forSome { type t <: Int }]
def f7(x: T forSome { type T <: Float }) = x
@@ -12,7 +12,7 @@ object A {
def f9(x: T forSome { type T <: runtime.BoxedUnit }) = x
def f10(x: Int) = new Bippy[t forSome { type t <: Unit }]
def f11(x: Int) = new Bippy[t forSome { type t >: Null }]
-
+
class Boppy[+T1,-T2]
def g1 = new Boppy[t forSome { type t <: Int }, u forSome { type u <: String }]
} \ No newline at end of file
diff --git a/test/files/pos/gosh.scala b/test/files/pos/gosh.scala
index 98fae8a31e..427df4d33c 100644
--- a/test/files/pos/gosh.scala
+++ b/test/files/pos/gosh.scala
@@ -7,35 +7,35 @@ object ShapeTest extends App {
abstract class Shape {
def draw(): Unit
}
-
+
class Line(s: Point, e: Point) extends Shape {
def draw() { Console.println("draw line " + s + "," + e) }
}
-
+
abstract class Foo {
type T <: Object
-
+
def show(o: T): Unit
def print() { Console.println("in Foo") }
}
-
+
abstract class ShapeFoo extends Foo {
type T <: Shape
def show(o: T) { o.draw() }
override def print() { Console.println("in ShapeFoo") }
}
-
+
class LineFoo extends ShapeFoo {
type T = Line
override def print() { Console.println("in LineFoo") }
}
-
+
val p1 = new Point(1,4)
val p2 = new Point(12, 28)
-
+
val l1 = new Line(p1, p2)
-
+
val l = new ShapeFoo { // ** //
type T = Line // ** //
override def print() { Console.println("in LineFoo") } // ** //
diff --git a/test/files/pos/gui.scala b/test/files/pos/gui.scala
index 3b4f49cf55..322e0a6e22 100644
--- a/test/files/pos/gui.scala
+++ b/test/files/pos/gui.scala
@@ -2,7 +2,7 @@ object Geom {
trait Shape
case class Point(x: Int, y: Int) extends Shape
case class Rectangle(ll: Point, ur: Point) extends Shape {
- def inset(delta: Int) =
+ def inset(delta: Int) =
Rectangle(Point(ll.x - delta, ll.y - delta), Point(ur.x + delta, ur.y + delta));
}
}
@@ -20,7 +20,7 @@ trait Screen {
}
object DummyScreen extends Screen {
- def drawRect(r: Geom.Rectangle, c: Color) {
+ def drawRect(r: Geom.Rectangle, c: Color) {
Console.println("draw " + r + " with " + c)
}
def fillRect(r: Geom.Rectangle, c: Color) {
@@ -55,7 +55,7 @@ object GUI {
def mouseDown(p: Geom.Point): Unit
}
- abstract class Button(scr: Screen, p: Geom.Point, name: String)
+ abstract class Button(scr: Screen, p: Geom.Point, name: String)
extends Glyph with MouseCtl {
var enabled: Boolean = false
val label = new Label(scr, p, name)
@@ -86,7 +86,7 @@ object GUIClient {
def quit() { Console.println("application exited") }
}
- class QuitButton (scr: Screen, p: Geom.Point, name: String, a: App)
+ class QuitButton (scr: Screen, p: Geom.Point, name: String, a: App)
extends GUI.Button(scr, p, name) {
def doit() { a.quit() }
}
diff --git a/test/files/pos/hk-infer.scala b/test/files/pos/hk-infer.scala
index 30e3476404..7834282bf2 100644
--- a/test/files/pos/hk-infer.scala
+++ b/test/files/pos/hk-infer.scala
@@ -31,7 +31,7 @@ object DoesWorkHK {
def BOOP(ys: Seq[M[_]]) = new Booper[M](xs ++ ys)
}
implicit def mkBoop[M[_]](xs: Seq[M[_]]) = new Booper[M](xs)
-
+
def f1 = x BOOP y BOOP x1 BOOP x2
}
diff --git a/test/files/pos/hkarray.scala b/test/files/pos/hkarray.scala
index af1160300a..3faae180f4 100644
--- a/test/files/pos/hkarray.scala
+++ b/test/files/pos/hkarray.scala
@@ -1,5 +1,5 @@
trait Foo[CC[_]] { }
class Bip {
- val x = new Foo[Array] { }
+ val x = new Foo[Array] { }
} \ No newline at end of file
diff --git a/test/files/pos/hkrange.scala b/test/files/pos/hkrange.scala
index a6803230ed..8d61167ad8 100644
--- a/test/files/pos/hkrange.scala
+++ b/test/files/pos/hkrange.scala
@@ -1,5 +1,5 @@
class A {
def f[CC[X] <: Traversable[X]](x: CC[Int]) = ()
-
+
f(1 to 5)
}
diff --git a/test/files/pos/imp2-pos.scala b/test/files/pos/imp2-pos.scala
index 5460c60015..407b07f3fd 100644
--- a/test/files/pos/imp2-pos.scala
+++ b/test/files/pos/imp2-pos.scala
@@ -1,5 +1,5 @@
object Test {
- import collection.mutable._
+ import collection.mutable._
import collection.mutable._
val x = new HashMap
}
diff --git a/test/files/pos/implicit-infix-ops.scala b/test/files/pos/implicit-infix-ops.scala
index 66f3718e86..d7519e6340 100644
--- a/test/files/pos/implicit-infix-ops.scala
+++ b/test/files/pos/implicit-infix-ops.scala
@@ -1,7 +1,7 @@
object Test {
import Ordering.Implicits._
import Numeric.Implicits._
-
+
def f1[T: Numeric](x: T, y: T, z: T) = x + y + z
def f2[T: Ordering](x: T, y: T, z: T) = if (x < y) (z > y) else (x < z)
}
@@ -9,7 +9,7 @@ object Test {
object Int {
import Ordering.Implicits._
import math.Integral.Implicits._
-
+
def f1[T: Integral](x: T, y: T, z: T) = (x + y + z) / z
def f2[T: Ordering](x: T, y: T, z: T) = if (x < y) (z > y) else (x < z)
}
@@ -17,7 +17,7 @@ object Int {
object Frac {
import Ordering.Implicits._
import math.Fractional.Implicits._
-
+
def f1[T: Fractional](x: T, y: T, z: T) = (x + y + z) / z
def f2[T: Ordering](x: T, y: T, z: T) = if (x < y) (z > y) else (x < z)
} \ No newline at end of file
diff --git a/test/files/pos/implicits.scala b/test/files/pos/implicits.scala
index 960c265e55..2c01dd0ba8 100644
--- a/test/files/pos/implicits.scala
+++ b/test/files/pos/implicits.scala
@@ -45,7 +45,7 @@ object Test1625 {
implicit def byName[A](x: =>A) = new Wrapped(x)
implicit def byVal[A](x: A) = x
-
+
def main(args: Array[String]) = {
// val res:Wrapped = 7 // works
@@ -57,7 +57,7 @@ object Test1625 {
}
object Test2188 {
- implicit def toJavaList[A: ClassManifest](t:collection.Seq[A]):java.util.List[A] = java.util.Arrays.asList(t.toArray:_*)
+ implicit def toJavaList[A: ClassManifest](t:collection.Seq[A]):java.util.List[A] = java.util.Arrays.asList(t.toArray:_*)
val x: java.util.List[String] = List("foo")
}
@@ -67,21 +67,21 @@ object TestNumericWidening {
val x: java.lang.Long = y
}
-// #2709
-package foo2709 {
- class A
- class B
-
- package object bar {
- implicit def a2b(a: A): B = new B
- }
-
- package bar {
- object test {
- new A: B
- }
- }
-}
+// #2709
+package foo2709 {
+ class A
+ class B
+
+ package object bar {
+ implicit def a2b(a: A): B = new B
+ }
+
+ package bar {
+ object test {
+ new A: B
+ }
+ }
+}
// Problem with specs
object specsProblem {
diff --git a/test/files/pos/imports-pos.scala b/test/files/pos/imports-pos.scala
index f6a55e5e07..5f70a5d2da 100644
--- a/test/files/pos/imports-pos.scala
+++ b/test/files/pos/imports-pos.scala
@@ -7,10 +7,10 @@ object test {
val foo = 1;
- p("hello"); print("world"); S.out.println("!");
+ p("hello"); print("world"); S.out.println("!");
S.out.flush();
}
object test1 {
import test._;
foo
-}
+}
diff --git a/test/files/pos/infer2-pos.scala b/test/files/pos/infer2-pos.scala
index e065219a80..06d0f5814f 100644
--- a/test/files/pos/infer2-pos.scala
+++ b/test/files/pos/infer2-pos.scala
@@ -5,4 +5,4 @@ case class nil[T] extends Lst[T]
object test {
Console.println(cons(1, nil()))
}
-
+
diff --git a/test/files/pos/inferbroadtype.scala b/test/files/pos/inferbroadtype.scala
index de8f7aa184..467bd0f186 100644
--- a/test/files/pos/inferbroadtype.scala
+++ b/test/files/pos/inferbroadtype.scala
@@ -2,7 +2,7 @@ object Test {
abstract class Base { val changesBaseClasses: Boolean }
class Concrete extends Base { val changesBaseClasses = true }
def getBase : Base = new Concrete
-
+
var c = new Base { val changesBaseClasses = true }
c = getBase
}
diff --git a/test/files/pos/inliner2.scala b/test/files/pos/inliner2.scala
index bc83e04312..fe231ec3c4 100644
--- a/test/files/pos/inliner2.scala
+++ b/test/files/pos/inliner2.scala
@@ -10,7 +10,7 @@ class A {
final def bob2() = if (debug) 1 else 2
}
// Cool:
-//
+//
// % ls -1 /tmp/2901/
// A$$anonfun$bob1$1.class
// A$$anonfun$bob1$2.class
@@ -20,7 +20,7 @@ class A {
// A.class
//
// Observations:
-//
+//
// (1) The inlined version accesses the field: the explicit one calls the accessor.
// (2) The inlined version fails to eliminate boxing. With reference types it emits
// an unneeded checkcast.
@@ -30,7 +30,7 @@ class A {
// inlined at all sites.
//
// Generated bytecode for the above:
-//
+//
// public final int bob1();
// Code:
// Stack=1, Locals=1, Args_size=1
@@ -44,7 +44,7 @@ class A {
// 15: invokestatic #41; //Method scala/runtime/BoxesRunTime.boxToInteger:(I)Ljava/lang/Integer;
// 18: invokestatic #45; //Method scala/runtime/BoxesRunTime.unboxToInt:(Ljava/lang/Object;)I
// 21: ireturn
-//
+//
// public final int bob2();
// Code:
// Stack=1, Locals=1, Args_size=1
diff --git a/test/files/pos/java-access-pos/J.java b/test/files/pos/java-access-pos/J.java
index b6bc3363a1..4f2024673c 100644
--- a/test/files/pos/java-access-pos/J.java
+++ b/test/files/pos/java-access-pos/J.java
@@ -4,11 +4,11 @@ public abstract class J {
public J() { }
J(int x1) { }
protected J(int x1, int x2) { }
-
+
abstract void packageAbstract();
protected abstract void protectedAbstract();
public abstract void publicAbstract();
-
+
void packageConcrete() { return; }
protected void protectedConcrete() { return; }
public void publicConcrete() { return; }
diff --git a/test/files/pos/java-access-pos/S1.scala b/test/files/pos/java-access-pos/S1.scala
index 10730e3a70..cc739d9555 100644
--- a/test/files/pos/java-access-pos/S1.scala
+++ b/test/files/pos/java-access-pos/S1.scala
@@ -6,7 +6,7 @@ class S1 extends J {
override private[b] def packageAbstract() = ()
override protected[b] def protectedAbstract() = ()
override def publicAbstract() = ()
-
+
override private[b] def packageConcrete() = ()
override protected[b] def protectedConcrete() = ()
override def publicConcrete() = ()
@@ -26,7 +26,7 @@ class S3 extends J {
protected[b] def packageAbstract() = ()
protected[b] def protectedAbstract() = ()
def publicAbstract() = ()
-
+
override protected[b] def packageConcrete() = ()
override protected[b] def protectedConcrete() = ()
override def publicConcrete() = ()
@@ -37,7 +37,7 @@ class S4 extends J {
private[a] def packageAbstract() = ()
protected[a] def protectedAbstract() = ()
def publicAbstract() = ()
-
+
override private[a] def packageConcrete() = ()
override protected[a] def protectedConcrete() = ()
override def publicConcrete() = ()
@@ -48,14 +48,14 @@ class S5 extends J {
def packageAbstract() = ()
def protectedAbstract() = ()
def publicAbstract() = ()
-
+
override def packageConcrete() = ()
override def protectedConcrete() = ()
override def publicConcrete() = ()
}
/** Constructors.
*/
-class S6 extends J(1) {
+class S6 extends J(1) {
def packageAbstract() = ()
def protectedAbstract() = ()
def publicAbstract() = ()
diff --git a/test/files/pos/javaReadsSigs/fromjava.java b/test/files/pos/javaReadsSigs/fromjava.java
index 92441b0c6b..eca63961d5 100644
--- a/test/files/pos/javaReadsSigs/fromjava.java
+++ b/test/files/pos/javaReadsSigs/fromjava.java
@@ -22,11 +22,11 @@ class B { };
class Contra {
// Not an Ordering<Character>.
static Ordering<Object> charOrd = scala.math.Ordering.Char$.MODULE$;
-
+
public boolean useCharOrd() {
return charOrd.compare(new Object(), new Object()) == 0;
}
-
+
static Numeric<?> intNum = scala.math.Numeric.IntIsIntegral$.MODULE$;
}
@@ -36,13 +36,13 @@ public class fromjava {
return null;
}
};
-
+
public static Function1<Tuple2<? extends Object, B>, B> f2 = new scala.runtime.AbstractFunction1<Tuple2<? extends Object, B>, B>() {
public B apply(Tuple2<? extends Object, B> tup) {
return tup._2();
}
};
-
+
public static String vector(Vector<String> x) {
Vector<String> y = x.take(2);
return y.head();
diff --git a/test/files/pos/lambdalift.scala b/test/files/pos/lambdalift.scala
index bc997d6f81..10bbf3ac12 100644
--- a/test/files/pos/lambdalift.scala
+++ b/test/files/pos/lambdalift.scala
@@ -11,5 +11,5 @@ object test {
def h() = x;
}
g() + new inner().g();
- }
+ }
}
diff --git a/test/files/pos/listpattern.scala b/test/files/pos/listpattern.scala
index 47145bf037..b64068474c 100644
--- a/test/files/pos/listpattern.scala
+++ b/test/files/pos/listpattern.scala
@@ -1,7 +1,7 @@
trait Value {}
case class FloatValue(x: Double) extends Value
object Test {
- def applyNumeric(op: (Double, Double) => Double):
+ def applyNumeric(op: (Double, Double) => Double):
PartialFunction[List[Value], Value] = {
case List(FloatValue(x), FloatValue(y)) => FloatValue(op(x, y))
}
diff --git a/test/files/pos/looping-jsig.scala b/test/files/pos/looping-jsig.scala
index 6e3313c463..e2d9e76229 100644
--- a/test/files/pos/looping-jsig.scala
+++ b/test/files/pos/looping-jsig.scala
@@ -1,15 +1,15 @@
import scala.collection.mutable._
trait BugTrack {
- trait B[+T]
+ trait B[+T]
val cache : HashMap[A[_], B[_]] = HashMap.empty
- def A[T](f: Int => B[T]): A[T]
+ def A[T](f: Int => B[T]): A[T]
= new A[T]{def apply(in: Int) = f(in)}
-
+
abstract class A[+T] extends (Int => B[T]) {
def giveMeSame = this
- }
+ }
def amethod[T](p: =>A[T]): A[T] = A(in => cache.get(p) match {
case Some(res) => res
diff --git a/test/files/pos/michel6.scala b/test/files/pos/michel6.scala
index b32e8bed75..f312bf1796 100644
--- a/test/files/pos/michel6.scala
+++ b/test/files/pos/michel6.scala
@@ -1,6 +1,6 @@
object M {
def f(x: Int): Unit = {}
-
+
def g(): Int => Unit =
if (0 == 0) f else g()
}
diff --git a/test/files/pos/needstypeearly.scala b/test/files/pos/needstypeearly.scala
index a90c2575f2..bd93b5c45d 100644
--- a/test/files/pos/needstypeearly.scala
+++ b/test/files/pos/needstypeearly.scala
@@ -1,4 +1,4 @@
-abstract class NeedsXEarly {
- val x: Int
+abstract class NeedsXEarly {
+ val x: Int
}
class Foo extends { val x = 1 } with NeedsXEarly
diff --git a/test/files/pos/nothing_manifest_disambig.scala b/test/files/pos/nothing_manifest_disambig.scala
index 9a3db0c6d4..076742033f 100644
--- a/test/files/pos/nothing_manifest_disambig.scala
+++ b/test/files/pos/nothing_manifest_disambig.scala
@@ -1,10 +1,10 @@
object Test {
def mani[T: Manifest](xs: T) = xs
mani(List())
-
+
def listElMani[T: Manifest](xs: List[T]) = xs
listElMani(List())
-
+
def foo[A, C](m : C)(implicit ev: C <:< Traversable[A], mani: Manifest[A]): (C, A, Manifest[A]) = (m, m.head, mani)
- foo(List(1,2,3))
+ foo(List(1,2,3))
} \ No newline at end of file
diff --git a/test/files/pos/nullary.scala b/test/files/pos/nullary.scala
index 614fcdf480..8e5a834012 100644
--- a/test/files/pos/nullary.scala
+++ b/test/files/pos/nullary.scala
@@ -2,7 +2,7 @@ abstract class NullaryTest[T, m[s]] {
def nullary: String = "a"
val x = nullary
- def nullary2: T
+ def nullary2: T
val x2 = nullary2
def nullary3: m[T]
@@ -16,5 +16,5 @@ class Concrete extends NullaryTest[Int, List] {
object test {
(new Concrete).nullary2
- (new Concrete).nullary3
+ (new Concrete).nullary3
}
diff --git a/test/files/pos/nullary_poly.scala b/test/files/pos/nullary_poly.scala
index d2e1e127a1..4de7235a1c 100644
--- a/test/files/pos/nullary_poly.scala
+++ b/test/files/pos/nullary_poly.scala
@@ -2,9 +2,9 @@
class A {
// built-in
synchronized {}
-
+
val x: String = "a".asInstanceOf[String]
-
+
// user-defined:
def polyNullary[T]: List[T] = Nil
}
diff --git a/test/files/pos/override-object-yes.scala b/test/files/pos/override-object-yes.scala
index 858f9b21fc..b0563df0a3 100644
--- a/test/files/pos/override-object-yes.scala
+++ b/test/files/pos/override-object-yes.scala
@@ -14,8 +14,8 @@ package case1 {
override def f = 3
}
}
-
- trait Foo3 {
+
+ trait Foo3 {
object Bar {
def g: Traversable[Int] = Nil
}
diff --git a/test/files/pos/partialfun.scala b/test/files/pos/partialfun.scala
index 9f32a22023..d8971e56fb 100644
--- a/test/files/pos/partialfun.scala
+++ b/test/files/pos/partialfun.scala
@@ -1,6 +1,6 @@
object partialfun {
- def applyPartial[b](f: PartialFunction[Option[String], b])(x: Option[String]) =
+ def applyPartial[b](f: PartialFunction[Option[String], b])(x: Option[String]) =
if (f.isDefinedAt(x)) f(x) else "<undefined>";
applyPartial {
diff --git a/test/files/pos/pat_gilles.scala b/test/files/pos/pat_gilles.scala
index 704d5b9c00..567d700eba 100644
--- a/test/files/pos/pat_gilles.scala
+++ b/test/files/pos/pat_gilles.scala
@@ -1,7 +1,7 @@
abstract class Table2 {
- val x: Any => Unit = { zz:Any =>
+ val x: Any => Unit = { zz:Any =>
zz match {
case Table2.CellUpdated(row, column) =>
val foo = Table2.CellUpdated(2,2)
diff --git a/test/files/pos/propagate.scala b/test/files/pos/propagate.scala
index 84f4f5d6d2..a7f9d6ce6d 100644
--- a/test/files/pos/propagate.scala
+++ b/test/files/pos/propagate.scala
@@ -14,4 +14,4 @@ class C {
-
+
diff --git a/test/files/pos/return_thistype.scala b/test/files/pos/return_thistype.scala
index c0736c0ad9..f164e06cc0 100644
--- a/test/files/pos/return_thistype.scala
+++ b/test/files/pos/return_thistype.scala
@@ -1,8 +1,8 @@
// tests transformation of return type in typedTypeApply (see also tcpoly_gm.scala)
-class As {
- class A {
+class As {
+ class A {
def foo: A.this.type = bar.asInstanceOf[A.this.type]
def foo2: this.type = bar.asInstanceOf[this.type]
- def bar: A = null
+ def bar: A = null
}
}
diff --git a/test/files/pos/scala-singleton.scala b/test/files/pos/scala-singleton.scala
index 08038db93b..5e0baa0cb2 100644
--- a/test/files/pos/scala-singleton.scala
+++ b/test/files/pos/scala-singleton.scala
@@ -3,12 +3,12 @@
object Test {
def f1(x: AnyRef with Singleton): AnyRef with Singleton = x
def f2[T <: AnyRef with Singleton](x: T): T = x
-
+
val x1: AnyRef with Singleton = "abc"
val x2 = "def"
final val x3 = "ghi"
val x4: String = "jkl"
-
+
// compiles...
def narrow1(x: AnyRef): AnyRef with Singleton = x
@@ -17,26 +17,26 @@ object Test {
// fails, wait, what? This fails and narrow1 compiles?
def narrow3(x: AnyRef): AnyRef with Singleton = x.asInstanceOf[AnyRef with Singleton]
-
+
// ok
def narrow4[T <: AnyRef](x: T): AnyRef with Singleton = x
-
+
object imp {
implicit def narrow4[T <: AnyRef](x: T): AnyRef with Singleton = x
val x5: String = "mno"
def imp1 = f1(x5)
-
+
// f2(x5) // doesn't work but I think it should
def imp2 = f2(narrow4(x5))
}
-
+
def main(args: Array[String]): Unit = {
// compiles
f1(x1)
f1(x2)
f1(x3)
f1(x4)
-
+
f2(x1)
// f2(x2)
// f2(x3) // maybe this one should work
diff --git a/test/files/pos/scoping1.scala b/test/files/pos/scoping1.scala
index 9fe1b5f3e5..548f154b6b 100644
--- a/test/files/pos/scoping1.scala
+++ b/test/files/pos/scoping1.scala
@@ -9,4 +9,4 @@ object This extends App {
def foo() = ()
}
val c: C = new D
-}
+}
diff --git a/test/files/pos/selftails.scala b/test/files/pos/selftails.scala
index a4253b80c7..7c58543747 100644
--- a/test/files/pos/selftails.scala
+++ b/test/files/pos/selftails.scala
@@ -1,10 +1,10 @@
package net.liftweb.util
-
+
/**
* This trait adds functionality to Scala standard types
*/
trait BasicTypesHelpers { self: StringHelpers with ControlHelpers =>
-
+
/**
* Compare two arrays of Byte for byte equality.
* @return true if two Byte arrays contain the same bytes
@@ -19,5 +19,5 @@ trait BasicTypesHelpers { self: StringHelpers with ControlHelpers =>
}
}
-trait StringHelpers
+trait StringHelpers
trait ControlHelpers
diff --git a/test/files/pos/seq-ordering.scala b/test/files/pos/seq-ordering.scala
index 517d8ae8aa..8f1d293c40 100644
--- a/test/files/pos/seq-ordering.scala
+++ b/test/files/pos/seq-ordering.scala
@@ -2,7 +2,7 @@ import Ordering.Implicits._
class A {
import Predef.{ implicitly => ? }
-
+
?[Ordering[List[Int]]]
?[Ordering[IndexedSeq[(Int, String)]]]
?[Ordering[Seq[Seq[Int]]]]
diff --git a/test/files/pos/signatures/Test.java b/test/files/pos/signatures/Test.java
index 3d1e3756a7..78c196526b 100644
--- a/test/files/pos/signatures/Test.java
+++ b/test/files/pos/signatures/Test.java
@@ -3,7 +3,7 @@ import test.Outer;
/* Test correct generation of java signatures. The Outer class should not
* have a Java signature attribute for the inner method definition. Trait
- * Mutable should have one, even though it is also a nested definition.
+ * Mutable should have one, even though it is also a nested definition.
* (but for classes there is a way to tell about nesting to the JVM).
*/
class Test {
diff --git a/test/files/pos/signatures/sig.scala b/test/files/pos/signatures/sig.scala
index 4236f27bed..3feb9c456a 100644
--- a/test/files/pos/signatures/sig.scala
+++ b/test/files/pos/signatures/sig.scala
@@ -1,7 +1,7 @@
package test
/* Tests correct generation of Java signatures. The local method 'bar' should
- * not get a generic signature, as it may refer to type parameters of the enclosing
+ * not get a generic signature, as it may refer to type parameters of the enclosing
* method, and the JVM does not know about nested methods.
*/
class Outer {
diff --git a/test/files/pos/spec-Function1.scala b/test/files/pos/spec-Function1.scala
index 8d961c454d..7bdcd072b2 100644
--- a/test/files/pos/spec-Function1.scala
+++ b/test/files/pos/spec-Function1.scala
@@ -35,11 +35,11 @@ package scala
trait Function1[@specialized -T1, @specialized +R] extends AnyRef { self =>
def apply(v1:T1): R
override def toString() = "<function>"
-
+
/** (f compose g)(x) == f(g(x))
*/
def compose[A](g: A => T1): A => R = { x => apply(g(x)) }
-
+
/** (f andThen g)(x) == g(f(x))
*/
def andThen[A](g: R => A): T1 => A = { x => g(apply(x)) }
diff --git a/test/files/pos/spec-arrays.scala b/test/files/pos/spec-arrays.scala
index 96c75dd8de..84f6eef071 100644
--- a/test/files/pos/spec-arrays.scala
+++ b/test/files/pos/spec-arrays.scala
@@ -20,7 +20,7 @@ abstract class AbsArray[T] {
def updateBoolean(idx: Int, elem: Boolean) = update(idx, elem.asInstanceOf[T])
def applyObject(idx: Int): Object = apply(idx).asInstanceOf[Object]
def updateObject(idx: Int, elem: Object) = update(idx, elem.asInstanceOf[T])
-}
+}
final class IntArray(arr: Array[Int]) extends AbsArray[Int] {
def apply(idx: Int): Int = applyInt(idx)
@@ -64,7 +64,7 @@ class ScalaSpecTest extends Test {
while (i < arr.length) { acc = acc + arr.applyInt(i); i += 1 }
acc
}
-
+
def modify(j: Int) = {
val base = j * 100 % 1000
var i = 0
@@ -74,7 +74,7 @@ class ScalaSpecTest extends Test {
}
}
}
-
+
class ScalaSpec2Test extends Test {
val arr: AbsArray[Int] = new IntArray(new Array[Int](1000))
@@ -84,7 +84,7 @@ class ScalaSpec2Test extends Test {
while (i < arr.length) { acc = acc + arr.applyInt(i); i += 1 }
acc
}
-
+
def modify(j: Int) = {
val base = j * 100 % 1000
var i = 0
@@ -94,7 +94,7 @@ class ScalaSpec2Test extends Test {
}
}
}
-
+
class ScalaWrapTest extends Test {
val arr: AbsArray[Int] = new ArraySeq(new Array[Int](1000))
@@ -104,7 +104,7 @@ class ScalaWrapTest extends Test {
while (i < arr.length) { acc = acc + arr.applyInt(i); i += 1 }
acc
}
-
+
def modify(j: Int) = {
val base = j * 100 % 1000
var i = 0
@@ -114,7 +114,7 @@ class ScalaWrapTest extends Test {
}
}
}
-
+
class ScalaGenTest extends Test {
val arr: AbsArray[Integer] = new ArraySeq(new Array[Integer](1000))
for (i <- 0 until arr.length) arr(i) = new Integer(0)
@@ -125,7 +125,7 @@ class ScalaGenTest extends Test {
while (i < arr.length) { acc = acc + arr.apply(i).intValue; i += 1 }
acc
}
-
+
def modify(j: Int) = {
val base = j * 100 % 1000
var i = 0
@@ -135,7 +135,7 @@ class ScalaGenTest extends Test {
}
}
}
-
+
class JavaTest extends Test {
val arr = new Array[Int](1000)
@@ -145,7 +145,7 @@ class JavaTest extends Test {
while (i < arr.length) { acc = acc + arr(i); i += 1 }
acc
}
-
+
def modify(j: Int) = {
val base = j * 100 % 1000
var i = 0
@@ -166,7 +166,7 @@ class ScalaSpec3Test extends Test {
while (i < arr.length) { acc = acc + arr(i); i += 1 }
acc
}
-
+
def modify(j: Int) = {
val base = j * 100 % 1000
var i = 0
@@ -188,25 +188,25 @@ object TestSpec extends scala.testing.Benchmark {
(new ScalaSpecTest).run()
}
}
-
+
object TestSpec2 extends scala.testing.Benchmark {
def run() {
(new ScalaSpec2Test).run()
}
}
-
+
object TestGen extends scala.testing.Benchmark {
def run() {
(new ScalaGenTest).run()
}
}
-
+
object TestWrap extends scala.testing.Benchmark {
def run() {
(new ScalaWrapTest).run()
}
}
-
+
object TestSpec3 extends scala.testing.Benchmark {
def run() {
(new ScalaSpec3Test).run()
diff --git a/test/files/pos/spec-asseenfrom.scala b/test/files/pos/spec-asseenfrom.scala
index edd801071a..cf20fc5ffa 100644
--- a/test/files/pos/spec-asseenfrom.scala
+++ b/test/files/pos/spec-asseenfrom.scala
@@ -1,4 +1,4 @@
-class Automaton[@specialized(Double) W,State] {
+class Automaton[@specialized(Double) W,State] {
def finalWeight(s: State): W = error("todo");
diff --git a/test/files/pos/spec-cyclic.scala b/test/files/pos/spec-cyclic.scala
index 65da297989..b983caa6db 100644
--- a/test/files/pos/spec-cyclic.scala
+++ b/test/files/pos/spec-cyclic.scala
@@ -6,18 +6,18 @@ trait MyPartialFunction[-A, +B] extends AnyRef with AbsFun[A, B]
trait ColMap[A, +B] extends MyPartialFunction[A, B] /*with Collection[(A, B)] */
-trait ColSorted[K,+A] extends ColRanged[K,A]
+trait ColSorted[K,+A] extends ColRanged[K,A]
-trait ColSortedMap[K,+E] extends ColMap[K,E] with ColSorted[K,Tuple2[K,E]]
+trait ColSortedMap[K,+E] extends ColMap[K,E] with ColSorted[K,Tuple2[K,E]]
trait MutMap[A, B] extends AnyRef
with ColMap[A, B]
-trait ColRanged[K, +A] //extends Iterable[A]
+trait ColRanged[K, +A] //extends Iterable[A]
trait JclRanged[K,A] extends ColRanged[K,A] //with MutableIterable[A] {
-trait JclMap[K,E] extends /*collection.jcl.MutableIterable[Tuple2[K,E]] with*/ MutMap[K,E]
+trait JclMap[K,E] extends /*collection.jcl.MutableIterable[Tuple2[K,E]] with*/ MutMap[K,E]
trait JclSorted[K,A] extends ColSorted[K,A] with JclRanged[K,A]
diff --git a/test/files/pos/spec-funs.scala b/test/files/pos/spec-funs.scala
index d54dfd8227..611ec0ef62 100644
--- a/test/files/pos/spec-funs.scala
+++ b/test/files/pos/spec-funs.scala
@@ -19,7 +19,7 @@ final class IntTest {
val xs = new Array[Int](10000)
val f = new AbsFunction1[Int, Int] {
def apply(x: Int): Int = x * x
- }
+ }
for (j <- 0 until niters) {
transF(xs, f)
}
diff --git a/test/files/pos/spec-params.scala b/test/files/pos/spec-params.scala
index 33a252120c..f522512846 100644
--- a/test/files/pos/spec-params.scala
+++ b/test/files/pos/spec-params.scala
@@ -10,7 +10,7 @@ class Foo[@specialized A: ClassManifest] {
def m2[@specialized B <: String](x: B) = x.concat("a")
// conflicting in bounds, no mention of other spec members
- // expect an overload here plus implementation in
+ // expect an overload here plus implementation in
// compatible specialized subclasses
def m3[@specialized B >: A](x: B) = ()
@@ -19,10 +19,10 @@ class Foo[@specialized A: ClassManifest] {
// non-conflicting, expect a normalized overload implementation here
def m5[@specialized B](x: B) = x
-
+
// non-conflicting, expect a normalized implementation here
// and specialized implementations for all expansions in specialized subclasses
- def m6[@specialized B](x: B, y: A) =
+ def m6[@specialized B](x: B, y: A) =
goal(y)
def goal(x: A) = {
diff --git a/test/files/pos/spec-sealed.scala b/test/files/pos/spec-sealed.scala
index a5ee4e3c5f..5782930899 100644
--- a/test/files/pos/spec-sealed.scala
+++ b/test/files/pos/spec-sealed.scala
@@ -2,7 +2,7 @@ sealed abstract class MyList[@specialized +A] {
def head: A
def tail: MyList[A]
- def ::[@specialized B >: A](x: B): MyList[B] =
+ def ::[@specialized B >: A](x: B): MyList[B] =
new Cons[B](x, this)
}
@@ -19,7 +19,7 @@ case class Cons[@specialized a](private val hd: a, tl: MyList[a]) extends MyList
abstract class IntList extends MyList[Int]
object Main extends App {
- val xs = 1 :: 2 :: 3 :: MyNil
+ val xs = 1 :: 2 :: 3 :: MyNil
println(xs)
}
diff --git a/test/files/pos/spec-short.scala b/test/files/pos/spec-short.scala
index 71e56a485a..94a8007c6e 100644
--- a/test/files/pos/spec-short.scala
+++ b/test/files/pos/spec-short.scala
@@ -5,7 +5,7 @@ abstract class AbsFun[@specialized T, @specialized U] {
// abstract function, specialized
def sum(xs: List[T]): Int
- def prod(xs: List[T], mul: (Int, T) => Int): Int =
+ def prod(xs: List[T], mul: (Int, T) => Int): Int =
(1 /: xs)(mul)
// concrete function, not specialized
@@ -18,9 +18,9 @@ abstract class AbsFun[@specialized T, @specialized U] {
class Square extends AbsFun[Int, Int] {
def apply(x: Int): Int = x * x
- def sum(xs: List[Int]): Int =
+ def sum(xs: List[Int]): Int =
(0 /: xs) (_ + _)
- def abs(m: Int): Int =
+ def abs(m: Int): Int =
sum(List(1, 2, 3))
}
diff --git a/test/files/pos/spec-t3497.scala b/test/files/pos/spec-t3497.scala
index ff054aa7de..6cc0e24f89 100644
--- a/test/files/pos/spec-t3497.scala
+++ b/test/files/pos/spec-t3497.scala
@@ -10,7 +10,7 @@ object B extends A[ Array[Byte], Int ] {
return -1
}
}
-
+
return 0
}
}
diff --git a/test/files/pos/spec-tailcall.scala b/test/files/pos/spec-tailcall.scala
index 703ec011ad..d91e2f59ce 100644
--- a/test/files/pos/spec-tailcall.scala
+++ b/test/files/pos/spec-tailcall.scala
@@ -1,5 +1,5 @@
class TailCall[@specialized T] {
- final def dropLeft(n: Int, xs: List[T]): List[T] =
+ final def dropLeft(n: Int, xs: List[T]): List[T] =
if (n == 0) xs
else dropLeft(n - 1, xs.tail)
/*
@@ -7,7 +7,7 @@ class TailCall[@specialized T] {
def crash(o: Option[String]) = filter {
case None if {
- def dropLeft[T](n: Int, xs: List[T]): List[T] =
+ def dropLeft[T](n: Int, xs: List[T]): List[T] =
if (n == 0) xs
else dropLeft(n - 1, xs.tail)
dropLeft(2, List(1, 2, 3)).isEmpty
diff --git a/test/files/pos/spec-traits.scala b/test/files/pos/spec-traits.scala
index 8b1fefe80f..c6cc2921b7 100644
--- a/test/files/pos/spec-traits.scala
+++ b/test/files/pos/spec-traits.scala
@@ -11,12 +11,12 @@ class Lazy {
// issue 3307
class Bug3307 {
- def f[Z](block: String => Z) {
- block("abc")
+ def f[Z](block: String => Z) {
+ block("abc")
}
-
- ({ () =>
- f { implicit x => println(x) } })()
+
+ ({ () =>
+ f { implicit x => println(x) } })()
}
// issue 3301
diff --git a/test/files/pos/spec-vector.scala b/test/files/pos/spec-vector.scala
index 392949c669..06e49b521f 100644
--- a/test/files/pos/spec-vector.scala
+++ b/test/files/pos/spec-vector.scala
@@ -1,4 +1,4 @@
// ticket #3379, abstract overrides
trait Vector extends (Int=>Double) {
- override def apply(i: Int): Double
+ override def apply(i: Int): Double
}
diff --git a/test/files/pos/spec.scala b/test/files/pos/spec.scala
index cc060ffe84..093d3cded4 100644
--- a/test/files/pos/spec.scala
+++ b/test/files/pos/spec.scala
@@ -7,7 +7,7 @@ class Bar[@specialized(Int, AnyRef) A](a: A) {
}
-class WithInner[@specialized(Int, AnyRef) A](a: A) {
+class WithInner[@specialized(Int, AnyRef) A](a: A) {
class Inner {
def meth = a
}
@@ -42,7 +42,7 @@ class Qux[@specialized(AnyRef) A] {
class Foo[@specialized(Int, AnyRef) A](val a: Array[A]) {
a(0)
-
+
def id(elem: A) = a(0) = elem
}
@@ -52,13 +52,13 @@ object Test {
def main(arg: Array[String]) {
val f = new Foo(new Array[String](5))
f.id("")
-
+
val z = new Baz[Int, Double]
z.ab(1, 1.0)
-
+
testspec(new Array[String](5))
testspec(new Array[Int](5))
}
-
+
def testspec[@specialized(Int, AnyRef) T](arr: Array[T]) = arr(0)
}
diff --git a/test/files/pos/strings.scala b/test/files/pos/strings.scala
index 9fe8cfd94b..83b8179706 100644
--- a/test/files/pos/strings.scala
+++ b/test/files/pos/strings.scala
@@ -6,5 +6,5 @@ object test {
}
// #1000
object A {
- println("""This a "raw" string ending with a "double quote"""")
+ println("""This a "raw" string ending with a "double quote"""")
}
diff --git a/test/files/pos/sudoku.scala b/test/files/pos/sudoku.scala
index 9435f504d6..336dc756a9 100644
--- a/test/files/pos/sudoku.scala
+++ b/test/files/pos/sudoku.scala
@@ -3,22 +3,22 @@ object SudokuSolver extends App {
// held in a global variable m. The program begins by reading 9 lines
// of input to fill the board
var m: Array[Array[Char]] = Array.tabulate(9)((x: Int) => readLine.toArray)
-
+
// For printing m, a method print is defined
def print = { println(""); m map (carr => println(new String(carr))) }
-
+
// The test for validity is performed by looping over i=0..8 and
// testing the row, column and 3x3 square containing the given
// coordinate
def invalid(i: Int, x: Int, y: Int, n: Char): Boolean =
i<9 && (m(y)(i) == n || m(i)(x) == n ||
m(y/3*3 + i/3)(x/3*3 + i % 3) == n || invalid(i+1, x, y, n))
-
+
// Looping over a half-closed range of consecutive integers [l..u)
// is factored out into a higher-order function
def fold(f: (Int, Int) => Int, accu: Int, l: Int, u: Int): Int =
if(l==u) accu else fold(f, f(accu, l), l+1, u)
-
+
// The search function examines each position on the board in turn,
// trying the numbers 1..9 in each unfilled position
// The function is itself a higher-order fold, accumulating the value
@@ -34,7 +34,7 @@ object SudokuSolver extends App {
val newaccu = search(x+1, y, f, accu);
m(y)(x) = '0';
newaccu}, accu, 1, 10)}
-
+
// The main part of the program uses the search function to accumulate
// the total number of solutions
println("\n"+search(0,0,i => {print; i+1},0)+" solution(s)")
diff --git a/test/files/pos/super/Super_1.java b/test/files/pos/super/Super_1.java
index 9acbba0ec4..418ae96bc0 100644
--- a/test/files/pos/super/Super_1.java
+++ b/test/files/pos/super/Super_1.java
@@ -1,6 +1,6 @@
// A.java
interface Inter<T> { }
-class Super implements Inter<Super.Inner> {
+class Super implements Inter<Super.Inner> {
public class Inner { };
}
diff --git a/test/files/pos/t0031.scala b/test/files/pos/t0031.scala
index aa787ca794..ec6eae9282 100644
--- a/test/files/pos/t0031.scala
+++ b/test/files/pos/t0031.scala
@@ -4,7 +4,7 @@ object Main {
def ensure(postcondition: a => Boolean): a
}
- def require[a](precondition: => Boolean)(command: => a): Ensure[a] =
+ def require[a](precondition: => Boolean)(command: => a): Ensure[a] =
if (precondition)
new Ensure[a] {
def ensure(postcondition: a => Boolean): a = {
diff --git a/test/files/pos/t0066.scala b/test/files/pos/t0066.scala
index 2153264e7a..9317da7165 100644
--- a/test/files/pos/t0066.scala
+++ b/test/files/pos/t0066.scala
@@ -3,5 +3,5 @@ class GBTree[A, B] /*with Map[A, B, GBTree[A,B]]*/ {
case class Node[A,B](key:A,value:B,smaller:Node[A,B],bigger:Node[A,B])
extends Tree[A,B];
case class Nil[A,B]() extends Tree[A,B];
-
+
}
diff --git a/test/files/pos/t0069.scala b/test/files/pos/t0069.scala
index 113820613f..5a8c15cd5a 100644
--- a/test/files/pos/t0069.scala
+++ b/test/files/pos/t0069.scala
@@ -8,4 +8,4 @@ object testCQ {
*/
}
-
+
diff --git a/test/files/pos/t0227.scala b/test/files/pos/t0227.scala
index a52a9798fc..8650350c4a 100644
--- a/test/files/pos/t0227.scala
+++ b/test/files/pos/t0227.scala
@@ -19,7 +19,7 @@ class SA(val settings: Settings) extends Base {
SD
) ::: settings.f(
SC
- )
+ )
}
object SC extends Factory {
diff --git a/test/files/pos/t0288/Foo.scala b/test/files/pos/t0288/Foo.scala
index 778ba65f58..1f7d81327d 100644
--- a/test/files/pos/t0288/Foo.scala
+++ b/test/files/pos/t0288/Foo.scala
@@ -6,4 +6,4 @@ class Foo extends Outer{
val bar = new Inner(); // Shouldn't this work?
-}
+}
diff --git a/test/files/pos/t0288/Outer.java b/test/files/pos/t0288/Outer.java
index bea3e3f8d0..7a3754fb5d 100644
--- a/test/files/pos/t0288/Outer.java
+++ b/test/files/pos/t0288/Outer.java
@@ -6,4 +6,4 @@ public class Outer{
}
-}
+}
diff --git a/test/files/pos/t0305.scala b/test/files/pos/t0305.scala
index 4838b1fcf8..4d37a02eb3 100644
--- a/test/files/pos/t0305.scala
+++ b/test/files/pos/t0305.scala
@@ -1,5 +1,5 @@
object Test extends App {
-
+
def foo(is:Int*) = 1;
def foo(i:Int) = 2;
diff --git a/test/files/pos/t0438.scala b/test/files/pos/t0438.scala
index fa5b7711ff..33b7efeaac 100644
--- a/test/files/pos/t0438.scala
+++ b/test/files/pos/t0438.scala
@@ -1,9 +1,9 @@
class Foo {
- implicit def pair2fun2[A, B, C](f: (A, B) => C) =
+ implicit def pair2fun2[A, B, C](f: (A, B) => C) =
{p: (A, B) => f(p._1, p._2) }
def foo(f: ((Int, Int)) => Int) = f
- def bar(x: Int, y: Int) = x + y
+ def bar(x: Int, y: Int) = x + y
foo({ (x: Int, y: Int) => x + y }) // works
foo(pair2fun2(bar _)) // works
diff --git a/test/files/pos/t0453.scala b/test/files/pos/t0453.scala
index dfacc5eed7..d59a3d22f2 100644
--- a/test/files/pos/t0453.scala
+++ b/test/files/pos/t0453.scala
@@ -1,5 +1,5 @@
object Test {
- val foo = new {
+ val foo = new {
trait Bar
def l () : Bar = { new Bar {} }
}
diff --git a/test/files/pos/t0599.scala b/test/files/pos/t0599.scala
index 885159af66..6125b99ce2 100644
--- a/test/files/pos/t0599.scala
+++ b/test/files/pos/t0599.scala
@@ -15,4 +15,4 @@ abstract class FooA {
a.xxx;
doB.xxx;
}
- }
+ }
diff --git a/test/files/pos/t0625.scala b/test/files/pos/t0625.scala
index 5614542599..bda463d6a6 100644
--- a/test/files/pos/t0625.scala
+++ b/test/files/pos/t0625.scala
@@ -1,6 +1,6 @@
object Test {
def idMap[C[_],T](m: { def map[U](f: T => U): C[U] }): C[T] = m.map(t => t)
-
+
def main(args: Array[String]): Unit = {
idMap(Some(5))
idMap(Responder.constant(5))
diff --git a/test/files/pos/t0646.scala b/test/files/pos/t0646.scala
index a56e857223..6146e60020 100644
--- a/test/files/pos/t0646.scala
+++ b/test/files/pos/t0646.scala
@@ -2,7 +2,7 @@ object xfor {
import scala.xml.NodeSeq
- val books =
+ val books =
<bks>
<title>Blabla</title>
<title>Blubabla</title>
@@ -13,7 +13,7 @@ object xfor {
case t @ Seq(<title>Blabla</title>) => t
}
- //val n: NodeSeq = new NodeSeq { val theSeq = books.child }
+ //val n: NodeSeq = new NodeSeq { val theSeq = books.child }
//n match {
// case t @ <title>Blabla</title> => t
//}
diff --git a/test/files/pos/t0770.scala b/test/files/pos/t0770.scala
index 7a0a2bf9bb..bb438f1918 100644
--- a/test/files/pos/t0770.scala
+++ b/test/files/pos/t0770.scala
@@ -1,7 +1,7 @@
trait A
{
private[this] val p = 5
-
+
def f = (b: Byte) => p
}
diff --git a/test/files/pos/t0774/unrelated.scala b/test/files/pos/t0774/unrelated.scala
index 1efdb2505e..483f836d0c 100644
--- a/test/files/pos/t0774/unrelated.scala
+++ b/test/files/pos/t0774/unrelated.scala
@@ -1,8 +1,8 @@
object Outer {
import Inner._
-
+
deathname
-
+
object Inner {
def deathname: Int = 1
}
diff --git a/test/files/pos/t0786.scala b/test/files/pos/t0786.scala
index f40cf7d2e1..4d9f1d0dc9 100644
--- a/test/files/pos/t0786.scala
+++ b/test/files/pos/t0786.scala
@@ -2,15 +2,15 @@ object ImplicitProblem {
class M[T]
def nullval[T] = null.asInstanceOf[T];
-
+
trait Rep[T] {
def eval: Int
}
-
+
implicit def toRep0(n: Int) = new Rep[Int] {
def eval = 0
}
-
+
implicit def toRepN[T](n: M[T])(implicit f: T => Rep[T]) = new Rep[M[T]] {
def eval = f(nullval[T]).eval + 1
}
@@ -18,11 +18,11 @@ object ImplicitProblem {
def depth[T <% Rep[T]](n: T) = n.eval
def main(args: Array[String]) {
- println(depth(nullval[M[Int]])) // (1) this works
+ println(depth(nullval[M[Int]])) // (1) this works
println(nullval[M[Int]].eval) // (2) this works
-
+
type m = M[Int]
- println(depth(nullval[m])) // (3) this doesn't compile on 2.7.RC1
+ println(depth(nullval[m])) // (3) this doesn't compile on 2.7.RC1
println(nullval[m].eval) // (4) this works
}
diff --git a/test/files/pos/t1000.scala b/test/files/pos/t1000.scala
index 613af76b94..fabef94fff 100644
--- a/test/files/pos/t1000.scala
+++ b/test/files/pos/t1000.scala
@@ -1,5 +1,5 @@
object A {
- println("""This a "raw" string ending with a "double quote"""")
+ println("""This a "raw" string ending with a "double quote"""")
}
object Test extends App {
diff --git a/test/files/pos/t1035.scala b/test/files/pos/t1035.scala
index e0a9379c7e..bd693d9e68 100644
--- a/test/files/pos/t1035.scala
+++ b/test/files/pos/t1035.scala
@@ -7,7 +7,7 @@ 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){
@@ -18,15 +18,15 @@ 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")
-
-
+ case B(n) => println("B")
+ case A(n) => println("A")
+
+
}
}
diff --git a/test/files/pos/t1048.scala b/test/files/pos/t1048.scala
index f88dbbc88b..ce57e72391 100644
--- a/test/files/pos/t1048.scala
+++ b/test/files/pos/t1048.scala
@@ -1,7 +1,7 @@
trait T[U] {
def x: T[V] forSome { type V <: U }
}
-
+
object T {
def unapply[U](t: T[U]): Option[T[V] forSome { type V <: U }] = Some(t.x)
}
@@ -12,4 +12,4 @@ object Test {
}
}
-
+
diff --git a/test/files/pos/t1059.scala b/test/files/pos/t1059.scala
index 659bf375ca..bcd8f0374f 100644
--- a/test/files/pos/t1059.scala
+++ b/test/files/pos/t1059.scala
@@ -25,4 +25,4 @@ object SafeNodeSeq {
})) case _ => None }
-}
+}
diff --git a/test/files/pos/t1071.scala b/test/files/pos/t1071.scala
index 59149a021b..7fb802f8b0 100644
--- a/test/files/pos/t1071.scala
+++ b/test/files/pos/t1071.scala
@@ -12,6 +12,6 @@ object Test {
val c = new C
(c: D).a // works
- c.a // error
+ c.a // error
}
diff --git a/test/files/pos/t1090.scala b/test/files/pos/t1090.scala
index a9bce90b00..dca762af4f 100644
--- a/test/files/pos/t1090.scala
+++ b/test/files/pos/t1090.scala
@@ -10,7 +10,7 @@ object Test {
type Node = Core.this.Node
}
def f(manager : Manager) = manager.iterator.foreach{
- case node : NodeImpl =>
+ case node : NodeImpl =>
}
}
}
diff --git a/test/files/pos/t1107/O.scala b/test/files/pos/t1107/O.scala
index 0198867704..aa605a6d09 100644
--- a/test/files/pos/t1107/O.scala
+++ b/test/files/pos/t1107/O.scala
@@ -4,10 +4,10 @@ object O
case s: Sub => true
case _ => false
}
-
+
def main(args: Array[String]): Unit = {
val c = new AnyRef with C
c.bob.toString + c.bob2.toString
- }
+ }
}
diff --git a/test/files/pos/t1107/T.scala b/test/files/pos/t1107/T.scala
index 0dff0b94fd..1f3712d529 100644
--- a/test/files/pos/t1107/T.scala
+++ b/test/files/pos/t1107/T.scala
@@ -1,6 +1,6 @@
sealed trait Top
sealed trait Sub extends Top
-trait C {
+trait C {
private object P extends Sub
def bob() = P.getClass
def bob2() = O.d(P)
diff --git a/test/files/pos/t1123.scala b/test/files/pos/t1123.scala
index 3812fa3eb3..a7b009cbbe 100644
--- a/test/files/pos/t1123.scala
+++ b/test/files/pos/t1123.scala
@@ -7,5 +7,5 @@ object Test {
}
def f = extraListener.h
}
- def main(args : Array[String]) : Unit = (new Editor).f
+ def main(args : Array[String]) : Unit = (new Editor).f
}
diff --git a/test/files/pos/t1164.scala b/test/files/pos/t1164.scala
index ca780c9a26..307ca92c85 100644
--- a/test/files/pos/t1164.scala
+++ b/test/files/pos/t1164.scala
@@ -1,29 +1,29 @@
-object test {
+object test {
- class Foo[a](val arg : a)
-
- object Foo {
- def apply [a](arg : a, right :a) = new Foo[a](arg)
- def unapply [a](m : Foo[a]) = Some (m.arg)
- }
+ class Foo[a](val arg : a)
+ object Foo {
+ def apply [a](arg : a, right :a) = new Foo[a](arg)
+ def unapply [a](m : Foo[a]) = Some (m.arg)
+ }
+
def matchAndGetArgFromFoo[a]( e:Foo[a]):a = {e match { case Foo(x) => x }}
-
-
+
+
// Try the same thing as above but use function as argument to Bar
// constructor
-
+
type FunIntToA [a] = (Int) => a
- class Bar[a] (var f: FunIntToA[a])
-
+ class Bar[a] (var f: FunIntToA[a])
+
object Bar {
def apply[a](f: FunIntToA[a]) = new Bar[a](f)
def unapply[a](m: Bar[a]) = Some (m.f)
}
-
+
def matchAndGetFunFromBar[a](b:Bar[a]) : FunIntToA[a] = { b match { case Bar(x) => x}}
-
+
}
diff --git a/test/files/pos/t1168.scala b/test/files/pos/t1168.scala
index 75638e792f..d9f38714b8 100644
--- a/test/files/pos/t1168.scala
+++ b/test/files/pos/t1168.scala
@@ -1,5 +1,5 @@
object Test extends App {
-
+
trait SpecialException {}
try {
diff --git a/test/files/pos/t1210a.scala b/test/files/pos/t1210a.scala
index b3492f96e4..fbb0a611d6 100644
--- a/test/files/pos/t1210a.scala
+++ b/test/files/pos/t1210a.scala
@@ -1,9 +1,9 @@
// both styles of abstraction should behave the same
// related to 1210 because that bug broke the OO version below
-trait OO {
+trait OO {
abstract class Test { self =>
type T
-
+
val v: Test {type T = self.T} = self.v.v
}
}
diff --git a/test/files/pos/t122.scala b/test/files/pos/t122.scala
index 630e24ce4a..e3daeef73e 100644
--- a/test/files/pos/t122.scala
+++ b/test/files/pos/t122.scala
@@ -1,4 +1,4 @@
class L {
- val List(v:Int, 2) = List(2, v:Int)
+ val List(v:Int, 2) = List(2, v:Int)
val (a:Int, b:Int) = (1, a)
}
diff --git a/test/files/pos/t1236.scala b/test/files/pos/t1236.scala
index 5e221ce411..7028162ee0 100644
--- a/test/files/pos/t1236.scala
+++ b/test/files/pos/t1236.scala
@@ -1,5 +1,5 @@
trait Empty[E[_]] {
- def e[A]: E[A]
+ def e[A]: E[A]
}
object T {
diff --git a/test/files/pos/t1237.scala b/test/files/pos/t1237.scala
index 7777372138..0d1dd05d50 100644
--- a/test/files/pos/t1237.scala
+++ b/test/files/pos/t1237.scala
@@ -1,11 +1,11 @@
-class HelloWorld {
- def main(args: Array[String]) {
+class HelloWorld {
+ def main(args: Array[String]) {
object TypeBool;
trait Fct {
def g(x : Int) = TypeBool // breaks.
-
+
// def g(x : Int) = 3 // fine.
}
diff --git a/test/files/pos/t1254/t1254.java b/test/files/pos/t1254/t1254.java
index 17e1c60bf5..17dc391672 100644
--- a/test/files/pos/t1254/t1254.java
+++ b/test/files/pos/t1254/t1254.java
@@ -11,7 +11,7 @@ class NothingBug3 {
scala.Option<?> o = scala.None$.MODULE$;
test(o);
- None.toLeft(new scala.runtime.AbstractFunction0<Integer>() {
+ None.toLeft(new scala.runtime.AbstractFunction0<Integer>() {
public Integer apply() { return 0; }
});
}
diff --git a/test/files/pos/t1263/test.scala b/test/files/pos/t1263/test.scala
index 92d8c1cdfa..7ced59083a 100644
--- a/test/files/pos/t1263/test.scala
+++ b/test/files/pos/t1263/test.scala
@@ -2,7 +2,7 @@ package test
trait Map[A, +B] {
def plus(key: A): MapTo = new MapTo(key)
-
+
class MapTo(key: A) {
def arrow [B1 >: B](value: B1) = null
}
diff --git a/test/files/pos/t1272.scala b/test/files/pos/t1272.scala
index d86a909ae5..aab1a886c7 100644
--- a/test/files/pos/t1272.scala
+++ b/test/files/pos/t1272.scala
@@ -2,8 +2,8 @@ object ImplicitTest {
implicit val i : Int = 10
implicit def a(implicit i : Int) : Array[Byte] = null
implicit def b[T](implicit i : Int) : Array[T] = null
-
+
def fn[T](implicit x : T) = 0
-
+
val x = fn[Array[Byte]]
} \ No newline at end of file
diff --git a/test/files/pos/t1292.scala b/test/files/pos/t1292.scala
index 83a996d530..3ed153abf2 100644
--- a/test/files/pos/t1292.scala
+++ b/test/files/pos/t1292.scala
@@ -1,5 +1,5 @@
trait Foo[T <: Foo[T, Enum], Enum <: Enumeration] {
- type StV = Enum#Value
+ type StV = Enum#Value
type Meta = MegaFoo[T, Enum]
type Slog <: Enumeration
diff --git a/test/files/pos/t1318.scala b/test/files/pos/t1318.scala
index f3d2f7ab5a..3fc6e3060f 100644
--- a/test/files/pos/t1318.scala
+++ b/test/files/pos/t1318.scala
@@ -19,7 +19,7 @@ object A extends A0 {}
abstract class B0 extends M {
type mType = B0
- def fs: List[fType] = Nil
+ def fs: List[fType] = Nil
}
object B extends B0 {}
diff --git a/test/files/pos/t1385.scala b/test/files/pos/t1385.scala
index 55356c1f25..59953bcc39 100644
--- a/test/files/pos/t1385.scala
+++ b/test/files/pos/t1385.scala
@@ -1,3 +1,3 @@
-@serializable object Test {
+@serializable object Test {
private def readResolve:AnyRef = this
}
diff --git a/test/files/pos/t1480.scala b/test/files/pos/t1480.scala
index 1d9f94d2e9..3dc3062ca0 100644
--- a/test/files/pos/t1480.scala
+++ b/test/files/pos/t1480.scala
@@ -1,6 +1,6 @@
class Foo{
def compare(newP : Any, oldP : Any) : Boolean = (newP,oldP) match {
- case (newP : AnyRef, oldP : AnyRef) if newP == oldP => newP == oldP
- case (newS : Symbol, oldS: Symbol) if newS == oldS => newS == oldS
+ case (newP : AnyRef, oldP : AnyRef) if newP == oldP => newP == oldP
+ case (newS : Symbol, oldS: Symbol) if newS == oldS => newS == oldS
}
}
diff --git a/test/files/pos/t1545.scala b/test/files/pos/t1545.scala
index 8cdd39660c..51df606da3 100755
--- a/test/files/pos/t1545.scala
+++ b/test/files/pos/t1545.scala
@@ -9,8 +9,8 @@ object Main extends App {
case None => 99
}
}
-
+
println (x (Foo (None))) // prints 99
println (x (Foo (Some ("foo")))) // prints 42
-
+
}
diff --git a/test/files/pos/t1560.scala b/test/files/pos/t1560.scala
index 2af299af86..fb5592016a 100644
--- a/test/files/pos/t1560.scala
+++ b/test/files/pos/t1560.scala
@@ -1,13 +1,13 @@
object Test extends App {
-
+
trait C[T] {
def t: T
}
-
+
def b: Option[C[x] forSome { type x }] = null
-
+
def c = b match {
case Some(b) => b.t
}
-
+
}
diff --git a/test/files/pos/t1565.scala b/test/files/pos/t1565.scala
index df333151d5..030086c541 100644
--- a/test/files/pos/t1565.scala
+++ b/test/files/pos/t1565.scala
@@ -3,7 +3,7 @@ object Bug1565 {
def x() = { 0; (a : Int, b : Int) => println(List(a, b)) ; 0 }
(a : Int, b : Int) => println(List(a, b))
-
+
// various function syntaxes to exercise the parser
val xs = List(1,2,3)
xs.filter(x => x < 2)
diff --git a/test/files/pos/t1591b.scala b/test/files/pos/t1591b.scala
index c671ad6472..84372bb084 100644
--- a/test/files/pos/t1591b.scala
+++ b/test/files/pos/t1591b.scala
@@ -1,10 +1,10 @@
import scala.tools.nsc._
-class SemanticTokens(val compiler: Global) {
- import compiler._
+class SemanticTokens(val compiler: Global) {
+ import compiler._
def build() = ErrorType
-
+
class Process {
def f() = analyzer
// or to crash the compiler instead of a nice message,
diff --git a/test/files/pos/t1711/Seq.scala b/test/files/pos/t1711/Seq.scala
index c18f05cd73..5f426ea0f7 100644
--- a/test/files/pos/t1711/Seq.scala
+++ b/test/files/pos/t1711/Seq.scala
@@ -3,7 +3,7 @@ package com
object Sequence {
def filteringFunction[V](filter: V => Boolean): List[V] => List[V] = {
- def include(v: V) =
+ def include(v: V) =
filter(v)
(l: List[V]) => l.filter(include)
}
diff --git a/test/files/pos/t1722-A.scala b/test/files/pos/t1722-A.scala
index d059bf22f8..9e522a5059 100644
--- a/test/files/pos/t1722-A.scala
+++ b/test/files/pos/t1722-A.scala
@@ -1,8 +1,8 @@
sealed trait Top
trait C {
private object P extends Top
-}
-/*
+}
+/*
$ scala -e 'new AnyRef with C'
error: error while loading Top, class file '/private/tmp/bobobo/./Top.class' is broken
(error reading Scala signature of /private/tmp/bobobo/./Top.class: malformed Scala signature of Top at 185; reference value P of trait C refers to nonexisting symbol.)
diff --git a/test/files/pos/t1722/Test.scala b/test/files/pos/t1722/Test.scala
index f236d3fdc4..5685d8f40a 100755
--- a/test/files/pos/t1722/Test.scala
+++ b/test/files/pos/t1722/Test.scala
@@ -1,5 +1,5 @@
package t1722
object Test {
- val x = new AnyRef with C
+ val x = new AnyRef with C
}
diff --git a/test/files/pos/t1722/Top.scala b/test/files/pos/t1722/Top.scala
index 4ac52412aa..cec4c531f9 100755
--- a/test/files/pos/t1722/Top.scala
+++ b/test/files/pos/t1722/Top.scala
@@ -3,8 +3,8 @@ package t1722
sealed trait Top
trait C {
private object P extends Top
-}
-/*
+}
+/*
$ scala -e 'new AnyRef with C'
error: error while loading Top, class file '/private/tmp/bobobo/./Top.class' is broken
(error reading Scala signature of /private/tmp/bobobo/./Top.class: malformed Scala signature of Top at 185; reference value P of trait C refers to nonexisting symbol.)
diff --git a/test/files/pos/t1737/A.java b/test/files/pos/t1737/A.java
deleted file mode 100644
index ee87e29a35..0000000000
--- a/test/files/pos/t1737/A.java
+++ /dev/null
@@ -1,3 +0,0 @@
-public interface A<T extends String> {
- T get();
-} \ No newline at end of file
diff --git a/test/files/pos/t1737/B.java b/test/files/pos/t1737/B.java
deleted file mode 100644
index 28a1907a04..0000000000
--- a/test/files/pos/t1737/B.java
+++ /dev/null
@@ -1 +0,0 @@
-public abstract class B implements A {} \ No newline at end of file
diff --git a/test/files/pos/t1737/c.scala b/test/files/pos/t1737/c.scala
deleted file mode 100644
index 782ec18b9e..0000000000
--- a/test/files/pos/t1737/c.scala
+++ /dev/null
@@ -1,4 +0,0 @@
-class C extends B {
- this: A[_] =>
- def get = "foo"
-} \ No newline at end of file
diff --git a/test/files/pos/t1745/J.java b/test/files/pos/t1745/J.java
index 8444eabb24..d95efe8e6f 100644
--- a/test/files/pos/t1745/J.java
+++ b/test/files/pos/t1745/J.java
@@ -1,9 +1,9 @@
-class J {
+class J {
S1 s1;
S2 s2;
-
+
String s = bar(S3.foo(), S3.bar("def"));
-
+
private String bar(String s1, String s2) {
return s1 + s2;
}
diff --git a/test/files/pos/t1756.scala b/test/files/pos/t1756.scala
index 1d067c3b04..2e09c8a94a 100755
--- a/test/files/pos/t1756.scala
+++ b/test/files/pos/t1756.scala
@@ -1,5 +1,5 @@
-/**
+/**
This is a tricky issue which has to do with the fact that too much conflicting
type information is propagated into a single implicit search, where the intended
solution applies two implicit searches.
@@ -35,20 +35,20 @@ class Poly[C <: Ring[C]](val c: C) extends Ring[Poly[C]] {
}
object Test extends App {
-
+
implicit def coef2poly[C <: Ring[C]](c: C): Poly[C] = new Poly(c)
val a = new A
val x = new Poly(new A)
-
+
println(x+a) // works
println(a+x) // works
-
+
val y = new Poly(new Poly(new A))
-
+
println(x+y*x) // works
println(x*y+x) // works
println(y*x+x) // works
-
+
println(x+x*y) // failed before
}
diff --git a/test/files/pos/t1761.scala b/test/files/pos/t1761.scala
index a3ceeea815..2af7280734 100644
--- a/test/files/pos/t1761.scala
+++ b/test/files/pos/t1761.scala
@@ -3,7 +3,7 @@ import scala.xml._
class Foo {
val elements: Seq[Node] = Nil
val innerTransform: PartialFunction[Elem, String] = {
- case Elem(_, l: String, _, _, _ @ _*) if elements.exists(_.label == l) =>
+ case Elem(_, l: String, _, _, _ @ _*) if elements.exists(_.label == l) =>
l
}
}
diff --git a/test/files/pos/t1798.scala b/test/files/pos/t1798.scala
index 1624e3025e..93df61e844 100644
--- a/test/files/pos/t1798.scala
+++ b/test/files/pos/t1798.scala
@@ -2,7 +2,7 @@ object Foo { private def bar(): Int = 55 }
class Foo(x: Int) { def this() = this(Foo.bar()) }
/*
- * scalac28 a.scala
+ * scalac28 a.scala
a.scala:2: error: method bar cannot be accessed in object Foo
class Foo(x: Int) { def this() = this(Foo.bar()) }
^
diff --git a/test/files/pos/t1840/J.java b/test/files/pos/t1840/J.java
index fd98b6c4a5..a697596fdd 100644
--- a/test/files/pos/t1840/J.java
+++ b/test/files/pos/t1840/J.java
@@ -1,4 +1,4 @@
package p;
-class J {
- J() {}
+class J {
+ J() {}
}
diff --git a/test/files/pos/t1974.scala b/test/files/pos/t1974.scala
index a0daa13c21..3d28478177 100644
--- a/test/files/pos/t1974.scala
+++ b/test/files/pos/t1974.scala
@@ -1,20 +1,20 @@
object Broken {
private var map = Map[Class[_], String]()
-
+
def addToMap(c : Class[_], s : String) = map += (c -> s)
def fetch(c : Class[_]) = map(c)
}
object Works {
private var map = Map[Class[_], String]()
-
+
def addToMap(c : Class[_], s : String) = map += ((c, s))
def fetch(c : Class[_]) = map(c)
}
object Works2 {
private var map = Map[Class[_], String]()
-
+
def addToMap(c : Class[_], s : String) = map += ((c : Class[_]) -> s)
def fetch(c : Class[_]) = map(c)
} \ No newline at end of file
diff --git a/test/files/pos/t2023.scala b/test/files/pos/t2023.scala
index 21c6fc96a6..de3e848fbd 100644
--- a/test/files/pos/t2023.scala
+++ b/test/files/pos/t2023.scala
@@ -3,11 +3,11 @@ trait C[A]
object C {
implicit def ipl[A](implicit from: A => Ordered[A]): C[A] = null
}
-
+
object P {
def foo[A](i: A, j: A)(implicit c: C[A]): Unit = ()
}
-
+
class ImplicitChainTest {
def testTrivial: Unit = {
P.foo('0', '9')
diff --git a/test/files/pos/t2060.scala b/test/files/pos/t2060.scala
index 2c701150e4..cf7250f545 100644
--- a/test/files/pos/t2060.scala
+++ b/test/files/pos/t2060.scala
@@ -4,7 +4,7 @@
* line':
*
* val failure = 1.0 + new Op[Int]
- *
+ *
* we reduce the problem to finding a function from Double to
* {+: _ >: Op[Int] <: Any}, that is, a method which takes
* an argument which is an Op[Int] or a supertype thereof.
diff --git a/test/files/pos/t2081.scala b/test/files/pos/t2081.scala
index 52388464a5..d772c02dc2 100644
--- a/test/files/pos/t2081.scala
+++ b/test/files/pos/t2081.scala
@@ -7,5 +7,5 @@ object ScalaForRubyists {
val x = 10.days
// a couple parser corner cases I wanted not to break
- val y = 5.e0 + 5e7
+ val y = 5.e0 + 5e7
}
diff --git a/test/files/pos/t2082.scala b/test/files/pos/t2082.scala
index 3a160612fe..38937d78fb 100644
--- a/test/files/pos/t2082.scala
+++ b/test/files/pos/t2082.scala
@@ -1,10 +1,10 @@
trait Mapper[T <: Mapper[T]]
-trait KeyedMapper[KeyType, T <: KeyedMapper[KeyType, T]] extends Mapper[T]
+trait KeyedMapper[KeyType, T <: KeyedMapper[KeyType, T]] extends Mapper[T]
-trait KeyedMetaMapper[KeyType, T <: KeyedMapper[KeyType, T]]
+trait KeyedMetaMapper[KeyType, T <: KeyedMapper[KeyType, T]]
trait MappedForeignKey[KeyType, Owner <: Mapper[Owner], Other <: KeyedMapper[KeyType, Other]]
@@ -19,19 +19,19 @@ class TestRun extends KeyedMapper[Long, TestRun] with IdPK {
object TestRun extends TestRun with KeyedMetaMapper[Long, TestRun]
class MetaTestSubject extends TestSubject with KeyedMetaMapper[Long, TestSubject]
-object TestSubject extends MetaTestSubject
+object TestSubject extends MetaTestSubject
object Main {
-
+
def oneToOneJoin[PType <: KeyedMapper[Long, PType] with IdPK,
CType <: KeyedMapper[Long, CType] with IdPK,
- CMetaType <: CType with KeyedMetaMapper[Long, CType],
+ CMetaType <: CType with KeyedMetaMapper[Long, CType],
FKType <: MappedForeignKey[Long, PType, CType]]
- (parents: List[PType], metaMapper: CMetaType, keyGetter: (PType) => FKType ):
+ (parents: List[PType], metaMapper: CMetaType, keyGetter: (PType) => FKType ):
Map[Long, CType] = Map.empty
-
+
def callIt {
- oneToOneJoin[TestRun, TestSubject, MetaTestSubject,
+ oneToOneJoin[TestRun, TestSubject, MetaTestSubject,
MappedForeignKey[Long, TestRun, TestSubject]](
List(), TestSubject, (tr: TestRun) => tr.testSubject)
}
diff --git a/test/files/pos/t2130-2.scala b/test/files/pos/t2130-2.scala
index 1d0b33c3e5..464f5e0d8e 100644
--- a/test/files/pos/t2130-2.scala
+++ b/test/files/pos/t2130-2.scala
@@ -10,7 +10,7 @@ package object bar {
class Dingus
object Dingus
case class Dongus(x: Float)
-
+
def apply(xs: Int*) = new Bippy(xs.sum)
def apply() = new Bippy(5)
}
diff --git a/test/files/pos/t2133.scala b/test/files/pos/t2133.scala
index c74d0a4bbf..99bac5c38b 100644
--- a/test/files/pos/t2133.scala
+++ b/test/files/pos/t2133.scala
@@ -13,6 +13,6 @@ trait Foo2 {
class Bob extends AnyRef with Foo with Foo2 {
import bip._
import bar._
-
+
def go() = fn()
}
diff --git a/test/files/pos/t2168.scala b/test/files/pos/t2168.scala
index e3b24b6a72..845c5b7361 100644
--- a/test/files/pos/t2168.scala
+++ b/test/files/pos/t2168.scala
@@ -2,5 +2,5 @@ object Test extends App {
def foo1(x: AnyRef) = x match { case x: Function0[_] => x() }
def foo2(x: AnyRef) = x match { case x: Function0[Any] => x() }
}
-
-
+
+
diff --git a/test/files/pos/t2171.scala b/test/files/pos/t2171.scala
index 6c754c76a6..a5663c96cd 100644
--- a/test/files/pos/t2171.scala
+++ b/test/files/pos/t2171.scala
@@ -3,5 +3,5 @@ final object test {
try 0 catch { case ex => println(msg) }
def main (args: Array[String]): Unit =
- while (true) logIgnoredException ("...")
+ while (true) logIgnoredException ("...")
}
diff --git a/test/files/pos/t2261.scala b/test/files/pos/t2261.scala
index aac5c9e0fd..af24234235 100644
--- a/test/files/pos/t2261.scala
+++ b/test/files/pos/t2261.scala
@@ -5,5 +5,5 @@ object Test {
x = List(1,2,3)
// the problem here was that somehow the type variable that was used to infer the type argument for List.apply
// would accumulate several conflicting constraints
- // can't reproduce with
+ // can't reproduce with
} \ No newline at end of file
diff --git a/test/files/pos/t2281.scala b/test/files/pos/t2281.scala
index fc4ae1ca25..3515d2e2e6 100644
--- a/test/files/pos/t2281.scala
+++ b/test/files/pos/t2281.scala
@@ -27,11 +27,11 @@ class B {
outarr
}
- def spanForSentence(x : String,picktext : String) =
+ def spanForSentence(x : String,picktext : String) =
if(x == "\n\n"){
<br/><br/>
}else{
- <span class='clicksentence' style={if(x == picktext) "background-color: yellow" else ""}>{x}</span>
+ <span class='clicksentence' style={if(x == picktext) "background-color: yellow" else ""}>{x}</span>
}
def selectableSentences(text : String, picktext : String) = {
diff --git a/test/files/pos/t2305.scala b/test/files/pos/t2305.scala
index 8b5abccbe0..d0b103fdba 100644
--- a/test/files/pos/t2305.scala
+++ b/test/files/pos/t2305.scala
@@ -1,6 +1,6 @@
import java.util.ArrayList
-trait Bind[Z[_]]
+trait Bind[Z[_]]
class MySerializable[X] extends java.io.Serializable
@@ -17,7 +17,7 @@ object works {
object breaks {
def runbind(implicit bind: Bind[ArrayList]) {}
- runbind
+ runbind
/*java.lang.AssertionError: assertion failed: java.io.Serializable
at scala.Predef$.assert(Predef.scala:107)
at scala.tools.nsc.symtab.Types$TypeRef.transform(Types.scala:1417)
diff --git a/test/files/pos/t2310.scala b/test/files/pos/t2310.scala
index 68912b4961..e08411a3df 100644
--- a/test/files/pos/t2310.scala
+++ b/test/files/pos/t2310.scala
@@ -1,15 +1,15 @@
import scala.Stream._
object consistencyError {
- /* this gives an error:
+ /* 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) =
+ vss(0) =
args = List(tp2, temp6, temp5)
vss(1) = value rs, value ls, value l
args = List(tp2, temp6, temp5)
@@ -18,19 +18,19 @@ object consistencyError {
labels(1) = method body%1
labels(0) = method body%0
bx = 1
- label.tpe = (val rs: scala.collection.immutable.Stream[A])None.type
+ 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/t2399.scala b/test/files/pos/t2399.scala
index 07882dd549..b009f7856b 100644
--- a/test/files/pos/t2399.scala
+++ b/test/files/pos/t2399.scala
@@ -3,12 +3,12 @@ trait That2[A, R <: That2[A, R]]
trait T[A, This >: Null <: That1[A] with T[A, This]] extends That2[A, This] {
self: This =>
-
+
private var next: This = _
def isEmpty = next eq null
-
+
def length: Int = {
def loop(x: This, cnt: Int): Int = if (x.isEmpty) cnt else loop(x.next, cnt + 1)
loop(self, 0)
- }
+ }
} \ No newline at end of file
diff --git a/test/files/pos/t2413/TestScalac.scala b/test/files/pos/t2413/TestScalac.scala
index 098e852dd7..6992a30f2c 100644
--- a/test/files/pos/t2413/TestScalac.scala
+++ b/test/files/pos/t2413/TestScalac.scala
@@ -4,7 +4,7 @@ class Foo extends TestJava {
// THIS METHOD YIELDS TO CRASH
/* def foomethod : Option[String] => Unit = {
- case None =>
+ case None =>
val path = repeatParam("s","a","b","c")
()
case Some(error) =>
diff --git a/test/files/pos/t2421.scala b/test/files/pos/t2421.scala
index 0d01be29fc..26e485c160 100644
--- a/test/files/pos/t2421.scala
+++ b/test/files/pos/t2421.scala
@@ -7,8 +7,8 @@ object Test {
implicit val forcibleInt: (Int <~< Forcible[Int]) = error("")
def headProxy[P <: Forcible[Int]](implicit w: Int <~< P): P = error("")
-
- headProxy
- // trivial[Int] should not be considered a valid implicit, since w would have type Int <~< Int,
+
+ headProxy
+ // trivial[Int] should not be considered a valid implicit, since w would have type Int <~< Int,
// and headProxy's type parameter P cannot be instantiated to Int
} \ No newline at end of file
diff --git a/test/files/pos/t2421_delitedsl.scala b/test/files/pos/t2421_delitedsl.scala
index a05887023a..ad6afa7bd8 100644
--- a/test/files/pos/t2421_delitedsl.scala
+++ b/test/files/pos/t2421_delitedsl.scala
@@ -1,10 +1,10 @@
trait DeliteDSL {
abstract class <~<[-From, +To] extends (From => To)
- implicit def trivial[A]: A <~< A = new (A <~< A) {def apply(x: A) = x}
+ implicit def trivial[A]: A <~< A = new (A <~< A) {def apply(x: A) = x}
trait Forcible[T]
object Forcible {
- def factory[T](f: T => Forcible[T]) = new (T <~< Forcible[T]){def apply(x: T) = f(x)}
+ def factory[T](f: T => Forcible[T]) = new (T <~< Forcible[T]){def apply(x: T) = f(x)}
}
case class DeliteInt(x: Int) extends Forcible[Int]
@@ -22,16 +22,16 @@ trait DeliteDSL {
// If T is already a proxy (it is forcible), the compiler should use
// forcibleIdentity to deduce that P=T. If T is Int, the compiler
// should use intToForcible to deduce that P=DeliteInt.
- //
+ //
// Without this feature, the user must write 'xs.proxyOfFirst[DeliteInt]',
// with the feature they can write 'xs.proxyOfFirst', which is shorter and
// avoids exposing internal DELITE types to the world.
object Test {
- val x = new DeliteCollection(List(1,2,3)).headProxy
+ val x = new DeliteCollection(List(1,2,3)).headProxy
// inferred: val x: Forcible[Int] = new DeliteCollection[Int](List.apply[Int](1, 2, 3)).headProxy[Forcible[Int]](forcibleInt);
- val xAlready = new DeliteCollection(List(DeliteInt(1),DeliteInt(2),DeliteInt(3))).headProxy
+ val xAlready = new DeliteCollection(List(DeliteInt(1),DeliteInt(2),DeliteInt(3))).headProxy
// inferred: val xAlready: DeliteInt = new DeliteCollection[DeliteInt](List.apply[DeliteInt](DeliteInt(1), DeliteInt(2), DeliteInt(3))).headProxy[DeliteInt](trivial[DeliteInt]);
}
} \ No newline at end of file
diff --git a/test/files/pos/t2421b_pos.scala b/test/files/pos/t2421b_pos.scala
index 0df3461662..8b848abb75 100644
--- a/test/files/pos/t2421b_pos.scala
+++ b/test/files/pos/t2421b_pos.scala
@@ -11,7 +11,7 @@ object Test {
f
}
-/* bug:
+/* bug:
error: ambiguous implicit values:
both method b in object Test1 of type [X <: Test1.B]Test1.F[X]
and method a in object Test1 of type => Test1.F[Test1.A]
diff --git a/test/files/pos/t2429.scala b/test/files/pos/t2429.scala
index 9b9cb89de7..3ea3f9e2a5 100755
--- a/test/files/pos/t2429.scala
+++ b/test/files/pos/t2429.scala
@@ -1,8 +1,8 @@
object Msg {
trait T
-
+
trait TSeq
-
+
object TSeq {
implicit def fromSeq(s: Seq[T]): TSeq = error("stub")
}
diff --git a/test/files/pos/t2444.scala b/test/files/pos/t2444.scala
index 6f07dcf92d..a052270196 100644
--- a/test/files/pos/t2444.scala
+++ b/test/files/pos/t2444.scala
@@ -2,14 +2,14 @@ object Test {
trait Foo
- class Bar {
+ class Bar {
object baz extends Foo
}
- def frob[P1, P2<:Foo](f:P1 => P2) = ()
+ def frob[P1, P2<:Foo](f:P1 => P2) = ()
def main(args:Array[String]) : Unit = {
- frob((p:Bar) => p.baz)
+ frob((p:Bar) => p.baz)
}
}
diff --git a/test/files/pos/t2464/ScalaOne_1.scala b/test/files/pos/t2464/ScalaOne_1.scala
index 1caf8ecae4..0271b9ce72 100644
--- a/test/files/pos/t2464/ScalaOne_1.scala
+++ b/test/files/pos/t2464/ScalaOne_1.scala
@@ -1,6 +1,6 @@
class ScalaClassOne extends ClassTwo.Child {
def func4() = {
func2
- }
+ }
}
diff --git a/test/files/pos/t247.scala b/test/files/pos/t247.scala
index e976404e61..983b7998a9 100644
--- a/test/files/pos/t247.scala
+++ b/test/files/pos/t247.scala
@@ -12,7 +12,7 @@ class TreeMapFactory[KEY](newOrder:Order[KEY]) extends MapFactory[KEY] {
def Empty[V] = new TreeMap[KEY,V](new TreeMapFactory[KEY](order));
}
-class Tree[KEY,Entry](order:Order[KEY]) {
+class Tree[KEY,Entry](order:Order[KEY]) {
def size =0;
}
diff --git a/test/files/pos/t2504.scala b/test/files/pos/t2504.scala
index 67f8226852..0abe7dd13e 100755
--- a/test/files/pos/t2504.scala
+++ b/test/files/pos/t2504.scala
@@ -1,5 +1,5 @@
object Test {
val ys: Iterable[_] = Array("abc")
- val xs = Array("abc")
+ val xs = Array("abc")
xs sameElements Array("abc")
}
diff --git a/test/files/pos/t2545.scala b/test/files/pos/t2545.scala
index 6ad994223c..b4238fb718 100755
--- a/test/files/pos/t2545.scala
+++ b/test/files/pos/t2545.scala
@@ -1,6 +1,6 @@
trait Frog[T] {
- def hello: T
- def size: Int
+ def hello: T
+ def size: Int
}
trait OnlyWithFrogs {
diff --git a/test/files/pos/t2569/Child.scala b/test/files/pos/t2569/Child.scala
index 64f4dc172f..3d7f4248b5 100644
--- a/test/files/pos/t2569/Child.scala
+++ b/test/files/pos/t2569/Child.scala
@@ -1,9 +1,9 @@
package varargs
-
+
class Child extends Parent {
-
+
override def concatenate(strings: String*): String =
strings map("\"" + _ + "\"") mkString("(", ", ", ")")
-
+
}
diff --git a/test/files/pos/t2569/Parent.java b/test/files/pos/t2569/Parent.java
index 89421becbd..133f2ee567 100644
--- a/test/files/pos/t2569/Parent.java
+++ b/test/files/pos/t2569/Parent.java
@@ -1,7 +1,7 @@
package varargs;
-
+
public class Parent {
-
+
public String concatenate(String... strings) {
StringBuilder builder = new StringBuilder();
for (String s : strings) {
@@ -9,5 +9,5 @@ package varargs;
}
return builder.toString();
}
-
+
}
diff --git a/test/files/pos/t262.scala b/test/files/pos/t262.scala
index ec6187b36b..b81490977c 100644
--- a/test/files/pos/t262.scala
+++ b/test/files/pos/t262.scala
@@ -1,11 +1,11 @@
object O {
abstract class A {
- def f:A;
+ def f:A;
}
class B extends A {
def f = if(1 == 2) new C else new D;
}
- class C extends A {
+ class C extends A {
def f = this;
}
class D extends A {
diff --git a/test/files/pos/t2665.scala b/test/files/pos/t2665.scala
index 3163e31326..108daf509a 100644
--- a/test/files/pos/t2665.scala
+++ b/test/files/pos/t2665.scala
@@ -1,3 +1,3 @@
object Test {
- val x: Unit = Array("")
+ val x: Unit = Array("")
} \ No newline at end of file
diff --git a/test/files/pos/t2669.scala b/test/files/pos/t2669.scala
index 72e931178c..e34f08f0f5 100644
--- a/test/files/pos/t2669.scala
+++ b/test/files/pos/t2669.scala
@@ -23,6 +23,6 @@ import java.util.Vector
// scalac cannot detect lack of type params, but then throws AssertionError later:
class TVector2639 {
- val b = new Vector // this line passed without error detected
+ val b = new Vector // this line passed without error detected
val a = new Vector(1) // this line caused throwing AssertionError when scalac
}
diff --git a/test/files/pos/t2691.scala b/test/files/pos/t2691.scala
index 5f0ddd122f..94012a8177 100644
--- a/test/files/pos/t2691.scala
+++ b/test/files/pos/t2691.scala
@@ -1,5 +1,5 @@
object Breakdown {
- def unapplySeq(x: Int): Some[List[String]] = Some(List("", "there"))
+ def unapplySeq(x: Int): Some[List[String]] = Some(List("", "there"))
}
object Test {
42 match {
diff --git a/test/files/pos/t2726/SQLBuilder_1.scala b/test/files/pos/t2726/SQLBuilder_1.scala
index 8d07a88265..7b3e3d8322 100644
--- a/test/files/pos/t2726/SQLBuilder_1.scala
+++ b/test/files/pos/t2726/SQLBuilder_1.scala
@@ -1,7 +1,7 @@
class SQLBuilder extends SQLBuilder.Segment
-object SQLBuilder {
- trait Segment
+object SQLBuilder {
+ trait Segment
}
diff --git a/test/files/pos/t2910.scala b/test/files/pos/t2910.scala
index d4d92fa765..17a6a64809 100644
--- a/test/files/pos/t2910.scala
+++ b/test/files/pos/t2910.scala
@@ -9,9 +9,9 @@ object Test {
lazy val s = "abc"
}
- def test3 {
+ def test3 {
lazy val lazyBar = bar
- object bar {
+ object bar {
val foo = 12
}
lazy val lazyBar2 = bar
@@ -29,5 +29,5 @@ object Test {
lazy val f: Int = g
Console.println("foo")
lazy val g: Int = f
- }
+ }
} \ No newline at end of file
diff --git a/test/files/pos/t2913.scala b/test/files/pos/t2913.scala
index 11d8b92053..ee86b9e402 100755
--- a/test/files/pos/t2913.scala
+++ b/test/files/pos/t2913.scala
@@ -11,13 +11,13 @@ class RichA {
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,
+ // 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
@@ -48,6 +48,6 @@ object Main {
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/t2939.scala b/test/files/pos/t2939.scala
index 3be4d4d561..67677f2f18 100644
--- a/test/files/pos/t2939.scala
+++ b/test/files/pos/t2939.scala
@@ -4,10 +4,10 @@ object Proxies {
class C1 extends MapProxy[Int,Int] { def self = Map[Int,Int]() }
class C2 extends mutable.MapProxy[Int,Int] { def self = mutable.Map[Int,Int]() }
class C3 extends immutable.MapProxy[Int,Int] { def self = immutable.Map[Int,Int]() }
-
+
class C4 extends SetProxy[Int] { def self = Set[Int]() }
class C5 extends mutable.SetProxy[Int] { def self = mutable.Set[Int]() }
class C6 extends immutable.SetProxy[Int] { def self = immutable.Set[Int]() }
-
+
class C7 extends SeqProxy[Int] { def self = Seq[Int]() }
} \ No newline at end of file
diff --git a/test/files/pos/t2940/Error.scala b/test/files/pos/t2940/Error.scala
index bf5a6bd0df..7c600667f3 100644
--- a/test/files/pos/t2940/Error.scala
+++ b/test/files/pos/t2940/Error.scala
@@ -5,8 +5,8 @@ abstract class Error {
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/t2994a.scala b/test/files/pos/t2994a.scala
index cb4a389e2f..f2d57c34ca 100644
--- a/test/files/pos/t2994a.scala
+++ b/test/files/pos/t2994a.scala
@@ -17,8 +17,8 @@ object Naturals {
type _5 = SUCC[_4]
type _6 = SUCC[_5]
-
- // crashes scala-2.8.0 beta1
+
+ // 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]
diff --git a/test/files/pos/t3020.scala b/test/files/pos/t3020.scala
index 016563e27f..cb429cd94f 100644
--- a/test/files/pos/t3020.scala
+++ b/test/files/pos/t3020.scala
@@ -1,7 +1,7 @@
object Test {
def main(args: Array[String]): Unit = {
var x = true
-
+
( { if (x) new scala.util.Random() } .asInstanceOf[Runnable] )
}
}
diff --git a/test/files/pos/t3079.scala b/test/files/pos/t3079.scala
index fa732ea516..4bead34ff3 100644
--- a/test/files/pos/t3079.scala
+++ b/test/files/pos/t3079.scala
@@ -10,8 +10,8 @@ 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
+ //def unwrap = (_: Identity[B]).value
}
} \ No newline at end of file
diff --git a/test/files/pos/t3106.scala b/test/files/pos/t3106.scala
index 162e93366f..cf7b507126 100644
--- a/test/files/pos/t3106.scala
+++ b/test/files/pos/t3106.scala
@@ -3,5 +3,5 @@ class Sample[A] (val d0: ((A,A)) => A) {}
object Sample {
implicit def apply[A] (x:A): Sample[A] = {
new Sample(p => p._1)
- }
+ }
} \ No newline at end of file
diff --git a/test/files/pos/t3136.scala b/test/files/pos/t3136.scala
index 33d42c2f3c..6a5850aeb0 100644
--- a/test/files/pos/t3136.scala
+++ b/test/files/pos/t3136.scala
@@ -11,7 +11,7 @@ object NullaryMethodType {
}
object Test {
- def TEST(tp: Type): String =
+ 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/t3174b.scala b/test/files/pos/t3174b.scala
index 4df1bfe837..002c4f090f 100644
--- a/test/files/pos/t3174b.scala
+++ b/test/files/pos/t3174b.scala
@@ -2,9 +2,9 @@ trait Foo[X] { def foo : Map[String,Foo[X]] }
object Test {
def f[T]() : Foo[T] = {
- class Anon extends Foo[T] {
- var foo: Map[String, Foo[T]] = Map[String,Foo[T]]()
- //def foo = Map[String,Foo[T]]()
+ class Anon extends Foo[T] {
+ var foo: Map[String, Foo[T]] = Map[String,Foo[T]]()
+ //def foo = Map[String,Foo[T]]()
//def foo_=(x: Map[String,Foo[T]]) {}
}
new Anon
diff --git a/test/files/pos/t3175-pos.scala b/test/files/pos/t3175-pos.scala
index 89bbf8b5fc..497ff8255c 100644
--- a/test/files/pos/t3175-pos.scala
+++ b/test/files/pos/t3175-pos.scala
@@ -1,7 +1,7 @@
object Test {
- def f(g:{val update:Unit}) = g.update
-
+ def f(g:{val update:Unit}) = g.update
+
def main(args: Array[String]): Unit = {
-
+
}
}
diff --git a/test/files/pos/t3177.scala b/test/files/pos/t3177.scala
index 9f9528faec..21893c9422 100644
--- a/test/files/pos/t3177.scala
+++ b/test/files/pos/t3177.scala
@@ -1,17 +1,17 @@
trait InvariantFunctor[F[_]] {
def xmap[A, B](ma: F[A], f: A => B, g: B => A): F[B]
}
-
+
object InvariantFunctor {
import Endo._
-
+
implicit val EndoInvariantFunctor = new InvariantFunctor[Endo] {
- def xmap[A, B](ma: Endo[A], f: A => B, g: B => A): Endo[B] = (b: B) => f(ma(g(b)))
+ def xmap[A, B](ma: Endo[A], f: A => B, g: B => A): Endo[B] = (b: B) => f(ma(g(b)))
}
-
+
// The definition about fails with:
// anon-type.scala:9: error: not found: value b
- // def xmap[A, B](ma: Endo[A], f: A => B, g: B => A): Endo[B] = (b: B) => f(ma(g(b)))
+ // def xmap[A, B](ma: Endo[A], f: A => B, g: B => A): Endo[B] = (b: B) => f(ma(g(b)))
// ^
// anon-type.scala:8: error: not found: type $anon
// implicit val EndoInvariantFunctor = new InvariantFunctor[Endo] {
@@ -20,9 +20,9 @@ object InvariantFunctor {
// These both work:
// implicit val EndoInvariantFunctorAscribed: InvariantFunctor[Endo] = new InvariantFunctor[Endo] {
- // def xmap[A, B](ma: Endo[A], f: A => B, g: B => A): Endo[B] = (b: B) => f(ma(g(b)))
+ // def xmap[A, B](ma: Endo[A], f: A => B, g: B => A): Endo[B] = (b: B) => f(ma(g(b)))
// }
- //
+ //
// implicit val EndoInvariantFunctorStubbed = new InvariantFunctor[Endo] {
// def xmap[A, B](ma: Endo[A], f: A => B, g: B => A): Endo[B] = error("stub")
// }
diff --git a/test/files/pos/t3234.scala b/test/files/pos/t3234.scala
index 1553f1fa05..443d0467f0 100644
--- a/test/files/pos/t3234.scala
+++ b/test/files/pos/t3234.scala
@@ -1,6 +1,6 @@
trait Trait1 {
// need more work before this one works
- // @inline
+ // @inline
def foo2(n: Int) = n*n
}
diff --git a/test/files/pos/t3274.scala b/test/files/pos/t3274.scala
index 15723184bb..dfa6a4ec01 100644
--- a/test/files/pos/t3274.scala
+++ b/test/files/pos/t3274.scala
@@ -1,7 +1,7 @@
-trait A { this: B =>
- trait X {
+trait A { this: B =>
+ trait X {
class Y1 extends Y
- }
+ }
}
trait B extends A {
diff --git a/test/files/pos/t3312.scala b/test/files/pos/t3312.scala
index aef965d2e7..9bf3e23ed3 100644
--- a/test/files/pos/t3312.scala
+++ b/test/files/pos/t3312.scala
@@ -12,6 +12,6 @@ trait B extends Root {
object Foo extends A with B {
override def say: String = foo(super[A].say)
-
+
def foo(p: => String): String = p
}
diff --git a/test/files/pos/t3349/AbstractTupleSet.java b/test/files/pos/t3349/AbstractTupleSet.java
index 38e4743ef4..47b440a589 100644
--- a/test/files/pos/t3349/AbstractTupleSet.java
+++ b/test/files/pos/t3349/AbstractTupleSet.java
@@ -5,5 +5,5 @@ public abstract class AbstractTupleSet implements TupleSet {
public void addColumn(String name, String expr) {
throw new UnsupportedOperationException();
- }
+ }
}
diff --git a/test/files/pos/t3411.scala b/test/files/pos/t3411.scala
index b58e52db8d..b76fec66a6 100644
--- a/test/files/pos/t3411.scala
+++ b/test/files/pos/t3411.scala
@@ -1,6 +1,6 @@
object A {
def g(c: PartialFunction[Any,Unit]) {}
-
+
def f {
lazy val x = 0
g { case `x` => }
diff --git a/test/files/pos/t3429/A.scala b/test/files/pos/t3429/A.scala
index 80785db51d..4b705808c1 100644
--- a/test/files/pos/t3429/A.scala
+++ b/test/files/pos/t3429/A.scala
@@ -2,8 +2,8 @@ class A {
@Test(exc = classOf[Exception])
def myTestMethod = 0
}
-// rytz@chara:~/scala/trunk/sandbox$ javac Test.java
-// rytz@chara:~/scala/trunk/sandbox$ ../build/pack/bin/scalac A.scala
+// rytz@chara:~/scala/trunk/sandbox$ javac Test.java
+// rytz@chara:~/scala/trunk/sandbox$ ../build/pack/bin/scalac A.scala
// A.scala:2: error: type mismatch;
// found : java.lang.Class[Exception](classOf[java.lang.Exception])
// required: java.lang.Class
diff --git a/test/files/pos/t3430.scala b/test/files/pos/t3430.scala
index 3129c6276a..4990abb2a1 100644
--- a/test/files/pos/t3430.scala
+++ b/test/files/pos/t3430.scala
@@ -1,6 +1,6 @@
// package com.example
-object A {
+object A {
def f1(f: String => Boolean) = f("a")
def f2(): Boolean =
diff --git a/test/files/pos/t3440.scala b/test/files/pos/t3440.scala
index 026abfea1f..46bba1b207 100644
--- a/test/files/pos/t3440.scala
+++ b/test/files/pos/t3440.scala
@@ -9,7 +9,7 @@ object test {
case object Int16 extends SampleFormat1 {
def readerFactory = error("")
}
-
+
(new {}: Any) match {
case 8 => Int8
case 16 => Int16
diff --git a/test/files/pos/t3521/DoubleValue.java b/test/files/pos/t3521/DoubleValue.java
index e8c093890b..28f05cd972 100644
--- a/test/files/pos/t3521/DoubleValue.java
+++ b/test/files/pos/t3521/DoubleValue.java
@@ -4,4 +4,4 @@ import java.lang.annotation.*;
@Target(ElementType.FIELD)
public @interface DoubleValue {
double value();
-} \ No newline at end of file
+} \ No newline at end of file
diff --git a/test/files/pos/t3528.scala b/test/files/pos/t3528.scala
index ff49b3e929..b1c4344731 100644
--- a/test/files/pos/t3528.scala
+++ b/test/files/pos/t3528.scala
@@ -4,5 +4,5 @@ class A {
// 3528 comments
def f2 = List(Set(1,2,3), List(1,2,3))
// 2322
- def f3 = List(null: Range, null: List[Int])
+ def f3 = List(null: Range, null: List[Int])
}
diff --git a/test/files/pos/t3568.scala b/test/files/pos/t3568.scala
index c8e3fcc4be..0f26e2fad3 100644
--- a/test/files/pos/t3568.scala
+++ b/test/files/pos/t3568.scala
@@ -14,7 +14,7 @@ package buffer {
// ArrayVec2 can be compiled, instantiated and used.
def main(args: Array[String]) { println(works) }
}
-
+
trait ElemType { type Element; type Component <: ElemType }
trait Float1 extends ElemType { type Element = Float; type Component = Float1}
class Vec2 extends ElemType { type Element = Vec2; type Component = Float1 }
diff --git a/test/files/pos/t3578.scala b/test/files/pos/t3578.scala
index d984118208..306cde811b 100644
--- a/test/files/pos/t3578.scala
+++ b/test/files/pos/t3578.scala
@@ -24,7 +24,7 @@ object Test {
case class JInt(num: BigInt) extends JValue
case class JBool(value: Boolean) extends JValue
case class JField(name: String, value: JValue) extends JValue
- case class JObject(obj: List[JField]) extends JValue
+ case class JObject(obj: List[JField]) extends JValue
case class JArray(arr: List[JValue]) extends JValue
}
diff --git a/test/files/pos/t3582.scala b/test/files/pos/t3582.scala
index 0ac112efbf..e20af5e61d 100644
--- a/test/files/pos/t3582.scala
+++ b/test/files/pos/t3582.scala
@@ -6,7 +6,7 @@ object Test {
// [[syntax trees at end of typer]]
// abstract trait C#5[A#9116 >: Nothing#5832 <: Any#52] extends scala#33.AnyRef#2780;
// final object Test#15 extends java.lang.Object#2485 with ScalaObject#1913 {
-// def ImplicitParamCA#9123[CC#9124[A#10858 >: Nothing#5832 <: Any#52] >: [A#10858]Nothing#5832 <: [A#10858]Any#52,
+// def ImplicitParamCA#9123[CC#9124[A#10858 >: Nothing#5832 <: Any#52] >: [A#10858]Nothing#5832 <: [A#10858]Any#52,
// A#9125 >: Nothing#5832 <: Any#52](implicit ev#10856: C#5[A#9127]): Unit#3818
// = scala#34.this.Predef#1683.implicitly#8816[C#5[A#10858]]()
// }
diff --git a/test/files/pos/t3636.scala b/test/files/pos/t3636.scala
index 24d18c653d..dbfc7a2c94 100644
--- a/test/files/pos/t3636.scala
+++ b/test/files/pos/t3636.scala
@@ -5,11 +5,11 @@ class CTxnLocal[ T ] {
}
trait Txn
-
+
trait ProcTxn {
def ccstm: Txn
}
-
+
trait TxnLocal[ @specialized T ] {
def apply()( implicit tx: ProcTxn ) : T
def set( v: T )( implicit tx: ProcTxn ) : Unit
diff --git a/test/files/pos/t3670.scala b/test/files/pos/t3670.scala
index ec4fbe5b4f..19959f910f 100644
--- a/test/files/pos/t3670.scala
+++ b/test/files/pos/t3670.scala
@@ -1,4 +1,4 @@
-class A {
+class A {
val n = {
val z = {
lazy val bb = 1
diff --git a/test/files/pos/t3671.scala b/test/files/pos/t3671.scala
index 1ca9327bb7..75559f84e2 100644
--- a/test/files/pos/t3671.scala
+++ b/test/files/pos/t3671.scala
@@ -2,6 +2,6 @@ object Crash {
def crash(value: Int): Unit =
value match {
case java.lang.Integer.MAX_VALUE => println("MAX_VALUE")
- case java.lang.Integer.MIN_VALUE => println("MIN_VALUE")
+ case java.lang.Integer.MIN_VALUE => println("MIN_VALUE")
}
} \ No newline at end of file
diff --git a/test/files/pos/t3731.scala b/test/files/pos/t3731.scala
index 9a617012b3..75938540c0 100644
--- a/test/files/pos/t3731.scala
+++ b/test/files/pos/t3731.scala
@@ -2,7 +2,7 @@ object Test{
trait ZW[S]{type T}
def ZipWith[S, M <: ZW[S]]: M#T = error("ZW")
- // meh must be parameterised to force an asSeenFrom that
+ // meh must be parameterised to force an asSeenFrom that
// duplicates the refinement in the TR's pre without updating its sym
def meh[A] = ZipWith[A, ZW[A]{type T=Stream[A]}]
diff --git a/test/files/pos/t3837.scala b/test/files/pos/t3837.scala
index bcaf63cc8d..e1797dba77 100644
--- a/test/files/pos/t3837.scala
+++ b/test/files/pos/t3837.scala
@@ -1,8 +1,8 @@
class BipClass { }
trait BipTrait {
self: BipClass =>
-
- private[this] def foo() = 5
+
+ private[this] def foo() = 5
def bar() = this.foo()
}
// error: value foo is not a member of BipTrait with BipClass
diff --git a/test/files/pos/t3856.scala b/test/files/pos/t3856.scala
index 71c7bdc99d..fd253a56a8 100644
--- a/test/files/pos/t3856.scala
+++ b/test/files/pos/t3856.scala
@@ -1,4 +1,4 @@
-case class C[T](x: T)
+case class C[T](x: T)
case class CS(xs: C[_]*)
diff --git a/test/files/pos/t3864/tuples_1.scala b/test/files/pos/t3864/tuples_1.scala
index ed0c63dc79..1d19af6e41 100644
--- a/test/files/pos/t3864/tuples_1.scala
+++ b/test/files/pos/t3864/tuples_1.scala
@@ -4,7 +4,7 @@ trait PimpedType[X] {
trait Tuples {
-
+
trait Tuple15W[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O] extends PimpedType[Tuple15[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O]] {
def fold[Z](f: => (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) => Z): Z = {import value._; f(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15)}
def toIndexedSeq[Z](implicit ev: value.type <:< Tuple15[Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z]): IndexedSeq[Z] = {val zs = ev(value); import zs._; IndexedSeq(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15)}
@@ -13,7 +13,7 @@ trait Tuple15W[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O] extends PimpedType[T
implicit def ToTuple15W[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O](t: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)): Tuple15W[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O] = new { val value = t } with Tuple15W[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O]
-
+
trait Tuple16W[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P] extends PimpedType[Tuple16[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P]] {
def fold[Z](f: => (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) => Z): Z = {import value._; f(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16)}
def toIndexedSeq[Z](implicit ev: value.type <:< Tuple16[Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z]): IndexedSeq[Z] = {val zs = ev(value); import zs._; IndexedSeq(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16)}
@@ -22,7 +22,7 @@ trait Tuple16W[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P] extends PimpedTyp
implicit def ToTuple16W[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P](t: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)): Tuple16W[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P] = new { val value = t } with Tuple16W[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P]
-
+
trait Tuple17W[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q] extends PimpedType[Tuple17[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q]] {
def fold[Z](f: => (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q) => Z): Z = {import value._; f(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17)}
def toIndexedSeq[Z](implicit ev: value.type <:< Tuple17[Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z]): IndexedSeq[Z] = {val zs = ev(value); import zs._; IndexedSeq(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17)}
@@ -31,7 +31,7 @@ trait Tuple17W[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q] extends Pimped
implicit def ToTuple17W[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q](t: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)): Tuple17W[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q] = new { val value = t } with Tuple17W[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q]
-
+
trait Tuple18W[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R] extends PimpedType[Tuple18[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R]] {
def fold[Z](f: => (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R) => Z): Z = {import value._; f(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18)}
def toIndexedSeq[Z](implicit ev: value.type <:< Tuple18[Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z]): IndexedSeq[Z] = {val zs = ev(value); import zs._; IndexedSeq(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18)}
@@ -40,7 +40,7 @@ trait Tuple18W[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R] extends Pim
implicit def ToTuple18W[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R](t: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)): Tuple18W[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R] = new { val value = t } with Tuple18W[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R]
-
+
trait Tuple19W[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S] extends PimpedType[Tuple19[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S]] {
def fold[Z](f: => (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S) => Z): Z = {import value._; f(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19)}
def toIndexedSeq[Z](implicit ev: value.type <:< Tuple19[Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z]): IndexedSeq[Z] = {val zs = ev(value); import zs._; IndexedSeq(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19)}
@@ -49,7 +49,7 @@ trait Tuple19W[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S] extends
implicit def ToTuple19W[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S](t: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)): Tuple19W[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S] = new { val value = t } with Tuple19W[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S]
-
+
trait Tuple20W[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T] extends PimpedType[Tuple20[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T]] {
def fold[Z](f: => (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T) => Z): Z = {import value._; f(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20)}
def toIndexedSeq[Z](implicit ev: value.type <:< Tuple20[Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z]): IndexedSeq[Z] = {val zs = ev(value); import zs._; IndexedSeq(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20)}
@@ -58,7 +58,7 @@ trait Tuple20W[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T] exten
implicit def ToTuple20W[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T](t: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)): Tuple20W[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T] = new { val value = t } with Tuple20W[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T]
-
+
trait Tuple21W[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U] extends PimpedType[Tuple21[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U]] {
def fold[Z](f: => (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U) => Z): Z = {import value._; f(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21)}
def toIndexedSeq[Z](implicit ev: value.type <:< Tuple21[Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z]): IndexedSeq[Z] = {val zs = ev(value); import zs._; IndexedSeq(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21)}
@@ -67,7 +67,7 @@ trait Tuple21W[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U] ex
implicit def ToTuple21W[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U](t: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)): Tuple21W[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U] = new { val value = t } with Tuple21W[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U]
-
+
trait Tuple22W[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V] extends PimpedType[Tuple22[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V]] {
def fold[Z](f: => (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V) => Z): Z = {import value._; f(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22)}
def toIndexedSeq[Z](implicit ev: value.type <:< Tuple22[Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z, Z]): IndexedSeq[Z] = {val zs = ev(value); import zs._; IndexedSeq(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22)}
diff --git a/test/files/pos/t3866.scala b/test/files/pos/t3866.scala
index 5d366ccf13..5fe7e3f50e 100644
--- a/test/files/pos/t3866.scala
+++ b/test/files/pos/t3866.scala
@@ -13,5 +13,5 @@ abstract class ImplicitRepeated {
f("A", 1, 2) // should be implicitly resolved to alternative b)
f( 1, 2 ) // should be implicitly resolved to alternative a)
// ImplicitRepeated.this.f[Int, Nothing]("A", ImplicitRepeated.this.anyToN[Int](1), ImplicitRepeated.this.anyToN[Int](2));
- // ImplicitRepeated.this.f[Int, Nothing](ImplicitRepeated.this.anyToN[Int](1), ImplicitRepeated.this.anyToN[Int](2))
+ // ImplicitRepeated.this.f[Int, Nothing](ImplicitRepeated.this.anyToN[Int](1), ImplicitRepeated.this.anyToN[Int](2))
} \ No newline at end of file
diff --git a/test/files/pos/t3898.scala b/test/files/pos/t3898.scala
index ab47bbd877..075692e5a8 100644
--- a/test/files/pos/t3898.scala
+++ b/test/files/pos/t3898.scala
@@ -2,5 +2,5 @@ trait Atomic[@specialized(Boolean) T] {
def x: T
def f(fn: T => T): Boolean = f(fn(x), true)
- def f[R](a: T, b: R): R = b
+ def f[R](a: T, b: R): R = b
}
diff --git a/test/files/pos/t3927.scala b/test/files/pos/t3927.scala
index c1344febba..eb4c4b3be5 100644
--- a/test/files/pos/t3927.scala
+++ b/test/files/pos/t3927.scala
@@ -3,4 +3,4 @@ object A {
implicit lazy val e: Equiv[Int] = error("")
implicitly[Equiv[Int]]
}
-}
+}
diff --git a/test/files/pos/t3938/Parent.java b/test/files/pos/t3938/Parent.java
index 08fae330bb..a35f435030 100644
--- a/test/files/pos/t3938/Parent.java
+++ b/test/files/pos/t3938/Parent.java
@@ -1,7 +1,7 @@
public class Parent<A>{
class I1 {}
class I2 extends Parent.I1 {}
-
+
// OKAY:
class I3 extends I1 {}
static class I4 {}
diff --git a/test/files/pos/t3938/UseParent.scala b/test/files/pos/t3938/UseParent.scala
index 685d1a03a8..3f4c2298d5 100644
--- a/test/files/pos/t3938/UseParent.scala
+++ b/test/files/pos/t3938/UseParent.scala
@@ -1,6 +1,6 @@
object UseParent {
classOf[Parent[AnyRef]#I2]
-
+
// OKAY
classOf[Parent[AnyRef]#I3]
classOf[Parent.I5]
diff --git a/test/files/pos/t3972.scala b/test/files/pos/t3972.scala
index 5dfc10fcef..d6cbb3dfb7 100644
--- a/test/files/pos/t3972.scala
+++ b/test/files/pos/t3972.scala
@@ -2,7 +2,7 @@ object CompilerCrash {
def main(args: Array[String]) {
args match {
case Array("a", a @ _*) => { } // The code compiles fine if this line is commented out or "@ _*" is deleted or this line is swapped for the next line
- case Array("b") => { } // The code compiles fine if this line is commented out
+ case Array("b") => { } // The code compiles fine if this line is commented out
case Array("c", c) => {
0 // The code compiles fine if this line is commented out
}
diff --git a/test/files/pos/t4020.scala b/test/files/pos/t4020.scala
index f976460191..8a758d53f7 100644
--- a/test/files/pos/t4020.scala
+++ b/test/files/pos/t4020.scala
@@ -14,11 +14,11 @@ class B {
def mthd(foo: a2.Foo) = {
foo match {
case a2.Foo2(i) => i
-
- // Note: This case is impossible. In fact, scalac
+
+ // Note: This case is impossible. In fact, scalac
// will (correctly) report an error if it is uncommented,
// but a warning if it is commented.
-
+
// case a1.Foo1(i) => i
}
}
diff --git a/test/files/pos/t4202.scala b/test/files/pos/t4202.scala
index b2a0c0120a..aca7d503ee 100644
--- a/test/files/pos/t4202.scala
+++ b/test/files/pos/t4202.scala
@@ -2,7 +2,7 @@ object t4202_1 {
() => {
trait T {
def t = ()
- }
+ }
}
}
diff --git a/test/files/pos/t4220.scala b/test/files/pos/t4220.scala
index 98f2649767..8fb999e345 100644
--- a/test/files/pos/t4220.scala
+++ b/test/files/pos/t4220.scala
@@ -1,4 +1,4 @@
-// don't know if our half-working sbt build is meaningfully
+// don't know if our half-working sbt build is meaningfully
// tested for #4220 with this, but it can't hurt.
class Boo(a: Int = 0)
diff --git a/test/files/pos/t4243.scala b/test/files/pos/t4243.scala
index e6c66faff0..5fa8665918 100644
--- a/test/files/pos/t4243.scala
+++ b/test/files/pos/t4243.scala
@@ -3,16 +3,16 @@
object wrap {
-
+
trait DomainLike[@specialized(Int) A, +This <: Domain[A]]
-
+
trait Domain[@specialized(Int) B]
extends DomainLike[B, Domain[B]]
-
+
trait IterableDomainLike[@specialized(Int) C, +This <: IterableDomain[C]]
extends DomainLike[C, This]
-
+
trait IterableDomain[@specialized(Int) D]
extends Domain[D] with IterableDomainLike[D, IterableDomain[D]]
-
+
}
diff --git a/test/files/pos/t4266.scala b/test/files/pos/t4266.scala
index 222f65e970..301cc264bc 100644
--- a/test/files/pos/t4266.scala
+++ b/test/files/pos/t4266.scala
@@ -1,21 +1,21 @@
object Test {
-
+
trait Tensor2Like[
- @specialized(Int) A1,
- +D1 <: DomainLike[A1],
+ @specialized(Int) A1,
+ +D1 <: DomainLike[A1],
+D <: Product2DomainLike[D1]
] {
def domain: D;
-
+
def checkKey(k1: A1) {
domain._1.contains(k1)
}
}
-
+
trait DomainLike[A] {
def contains(key: A): Boolean;
}
-
+
// trait DomainLike[@specialized(Int) A] {
// def contains(key: A): Boolean;
// }
diff --git a/test/files/pos/t4269.scala b/test/files/pos/t4269.scala
index 99a30785b4..70f0471a9a 100644
--- a/test/files/pos/t4269.scala
+++ b/test/files/pos/t4269.scala
@@ -1,5 +1,5 @@
-class A {
- PartialFunction.condOpt(Nil) {
- case items@List(_*) if true =>
+class A {
+ PartialFunction.condOpt(Nil) {
+ case items@List(_*) if true =>
}
}
diff --git a/test/files/pos/t4275.scala b/test/files/pos/t4275.scala
index 1938aceadc..183cb5155e 100644
--- a/test/files/pos/t4275.scala
+++ b/test/files/pos/t4275.scala
@@ -1,6 +1,6 @@
object Test {
def f = "abc".count(_ > 'a')
-
+
class A {
private val count: Int = 0
}
diff --git a/test/files/pos/t430-feb09.scala b/test/files/pos/t430-feb09.scala
index 1499f32b7a..bba8996e4e 100644
--- a/test/files/pos/t430-feb09.scala
+++ b/test/files/pos/t430-feb09.scala
@@ -13,12 +13,12 @@ package c.scala {
case class C[T]()
}
-// Doesn't compile: type Nothing is not a member of d.scala
+// Doesn't compile: type Nothing is not a member of d.scala
package d.scala.d {
case class D[T]()
}
-// Doesn't compile: type Any is not a member of e.scala
+// Doesn't compile: type Any is not a member of e.scala
package e.scala {
case class E[T >: Nothing]()
}
diff --git a/test/files/pos/t4432.scala b/test/files/pos/t4432.scala
index 106312311a..09f4c2ab34 100644
--- a/test/files/pos/t4432.scala
+++ b/test/files/pos/t4432.scala
@@ -9,7 +9,7 @@ object Main {
}
new A
}
-
+
def foo2 = {
class B {
val x = {
@@ -38,5 +38,5 @@ object Main {
}
new D
}
-
+
}
diff --git a/test/files/pos/t4457_1.scala b/test/files/pos/t4457_1.scala
index 32edd6cfdc..4442f28e4a 100644
--- a/test/files/pos/t4457_1.scala
+++ b/test/files/pos/t4457_1.scala
@@ -15,7 +15,7 @@ object ImplicitConvAmbiguity2 {
def aFunc[A](a: NN[A]) = new BB[A]
def bFunc[T](e1: N[T]) = {}
-
+
def typeMe1 {
val x = aFunc(4F)
bFunc(x)
diff --git a/test/files/pos/t4501.scala b/test/files/pos/t4501.scala
index 40628f1a4b..dac2524024 100644
--- a/test/files/pos/t4501.scala
+++ b/test/files/pos/t4501.scala
@@ -6,7 +6,7 @@ class A {
def f1 = foo(ListBuffer(), List())
def f2 = foo(ListBuffer(), ListBuffer())
def f3 = foo(List(), List())
-
+
// scalap
// def f1 : scala.collection.Seq[scala.Nothing] = { /* compiled code */ }
// def f2 : scala.collection.mutable.ListBuffer[scala.Nothing] = { /* compiled code */ }
diff --git a/test/files/pos/t460.scala b/test/files/pos/t460.scala
index 3fc13e4dd0..466d06c2ad 100644
--- a/test/files/pos/t460.scala
+++ b/test/files/pos/t460.scala
@@ -1,8 +1,8 @@
object Bug460 {
def testFun(x : Int, y : Int) = x + y
- val fn = testFun _
-
- fn(1, 2) // Ok
+ val fn = testFun _
+
+ fn(1, 2) // Ok
(testFun(_, _))(1, 2) // Ok
(testFun _).apply(1, 2)
(testFun _)(1, 2) // Error! (but no longer)
diff --git a/test/files/pos/t4603/S.scala b/test/files/pos/t4603/S.scala
index c7d809d9f7..9e228195a4 100644
--- a/test/files/pos/t4603/S.scala
+++ b/test/files/pos/t4603/S.scala
@@ -1,7 +1,7 @@
// S.scala
class S extends J[AnyRef]
-object Test {
+object Test {
def main(args:Array[String]) {
J.f(classOf[S])
}
diff --git a/test/files/pos/t4716.scala b/test/files/pos/t4716.scala
index ec29e8d2cb..d4bd55c55b 100644
--- a/test/files/pos/t4716.scala
+++ b/test/files/pos/t4716.scala
@@ -2,7 +2,7 @@
-trait Bug2[@specialized(Int) +A] extends TraversableOnce[A] {
+trait Bug2[@specialized(Int) +A] extends TraversableOnce[A] {
def ++[B >: A](that: TraversableOnce[B]) = {
lazy val it = that.toIterator
it
diff --git a/test/files/pos/t4840.scala b/test/files/pos/t4840.scala
index bf44f71d7a..eefa3b2dee 100644
--- a/test/files/pos/t4840.scala
+++ b/test/files/pos/t4840.scala
@@ -1,6 +1,6 @@
class Crashy {
def g(): Option[Any] = None
-
+
def crashy() = {
for (_ <- g()) {
(null: Any) match {
diff --git a/test/files/pos/t4853.scala b/test/files/pos/t4853.scala
index c91f2d6b05..ed9b320434 100644
--- a/test/files/pos/t4853.scala
+++ b/test/files/pos/t4853.scala
@@ -3,7 +3,7 @@ object Animal {
}
class Animal[A <: AwakeOrAsleep] {
- def goToSleep[B >: A <: Awake]: Animal[Asleep] = new Animal[Asleep]
+ def goToSleep[B >: A <: Awake]: Animal[Asleep] = new Animal[Asleep]
def wakeUp[B >: A <: Asleep]: Animal[Awake] = new Animal[Awake]
}
diff --git a/test/files/pos/t5127.scala b/test/files/pos/t5127.scala
index c562025302..e90b8d00a0 100644
--- a/test/files/pos/t5127.scala
+++ b/test/files/pos/t5127.scala
@@ -4,5 +4,5 @@ package foo {
class Parametrized1[T] extends Abstract1[Parametrized2[T]] {
def bar(a: AnyRef) { a match { case d: Parametrized1[_] => println("ok") } }
}
- class Parametrized2[T] extends Parametrized1[T] with Abstract2[Parametrized2[T]]
+ class Parametrized2[T] extends Parametrized1[T] with Abstract2[Parametrized2[T]]
}
diff --git a/test/files/pos/t516.scala b/test/files/pos/t516.scala
index ce4e0e3dd6..735b259436 100644
--- a/test/files/pos/t516.scala
+++ b/test/files/pos/t516.scala
@@ -4,7 +4,7 @@ import scala.collection.script._;
class Members;
object subscriber extends Subscriber[Message[String] with Undoable, Members] {
- def notify(pub: Members, event: Message[String] with Undoable): Unit =
+ def notify(pub: Members, event: Message[String] with Undoable): Unit =
(event: Message[String]) match {
case Include(l, elem) => Console.println("ADD: " + elem);
case Remove(l, elem) => Console.println("REM: " + elem);
@@ -12,4 +12,4 @@ object subscriber extends Subscriber[Message[String] with Undoable, Members] {
//case r : Remove [HasTree] with Undoable =>
}
}
-
+
diff --git a/test/files/pos/t573.scala b/test/files/pos/t573.scala
index 694d001e3c..7b9d377cd1 100644
--- a/test/files/pos/t573.scala
+++ b/test/files/pos/t573.scala
@@ -16,15 +16,15 @@ import DirX._;
abstract class Linked {
type Node <: Node0;
-
+
abstract class Node0 {
self: Node =>
-
+
var next : Node = _;
var prev : Node = _;
-
+
def get(dir : Dir) = if (dir == BEFORE) prev; else next;
- private def set(dir : Dir, node : Node) =
+ private def set(dir : Dir, node : Node) =
if (dir == BEFORE) prev = node; else next = node;
def link(dir : Dir, node : Node) = {
@@ -34,7 +34,7 @@ abstract class Linked {
node.set(dir.reverse, self);
}
-
+
def end(dir : Dir) : Node = {
if (get(dir) == null) this;
else get(dir).end(dir);
diff --git a/test/files/pos/t577.scala b/test/files/pos/t577.scala
index ede45399a0..236c1395e2 100644
--- a/test/files/pos/t577.scala
+++ b/test/files/pos/t577.scala
@@ -1,15 +1,15 @@
trait PriorityTree {
type Node <: BasicTreeNode;
-
+
val top = initTree;
top.next = (initTree);
top.next.prev = (top);
-
+
def initTree : Node;
+
+
-
-
-
+
trait BasicTreeNode {
private[PriorityTree] var next : Node = _;
private[PriorityTree] var prev : Node = _;
diff --git a/test/files/pos/t599.scala b/test/files/pos/t599.scala
index 968e2deaee..53f205a26b 100644
--- a/test/files/pos/t599.scala
+++ b/test/files/pos/t599.scala
@@ -16,4 +16,4 @@ abstract class FooA {
val aaa: InnerB.this.B = doB
aaa.xxx;
}
- }
+ }
diff --git a/test/files/pos/t602.scala b/test/files/pos/t602.scala
index 18dd405645..6062b976b6 100644
--- a/test/files/pos/t602.scala
+++ b/test/files/pos/t602.scala
@@ -10,5 +10,5 @@ case class Span[K <: Ordered[K]](low: Option[K], high: Option[K]) extends Functi
case Span(Some(low), None) => (k >= low)
case Span(None, Some(high)) => (k <= high)
case _ => false
- }
+ }
}
diff --git a/test/files/pos/t613.scala b/test/files/pos/t613.scala
index e140833106..6e3841dada 100644
--- a/test/files/pos/t613.scala
+++ b/test/files/pos/t613.scala
@@ -3,9 +3,9 @@ class Outer extends App {
abstract class C {
val x: Int
}
- val foo = new C {
+ val foo = new C {
class I {
- val z = y
+ val z = y
}
val x = (new I).z
}
diff --git a/test/files/pos/t616.scala b/test/files/pos/t616.scala
index bb91c732a6..074ad190da 100644
--- a/test/files/pos/t616.scala
+++ b/test/files/pos/t616.scala
@@ -1,7 +1,7 @@
object testImplicit {
implicit def foo2bar(foo: Foo): Bar = foo.bar
class Foo(val bar: Bar) {
- def testCoercion = {val a = this; a.baz} // here, foo2bar is inferred by the compiler, as expected
+ def testCoercion = {val a = this; a.baz} // here, foo2bar is inferred by the compiler, as expected
//def testCoercionThisImplicit = baz // --> error: not found: value baz
def testCoercionThisExplicit: Any = this.baz // --> error: value baz is not a member of Foo
}
diff --git a/test/files/pos/t651.scala b/test/files/pos/t651.scala
index c146446af9..44d20ad580 100644
--- a/test/files/pos/t651.scala
+++ b/test/files/pos/t651.scala
@@ -4,12 +4,12 @@ trait Test3 {
trait MatchableImpl {
trait MatchImpl;
}
-
+
trait BracePairImpl {
trait BraceImpl extends MatchableImpl {
private object MyMatch1 extends MatchImpl;
protected def match0 : MatchImpl = MyMatch1;
-
+
}
}
}
diff --git a/test/files/pos/t675.scala b/test/files/pos/t675.scala
index c736d9dc05..c284c0e202 100644
--- a/test/files/pos/t675.scala
+++ b/test/files/pos/t675.scala
@@ -7,7 +7,7 @@ trait T {
}
trait X {
def foo : Foo = FOO_0;
- }
+ }
}
object Test extends App {
@@ -15,5 +15,5 @@ object Test extends App {
val x = new t.X{}
Console.println(x.foo)
}
-
-
+
+
diff --git a/test/files/pos/t690.scala b/test/files/pos/t690.scala
index a93c54f007..3fcdca785d 100644
--- a/test/files/pos/t690.scala
+++ b/test/files/pos/t690.scala
@@ -10,5 +10,5 @@ trait test {
override def foo(t : T) = super.foo(t);
}
def t : T;
- M0.foo(t);
+ M0.foo(t);
}
diff --git a/test/files/pos/t711.scala b/test/files/pos/t711.scala
index 4dd6040969..10b410e54e 100644
--- a/test/files/pos/t711.scala
+++ b/test/files/pos/t711.scala
@@ -2,7 +2,7 @@ abstract class Component
class Button extends Component {
def sayHey: Unit = Console.println("Hey, I'm a button") }
-
+
abstract class Origin {
val delegate: Component }
diff --git a/test/files/pos/t715/meredith_1.scala b/test/files/pos/t715/meredith_1.scala
index 4be7b48908..3ed2e57d7a 100644
--- a/test/files/pos/t715/meredith_1.scala
+++ b/test/files/pos/t715/meredith_1.scala
@@ -9,7 +9,7 @@ trait XMLRenderer {
classOf[java.lang.Boolean],
classOf[java.lang.Integer],
classOf[java.lang.Float],
- classOf[java.lang.String]
+ classOf[java.lang.String]
// more to come
)
@@ -21,14 +21,14 @@ trait XMLRenderer {
value match {
case null => Text( "null" )
case vUnmatched =>
- if (value.isInstanceOf[java.lang.Boolean])
+ if (value.isInstanceOf[java.lang.Boolean])
Text( value.asInstanceOf[java.lang.Boolean].toString )
- else if (value.isInstanceOf[java.lang.Integer])
+ else if (value.isInstanceOf[java.lang.Integer])
Text( value.asInstanceOf[java.lang.Integer].toString )
- else if (value.isInstanceOf[java.lang.Float])
+ else if (value.isInstanceOf[java.lang.Float])
Text( value.asInstanceOf[java.lang.Float].toString )
- // else if (value.isInstanceOf[T])
- // pojo2XML( value.asInstanceOf[T] )
+ // else if (value.isInstanceOf[T])
+ // pojo2XML( value.asInstanceOf[T] )
else
<unmatchedType>
<theType>
@@ -57,7 +57,7 @@ trait XMLRenderer {
null,
field.getName,
null,
- TopScope,
+ TopScope,
fldValXML
)
}
@@ -73,7 +73,7 @@ trait XMLRenderer {
null,
TopScope,
progeny.asInstanceOf[Array[scala.xml.Node]] : _*
- )
+ )
}
}
diff --git a/test/files/pos/t757.scala b/test/files/pos/t757.scala
index fd7624cee7..7513910d8d 100644
--- a/test/files/pos/t757.scala
+++ b/test/files/pos/t757.scala
@@ -1,4 +1,4 @@
-package foo {
+package foo {
object C {
def foo {
Console.println("foo")
@@ -6,7 +6,7 @@ package foo {
}
}
-package bar {
+package bar {
object Main extends App {
foo.C.foo
}
diff --git a/test/files/pos/t758.scala b/test/files/pos/t758.scala
index 160bf37172..44769d54f1 100644
--- a/test/files/pos/t758.scala
+++ b/test/files/pos/t758.scala
@@ -1,7 +1,7 @@
trait A { type T; type M >: T }
-trait B extends A {
- val x : String;
- val u : A { type T = B.this.T } ;
- type T = x.type;
- type M = u.M
+trait B extends A {
+ val x : String;
+ val u : A { type T = B.this.T } ;
+ type T = x.type;
+ type M = u.M
}
diff --git a/test/files/pos/t767.scala b/test/files/pos/t767.scala
index 0c4067f022..d4d7eae870 100644
--- a/test/files/pos/t767.scala
+++ b/test/files/pos/t767.scala
@@ -4,7 +4,7 @@ abstract class AbsCell {
private var value: T = init
def get: T = value
def set (x: T) { value = x }
-
+
class Node {
val foo = 1
}
diff --git a/test/files/pos/t788.scala b/test/files/pos/t788.scala
index 19638dd170..3da88a2d26 100644
--- a/test/files/pos/t788.scala
+++ b/test/files/pos/t788.scala
@@ -4,7 +4,7 @@ trait Test {
type Node <: NodeImpl;
trait NodeImpl;
type Expression <: Node with ExpressionImpl;
- trait ExpressionImpl extends NodeImpl {
+ trait ExpressionImpl extends NodeImpl {
def self : Expression;
}
type Named <: Node with NamedImpl;
diff --git a/test/files/pos/t802.scala b/test/files/pos/t802.scala
index 2dea7036d6..124d4915bc 100644
--- a/test/files/pos/t802.scala
+++ b/test/files/pos/t802.scala
@@ -1,17 +1,17 @@
package test;
trait Test {
- abstract class BracesImpl {
+ abstract class BracesImpl {
type Singleton;
type Brace <: Singleton with BraceImpl;
- trait BraceImpl;
+ trait BraceImpl;
trait ForFile;
}
- abstract class ParensImpl extends BracesImpl {
+ abstract class ParensImpl extends BracesImpl {
type Brace <: Singleton with BraceImpl;
trait BraceImpl extends super.BraceImpl;
}
val parens : ParensImpl;
- abstract class BracksImpl extends BracesImpl {
+ abstract class BracksImpl extends BracesImpl {
type Brace <: Singleton with BraceImpl;
trait BraceImpl extends super.BraceImpl;
}
diff --git a/test/files/pos/t807.scala b/test/files/pos/t807.scala
index 0eeb92ea24..ed73fe3f97 100644
--- a/test/files/pos/t807.scala
+++ b/test/files/pos/t807.scala
@@ -6,7 +6,7 @@ trait Matcher {
trait HasLinks {
def link(b : Boolean) : Link = null;
}
-
+
}
trait BraceMatcher extends Matcher {
trait BracePair {
diff --git a/test/files/pos/t927.scala b/test/files/pos/t927.scala
index c903f19867..534f355045 100644
--- a/test/files/pos/t927.scala
+++ b/test/files/pos/t927.scala
@@ -7,5 +7,5 @@ object Test {
}
val str: Stream[Int] = List(1,2,3).iterator.toStream
assert(sum(str) == 6)
-
+
}
diff --git a/test/files/pos/t946.scala b/test/files/pos/t946.scala
index c4bd6e9ba4..9f4cdbc043 100644
--- a/test/files/pos/t946.scala
+++ b/test/files/pos/t946.scala
@@ -1,7 +1,7 @@
object pmbugbounds {
trait Bar
class Foo[t <: Bar] {}
-
+
(new Foo[Bar]) match {
case _ : Foo[x] => null
}
diff --git a/test/files/pos/tcpoly_boundedmonad.scala b/test/files/pos/tcpoly_boundedmonad.scala
index ef02507b66..24a911769b 100644
--- a/test/files/pos/tcpoly_boundedmonad.scala
+++ b/test/files/pos/tcpoly_boundedmonad.scala
@@ -1,19 +1,19 @@
trait Monad[T <: Bound[T], MyType[x <: Bound[x]], Bound[_]] {
- def map[S <: Bound[S]](f: T => S): MyType[S]
+ def map[S <: Bound[S]](f: T => S): MyType[S]
- def flatMap[S <: RBound[S], RContainer[x <: RBound[x]], RBound[_],
+ def flatMap[S <: RBound[S], RContainer[x <: RBound[x]], RBound[_],
Result[x <: RBound[x]] <: Monad[x, RContainer, RBound]]
- (f: T => Result[S]): Result[S]
+ (f: T => Result[S]): Result[S]
def filter(p: T => Boolean): MyType[T]
}
class Set[T <: Ordered[T]] extends Monad[T, Set, Ordered] {
- def map[S <: Ordered[S]](f: T => S): Set[S] = error("TODO")
-
- def flatMap[S <: RBound[S], RContainer[x <: RBound[x]], RBound[_],
+ def map[S <: Ordered[S]](f: T => S): Set[S] = error("TODO")
+
+ def flatMap[S <: RBound[S], RContainer[x <: RBound[x]], RBound[_],
Result[x <: RBound[x]] <: Monad[x, RContainer, RBound]]
- (f: T => Result[S]): Result[S] = error("TODO")
-
- def filter(p: T => Boolean): Set[T] = error("TODO")
+ (f: T => Result[S]): Result[S] = error("TODO")
+
+ def filter(p: T => Boolean): Set[T] = error("TODO")
}
diff --git a/test/files/pos/tcpoly_bounds1.scala b/test/files/pos/tcpoly_bounds1.scala
index 5874cc664d..142c0b7b7f 100644
--- a/test/files/pos/tcpoly_bounds1.scala
+++ b/test/files/pos/tcpoly_bounds1.scala
@@ -1,6 +1,6 @@
-class Foo[t[x]<: Pair[Int, x]]
+class Foo[t[x]<: Pair[Int, x]]
-//
+//
class MyPair[z](a: Int, b: z) extends Pair[Int, z](a,b)
object foo extends Foo[MyPair]
diff --git a/test/files/pos/tcpoly_checkkinds_mix.scala b/test/files/pos/tcpoly_checkkinds_mix.scala
index 3734405f8b..2d265da6b9 100644
--- a/test/files/pos/tcpoly_checkkinds_mix.scala
+++ b/test/files/pos/tcpoly_checkkinds_mix.scala
@@ -2,9 +2,9 @@ trait Iterable[A <: Bound[A], Bound[_]] {
type MyType[x <: Bound[x]] <: Iterable[x, Bound]
def map[B <: Bound[B]](f: A => B): MyType[B]
def flatMap[B <: Bound[B]](f: A => MyType[B]): MyType[B]
- def filter(p: A => Boolean): MyType[A]
+ def filter(p: A => Boolean): MyType[A]
}
-trait OrderedSet[T <: Ordered[T]] extends Iterable[T, Ordered] {
+trait OrderedSet[T <: Ordered[T]] extends Iterable[T, Ordered] {
type MyType[x <: Ordered[x]] = OrderedSet[x]
-}
+}
diff --git a/test/files/pos/tcpoly_gm.scala b/test/files/pos/tcpoly_gm.scala
index 95361e0dac..ecaeef9679 100644
--- a/test/files/pos/tcpoly_gm.scala
+++ b/test/files/pos/tcpoly_gm.scala
@@ -1,4 +1,4 @@
-trait Rep[a] {
+trait Rep[a] {
def rep[m[x]]: m[a] // typedTypeApply must use asSeenFrom to adapt the return type
// since rep is called on x: Rep[t]
// a must become t
@@ -9,7 +9,7 @@ case class ShowBin[b](app: b => String)
object foo {
def showBin[t](x: Rep[t], y: t): String = {
val r: ShowBin[t] = x.rep[ShowBin]
- r.app(y)
+ r.app(y)
}
}
-
+
diff --git a/test/files/pos/tcpoly_higherorder_bound_method.scala b/test/files/pos/tcpoly_higherorder_bound_method.scala
index 3905b3b96d..090bb8fcf3 100644
--- a/test/files/pos/tcpoly_higherorder_bound_method.scala
+++ b/test/files/pos/tcpoly_higherorder_bound_method.scala
@@ -1,3 +1,3 @@
trait SkolemisationOfHigherOrderBoundInMethod {
def method[A, N[X <: A], M[X <: N[A]]]: Unit
-}
+}
diff --git a/test/files/pos/tcpoly_infer_explicit_tuple_wrapper.scala b/test/files/pos/tcpoly_infer_explicit_tuple_wrapper.scala
index de31efd565..97594d506d 100644
--- a/test/files/pos/tcpoly_infer_explicit_tuple_wrapper.scala
+++ b/test/files/pos/tcpoly_infer_explicit_tuple_wrapper.scala
@@ -7,9 +7,9 @@ class IterableOps[CC[+B] <: Iterable[B] with GenericTraversableTemplate[B, CC],
object Test {
- implicit def tupleOfIterableWrapper[CC[+B] <: Iterable[B] with GenericTraversableTemplate[B, CC], A1, A2](tuple: (CC[A1], Iterable[A2]))
+ implicit def tupleOfIterableWrapper[CC[+B] <: Iterable[B] with GenericTraversableTemplate[B, CC], A1, A2](tuple: (CC[A1], Iterable[A2]))
= new IterableOps[CC, A1, A2](tuple)
-
+
val t = (List(1, 2, 3), List(6, 5, 4))
tupleOfIterableWrapper(t) unzip
diff --git a/test/files/pos/tcpoly_late_method_params.scala b/test/files/pos/tcpoly_late_method_params.scala
index e2f0bcffb3..c9298918a0 100644
--- a/test/files/pos/tcpoly_late_method_params.scala
+++ b/test/files/pos/tcpoly_late_method_params.scala
@@ -1,5 +1,5 @@
trait Foo {
- def flatMap[RT <: RBound[RT], RBound[_], Result[x <: RBound[x]]]: Result[RT]
+ def flatMap[RT <: RBound[RT], RBound[_], Result[x <: RBound[x]]]: Result[RT]
// bounds for RT& = >: scala.this.Nothing <: RBound&[RT&]
// bounds for x = >: scala.this.Nothing <: RBound&[x]
}
diff --git a/test/files/pos/tcpoly_method.scala b/test/files/pos/tcpoly_method.scala
index 294b53b915..80dc0482fd 100644
--- a/test/files/pos/tcpoly_method.scala
+++ b/test/files/pos/tcpoly_method.scala
@@ -1,6 +1,6 @@
trait Iterable[m[+x], +t] {
def flatMap[resColl[+x] <: Iterable[resColl, x], s](f: t => resColl[s]): resColl[s]
-
+
def foo[a[x]] = "a"
val x = foo[List]
}
diff --git a/test/files/pos/tcpoly_overloaded.scala b/test/files/pos/tcpoly_overloaded.scala
index f67e4a9fef..4240074d85 100644
--- a/test/files/pos/tcpoly_overloaded.scala
+++ b/test/files/pos/tcpoly_overloaded.scala
@@ -1,10 +1,10 @@
trait Monad[T <: Bound[T], MyType[x <: Bound[x]], Bound[_]] {
- def flatMap[S <: RBound[S], RContainer[x <: RBound[x]], RBound[_],
+ def flatMap[S <: RBound[S], RContainer[x <: RBound[x]], RBound[_],
Result[x <: RBound[x]] <: Monad[x, RContainer, RBound]]
- (f: T => Result[S]): Result[S]
- def flatMap[S <: RBound[S], RContainer[x <: RBound[x]], RBound[_],
+ (f: T => Result[S]): Result[S]
+ def flatMap[S <: RBound[S], RContainer[x <: RBound[x]], RBound[_],
Result[x <: RBound[x]] <: Monad[x, RContainer, RBound]]
- (f: T => Result[S], foo: String): Result[S]
+ (f: T => Result[S], foo: String): Result[S]
def flatMap[S <: Bound[S]]
(f: T => MyType[S], foo: Int): MyType[S]
}
@@ -12,14 +12,14 @@ trait Monad[T <: Bound[T], MyType[x <: Bound[x]], Bound[_]] {
trait Test {
def moo: MList[Int]
class MList[T](el: T) extends Monad[T, List, Any] {
- def flatMap[S <: RBound[S], RContainer[x <: RBound[x]], RBound[_],
+ def flatMap[S <: RBound[S], RContainer[x <: RBound[x]], RBound[_],
Result[x <: RBound[x]] <: Monad[x, RContainer, RBound]]
(f: T => Result[S]): Result[S] = error("foo")
- def flatMap[S <: RBound[S], RContainer[x <: RBound[x]], RBound[_],
+ def flatMap[S <: RBound[S], RContainer[x <: RBound[x]], RBound[_],
Result[x <: RBound[x]] <: Monad[x, RContainer, RBound]]
(f: T => Result[S], foo: String): Result[S] = error("foo")
def flatMap[S]
- (f: T => List[S], foo: Int): List[S] = error("foo")
+ (f: T => List[S], foo: Int): List[S] = error("foo")
}
val l: MList[String] = moo.flatMap[String, List, Any, MList]((x: Int) => new MList("String"))
}
diff --git a/test/files/pos/tcpoly_poly.scala b/test/files/pos/tcpoly_poly.scala
index 1ba04e29df..50ffc7837f 100644
--- a/test/files/pos/tcpoly_poly.scala
+++ b/test/files/pos/tcpoly_poly.scala
@@ -1,3 +1,3 @@
-class Monad[m[x]]
+class Monad[m[x]]
object ml extends Monad[List]
diff --git a/test/files/pos/tcpoly_return_overriding.scala b/test/files/pos/tcpoly_return_overriding.scala
index 57ec8da76c..0814e73fa4 100644
--- a/test/files/pos/tcpoly_return_overriding.scala
+++ b/test/files/pos/tcpoly_return_overriding.scala
@@ -2,7 +2,7 @@ trait Generic[g[x]] {
def unit: g[Unit]
}
-trait Rep[t] {
+trait Rep[t] {
def rep[m[x]](implicit gen: Generic[m]): m[t]
}
diff --git a/test/files/pos/tcpoly_seq.scala b/test/files/pos/tcpoly_seq.scala
index 48b3e1ce52..b5f46f6b6b 100644
--- a/test/files/pos/tcpoly_seq.scala
+++ b/test/files/pos/tcpoly_seq.scala
@@ -6,40 +6,40 @@ trait HOSeq {
// values implementing this interface, in order to provide more performant ways of building that structure
trait Accumulator[+coll[x], elT] {
def += (el: elT): Unit
- def result: coll[elT]
+ def result: coll[elT]
}
-
-
+
+
// Iterable abstracts over the type of its structure as well as its elements (see PolyP's Bifunctor)
- // m[x] is intentionally unbounded: fold can then be defined nicely
- // variance: if we write m[+x] instead of +m[+x], x is an invariant position because its enclosing type
+ // m[x] is intentionally unbounded: fold can then be defined nicely
+ // variance: if we write m[+x] instead of +m[+x], x is an invariant position because its enclosing type
// is an invariant position -- should probably rule that out?
trait Iterable[+m[+x], +t] {
//def unit[a](orig: a): m[a]
def iterator: Iterator[t]
-
+
// construct an empty accumulator that will produce the same structure as this iterable, with elements of type t
def accumulator[t]: Accumulator[m, t]
-
+
def filter(p: t => Boolean): m[t] = {
val buf = accumulator[t]
val elems = iterator
while (elems.hasNext) { val x = elems.next; if (p(x)) buf += x }
buf.result
}
-
+
def map[s](f: t => s): m[s] = {
val buf = accumulator[s]
val elems = iterator
while (elems.hasNext) buf += f(elems.next)
buf.result
}
-
+
// flatMap is a more specialized map, it only works if the mapped function produces Iterable values,
// which are then added to the result one by one
// the compiler should be able to find the right accumulator (implicit buf) to build the result
// to get concat, resColl = SingletonIterable, f = unit for SingletonIterable
- def flatMap[resColl[+x] <: Iterable[resColl, x], s](f: t => resColl[s])(implicit buf: Accumulator[resColl, s]): resColl[s] = {
+ def flatMap[resColl[+x] <: Iterable[resColl, x], s](f: t => resColl[s])(implicit buf: Accumulator[resColl, s]): resColl[s] = {
// TODO: would a viewbound for resColl[x] be better?
// -- 2nd-order type params are not yet in scope in view bound
val elems = iterator
@@ -48,9 +48,9 @@ trait HOSeq {
while (elemss.hasNext) buf += elemss.next
}
buf.result
- }
+ }
}
-
+
final class ListBuffer[A] {
private var start: List[A] = Nil
private var last: ::[A] = _
@@ -78,7 +78,7 @@ trait HOSeq {
exported = !start.isEmpty
start
}
-
+
/** Clears the buffer contents.
*/
def clear {
@@ -97,13 +97,13 @@ trait HOSeq {
}
}
}
-
+
implicit def listAccumulator[elT]: Accumulator[List, elT] = new Accumulator[List, elT] {
private[this] val buff = new ListBuffer[elT]
def += (el: elT): Unit = buff += el
def result: List[elT] = buff.toList
}
-
+
trait List[+t] extends Iterable[List, t] {
def head: t
def tail: List[t]
@@ -121,14 +121,14 @@ trait HOSeq {
// construct an empty accumulator that will produce the same structure as this iterable, with elements of type t
def accumulator[t]: Accumulator[List, t] = listAccumulator[t]
}
-
+
// TODO: the var tl approach does not seem to work because subtyping isn't fully working yet
final case class ::[+b](hd: b, private val tl: List[b]) extends List[b] {
def head = hd
def tail = if(tl==null) this else tl // hack
override def isEmpty: Boolean = false
}
-
+
case object Nil extends List[Nothing] {
def isEmpty = true
def head: Nothing =
@@ -157,18 +157,18 @@ trait HOSeq {
def filter(f: T=>Boolean): FilterResult
def subseq(from: Int, to: Int): Subseq
def flatMap[S <: Seq[K], K](f: T => S): S#Concat // legal?
- def concat(others: Seq[T]): Concat
+ def concat(others: Seq[T]): Concat
*/
-
+
/*trait Iterator[t] {
// @post hasAdvanced implies hasNext
// model def hasAdvanced: Boolean
-
+
def hasNext: Boolean // pure
-
+
// @pre hasAdvanced
def current: t // pure
-
+
// @pre hasNext
// @post hasAdvanced
def advance: Unit
diff --git a/test/files/pos/tcpoly_seq_typealias.scala b/test/files/pos/tcpoly_seq_typealias.scala
index fb48126ce6..0651ad9760 100644
--- a/test/files/pos/tcpoly_seq_typealias.scala
+++ b/test/files/pos/tcpoly_seq_typealias.scala
@@ -6,42 +6,42 @@ trait HOSeq {
// values implementing this interface, in order to provide more performant ways of building that structure
trait Accumulator[+coll[x], elT] {
def += (el: elT): Unit
- def result: coll[elT]
+ def result: coll[elT]
}
-
-
+
+
// Iterable abstracts over the type of its structure as well as its elements (see PolyP's Bifunctor)
- // m[x] is intentionally unbounded: fold can then be defined nicely
- // variance: if we write m[+x] instead of +m[+x], x is an invariant position because its enclosing type
+ // m[x] is intentionally unbounded: fold can then be defined nicely
+ // variance: if we write m[+x] instead of +m[+x], x is an invariant position because its enclosing type
// is an invariant position -- should probably rule that out?
trait Iterable[+t] {
- type m[+x]
-
+ type m[+x]
+
//def unit[a](orig: a): m[a]
def iterator: Iterator[t]
-
+
// construct an empty accumulator that will produce the same structure as this iterable, with elements of type t
def accumulator[t]: Accumulator[m, t]
-
+
def filter(p: t => Boolean): m[t] = {
val buf = accumulator[t]
val elems = iterator
while (elems.hasNext) { val x = elems.next; if (p(x)) buf += x }
buf.result
}
-
+
def map[s](f: t => s): m[s] = {
val buf = accumulator[s]
val elems = iterator
while (elems.hasNext) buf += f(elems.next)
buf.result
}
-
+
// flatMap is a more specialized map, it only works if the mapped function produces Iterable values,
// which are then added to the result one by one
// the compiler should be able to find the right accumulator (implicit buf) to build the result
// to get concat, resColl = SingletonIterable, f = unit for SingletonIterable
- def flatMap[resColl[+x] <: Iterable[x], s](f: t => resColl[s])(implicit buf: Accumulator[resColl, s]): resColl[s] = {
+ def flatMap[resColl[+x] <: Iterable[x], s](f: t => resColl[s])(implicit buf: Accumulator[resColl, s]): resColl[s] = {
// TODO: would a viewbound for resColl[x] be better?
// -- 2nd-order type params are not yet in scope in view bound
val elems = iterator
@@ -50,9 +50,9 @@ trait HOSeq {
while (elemss.hasNext) buf += elemss.next
}
buf.result
- }
+ }
}
-
+
final class ListBuffer[A] {
private var start: List[A] = Nil
private var last: ::[A] = _
@@ -80,7 +80,7 @@ trait HOSeq {
exported = !start.isEmpty
start
}
-
+
/** Clears the buffer contents.
*/
def clear {
@@ -99,16 +99,16 @@ trait HOSeq {
}
}
}
-
+
implicit def listAccumulator[elT]: Accumulator[List, elT] = new Accumulator[List, elT] {
private[this] val buff = new ListBuffer[elT]
def += (el: elT): Unit = buff += el
def result: List[elT] = buff.toList
}
-
+
trait List[+t] extends Iterable[t] {
type m[+x] = List[x]
-
+
def head: t
def tail: List[t]
def isEmpty: Boolean
@@ -125,14 +125,14 @@ trait HOSeq {
// construct an empty accumulator that will produce the same structure as this iterable, with elements of type t
def accumulator[t]: Accumulator[List, t] = listAccumulator[t]
}
-
+
// TODO: the var tl approach does not seem to work because subtyping isn't fully working yet
final case class ::[+b](hd: b, private val tl: List[b]) extends List[b] {
def head = hd
def tail = if(tl==null) this else tl // hack
override def isEmpty: Boolean = false
}
-
+
case object Nil extends List[Nothing] {
def isEmpty = true
def head: Nothing =
diff --git a/test/files/pos/ted.scala b/test/files/pos/ted.scala
index 314f109328..d8ae64f29b 100644
--- a/test/files/pos/ted.scala
+++ b/test/files/pos/ted.scala
@@ -9,7 +9,7 @@ object App
case (b, e) => b * exponentiate(b, e - 1)
}
-
+
def main(args : Array[String]) =
System.out.println(exponentiate(2, 2))
diff --git a/test/files/pos/test5.scala b/test/files/pos/test5.scala
index 4dbafc9ac3..b04de5d613 100644
--- a/test/files/pos/test5.scala
+++ b/test/files/pos/test5.scala
@@ -53,7 +53,7 @@ object test {
// Check type j.P
j.chk_ip(val_mp);
- j.chk_ip(val_np);
+ j.chk_ip(val_np);
// Check type i.X
i.chk_ix(i.val_ix);
@@ -63,6 +63,6 @@ object test {
// Check j.X
j.chk_ix(j.val_ix);
j.chk_ix(j.val_jx);
- j.chk_ix(val_njx);
+ j.chk_ix(val_njx);
}
}
diff --git a/test/files/pos/test5refine.scala b/test/files/pos/test5refine.scala
index 5459b3b975..290449c3ed 100644
--- a/test/files/pos/test5refine.scala
+++ b/test/files/pos/test5refine.scala
@@ -60,7 +60,7 @@ object test {
// Check type j.P
j.chk_ip(val_mp);
- j.chk_ip(val_np);
+ j.chk_ip(val_np);
// Check type i.X
i.chk_ix(i.val_ix);
@@ -70,6 +70,6 @@ object test {
// Check j.X
j.chk_ix(j.val_ix);
j.chk_ix(j.val_jx);
- j.chk_ix(val_njx);
+ j.chk_ix(val_njx);
}
}
diff --git a/test/files/pos/testCoercionThis.scala b/test/files/pos/testCoercionThis.scala
index 5631b33306..8bbfdcd684 100644
--- a/test/files/pos/testCoercionThis.scala
+++ b/test/files/pos/testCoercionThis.scala
@@ -11,9 +11,9 @@ object Test {
// PP: is that something we really want to work? Seems like sketchville.
//
// These work, so I moved this out of pending.
- def testCoercionThis1 = this.baz
+ def testCoercionThis1 = this.baz
def testCoercionThis2 = (this: Foo).baz
}
-
- class Bar { def baz = System.out.println("baz") }
+
+ class Bar { def baz = System.out.println("baz") }
}
diff --git a/test/files/pos/thistypes.scala b/test/files/pos/thistypes.scala
index 7319cc1ecb..26339e07c4 100644
--- a/test/files/pos/thistypes.scala
+++ b/test/files/pos/thistypes.scala
@@ -5,4 +5,4 @@ trait B {
trait C extends B {
def foo: C.this.I;
-}
+}
diff --git a/test/files/pos/ticket0137.scala b/test/files/pos/ticket0137.scala
index 94ef8e49fc..72f955fe5e 100644
--- a/test/files/pos/ticket0137.scala
+++ b/test/files/pos/ticket0137.scala
@@ -1,7 +1,7 @@
-trait AbsM {
- abstract class MonadCompanion[M[_]]
+trait AbsM {
+ abstract class MonadCompanion[M[_]]
abstract class AbsMonadCompanion extends MonadCompanion[AM] {
- def newTag: Int
+ def newTag: Int
}
type AM[_] // to trigger the bug, this must be an abstract type member that comes after the reference to it
diff --git a/test/files/pos/traits.scala b/test/files/pos/traits.scala
index 8dcd9c0b5f..bd64d7215a 100644
--- a/test/files/pos/traits.scala
+++ b/test/files/pos/traits.scala
@@ -20,8 +20,8 @@ object Test {
trait BorderedColoredShape extends Shape with Bordered with Colored {
override def equals(other: Any) = other match {
case that: BorderedColoredShape => (
- super.equals(that) &&
- super[Bordered].equals(that) &&
+ super.equals(that) &&
+ super[Bordered].equals(that) &&
super[Colored].equals(that))
case _ => false
}
diff --git a/test/files/pos/typealias_dubious.scala b/test/files/pos/typealias_dubious.scala
index de6bb67fe3..587453a037 100644
--- a/test/files/pos/typealias_dubious.scala
+++ b/test/files/pos/typealias_dubious.scala
@@ -1,8 +1,8 @@
class MailBox {
- //class Message
+ //class Message
type Message = AnyRef
-}
-
+}
+
abstract class Actor {
private val in = new MailBox
@@ -10,6 +10,6 @@ abstract class Actor {
def unstable: Actor = error("foo")
- def dubiousSend(msg: MailBox#Message) =
+ def dubiousSend(msg: MailBox#Message) =
unstable.send(msg) // in.Message becomes unstable.Message, but that's ok since Message is a concrete type member
-}
+}
diff --git a/test/files/pos/typealiases.scala b/test/files/pos/typealiases.scala
index d03b521f77..5974921ed3 100644
--- a/test/files/pos/typealiases.scala
+++ b/test/files/pos/typealiases.scala
@@ -3,18 +3,18 @@ package foo
trait Test[T] {
type Check[T] = Array[T] => Unit;
type MyPair[S] = (T, S)
-
+
val pair1: (T, Int)
val pair: MyPair[Int] = pair1
-
+
def check(xs: Array[T], c: Check[T]) = c(xs)
- def check2[S](xs: Array[S], c: Check[S]) = c(xs)
-}
+ def check2[S](xs: Array[S], c: Check[S]) = c(xs)
+}
-object main extends Test[Int] {
- val pair1 = (1,1)
+object main extends Test[Int] {
+ val pair1 = (1,1)
implicit def topair(x: Int): Pair[Int, Int] = (x,x)
- val pair2: MyPair[Int] = 1
+ val pair2: MyPair[Int] = 1
val x: Short = 1
}
diff --git a/test/files/pos/unapplyNeedsMemberType.scala b/test/files/pos/unapplyNeedsMemberType.scala
index b423257e04..2581512a7b 100644
--- a/test/files/pos/unapplyNeedsMemberType.scala
+++ b/test/files/pos/unapplyNeedsMemberType.scala
@@ -8,7 +8,7 @@ trait Gunk[a] {
def unapply(s: Seq) = unapply_Cons(s)
}
def unapply_Cons(s: Any): Option[Tuple2[a, Seq]]
-}
+}
class Join[a] extends Gunk[a] {
type Seq = JoinSeq
diff --git a/test/files/pos/unapplySeq.scala b/test/files/pos/unapplySeq.scala
index 6d13cc8b52..4d5409c6f7 100644
--- a/test/files/pos/unapplySeq.scala
+++ b/test/files/pos/unapplySeq.scala
@@ -4,7 +4,7 @@ object FooSeq {
val y = x.asInstanceOf[Bar]
Some(y.size, y.name)
} else None
- }
+ }
def main(args:Array[String]) = {
val b = new Bar
diff --git a/test/files/pos/unapplyVal.scala b/test/files/pos/unapplyVal.scala
index 368b9b9375..0d6394a90f 100644
--- a/test/files/pos/unapplyVal.scala
+++ b/test/files/pos/unapplyVal.scala
@@ -10,7 +10,7 @@ class Buffer {
def joinPat(x: Any): Unit = {
x match {
- case Put =>
+ case Put =>
case Put(y) =>
println("returning "+y)
}
@@ -29,7 +29,7 @@ object unapplyJoins extends App { // bug #1257
object Get extends Sync
val jp: PartialFunction[Any, Any] = {
- case Get() =>
+ case Get() =>
}
}
diff --git a/test/files/pos/virtpatmat_castbinder.scala b/test/files/pos/virtpatmat_castbinder.scala
index be269638ce..53e937e866 100644
--- a/test/files/pos/virtpatmat_castbinder.scala
+++ b/test/files/pos/virtpatmat_castbinder.scala
@@ -6,7 +6,7 @@ trait IntMapIterator[V, T] {
def valueOf(tip: Tip[V]): T
def pop: IntMap[V]
- def next: T =
+ def next: T =
pop match {
case Bin(t@Tip(_)) => {
valueOf(t)
diff --git a/test/files/pos/virtpatmat_exist1.scala b/test/files/pos/virtpatmat_exist1.scala
index 6cad017b0b..ccb91299db 100644
--- a/test/files/pos/virtpatmat_exist1.scala
+++ b/test/files/pos/virtpatmat_exist1.scala
@@ -13,7 +13,7 @@ object Test {
// without type ascription for the one in the body of the last flatmap of each alternative, type inference borks on the existentials
// def splitArray[T >: Nothing <: Any](ad: Array[Iterable[T]]): Any = { import OptionMatching._
// runOrElse(ad.apply(0))(((x1: Iterable[T]) => (
- // or(((x4: Iterable[T]) => one(null)),
+ // or(((x4: Iterable[T]) => one(null)),
// guard(x1.isInstanceOf[Iterable[T] with Test.HashMapCollision1[_,_]], x1.asInstanceOf[Iterable[T] with Test.HashMapCollision1[_,_]]).flatMap(((x2: Iterable[T] with Test.HashMapCollision1[_,_]) => one(x2))),
// guard(x1.isInstanceOf[Test.HashSetCollision1[_]], x1.asInstanceOf[Iterable[T] with Test.HashSetCollision1[_]]).flatMap(((x3: Iterable[T] with Test.HashSetCollision1[_]) => one(x3)))): Option[Any]).orElse(
// (zero: Option[Any])))
diff --git a/test/files/pos/virtpatmat_exist2.scala b/test/files/pos/virtpatmat_exist2.scala
index ee186074ab..b0e4c667b7 100644
--- a/test/files/pos/virtpatmat_exist2.scala
+++ b/test/files/pos/virtpatmat_exist2.scala
@@ -9,11 +9,11 @@ object Test {
// what's the _$1 doing there?
// def grow[T >: Nothing <: Any]: ParseResult[T] = {
// import OptionMatching._
- // runOrElse[MemoEntry[T], ParseResult[T]]((null: MemoEntry[T]))(((x1: MemoEntry[T]) =>
- // (MemoEntry.unapply[T](x1).flatMap[ParseResult[T]](((x4: Either[Nothing,ParseResult[_]]) =>
- // guard[Right[Nothing,ParseResult[_]]](x4.isInstanceOf[Right[Nothing,ParseResult[_]]], x4.asInstanceOf[Right[Nothing,ParseResult[_]]]).flatMap[ParseResult[T]](((cp3: Right[Nothing,ParseResult[_]]) =>
- // scala.Right.unapply[Nothing, ParseResult[_]](cp3).flatMap[ParseResult[T]](((x5: ParseResult[_]) =>
- // guard[ParseResult[_$1]](x5.ne(null), x5.asInstanceOf[ParseResult[_]]).flatMap[ParseResult[T]](((x6: ParseResult[_]) =>
+ // runOrElse[MemoEntry[T], ParseResult[T]]((null: MemoEntry[T]))(((x1: MemoEntry[T]) =>
+ // (MemoEntry.unapply[T](x1).flatMap[ParseResult[T]](((x4: Either[Nothing,ParseResult[_]]) =>
+ // guard[Right[Nothing,ParseResult[_]]](x4.isInstanceOf[Right[Nothing,ParseResult[_]]], x4.asInstanceOf[Right[Nothing,ParseResult[_]]]).flatMap[ParseResult[T]](((cp3: Right[Nothing,ParseResult[_]]) =>
+ // scala.Right.unapply[Nothing, ParseResult[_]](cp3).flatMap[ParseResult[T]](((x5: ParseResult[_]) =>
+ // guard[ParseResult[_$1]](x5.ne(null), x5.asInstanceOf[ParseResult[_]]).flatMap[ParseResult[T]](((x6: ParseResult[_]) =>
// one[ParseResult[T]](x6.asInstanceOf[ParseResult[T]]))))))))): Option[ParseResult[T]]
// ).orElse[ParseResult[T]]((zero: Option[ParseResult[T]]))))
// }
diff --git a/test/files/pos/virtpatmat_exist3.scala b/test/files/pos/virtpatmat_exist3.scala
index 94385f32c9..c8f873878f 100644
--- a/test/files/pos/virtpatmat_exist3.scala
+++ b/test/files/pos/virtpatmat_exist3.scala
@@ -4,8 +4,8 @@ class ReferenceQueue[T] {
case null => null
}
- // def wrapper(jref: ReferenceQueue[_]): ReferenceQueue[T] = OptionMatching.runOrElse(jref)(((x1: ReferenceQueue[_]) =>
- // (OptionMatching.guard(null.==(x1), x1.asInstanceOf[ReferenceQueue[_]]).flatMap(((x2: ReferenceQueue[_]) =>
+ // def wrapper(jref: ReferenceQueue[_]): ReferenceQueue[T] = OptionMatching.runOrElse(jref)(((x1: ReferenceQueue[_]) =>
+ // (OptionMatching.guard(null.==(x1), x1.asInstanceOf[ReferenceQueue[_]]).flatMap(((x2: ReferenceQueue[_]) =>
// OptionMatching.one(null))): Option[ReferenceQueue[T]]).orElse(
// (OptionMatching.zero: Option[ReferenceQueue[T]])))
// )
diff --git a/test/files/pos/virtpatmat_gadt_array.scala b/test/files/pos/virtpatmat_gadt_array.scala
index f3332a897f..27e72aa03e 100644
--- a/test/files/pos/virtpatmat_gadt_array.scala
+++ b/test/files/pos/virtpatmat_gadt_array.scala
@@ -4,12 +4,12 @@ object Test {
case x: Array[AnyRef] => refArrayOps[AnyRef](x).asInstanceOf[ArrayOps[T]]
case null => null
}
- // def genericArrayOps[T >: Nothing <: Any](xs: Array[T]): scala.collection.mutable.ArrayOps[T]
- // = OptionMatching.runOrElse(xs)(((x1: Array[T]) =>
- // ((OptionMatching.guard(x1.isInstanceOf[Array[AnyRef]], x1.asInstanceOf[Array[T] with Array[AnyRef]]).flatMap(((x2: Array[T] with Array[AnyRef]) =>
+ // def genericArrayOps[T >: Nothing <: Any](xs: Array[T]): scala.collection.mutable.ArrayOps[T]
+ // = OptionMatching.runOrElse(xs)(((x1: Array[T]) =>
+ // ((OptionMatching.guard(x1.isInstanceOf[Array[AnyRef]], x1.asInstanceOf[Array[T] with Array[AnyRef]]).flatMap(((x2: Array[T] with Array[AnyRef]) =>
// OptionMatching.one(Test.this.refArrayOps[AnyRef](x2).asInstanceOf[scala.collection.mutable.ArrayOps[T]]))): Option[scala.collection.mutable.ArrayOps[T]]).orElse(
- // (OptionMatching.guard(null.==(x1), x1.asInstanceOf[Array[T]]).flatMap(((x3: Array[T]) =>
+ // (OptionMatching.guard(null.==(x1), x1.asInstanceOf[Array[T]]).flatMap(((x3: Array[T]) =>
// OptionMatching.one(null))): Option[scala.collection.mutable.ArrayOps[T]])): Option[scala.collection.mutable.ArrayOps[T]]).orElse((OptionMatching.zero: Option[scala.collection.mutable.ArrayOps[T]]))))
-
+
def refArrayOps[T <: AnyRef](xs: Array[T]): ArrayOps[T] = new ArrayOps.ofRef[T](xs)
} \ No newline at end of file
diff --git a/test/files/positions/Anon.scala b/test/files/positions/Anon.scala
index 940fff035a..65eb7ae477 100644
--- a/test/files/positions/Anon.scala
+++ b/test/files/positions/Anon.scala
@@ -2,7 +2,7 @@ object Anon {
trait Foo {
val bar : Int
}
-
+
def foo = new Foo {
override val bar = 23
}
diff --git a/test/files/positions/Enclosing1.scala b/test/files/positions/Enclosing1.scala
index e170187d60..7c8fbaf4a0 100644
--- a/test/files/positions/Enclosing1.scala
+++ b/test/files/positions/Enclosing1.scala
@@ -1,5 +1,5 @@
object Enclosing1 {
do {
-
+
} while (true)
}
diff --git a/test/files/positions/ExcludedPrefix1.scala b/test/files/positions/ExcludedPrefix1.scala
index f3562c37f0..72d9756b2a 100644
--- a/test/files/positions/ExcludedPrefix1.scala
+++ b/test/files/positions/ExcludedPrefix1.scala
@@ -5,16 +5,16 @@ object ExcludedPrefix1 {
case
object
BLAH
-
+
val
a = 1
-
+
var
b = 2
-
+
def
c = 23
-
+
private
def
d = 23
@@ -22,19 +22,19 @@ object ExcludedPrefix1 {
lazy
val
e = 23
-
+
private
type
f = Int
-
+
val
g,
h = 23
-
+
val
(i,
j) = (0, 0)
-
+
val Pair(
k,
l) = (0, 0)
diff --git a/test/files/positions/Overlap3.scala b/test/files/positions/Overlap3.scala
index 4c5f8af9d1..657c12d4fd 100644
--- a/test/files/positions/Overlap3.scala
+++ b/test/files/positions/Overlap3.scala
@@ -1,3 +1,3 @@
object Overlap3 {
- val (a, b) = (0, 0)
+ val (a, b) = (0, 0)
}
diff --git a/test/files/positions/Scaladoc2.scala b/test/files/positions/Scaladoc2.scala
index e52263d86c..78bc4acb28 100644
--- a/test/files/positions/Scaladoc2.scala
+++ b/test/files/positions/Scaladoc2.scala
@@ -4,13 +4,13 @@ object Scaladoc2 {
* Foo
*/
def g {}
-
+
/*
* Blah blah
*/
def h{}
h
}
-
+
def h {}
}
diff --git a/test/files/positions/Scaladoc3.scala b/test/files/positions/Scaladoc3.scala
index c331b7e396..bb9d66fdb4 100644
--- a/test/files/positions/Scaladoc3.scala
+++ b/test/files/positions/Scaladoc3.scala
@@ -3,6 +3,6 @@ object Scaladoc3 {
* Foo
*/
import scala.collection.mutable.ArrayBuffer
-
+
def f {}
}
diff --git a/test/files/positions/Scaladoc4.scala b/test/files/positions/Scaladoc4.scala
index 133cde1c85..f613dda7f5 100644
--- a/test/files/positions/Scaladoc4.scala
+++ b/test/files/positions/Scaladoc4.scala
@@ -3,6 +3,6 @@ object Scaladoc4 {
* Foo
*/
2+2
-
+
def f {}
}
diff --git a/test/files/positions/Scaladoc6.scala b/test/files/positions/Scaladoc6.scala
index 8beda625ae..5c230edeb2 100644
--- a/test/files/positions/Scaladoc6.scala
+++ b/test/files/positions/Scaladoc6.scala
@@ -5,6 +5,6 @@ object Scaladoc6 {
*/
val i = 23
}
-
+
def f {}
}
diff --git a/test/files/presentation/akka/src/com/eaio/uuid/UUIDGen.java b/test/files/presentation/akka/src/com/eaio/uuid/UUIDGen.java
index a42ed666bc..7b63f65447 100644
--- a/test/files/presentation/akka/src/com/eaio/uuid/UUIDGen.java
+++ b/test/files/presentation/akka/src/com/eaio/uuid/UUIDGen.java
@@ -73,7 +73,7 @@ public final class UUIDGen {
* The last time value. Used to remove duplicate UUIDs.
*/
private static long lastTime = Long.MIN_VALUE;
-
+
/**
* The cached MAC address.
*/
@@ -232,11 +232,11 @@ public final class UUIDGen {
public static long newTime() {
return createTime(System.currentTimeMillis());
}
-
+
/**
* Creates a new time field from the given timestamp. Note that even identical
* values of <code>currentTimeMillis</code> will produce different time fields.
- *
+ *
* @param currentTimeMillis the timestamp
* @return a new time value
* @see UUID#getTime()
@@ -271,10 +271,10 @@ public final class UUIDGen {
return time;
}
-
+
/**
* Returns the MAC address. Not guaranteed to return anything.
- *
+ *
* @return the MAC address, may be <code>null</code>
*/
public static String getMACAddress() {
diff --git a/test/files/presentation/akka/src/pi.scala b/test/files/presentation/akka/src/pi.scala
index 24eba5a013..b4c644052c 100644
--- a/test/files/presentation/akka/src/pi.scala
+++ b/test/files/presentation/akka/src/pi.scala
@@ -50,7 +50,7 @@ object Pi extends App {
// create the workers
val workers = Vector.fill(nrOfWorkers)(actorOf[Worker]./*!*/start())
-
+
// wrap them with a load-balancing router
val router = Routing./*!*/loadBalancerActor(CyclicIterator(workers))./*!*/start()
diff --git a/test/files/presentation/callcc-interpreter/src/CallccInterpreter.scala b/test/files/presentation/callcc-interpreter/src/CallccInterpreter.scala
index ce3b996b96..0e96dfaa05 100644
--- a/test/files/presentation/callcc-interpreter/src/CallccInterpreter.scala
+++ b/test/files/presentation/callcc-interpreter/src/CallccInterpreter.scala
@@ -2,8 +2,8 @@ object callccInterpreter {
type Answer = Value
- /**
- * A continuation monad.
+ /**
+ * A continuation monad.
*/
case class M[A](in: (A => Answer) => Answer) {
def bind[B](k: A => M[B]) = M[B](c => in (a => k(a) in c))
diff --git a/test/files/presentation/ide-bug-1000475/src/Foo.scala b/test/files/presentation/ide-bug-1000475/src/Foo.scala
index 5dd6b7d00d..b963bb7a88 100644
--- a/test/files/presentation/ide-bug-1000475/src/Foo.scala
+++ b/test/files/presentation/ide-bug-1000475/src/Foo.scala
@@ -1,7 +1,7 @@
class Foo {
val v = new Object
v.toS/*!*/
-
+
val m = Map(1 -> new Object)
m(1).toS/*!*/
m(1)./*!*/
diff --git a/test/files/presentation/ide-bug-1000531/src/CrashOnLoad.scala b/test/files/presentation/ide-bug-1000531/src/CrashOnLoad.scala
index 878bbfa19e..21d39c8923 100644
--- a/test/files/presentation/ide-bug-1000531/src/CrashOnLoad.scala
+++ b/test/files/presentation/ide-bug-1000531/src/CrashOnLoad.scala
@@ -1,7 +1,7 @@
/** When this files is opened within the IDE, a typing error is reported. */
class A[B] extends java.lang.Iterable[B] {
import scala.collection.JavaConversions._
- def iterator = Iterator.empty
-
+ def iterator = Iterator.empty
+
iterator. /*!*/
} \ No newline at end of file
diff --git a/test/files/presentation/implicit-member/src/ImplicitMember.scala b/test/files/presentation/implicit-member/src/ImplicitMember.scala
index a547b65a8e..06732f6dc6 100644
--- a/test/files/presentation/implicit-member/src/ImplicitMember.scala
+++ b/test/files/presentation/implicit-member/src/ImplicitMember.scala
@@ -1,8 +1,8 @@
object Implicit {
final class AppliedImplicit[A](val x: A)
-
+
implicit def AppliedImplicit[A](x: A): AppliedImplicit[A] = new AppliedImplicit(x)
-
+
this./*!*/x
} \ No newline at end of file
diff --git a/test/files/presentation/ping-pong/src/PingPong.scala b/test/files/presentation/ping-pong/src/PingPong.scala
index 94f52c4658..08bb4e3f2d 100644
--- a/test/files/presentation/ping-pong/src/PingPong.scala
+++ b/test/files/presentation/ping-pong/src/PingPong.scala
@@ -2,21 +2,21 @@
class Ping {
val pong = new Pong(this)
-
+
def name = "ping"
- def loop/*?*/ { poke() }
-
+ def loop/*?*/ { poke() }
+
def poke/*?*/ { pong./*!*/poke() }
-
- override def toString = name
+
+ override def toString = name
}
class Pong(ping: Ping) {
val name/*?*/ = "pong"
-
+
def poke() { ping./*!*/poke() }
-
+
override def toString = name
} \ No newline at end of file
diff --git a/test/files/presentation/random/src/Random.scala b/test/files/presentation/random/src/Random.scala
index af76a28f47..4fff783fa4 100644
--- a/test/files/presentation/random/src/Random.scala
+++ b/test/files/presentation/random/src/Random.scala
@@ -4,16 +4,16 @@ import java.io._
import java.net.{InetAddress,ServerSocket,Socket,SocketException}
import java.util.Random
-/**
- * Simple client/server application using Java sockets.
- *
- * The server simply generates random integer values and
- * the clients provide a filter function to the server
- * to get only values they interested in (eg. even or
- * odd values, and so on).
+/**
+ * Simple client/server application using Java sockets.
+ *
+ * The server simply generates random integer values and
+ * the clients provide a filter function to the server
+ * to get only values they interested in (eg. even or
+ * odd values, and so on).
*/
object randomclient {
-
+
def main(args: Array[String]) {
val filter/*?*/ = try {
Integer.parseInt(args(0)/*?*/) match {
diff --git a/test/files/presentation/timeofday/src/timeofday.scala b/test/files/presentation/timeofday/src/timeofday.scala
index b0d422a99e..d6355097f1 100644
--- a/test/files/presentation/timeofday/src/timeofday.scala
+++ b/test/files/presentation/timeofday/src/timeofday.scala
@@ -1,16 +1,16 @@
object timeofday {
class DateError extends Exception
- /** Simulating properties in Scala
- * (example 4.2.1 in ScalaReference.pdf)
+ /** Simulating properties in Scala
+ * (example 4.2.1 in ScalaReference.pdf)
*/
class TimeOfDayVar {
private var h, m, s: Int = 0
def hours = h
- /** A method 'ident_=' is a setter for 'ident'. 'code.ident = ...' will
- * be translated to a call to 'ident_='
+ /** A method 'ident_=' is a setter for 'ident'. 'code.ident = ...' will
+ * be translated to a call to 'ident_='
*/
def hours_= (h: Int) =
if (0 <= h && h < 24) this.h = h
@@ -26,7 +26,7 @@ object timeofday {
if (0 <= s && s < 60) this./*!*/s = s
else throw new DateError()
}
-
+
def main(args: Array[String]) {
val d = new TimeOfDayVar
d.hours = 8; d./*!*/minutes = 30; d.seconds = 0
diff --git a/test/files/res/t597/Test.scala b/test/files/res/t597/Test.scala
index 2f63f46c3d..45b90bb17d 100644
--- a/test/files/res/t597/Test.scala
+++ b/test/files/res/t597/Test.scala
@@ -2,7 +2,7 @@ package test;
abstract class Base {
type A <: Ax;
-
+
abstract class Ax {
def a = null;
def string = "A";
diff --git a/test/files/res/t722/Parser.scala b/test/files/res/t722/Parser.scala
index 5dfcd57367..9f54358920 100644
--- a/test/files/res/t722/Parser.scala
+++ b/test/files/res/t722/Parser.scala
@@ -2,7 +2,7 @@
package t722;
trait Parser {
trait Link {
- def foo() = {}
+ def foo() = {}
}
}
diff --git a/test/files/res/t735/ScalaExpressions.scala b/test/files/res/t735/ScalaExpressions.scala
index f9c8ac733c..605ad51c08 100644
--- a/test/files/res/t735/ScalaExpressions.scala
+++ b/test/files/res/t735/ScalaExpressions.scala
@@ -1,6 +1,6 @@
package t735;
trait ScalaExpressions {
- trait ExpressionFactory {
+ trait ExpressionFactory {
def foo = 10;
def bar : Int;
}
diff --git a/test/files/res/t743/BracesXXX.scala b/test/files/res/t743/BracesXXX.scala
index ed7b386a88..d3f6e28fe9 100644
--- a/test/files/res/t743/BracesXXX.scala
+++ b/test/files/res/t743/BracesXXX.scala
@@ -1,6 +1,6 @@
package t743;
trait BracesXXX extends ParserXXX {
- trait Matchable extends IsLinked {
+ trait Matchable extends IsLinked {
def foo : NodeImpl = null;
}
}
diff --git a/test/files/res/t743/ParserXXX.scala b/test/files/res/t743/ParserXXX.scala
index d132bdbf1d..fd584b972a 100644
--- a/test/files/res/t743/ParserXXX.scala
+++ b/test/files/res/t743/ParserXXX.scala
@@ -1,9 +1,9 @@
package t743;
trait ParserXXX {
- val foo = null;
- trait NodeImpl {
+ val foo = null;
+ trait NodeImpl {
trait Link extends ParserXXX.this.Link {
- val from = null;
+ val from = null;
}
}
trait Link {
diff --git a/test/files/res/t785/ScalaNewTyper.scala b/test/files/res/t785/ScalaNewTyper.scala
index acdba0f25d..919e3b8d0e 100644
--- a/test/files/res/t785/ScalaNewTyper.scala
+++ b/test/files/res/t785/ScalaNewTyper.scala
@@ -1,7 +1,7 @@
package t785;
trait ScalaNewTyper {
private var typed : String = null;
- trait HasSymbol {
+ trait HasSymbol {
protected def foo() : Unit = {}
}
trait HasArgsTypeParametersImpl extends HasSymbol {
diff --git a/test/files/res/t831/NewScalaParserXXX.scala b/test/files/res/t831/NewScalaParserXXX.scala
index 958e4f99c1..ed9b9d3b6f 100644
--- a/test/files/res/t831/NewScalaParserXXX.scala
+++ b/test/files/res/t831/NewScalaParserXXX.scala
@@ -10,33 +10,33 @@ trait ScalaNodeScannerXXX {
//for (ns <-n; val i <- 0.until(ns)) yield f;
-trait NewScalaScannerXXX extends ScalaNodeScannerXXX {
+trait NewScalaScannerXXX extends ScalaNodeScannerXXX {
type Unfixed <: Node with UnfixedImpl;
trait UnfixedImpl extends super.UnfixedImpl with NodeImpl;
type Statement <: Unfixed with StatementImpl;
trait StatementImpl extends UnfixedImpl { def self : Statement; }
type NewLine <: Statement with NewLineImpl;
- trait NewLineImpl extends StatementImpl {
- def self : NewLine;
+ trait NewLineImpl extends StatementImpl {
+ def self : NewLine;
def isActive : Boolean = true;
}
object ArrowMode extends Enumeration { val Def, Case, Expr = Value }
}
-trait ScalaPrecedenceXXX extends NewScalaScannerXXX {
+trait ScalaPrecedenceXXX extends NewScalaScannerXXX {
type NewLine <: Statement with NewLineImpl;
- trait NewLineImpl extends super.NewLineImpl with StatementImpl {
- def self : NewLine;
+ trait NewLineImpl extends super.NewLineImpl with StatementImpl {
+ def self : NewLine;
override def isActive = super[NewLineImpl].isActive;
}
}
trait NewScalaParserXXX extends NewScalaScannerXXX with ScalaPrecedenceXXX {
type NewLine <: Statement with NewLineImpl;
trait MyNewLine extends super[NewScalaScannerXXX].NewLineImpl;
- trait NewLineImpl extends MyNewLine with
+ trait NewLineImpl extends MyNewLine with
super[ScalaPrecedenceXXX].NewLineImpl with
- StatementImpl {
- def self : NewLine;
+ StatementImpl {
+ def self : NewLine;
override def isActive = super[MyNewLine].isActive;
}
}
diff --git a/test/files/run/Course-2002-02.scala b/test/files/run/Course-2002-02.scala
index b8650108ed..56d7298aaf 100644
--- a/test/files/run/Course-2002-02.scala
+++ b/test/files/run/Course-2002-02.scala
@@ -100,7 +100,7 @@ object M4 {
def sumInts = sum(x => x)
def sumCubes = sum(x => x * x * x)
- def sumReciprocals = sum(1.0/_)
+ def sumReciprocals = sum(1.0/_)
def sumPi = { n: Int => 4 + sum(x => 4.0/(4*x+1) - 4.0/(4*x-1))(1, n) }
Console.println(sumInts(1,4))
@@ -194,7 +194,7 @@ object M8 {
//############################################################################
object M9 {
- def accumulate[t](combiner: (t, t) => t, nullValue: t, f: Int => t,
+ def accumulate[t](combiner: (t, t) => t, nullValue: t, f: Int => t,
next: Int => Int)(a: Int, b: Int): t =
if (a > b) nullValue
else combiner(f(a), accumulate(combiner, nullValue, f, next)(next(a), b))
@@ -328,9 +328,9 @@ object MD {
iter(a, zero)
}
- def plus (x:Double,y:Double) = x+y;
+ def plus (x:Double,y:Double) = x+y;
val sum: (Int => Double) => (Int, Int) => Double = reduce(plus , 0);
- def times(x:Double,y:Double) = x*y;
+ def times(x:Double,y:Double) = x*y;
val product: (Int => Double) => (Int, Int) => Double = reduce(times, 1);
def factorial(n: Int) = product(x => x)(1 , n)
diff --git a/test/files/run/Course-2002-05.scala b/test/files/run/Course-2002-05.scala
index e6764b92c8..9457fae147 100644
--- a/test/files/run/Course-2002-05.scala
+++ b/test/files/run/Course-2002-05.scala
@@ -129,7 +129,7 @@ object M3 {
else {
def isSafe(column: Int, placement: Placement): Boolean =
placement forall {
- pos => (pos._2 != column &&
+ pos => (pos._2 != column &&
abs(pos._2 - column) != row - pos._1)
}
diff --git a/test/files/run/Course-2002-08.scala b/test/files/run/Course-2002-08.scala
index 2423bbc36a..85a83e0146 100644
--- a/test/files/run/Course-2002-08.scala
+++ b/test/files/run/Course-2002-08.scala
@@ -520,7 +520,7 @@ abstract class CircuitSimulator() extends BasicCircuitSimulator() {
val w1 = new Wire();
val w2 = new Wire();
val w3 = new Wire();
-
+
andGate(in, ctrl(1), w3);
andGate(in, ctrl(1), w2);
andGate(in, ctrlN(1), w1);
diff --git a/test/files/run/OrderingTest.scala b/test/files/run/OrderingTest.scala
index 8af18aaba5..53448fbbce 100644
--- a/test/files/run/OrderingTest.scala
+++ b/test/files/run/OrderingTest.scala
@@ -6,7 +6,7 @@ object Test extends App {
assert((cmp == 0) == (cmp2 == 0))
assert((cmp > 0) == (cmp2 < 0))
assert((cmp < 0) == (cmp2 > 0))
- }
+ }
def testAll[T](t1 : T, t2 : T)(implicit ord : Ordering[T]) = {
assert(ord.compare(t1, t2) < 0)
@@ -16,8 +16,8 @@ object Test extends App {
}
assert(Ordering[String].compare("australopithecus", "brontausaurus") < 0)
- // assert(Ordering[Unit].compare((), ()) == 0)
-
+ // assert(Ordering[Unit].compare((), ()) == 0)
+
testAll("bar", "foo");
testAll[Byte](0, 1);
testAll(false, true)
@@ -28,7 +28,7 @@ object Test extends App {
testAll[Iterable[Int]](List(1, 2), List(2));
testAll((1, "bar"), (1, "foo"))
testAll((1, "foo"), (2, "bar"))
-
+
// sortBy
val words = "The quick brown fox jumped over the lazy dog".split(' ')
val result = words.sortBy(x => (x.length, x.head))
diff --git a/test/files/run/ReplacementMatching.scala b/test/files/run/ReplacementMatching.scala
index 05040d98a3..faa46419dc 100644
--- a/test/files/run/ReplacementMatching.scala
+++ b/test/files/run/ReplacementMatching.scala
@@ -7,12 +7,12 @@ 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}.",
@@ -21,7 +21,7 @@ object Test {
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)
@@ -29,7 +29,7 @@ object Test {
})
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.") {
@@ -43,5 +43,5 @@ object Test {
assert(c == "2001" || c == "2000")
}
}
-
+
}
diff --git a/test/files/run/ReverseSeqView.scala b/test/files/run/ReverseSeqView.scala
index 2004791bff..517f1cc24c 100644
--- a/test/files/run/ReverseSeqView.scala
+++ b/test/files/run/ReverseSeqView.scala
@@ -5,14 +5,14 @@
object Test extends App {
-
+
val lstv = List(1, 2, 3).view
val lstvr = lstv.reverse
assert(lstvr.iterator.toList == List(3, 2, 1))
assert(lstvr.reverse == List(1, 2, 3))
assert(lstvr.reverseIterator.toList == List(1, 2, 3))
assert(lstvr.reverseMap(_ + 1) == List(2, 3, 4))
-
+
}
diff --git a/test/files/run/UnrolledBuffer.scala b/test/files/run/UnrolledBuffer.scala
index 62a1f7d083..fe08e812ac 100644
--- a/test/files/run/UnrolledBuffer.scala
+++ b/test/files/run/UnrolledBuffer.scala
@@ -7,12 +7,12 @@ import collection.mutable.UnrolledBuffer
object Test {
-
+
def main(args: Array[String]) {
val u1 = new UnrolledBuffer[Int]
assert(u1.isEmpty)
assert(u1.size == 0)
-
+
u1 += 1
u1 += 2
u1 += 3
@@ -20,11 +20,11 @@ object Test {
assert(u1.toList == List(1, 2, 3))
assert(u1.nonEmpty)
assert(u1.size == 3)
-
+
u1.clear
assert(u1.isEmpty)
assert(u1.size == 0)
-
+
u1 += 1
u1 += 2
u1 += 3
@@ -33,56 +33,56 @@ object Test {
assert(u1.size == 2)
assert(u1 == UnrolledBuffer(1, 3))
assert(u1.toList == List(1, 3))
-
+
u1 concat UnrolledBuffer(5, 7, 9)
assert(u1 == UnrolledBuffer(1, 3, 5, 7, 9))
-
+
val u2 = u1 map { x => (x - 1) / 2 }
assert(u2 == UnrolledBuffer(0, 1, 2, 3, 4))
-
+
u1.clear
u2.clear
assert(u1.size == 0)
assert(u2.size == 0)
-
+
for (i <- 0 until 500) u1 += i
for (i <- 500 until 1000) u2 += i
assert(u1.size == 500)
assert(u2.size == 500)
assert(u1.iterator.toList == (0 until 500).toList)
assert((for (elem <- u1) yield elem) sameElements (0 until 500))
-
+
u1 concat u2
assert(u1.size == 1000)
assert(u2.size == 0)
assertCorrect(u1)
-
+
u1 concat UnrolledBuffer()
assertCorrect(u1)
-
+
val u3 = u1 map { x => x }
var i = 0
for (elem <- u1) {
assert(elem == u3(i))
i += 1
}
-
+
u1.remove(999)
assert(u1.size == 999)
assertCorrect(u1)
-
+
u1.remove(500)
assert(u1.size == 998)
assertCorrect(u1)
-
+
u1.remove(5)
assert(u1.size == 997)
assertCorrect(u1)
-
+
u1.remove(0)
assert(u1.size == 996)
assertCorrect(u1)
-
+
u1.insert(0, 0)
assert(u1.size == 997)
assertCorrect(u1)
@@ -90,15 +90,15 @@ object Test {
u1.insert(5, 5)
assert(u1.size == 998)
assertCorrect(u1)
-
+
u1.insert(500, 500)
assert(u1.size == 999)
assertCorrect(u1)
-
+
u1.insert(999, 999)
assert(u1.size == 1000)
assertCorrect(u1)
-
+
for (i <- -100 until 0) {
i +=: u1
assertCorrect(u1)
@@ -106,7 +106,7 @@ object Test {
assert(u1.size == 1100)
assertCorrect(u1)
}
-
+
def assertCorrect(u1: UnrolledBuffer[Int]) {
val sz = u1.size
val store = new Array[Int](sz)
@@ -117,9 +117,9 @@ object Test {
for (i <- 0 until sz) assert(u1(i) == (sz - i))
for (i <- 0 until sz) u1(i) = store(i)
for (i <- 0 until sz) assert(store(i) == u1(i))
-
+
assert((u1 map { x => x }) == u1)
assert(u1.iterator.toSeq.size == u1.size)
}
-
+
}
diff --git a/test/files/run/absoverride.scala b/test/files/run/absoverride.scala
index a3c03df0d7..8c6de09d2a 100644
--- a/test/files/run/absoverride.scala
+++ b/test/files/run/absoverride.scala
@@ -26,16 +26,16 @@ trait SyncIterator extends AbsIterator {
}
}
trait LoggedIterator extends AbsIterator {
- abstract override def next: T = {
- val x = super.next; println("log: " + x); x
+ abstract override def next: T = {
+ val x = super.next; println("log: " + x); x
}
}
-class Iter2(s: String) extends StringIterator(s)
- with SyncIterator with LoggedIterator;
+class Iter2(s: String) extends StringIterator(s)
+ with SyncIterator with LoggedIterator;
object Test {
def main(args: Array[String]) {
class Iter extends StringIterator(args(0)) with RichIterator with SyncIterator with LoggedIterator
val iter = new Iter
- iter foreach Console.println
+ iter foreach Console.println
}
}
diff --git a/test/files/run/arrayclone.scala b/test/files/run/arrayclone.scala
index fbca38b42e..c9f7556b47 100644
--- a/test/files/run/arrayclone.scala
+++ b/test/files/run/arrayclone.scala
@@ -16,7 +16,7 @@ object BooleanArrayClone{
val cloned = it.clone();
assert(cloned.sameElements(it));
cloned(0) = false;
- assert(it(0) == true)
+ assert(it(0) == true)
}
object ByteArrayClone{
@@ -24,7 +24,7 @@ object ByteArrayClone{
val cloned = it.clone();
assert(cloned.sameElements(it));
cloned(0) = 0;
- assert(it(0) == 1)
+ assert(it(0) == 1)
}
object ShortArrayClone{
@@ -32,7 +32,7 @@ object ShortArrayClone{
val cloned = it.clone();
assert(cloned.sameElements(it));
cloned(0) = 0;
- assert(it(0) == 1)
+ assert(it(0) == 1)
}
object CharArrayClone{
@@ -40,7 +40,7 @@ object CharArrayClone{
val cloned = it.clone();
assert(cloned.sameElements(it));
cloned(0) = 0;
- assert(it(0) == 1)
+ assert(it(0) == 1)
}
object IntArrayClone{
@@ -48,7 +48,7 @@ object IntArrayClone{
val cloned = it.clone();
assert(cloned.sameElements(it));
cloned(0) = 0;
- assert(it(0) == 1)
+ assert(it(0) == 1)
}
object LongArrayClone{
@@ -56,7 +56,7 @@ object LongArrayClone{
val cloned = it.clone();
assert(cloned.sameElements(it));
cloned(0) = 0;
- assert(it(0) == 1)
+ assert(it(0) == 1)
}
object FloatArrayClone{
@@ -64,7 +64,7 @@ object FloatArrayClone{
val cloned = it.clone();
assert(cloned.sameElements(it));
cloned(0) = 0;
- assert(it(0) == 1)
+ assert(it(0) == 1)
}
object DoubleArrayClone{
@@ -72,7 +72,7 @@ object DoubleArrayClone{
val cloned = it.clone();
assert(cloned.sameElements(it));
cloned(0) = 0;
- assert(it(0) == 1)
+ assert(it(0) == 1)
}
object ObjectArrayClone{
@@ -80,7 +80,7 @@ object ObjectArrayClone{
val cloned = it.clone();
assert(cloned.sameElements(it));
cloned(0) = "0";
- assert(it(0) == "1")
+ assert(it(0) == "1")
}
object PolymorphicArrayClone{
@@ -88,14 +88,14 @@ object PolymorphicArrayClone{
val cloned = it.clone();
assert(cloned.sameElements(it));
cloned(0) = zero;
- assert(it(0) == one)
- }
+ assert(it(0) == one)
+ }
testIt(Array("one", "two"), "one", "two");
class Mangler[T: Manifest](ts : T*){
// this will always be a BoxedAnyArray even after we've unboxed its contents.
- val it = ts.toArray[T];
+ val it = ts.toArray[T];
}
val mangled = new Mangler[Int](0, 1);
diff --git a/test/files/run/arraycopy.scala b/test/files/run/arraycopy.scala
index bb06200dc7..82c34c23e7 100644
--- a/test/files/run/arraycopy.scala
+++ b/test/files/run/arraycopy.scala
@@ -5,7 +5,7 @@ object Test {
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/arrayview.scala b/test/files/run/arrayview.scala
index 97e840f5e9..42ced5e9ac 100644
--- a/test/files/run/arrayview.scala
+++ b/test/files/run/arrayview.scala
@@ -1,6 +1,6 @@
object Test {
def f = (1 to 100).toArray.view
-
+
def main(args: Array[String]): Unit = {
val xs = (f filter (_ < 50)).reverse.filter(_ % 2 == 0).map(_ / 2).flatMap(x => Array(1, x))
assert(xs.size == 48)
diff --git a/test/files/run/bigDecimalCache.scala b/test/files/run/bigDecimalCache.scala
index c0c709a50f..e8ebefee78 100644
--- a/test/files/run/bigDecimalCache.scala
+++ b/test/files/run/bigDecimalCache.scala
@@ -1,9 +1,9 @@
-object Test {
+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/bigDecimalTest.scala b/test/files/run/bigDecimalTest.scala
index 480305d7d4..07b524c017 100644
--- a/test/files/run/bigDecimalTest.scala
+++ b/test/files/run/bigDecimalTest.scala
@@ -28,7 +28,7 @@ object Test {
// SI-4547: implicit conversion
assert(5 + BigDecimal(3) == BigDecimal(8))
-
+
// meaningless sanity check
List[BigDecimal](a, b, c, d, e, f) map (_.scale) foreach println
}
diff --git a/test/files/run/boolexprs.scala b/test/files/run/boolexprs.scala
index b9b4faea9c..4f1c4b161a 100644
--- a/test/files/run/boolexprs.scala
+++ b/test/files/run/boolexprs.scala
@@ -10,7 +10,7 @@ class Counter {
object Test1 {
var flag = false;
- def flip: Boolean = { val tmp = flag; flag = !flag; tmp }
+ def flip: Boolean = { val tmp = flag; flag = !flag; tmp }
def run: Int = {
val c = new Counter;
c.incrThen(flip || flip);
diff --git a/test/files/run/bugs.scala b/test/files/run/bugs.scala
index bbf2a0fb39..d5905af76c 100644
--- a/test/files/run/bugs.scala
+++ b/test/files/run/bugs.scala
@@ -304,7 +304,7 @@ object Bug250Test {
// Bug 257
object Bug257Test {
- def sayhello(): Unit = { Console.println("I should come 1st and 2nd"); };
+ def sayhello(): Unit = { Console.println("I should come 1st and 2nd"); };
def sayhi(): Unit = { Console.println("I should come last"); };
def f1(x: Unit): Unit = ();
diff --git a/test/files/run/caseClassEquality.scala b/test/files/run/caseClassEquality.scala
index c11d7ad0d1..4940d80951 100644
--- a/test/files/run/caseClassEquality.scala
+++ b/test/files/run/caseClassEquality.scala
@@ -11,25 +11,25 @@ object Test {
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/castsingleton.scala b/test/files/run/castsingleton.scala
index 339f5e00cf..47bd613079 100644
--- a/test/files/run/castsingleton.scala
+++ b/test/files/run/castsingleton.scala
@@ -8,4 +8,4 @@ object Test extends App {
}
empty(L())
-}
+}
diff --git a/test/files/run/checked.scala b/test/files/run/checked.scala
index e4db9c0916..06bc0c05e5 100644
--- a/test/files/run/checked.scala
+++ b/test/files/run/checked.scala
@@ -23,9 +23,9 @@ trait T {
// Should not throw
class D extends B with T {
val sum = x + y + z + b1 + b2 + t1 + t2
- override def toString =
+ override def toString =
"sum = " + sum
-
+
}
abstract class NeedsXEarly {
@@ -91,7 +91,7 @@ class TestInterference extends {
object Test extends App {
-
+
def shouldThrow(t: => Unit) = try {
t
println("[FAIL]: No UFE thrown")
diff --git a/test/files/run/classof.scala b/test/files/run/classof.scala
index b50facc1e9..10c07d2e51 100644
--- a/test/files/run/classof.scala
+++ b/test/files/run/classof.scala
@@ -13,14 +13,14 @@ object Test {
println(classOf[Long])
println(classOf[Float])
println(classOf[Double])
-
+
println("Class types")
println(classOf[SomeClass])
println(classOf[List[Array[Float]]])
println(classOf[(String, Map[Int, String])])
println("Arrays:")
- println(classOf[Array[Unit]])
+ println(classOf[Array[Unit]])
println(classOf[Array[Int]])
println(classOf[Array[Double]])
println(classOf[Array[List[String]]])
diff --git a/test/files/run/code.scala b/test/files/run/code.scala
index e26f97b2a4..162f796c63 100644
--- a/test/files/run/code.scala
+++ b/test/files/run/code.scala
@@ -56,5 +56,5 @@ package baz {
}
-
+
diff --git a/test/files/run/collections-toSelf.scala b/test/files/run/collections-toSelf.scala
index 02f1dd6a95..2adbc22af7 100644
--- a/test/files/run/collections-toSelf.scala
+++ b/test/files/run/collections-toSelf.scala
@@ -2,7 +2,7 @@ object Test {
val map = Map(1 -> 2)
val set = Set(1, 2)
val seq = collection.immutable.Seq(1, 2)
-
+
def main(args: Array[String]): Unit = {
assert(map.toMap eq map)
assert(set.toSet eq set)
diff --git a/test/files/run/collections.scala b/test/files/run/collections.scala
index deab5aa210..60f0765e6a 100644
--- a/test/files/run/collections.scala
+++ b/test/files/run/collections.scala
@@ -61,7 +61,7 @@ object Test extends App {
}
time {
var x = 0
- for (i <- 0 to 10000)
+ for (i <- 0 to 10000)
s get i match {
case Some(i) => x += i
case None =>
@@ -96,7 +96,7 @@ object Test extends App {
}
time {
var x = 0
- for (i <- 0 to 10000)
+ for (i <- 0 to 10000)
s get i match {
case Some(i) => x += i
case None =>
diff --git a/test/files/run/colltest1.scala b/test/files/run/colltest1.scala
index 0e4c7e574c..1cbd932222 100644
--- a/test/files/run/colltest1.scala
+++ b/test/files/run/colltest1.scala
@@ -61,7 +61,7 @@ object Test extends App {
assert(ten.toStream == ten)
assert(ten.toString endsWith "(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)")
assert(ten.mkString("[", "; ", "]") endsWith "[1; 2; 3; 4; 5; 6; 7; 8; 9; 10]")
- }
+ }
def orderedIterableTest(empty: Iterable[Int]) {
orderedTraversableTest(empty)
@@ -84,7 +84,7 @@ object Test extends App {
assert(ten(0) == 1 && ten(9) == 10)
assert((ten lengthCompare 10) == 0 && (ten lengthCompare 1) > 0 && (ten lengthCompare 11) < 0)
assert((ten isDefinedAt 0) && (ten isDefinedAt 9))
- assert(!(ten isDefinedAt -1));
+ assert(!(ten isDefinedAt -1));
assert(!(ten isDefinedAt 10))
val tenten = ten zip ten
assert((tenten map (_._1)) == ten)
@@ -174,8 +174,8 @@ object Test extends App {
m ++= ('J' to 'Z') map (x => (x.toString -> x.toString))
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))
+ assert(m.keySet forall (k => (m get k) == Some(k)))
+ assert(m.keySet forall (k => (m apply k) == k))
assert(m.keySet forall (m contains))
assert(m.getOrElse("7", "@") == "@")
assert(m.keySet.size == 26)
diff --git a/test/files/run/comparable-comparator.scala b/test/files/run/comparable-comparator.scala
index aafe10eb59..ac943c63bb 100644
--- a/test/files/run/comparable-comparator.scala
+++ b/test/files/run/comparable-comparator.scala
@@ -1,7 +1,7 @@
object Test {
import java.util.Comparator
-
+
class C1(val s: String) extends Comparable[C1] {
def compareTo(other: C1) = s compareTo other.s
override def toString = s
@@ -10,7 +10,7 @@ object Test {
def compareTo(other: C2) = s compareTo other.s
override def toString = s
}
-
+
implicit val cmp: Comparator[C2] = new Comparator[C2] {
def compare(p1: C2, p2: C2) = p2.s compareTo p1.s
}
@@ -18,10 +18,10 @@ object Test {
val strs = "zip foo bar baz aggle bing bong" split ' ' toList
val c1s = strs map (x => new C1(x))
val c2s = strs map (x => new C2(x))
-
+
val sorted1 = c1s.sorted map (_.s)
val sorted2 = c2s.sorted map (_.s)
-
+
def main(args: Array[String]): Unit = {
assert(sorted1 == sorted2.reverse)
}
diff --git a/test/files/run/concat-two-strings.scala b/test/files/run/concat-two-strings.scala
index c8881aa146..ad796fe0ee 100644
--- a/test/files/run/concat-two-strings.scala
+++ b/test/files/run/concat-two-strings.scala
@@ -8,7 +8,7 @@ object Test {
def f4(x: List[Int]) = "" + x
def f5(x: Any) = "" + x
def f6(x: AnyVal) = "" + x
-
+
def main(args: Array[String]): Unit = {
List(f1("a"), f2(5), f3(null), f3(Array('a')), f4(List(1)), f5(null), f6(55d)) mkString ""
}
diff --git a/test/files/run/constrained-types.check b/test/files/run/constrained-types.check
index 963dd4a059..ac8817cb08 100644
--- a/test/files/run/constrained-types.check
+++ b/test/files/run/constrained-types.check
@@ -14,7 +14,7 @@ scala> class A {
val x = "hello"
val y: Int @Annot(x) = 10
override def toString = "an A"
-}
+}
defined class A
scala>
@@ -22,7 +22,7 @@ scala>
scala> val a = new A
a: A = an A
-scala> val y = a.y // should rewrite "this.x" to "a.x"
+scala> val y = a.y // should rewrite "this.x" to "a.x"
y: Int @Annot(a.x) = 10
scala> var a2 = new A
diff --git a/test/files/run/constrained-types.scala b/test/files/run/constrained-types.scala
index 91bd856d00..38ae076c06 100644
--- a/test/files/run/constrained-types.scala
+++ b/test/files/run/constrained-types.scala
@@ -15,10 +15,10 @@ class A {
val x = "hello"
val y: Int @Annot(x) = 10
override def toString = "an A"
-}
+}
val a = new A
-val y = a.y // should rewrite "this.x" to "a.x"
+val y = a.y // should rewrite "this.x" to "a.x"
var a2 = new A
val y2 = a2.y // should drop the annotation
diff --git a/test/files/run/ctor-order.scala b/test/files/run/ctor-order.scala
index 5f5871691a..a223ff77e8 100644
--- a/test/files/run/ctor-order.scala
+++ b/test/files/run/ctor-order.scala
@@ -8,7 +8,7 @@ class Outer {
class X extends {
/* The constructor of X should set this.$outer to the outer instance
- * *before* calling the super constructors. This is tested by
+ * *before* calling the super constructors. This is tested by
* mixin M1, which tries to access global from the enclosing class.
*/
val outer = Outer.this
diff --git a/test/files/run/distinct.scala b/test/files/run/distinct.scala
index 698d31f1e9..09e5a0734a 100644
--- a/test/files/run/distinct.scala
+++ b/test/files/run/distinct.scala
@@ -5,7 +5,7 @@ object Test {
val alphabet = 'a' to 'z' mkString ""
val alphaList = 'a' to 'z' toList
def shuffled = util.Random.shuffle(alphaList)
-
+
def main(args: Array[String]): Unit = {
val longList = alphaList ++ (1 to 9 flatMap (_ => shuffled))
val result = longList.distinct mkString ""
diff --git a/test/files/run/elidable-noflags.scala b/test/files/run/elidable-noflags.scala
index 1b9c5118bb..5192e34096 100644
--- a/test/files/run/elidable-noflags.scala
+++ b/test/files/run/elidable-noflags.scala
@@ -9,7 +9,7 @@ object Test {
@elidable(100000) def f5() = println("Good for me, I was not elided.")
@elidable(OFF) def f6() = println("Good for me, I was not elided.")
@elidable(ALL) def f7() = println("ESPECIALLY good for me, I was not elided.")
-
+
def main(args: Array[String]): Unit = {
f1()
f2()
diff --git a/test/files/run/elidable.scala b/test/files/run/elidable.scala
index 2a527efc4b..264efbad59 100644
--- a/test/files/run/elidable.scala
+++ b/test/files/run/elidable.scala
@@ -6,7 +6,7 @@ object Test {
@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()
diff --git a/test/files/run/emptypf.scala b/test/files/run/emptypf.scala
index eb3e3e6380..8aa0906a1b 100644
--- a/test/files/run/emptypf.scala
+++ b/test/files/run/emptypf.scala
@@ -5,10 +5,10 @@ object Test {
case s => s.length
}
}
-
+
def main(args: Array[String]): Unit = {
println(f("abc"))
- println(f("def"))
+ println(f("def"))
println(PartialFunction.empty[String, Int] isDefinedAt "abc")
}
}
diff --git a/test/files/run/equality.scala b/test/files/run/equality.scala
index ff59898821..68055fd012 100644
--- a/test/files/run/equality.scala
+++ b/test/files/run/equality.scala
@@ -2,7 +2,7 @@
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)
) ::: (
@@ -11,26 +11,26 @@ object Test
def makeFromDouble(x: Double) = List(
x.toShort, x.toInt, x.toLong, x.toFloat, x.toDouble, BigInt(x.toInt), BigDecimal(x)
)
-
+
def main(args: Array[String]): Unit = {
var xs = makeFromInt(5)
for (x <- xs ; y <- xs) {
assert(x == y, x + " == " + y)
assert(hash(x) == hash(y), "hash(%s) == hash(%s)".format(x, y))
}
-
+
xs = makeFromInt(-5)
for (x <- xs ; y <- xs) {
assert(x == y, x + " == " + y)
assert(hash(x) == hash(y), "hash(%s) == hash(%s)".format(x, y))
}
-
+
xs = makeFromDouble(500.0)
for (x <- xs ; y <- xs) {
assert(x == y, x + " == " + y)
assert(hash(x) == hash(y), "hash(%s) == hash(%s)".format(x, y))
}
-
+
// negatives
val bigLong = new java.util.concurrent.atomic.AtomicLong(Long.MaxValue)
assert(-1 != bigLong && bigLong != -1) // bigLong.intValue() == -1
diff --git a/test/files/run/exceptions-2.scala b/test/files/run/exceptions-2.scala
index 05aab66dd0..d0312a49b2 100644
--- a/test/files/run/exceptions-2.scala
+++ b/test/files/run/exceptions-2.scala
@@ -68,7 +68,7 @@ object Test {
Console.println("Outermost finally");
}
- def mixed =
+ def mixed =
try {
if (10 > 0)
throw Leaf(10);
@@ -107,7 +107,7 @@ object Test {
case Leaf(a) => Console.println(a);
}
} catch {
- case npe: NullPointerException =>
+ case npe: NullPointerException =>
Console.println("Caught an NPE");
}
@@ -141,14 +141,14 @@ object Test {
}
}
- def valInFinally: Unit =
- try {
+ def valInFinally: Unit =
+ try {
} finally {
val fin = "Abc";
Console.println(fin);
};
- def tryAndValInFinally: Unit =
+ def tryAndValInFinally: Unit =
try {
} finally {
val fin = "Abc";
@@ -157,51 +157,51 @@ object Test {
} catch { case _ => () }
};
- def returnInBody: Unit = try {
+ def returnInBody: Unit = try {
try {
Console.println("Normal execution...");
- return
+ return
Console.println("non reachable code");
} finally {
Console.println("inner finally");
}
- } finally {
+ } finally {
Console.println("Outer finally");
}
- def returnInBodySynch: Unit = try {
+ def returnInBodySynch: Unit = try {
synchronized {
try {
Console.println("Synchronized normal execution...");
- return
+ return
Console.println("non reachable code");
} finally {
Console.println("inner finally");
}
}
- } finally {
+ } finally {
Console.println("Outer finally");
}
- def returnInBodyAndInFinally: Unit = try {
+ def returnInBodyAndInFinally: Unit = try {
try {
Console.println("Normal execution...");
- return
+ return
Console.println("non reachable code");
} finally {
Console.println("inner finally");
return
}
- } finally {
+ } finally {
Console.println("Outer finally");
return
}
- def returnInBodyAndInFinally2: Unit = try {
+ def returnInBodyAndInFinally2: Unit = try {
try {
Console.println("Normal execution...");
- return
+ return
Console.println("non reachable code");
} finally {
try {
@@ -211,7 +211,7 @@ object Test {
Console.println("finally inside finally");
}
}
- } finally {
+ } finally {
Console.println("Outer finally");
return
}
@@ -253,7 +253,7 @@ object Test {
}
- def returnWithFinallyClean: Int = try {
+ def returnWithFinallyClean: Int = try {
try {
Console.println("Normal execution...");
return 10
@@ -262,7 +262,7 @@ object Test {
} finally {
Console.println("inner finally");
}
- } finally {
+ } finally {
Console.println("Outer finally");
try { 1 } catch { case e: java.io.IOException => () }
}
@@ -294,7 +294,7 @@ object Test {
Console.println("mixed: ");
execute(mixed);
-
+
Console.println("withValue1:");
execute(withValue1);
@@ -322,7 +322,7 @@ object Test {
Console.println("NoExcep.method3:");
execute(NoExcep.method3);
-
+
Console.println("NoExcep.method4:");
execute(NoExcep.method4);
diff --git a/test/files/run/existentials.scala b/test/files/run/existentials.scala
index ff52cc0040..3977d47417 100644
--- a/test/files/run/existentials.scala
+++ b/test/files/run/existentials.scala
@@ -2,7 +2,7 @@ class Foo {
class Line {
case class Cell[T](var x: T)
def f[T](x: Any): Cell[t1] forSome { type t1 } = x match { case y: Cell[t] => y }
-
+
var x: Cell[T] forSome { type T } = new Cell(1)
println({ x = new Cell("abc"); x })
}
@@ -12,7 +12,7 @@ class FooW {
class Line {
case class Cell[T](var x: T)
def f[T](x: Any): Cell[ _ ] = x match { case y: Cell[t] => y }
-
+
var x: Cell[_] = new Cell(1)
println({ x = new Cell("abc"); x })
}
diff --git a/test/files/run/finally.scala b/test/files/run/finally.scala
index b3b7f684e5..635123cc4d 100644
--- a/test/files/run/finally.scala
+++ b/test/files/run/finally.scala
@@ -10,7 +10,7 @@ object Test extends App {
case e => println(e)
}
}
-
+
// test that finally is not covered by any exception handlers.
def bar {
try {
@@ -26,7 +26,7 @@ object Test extends App {
}
// return in catch (finally is executed)
- def retCatch {
+ def retCatch {
try {
throw new Exception
} catch {
@@ -37,7 +37,7 @@ object Test extends App {
}
// throw in catch (finally is executed, exception propagated)
- def throwCatch {
+ def throwCatch {
try {
throw new Exception
} catch {
@@ -48,7 +48,7 @@ object Test extends App {
}
// return inside body (finally is executed)
- def retBody {
+ def retBody {
try {
return
} catch {
@@ -75,7 +75,7 @@ object Test extends App {
finally {
println("in finally 1")
return
- }
+ }
} finally println("in finally 2")
}
@@ -94,7 +94,7 @@ object Test extends App {
}
// nested finallies with return value
- def nestedFinalies: Int =
+ def nestedFinalies: Int =
try {
try {
return 10
diff --git a/test/files/run/flat-flat-flat.scala b/test/files/run/flat-flat-flat.scala
index 80868b9c5e..d57696b3a3 100644
--- a/test/files/run/flat-flat-flat.scala
+++ b/test/files/run/flat-flat-flat.scala
@@ -2,7 +2,7 @@ object Test {
def f1 = List(Iterator(Some(1), None, Some(2)), Iterator(Some(3), None))
def f2 = Iterator(List(Some(1), None, Some(2)), List(Some(3), None), Nil)
def f3 = List(Some(Iterator(1)), None, Some(Iterator(2, 3)))
-
+
def main(args: Array[String]): Unit = {
assert(f1.flatten.flatten.toList == List(1, 2, 3))
assert(f2.flatten.flatten.toList == List(1, 2, 3))
diff --git a/test/files/run/forvaleq.scala b/test/files/run/forvaleq.scala
index 8c1824a769..2a958802b6 100644
--- a/test/files/run/forvaleq.scala
+++ b/test/files/run/forvaleq.scala
@@ -2,7 +2,7 @@
import scala.collection.immutable.Queue
import scala.{List=>L}
-
+
object Test {
// redefine some symbols to make it extra hard
class List
@@ -16,11 +16,11 @@ object Test {
case _ if (x<10) => x
case _ => firstDigit(x / 10)
}
-
-
+
+
{
- // a basic test case
-
+ // a basic test case
+
val input = L.range(0,20)
val oddFirstTimesTwo =
for {x <- input
@@ -32,7 +32,7 @@ object Test {
{
// a test case with patterns
-
+
val input = L.range(0, 20)
val oddFirstTimesTwo =
for {x <- input
@@ -43,10 +43,10 @@ object Test {
yield a + b
println(oddFirstTimesTwo)
}
-
+
{
// make sure it works on non-Ls
-
+
// val input: Queue = Queue.Empty[int].incl(L.range(0,20))
val input = L.range(0, 20).iterator
val oddFirstTimesTwo =
@@ -54,36 +54,36 @@ object Test {
xf = firstDigit(x)
if xf % 2 == 1}
yield x*2
- println(oddFirstTimesTwo.toList)
+ println(oddFirstTimesTwo.toList)
}
-
+
{
// yield the computed value
-
+
val input = L.range(0,20)
val oddFirstTimesTwo =
for {x <- input
xf = firstDigit(x)
if xf % 2 == 1}
yield xf*2
- println(oddFirstTimesTwo)
+ println(oddFirstTimesTwo)
}
{
// make sure the function is only called once
var count: Int = 0
-
+
def fdct(x: Int) = {
count += 1
firstDigit(x)
}
-
+
val input = L.range(0,20)
for {x <- input
xf = fdct(x)
if xf % 2 == 1}
yield xf
-
+
println("called " + count + " times")
}
diff --git a/test/files/run/gadts.scala b/test/files/run/gadts.scala
index 57c7fc8af0..4ab3ef681a 100644
--- a/test/files/run/gadts.scala
+++ b/test/files/run/gadts.scala
@@ -2,8 +2,8 @@ abstract class Term[T]
case class Lit(x: Int) extends Term[Int]
case class Succ(t: Term[Int]) extends Term[Int]
case class IsZero(t: Term[Int]) extends Term[Boolean]
-case class If[T](c: Term[Boolean],
- t1: Term[T],
+case class If[T](c: Term[Boolean],
+ t1: Term[T],
t2: Term[T]) extends Term[T]
object Test extends App {
diff --git a/test/files/run/getClassTest.scala b/test/files/run/getClassTest.scala
index 951cc8d931..2485cd2c71 100644
--- a/test/files/run/getClassTest.scala
+++ b/test/files/run/getClassTest.scala
@@ -4,7 +4,7 @@ class AnyVals {
def f3 = 5.getClass
def f4 = (5: java.lang.Integer).getClass
def f5 = (5.asInstanceOf[AnyRef]).getClass
-
+
// scalap says:
//
// def f1 : java.lang.Class[?0] forSome {type ?0} = { /* compiled code */ }
@@ -19,18 +19,18 @@ class AnyVals {
// f2: java.lang.Class<?>
// f3: java.lang.Class<java.lang.Object>
// f4: java.lang.Class<? extends java.lang.Integer>
- // f5: java.lang.Class<?>
+ // f5: java.lang.Class<?>
}
class AnyRefs {
class A
class B extends A
-
+
def f1 = (new B: Any).getClass().newInstance()
def f2 = (new B: AnyRef).getClass().newInstance()
def f3 = (new B: A).getClass().newInstance()
def f4 = (new B: B).getClass().newInstance()
-
+
def f0[T >: B] = (new B: T).getClass().newInstance()
def f5 = f0[Any]
@@ -52,7 +52,7 @@ class MoreAnyRefs {
object Test {
def returnTypes[T: Manifest] = (
- manifest[T].erasure.getMethods.toList
+ manifest[T].erasure.getMethods.toList
filter (_.getName startsWith "f")
sortBy (_.getName)
map (m => m.getName + ": " + m.getGenericReturnType.toString)
diff --git a/test/files/run/global-showdef.scala b/test/files/run/global-showdef.scala
index e17f438247..71ba7b8bb3 100644
--- a/test/files/run/global-showdef.scala
+++ b/test/files/run/global-showdef.scala
@@ -39,8 +39,8 @@ object Bippy {
new Global(settings)
}
-
- def slurp(body: => Unit): String = stringFromStream { stream =>
+
+ def slurp(body: => Unit): String = stringFromStream { stream =>
Console.withOut(stream) {
Console.withErr(stream) {
body
@@ -57,11 +57,11 @@ object Bippy {
}
def showClass(name: String) = lines("-Yshow:typer", "-Xshow-class", name)
def showObject(name: String) = lines("-Yshow:typer", "-Xshow-object", name)
-
+
def show(xs: List[String]) = {
xs filter (x => (x contains "def showdefTestMember") || (x startsWith "<<-- ")) foreach println
}
-
+
def main(args: Array[String]) {
show(List("Bippy", "Bippy#BippyType", "Bippy.BippyType", "Bippy#Boppity", "Bippy#Boppity#Boo") flatMap showClass)
show(List("Bippy", "Bippy#Boppity#Boo") flatMap showObject)
diff --git a/test/files/run/groupby.scala b/test/files/run/groupby.scala
index a751e65e80..fe08f52812 100644
--- a/test/files/run/groupby.scala
+++ b/test/files/run/groupby.scala
@@ -3,8 +3,8 @@
// Fixes #3422
object Test {
-
- def main(args: Array[String]) {
+
+ def main(args: Array[String]) {
val arr = Array.range(0,10)
val map = arr groupBy (_%2)
val v1 = map(0)
@@ -14,5 +14,5 @@ object Test {
// hash map by default.
assert(v1 eq v2)
}
-
+
}
diff --git a/test/files/run/hashCodeBoxesRunTime.scala b/test/files/run/hashCodeBoxesRunTime.scala
index ba1a30f5fb..081a73376e 100644
--- a/test/files/run/hashCodeBoxesRunTime.scala
+++ b/test/files/run/hashCodeBoxesRunTime.scala
@@ -4,16 +4,16 @@ object Test
{
import java.{ lang => jl }
import scala.runtime.BoxesRunTime.{ hashFromNumber, hashFromObject }
-
+
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)
-
+
def testLDF(x: Long) = allSame(List[Number](x, x.toDouble, x.toFloat) map hashFromNumber)
-
+
def main(args: Array[String]): Unit = {
- List(Byte.MinValue, -1, 0, 1, Byte.MaxValue) foreach { n =>
+ List(Byte.MinValue, -1, 0, 1, Byte.MaxValue) foreach { n =>
val hashes = mkNumbers(n) map hashFromNumber
allSame(hashes)
if (n >= 0) {
@@ -21,7 +21,7 @@ object Test
assert(charCode == hashes.head)
}
}
-
+
testLDF(Short.MaxValue.toLong)
testLDF(Short.MinValue.toLong)
}
diff --git a/test/files/run/hashhash.scala b/test/files/run/hashhash.scala
index d3800be876..b9cec99a12 100644
--- a/test/files/run/hashhash.scala
+++ b/test/files/run/hashhash.scala
@@ -1,7 +1,7 @@
object Test {
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, ()) foreach confirmSame
diff --git a/test/files/run/indexedSeq.scala b/test/files/run/indexedSeq.scala
index 19308e1d8c..9744f47f63 100644
--- a/test/files/run/indexedSeq.scala
+++ b/test/files/run/indexedSeq.scala
@@ -1,8 +1,8 @@
object Test {
import scala.collection.{ mutable, immutable, generic }
-
+
def checkIdentity[A](xs: immutable.IndexedSeq[A]) = assert(xs.toIndexedSeq eq xs)
-
+
def main(args: Array[String]): Unit = {
checkIdentity(immutable.Vector(1 to 10: _*))
checkIdentity(1 to 10 toIndexedSeq)
diff --git a/test/files/run/infix.scala b/test/files/run/infix.scala
index ba77480297..700e4347ac 100644
--- a/test/files/run/infix.scala
+++ b/test/files/run/infix.scala
@@ -9,4 +9,4 @@ object Test extends App {
case null op (0, 0) op (1, 1) op (2, 2) => Console.println("OK")
}
}
-
+
diff --git a/test/files/run/inliner-infer.scala b/test/files/run/inliner-infer.scala
index 027d25b6e2..ea83966c52 100644
--- a/test/files/run/inliner-infer.scala
+++ b/test/files/run/inliner-infer.scala
@@ -7,8 +7,8 @@ object Test extends App {
@annotation.tailrec
def walk(xs: MyList): Unit = {
- if (xs.isEmpty)
- println("empty")
+ if (xs.isEmpty)
+ println("empty")
else {
println("non-empty")
walk(MyNil)
@@ -26,4 +26,4 @@ object MyNil extends MyList {
override def isEmpty = true
}
-
+
diff --git a/test/files/run/inner-obj-auto.scala b/test/files/run/inner-obj-auto.scala
index 98b48b150f..aa2e29326f 100644
--- a/test/files/run/inner-obj-auto.scala
+++ b/test/files/run/inner-obj-auto.scala
@@ -3,15 +3,15 @@
/* ================================================================================
Automatically generated on 2011-05-11. Do Not Edit (unless you have to).
(2-level nesting)
- ================================================================================ */
+ ================================================================================ */
class Class2_1 {
-
+
class Class1_2 {
var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
Obj // one
@@ -31,16 +31,16 @@ class Class2_1 {
def run { runTest }
}
-
+
def run { (new Class1_2).run }
}
object Object3_1 {
-
+
class Class1_2 {
var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
Obj // one
@@ -60,16 +60,16 @@ object Object3_1 {
def run { runTest }
}
-
+
def run { (new Class1_2).run } // trigger
}
trait Trait4_1 {
-
+
class Class1_2 {
var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
Obj // one
@@ -89,16 +89,16 @@ trait Trait4_1 {
def run { runTest }
}
-
+
def run { (new Class1_2).run }
}
class Class6_1 {
-
+
object Object5_2 {
var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
Obj // one
@@ -118,16 +118,16 @@ class Class6_1 {
def run { runTest } // trigger
}
-
+
def run { Object5_2.run }
}
object Object7_1 {
-
+
object Object5_2 {
var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
Obj // one
@@ -147,16 +147,16 @@ object Object7_1 {
def run { runTest } // trigger
}
-
+
def run { Object5_2.run } // trigger
}
trait Trait8_1 {
-
+
object Object5_2 {
var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
Obj // one
@@ -176,16 +176,16 @@ trait Trait8_1 {
def run { runTest } // trigger
}
-
+
def run { Object5_2.run }
}
class Class10_1 {
-
+
trait Trait9_2 {
var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
Obj // one
@@ -205,16 +205,16 @@ class Class10_1 {
def run { runTest }
}
-
+
def run { (new Trait9_2 {}).run }
}
object Object11_1 {
-
+
trait Trait9_2 {
var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
Obj // one
@@ -234,16 +234,16 @@ object Object11_1 {
def run { runTest }
}
-
+
def run { (new Trait9_2 {}).run } // trigger
}
trait Trait12_1 {
-
+
trait Trait9_2 {
var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
Obj // one
@@ -263,16 +263,16 @@ trait Trait12_1 {
def run { runTest }
}
-
+
def run { (new Trait9_2 {}).run }
}
class Class14_1 {
-
+
def method13_2 {
var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
Obj // one
@@ -292,16 +292,16 @@ class Class14_1 {
runTest // trigger
}
-
+
def run { method13_2 }
}
object Object15_1 {
-
+
def method13_2 {
var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
Obj // one
@@ -321,16 +321,16 @@ object Object15_1 {
runTest // trigger
}
-
+
def run { method13_2 } // trigger
}
trait Trait16_1 {
-
+
def method13_2 {
var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
Obj // one
@@ -350,16 +350,16 @@ trait Trait16_1 {
runTest // trigger
}
-
+
def run { method13_2 }
}
class Class18_1 {
-
+
private def method17_2 {
var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
Obj // one
@@ -379,16 +379,16 @@ class Class18_1 {
runTest // trigger
}
-
+
def run { method17_2 }
}
object Object19_1 {
-
+
private def method17_2 {
var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
Obj // one
@@ -408,16 +408,16 @@ object Object19_1 {
runTest // trigger
}
-
+
def run { method17_2 } // trigger
}
trait Trait20_1 {
-
+
private def method17_2 {
var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
Obj // one
@@ -437,16 +437,16 @@ trait Trait20_1 {
runTest // trigger
}
-
+
def run { method17_2 }
}
class Class22_1 {
-
+
val fun21_2 = () => {
var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
Obj // one
@@ -466,16 +466,16 @@ class Class22_1 {
runTest // trigger
}
-
+
def run { fun21_2() }
}
object Object23_1 {
-
+
val fun21_2 = () => {
var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
Obj // one
@@ -495,16 +495,16 @@ object Object23_1 {
runTest // trigger
}
-
+
def run { fun21_2() } // trigger
}
trait Trait24_1 {
-
+
val fun21_2 = () => {
var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
Obj // one
@@ -524,17 +524,17 @@ trait Trait24_1 {
runTest // trigger
}
-
+
def run { fun21_2() }
}
class Class26_1 {
-
+
class Class25_2 {
- { // in primary constructor
+ { // in primary constructor
var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
Obj // one
@@ -553,19 +553,19 @@ class Class26_1 {
}
runTest // trigger
- }
+ }
}
-
+
def run { (new Class25_2) }
}
object Object27_1 {
-
+
class Class25_2 {
- { // in primary constructor
+ { // in primary constructor
var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
Obj // one
@@ -584,19 +584,19 @@ object Object27_1 {
}
runTest // trigger
- }
+ }
}
-
+
def run { (new Class25_2) } // trigger
}
trait Trait28_1 {
-
+
class Class25_2 {
- { // in primary constructor
+ { // in primary constructor
var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
Obj // one
@@ -615,19 +615,19 @@ trait Trait28_1 {
}
runTest // trigger
- }
+ }
}
-
+
def run { (new Class25_2) }
}
class Class30_1 {
-
+
trait Trait29_2 {
- { // in primary constructor
+ { // in primary constructor
var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
Obj // one
@@ -646,19 +646,19 @@ class Class30_1 {
}
runTest // trigger
- }
+ }
}
-
+
def run { (new Trait29_2 {}) }
}
object Object31_1 {
-
+
trait Trait29_2 {
- { // in primary constructor
+ { // in primary constructor
var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
Obj // one
@@ -677,19 +677,19 @@ object Object31_1 {
}
runTest // trigger
- }
+ }
}
-
+
def run { (new Trait29_2 {}) } // trigger
}
trait Trait32_1 {
-
+
trait Trait29_2 {
- { // in primary constructor
+ { // in primary constructor
var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
Obj // one
@@ -708,18 +708,18 @@ trait Trait32_1 {
}
runTest // trigger
- }
+ }
}
-
+
def run { (new Trait29_2 {}) }
}
class Class34_1 {
-
+
lazy val lzvalue33_2 = {
var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
Obj // one
@@ -739,16 +739,16 @@ class Class34_1 {
runTest // trigger
}
-
+
def run { lzvalue33_2 }
}
object Object35_1 {
-
+
lazy val lzvalue33_2 = {
var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
Obj // one
@@ -768,16 +768,16 @@ object Object35_1 {
runTest // trigger
}
-
+
def run { lzvalue33_2 } // trigger
}
trait Trait36_1 {
-
+
lazy val lzvalue33_2 = {
var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
Obj // one
@@ -797,16 +797,16 @@ trait Trait36_1 {
runTest // trigger
}
-
+
def run { lzvalue33_2 }
}
class Class38_1 {
-
+
val value37_2 = {
var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
Obj // one
@@ -826,16 +826,16 @@ class Class38_1 {
runTest // trigger
}
-
+
def run { value37_2 }
}
object Object39_1 {
-
+
val value37_2 = {
var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
Obj // one
@@ -855,16 +855,16 @@ object Object39_1 {
runTest // trigger
}
-
+
def run { value37_2 } // trigger
}
trait Trait40_1 {
-
+
val value37_2 = {
var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
Obj // one
@@ -884,16 +884,16 @@ trait Trait40_1 {
runTest // trigger
}
-
+
def run { value37_2 }
}
class Class42_1 {
-
+
class Class41_2 {
var ObjCounter = 0
-
+
private object Obj { ObjCounter += 1}
Obj // one
@@ -913,16 +913,16 @@ class Class42_1 {
def run { runTest }
}
-
+
def run { (new Class41_2).run }
}
object Object43_1 {
-
+
class Class41_2 {
var ObjCounter = 0
-
+
private object Obj { ObjCounter += 1}
Obj // one
@@ -942,16 +942,16 @@ object Object43_1 {
def run { runTest }
}
-
+
def run { (new Class41_2).run } // trigger
}
trait Trait44_1 {
-
+
class Class41_2 {
var ObjCounter = 0
-
+
private object Obj { ObjCounter += 1}
Obj // one
@@ -971,16 +971,16 @@ trait Trait44_1 {
def run { runTest }
}
-
+
def run { (new Class41_2).run }
}
class Class46_1 {
-
+
object Object45_2 {
var ObjCounter = 0
-
+
private object Obj { ObjCounter += 1}
Obj // one
@@ -1000,16 +1000,16 @@ class Class46_1 {
def run { runTest } // trigger
}
-
+
def run { Object45_2.run }
}
object Object47_1 {
-
+
object Object45_2 {
var ObjCounter = 0
-
+
private object Obj { ObjCounter += 1}
Obj // one
@@ -1029,16 +1029,16 @@ object Object47_1 {
def run { runTest } // trigger
}
-
+
def run { Object45_2.run } // trigger
}
trait Trait48_1 {
-
+
object Object45_2 {
var ObjCounter = 0
-
+
private object Obj { ObjCounter += 1}
Obj // one
@@ -1058,16 +1058,16 @@ trait Trait48_1 {
def run { runTest } // trigger
}
-
+
def run { Object45_2.run }
}
class Class50_1 {
-
+
trait Trait49_2 {
var ObjCounter = 0
-
+
private object Obj { ObjCounter += 1}
Obj // one
@@ -1087,16 +1087,16 @@ class Class50_1 {
def run { runTest }
}
-
+
def run { (new Trait49_2 {}).run }
}
object Object51_1 {
-
+
trait Trait49_2 {
var ObjCounter = 0
-
+
private object Obj { ObjCounter += 1}
Obj // one
@@ -1116,16 +1116,16 @@ object Object51_1 {
def run { runTest }
}
-
+
def run { (new Trait49_2 {}).run } // trigger
}
trait Trait52_1 {
-
+
trait Trait49_2 {
var ObjCounter = 0
-
+
private object Obj { ObjCounter += 1}
Obj // one
@@ -1145,16 +1145,16 @@ trait Trait52_1 {
def run { runTest }
}
-
+
def run { (new Trait49_2 {}).run }
}
class Class54_1 {
-
+
class Class53_2 {
@volatile var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
def multiThreadedAccess() {
@@ -1178,16 +1178,16 @@ class Class54_1 {
def run { runTest }
}
-
+
def run { (new Class53_2).run }
}
object Object55_1 {
-
+
class Class53_2 {
@volatile var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
def multiThreadedAccess() {
@@ -1211,16 +1211,16 @@ object Object55_1 {
def run { runTest }
}
-
+
def run { (new Class53_2).run } // trigger
}
trait Trait56_1 {
-
+
class Class53_2 {
@volatile var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
def multiThreadedAccess() {
@@ -1244,16 +1244,16 @@ trait Trait56_1 {
def run { runTest }
}
-
+
def run { (new Class53_2).run }
}
class Class58_1 {
-
+
object Object57_2 {
@volatile var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
def multiThreadedAccess() {
@@ -1277,16 +1277,16 @@ class Class58_1 {
def run { runTest } // trigger
}
-
+
def run { Object57_2.run }
}
object Object59_1 {
-
+
object Object57_2 {
@volatile var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
def multiThreadedAccess() {
@@ -1310,16 +1310,16 @@ object Object59_1 {
def run { runTest } // trigger
}
-
+
def run { Object57_2.run } // trigger
}
trait Trait60_1 {
-
+
object Object57_2 {
@volatile var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
def multiThreadedAccess() {
@@ -1343,16 +1343,16 @@ trait Trait60_1 {
def run { runTest } // trigger
}
-
+
def run { Object57_2.run }
}
class Class62_1 {
-
+
trait Trait61_2 {
@volatile var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
def multiThreadedAccess() {
@@ -1376,16 +1376,16 @@ class Class62_1 {
def run { runTest }
}
-
+
def run { (new Trait61_2 {}).run }
}
object Object63_1 {
-
+
trait Trait61_2 {
@volatile var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
def multiThreadedAccess() {
@@ -1409,16 +1409,16 @@ object Object63_1 {
def run { runTest }
}
-
+
def run { (new Trait61_2 {}).run } // trigger
}
trait Trait64_1 {
-
+
trait Trait61_2 {
@volatile var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
def multiThreadedAccess() {
@@ -1442,16 +1442,16 @@ trait Trait64_1 {
def run { runTest }
}
-
+
def run { (new Trait61_2 {}).run }
}
class Class66_1 {
-
+
def method65_2 {
@volatile var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
def multiThreadedAccess() {
@@ -1475,16 +1475,16 @@ class Class66_1 {
runTest // trigger
}
-
+
def run { method65_2 }
}
object Object67_1 {
-
+
def method65_2 {
@volatile var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
def multiThreadedAccess() {
@@ -1508,16 +1508,16 @@ object Object67_1 {
runTest // trigger
}
-
+
def run { method65_2 } // trigger
}
trait Trait68_1 {
-
+
def method65_2 {
@volatile var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
def multiThreadedAccess() {
@@ -1541,16 +1541,16 @@ trait Trait68_1 {
runTest // trigger
}
-
+
def run { method65_2 }
}
class Class70_1 {
-
+
private def method69_2 {
@volatile var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
def multiThreadedAccess() {
@@ -1574,16 +1574,16 @@ class Class70_1 {
runTest // trigger
}
-
+
def run { method69_2 }
}
object Object71_1 {
-
+
private def method69_2 {
@volatile var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
def multiThreadedAccess() {
@@ -1607,16 +1607,16 @@ object Object71_1 {
runTest // trigger
}
-
+
def run { method69_2 } // trigger
}
trait Trait72_1 {
-
+
private def method69_2 {
@volatile var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
def multiThreadedAccess() {
@@ -1640,16 +1640,16 @@ trait Trait72_1 {
runTest // trigger
}
-
+
def run { method69_2 }
}
class Class74_1 {
-
+
val fun73_2 = () => {
@volatile var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
def multiThreadedAccess() {
@@ -1673,16 +1673,16 @@ class Class74_1 {
runTest // trigger
}
-
+
def run { fun73_2() }
}
object Object75_1 {
-
+
val fun73_2 = () => {
@volatile var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
def multiThreadedAccess() {
@@ -1706,16 +1706,16 @@ object Object75_1 {
runTest // trigger
}
-
+
def run { fun73_2() } // trigger
}
trait Trait76_1 {
-
+
val fun73_2 = () => {
@volatile var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
def multiThreadedAccess() {
@@ -1739,17 +1739,17 @@ trait Trait76_1 {
runTest // trigger
}
-
+
def run { fun73_2() }
}
class Class78_1 {
-
+
class Class77_2 {
- { // in primary constructor
+ { // in primary constructor
@volatile var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
def multiThreadedAccess() {
@@ -1772,19 +1772,19 @@ class Class78_1 {
}
runTest // trigger
- }
+ }
}
-
+
def run { (new Class77_2) }
}
object Object79_1 {
-
+
class Class77_2 {
- { // in primary constructor
+ { // in primary constructor
@volatile var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
def multiThreadedAccess() {
@@ -1807,19 +1807,19 @@ object Object79_1 {
}
runTest // trigger
- }
+ }
}
-
+
def run { (new Class77_2) } // trigger
}
trait Trait80_1 {
-
+
class Class77_2 {
- { // in primary constructor
+ { // in primary constructor
@volatile var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
def multiThreadedAccess() {
@@ -1842,19 +1842,19 @@ trait Trait80_1 {
}
runTest // trigger
- }
+ }
}
-
+
def run { (new Class77_2) }
}
class Class82_1 {
-
+
trait Trait81_2 {
- { // in primary constructor
+ { // in primary constructor
@volatile var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
def multiThreadedAccess() {
@@ -1877,19 +1877,19 @@ class Class82_1 {
}
runTest // trigger
- }
+ }
}
-
+
def run { (new Trait81_2 {}) }
}
object Object83_1 {
-
+
trait Trait81_2 {
- { // in primary constructor
+ { // in primary constructor
@volatile var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
def multiThreadedAccess() {
@@ -1912,19 +1912,19 @@ object Object83_1 {
}
runTest // trigger
- }
+ }
}
-
+
def run { (new Trait81_2 {}) } // trigger
}
trait Trait84_1 {
-
+
trait Trait81_2 {
- { // in primary constructor
+ { // in primary constructor
@volatile var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
def multiThreadedAccess() {
@@ -1947,18 +1947,18 @@ trait Trait84_1 {
}
runTest // trigger
- }
+ }
}
-
+
def run { (new Trait81_2 {}) }
}
class Class90_1 {
-
+
val value89_2 = {
@volatile var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
def multiThreadedAccess() {
@@ -1982,16 +1982,16 @@ class Class90_1 {
runTest // trigger
}
-
+
def run { value89_2 }
}
trait Trait92_1 {
-
+
val value89_2 = {
@volatile var ObjCounter = 0
-
+
object Obj { ObjCounter += 1}
def multiThreadedAccess() {
@@ -2015,7 +2015,7 @@ trait Trait92_1 {
runTest // trigger
}
-
+
def run { value89_2 }
}
diff --git a/test/files/run/io-position.scala b/test/files/run/io-position.scala
index 7e570ea29e..1093704fa4 100644
--- a/test/files/run/io-position.scala
+++ b/test/files/run/io-position.scala
@@ -1,13 +1,13 @@
object Test {
Console.setErr(Console.out)
-
- def main(args: Array[String]): Unit = {
+
+ def main(args: Array[String]): Unit = {
try {
xml.parsing.ConstructingParser.fromSource(io.Source.fromString("<foo>"), false).document()
} catch {
case e:Exception => println(e.getMessage)
}
- }
+ }
-}
+}
diff --git a/test/files/run/iq.scala b/test/files/run/iq.scala
index 31859cf867..e5f9e4705a 100644
--- a/test/files/run/iq.scala
+++ b/test/files/run/iq.scala
@@ -9,8 +9,8 @@ object iq {
/* Create an empty queue. */
val q: Queue[Int] = Queue.empty
- /* Test isEmpty.
- * Expected: Empty
+ /* Test isEmpty.
+ * Expected: Empty
*/
if (q.isEmpty) {
Console.println("Empty")
@@ -20,14 +20,14 @@ object iq {
//val q2 = q + 42 + 0 // deprecated
val q2 = q.enqueue(42).enqueue(0)
- /* Test is empty and dequeue.
+ /* Test is empty and dequeue.
* Expected: Head: 42
*/
val q4 =
if (q2.isEmpty) {
Console.println("Empty")
q2
- }
+ }
else {
val (head, q3) = q2.dequeue
Console.println("Head: " + head)
@@ -36,8 +36,8 @@ object iq {
/* Test sequence enqueing. */
val q5: Queue[Any] = q4.enqueue(List(1,2,3,4,5,6,7,8,9))
- /* Test toString.
- * Expected: Head: q5: Queue(0,1,2,3,4,5,6,7,8,9)
+ /* Test toString.
+ * Expected: Head: q5: Queue(0,1,2,3,4,5,6,7,8,9)
*/
Console.println("q5: " + q5)
/* Test apply
@@ -59,7 +59,7 @@ object iq {
//val q8 = q7 + 10 + 11 //deprecated
val q8 = q7.enqueue(10).enqueue(11)
/* Test dequeu
- * Expected: q8: Queue(2,3,4,5,6,7,8,9,10,11)
+ * Expected: q8: Queue(2,3,4,5,6,7,8,9,10,11)
*/
Console.println("q8: " + q8)
val q9 = Queue(2,3,4,5,6,7,8,9,10,11)
@@ -70,14 +70,14 @@ object iq {
Console.println("q8 == q9: " + (q8 == q9))
/* Testing elements
- * Expected: Elements: 1 2 3 4 5 6 7 8 9
+ * Expected: Elements: 1 2 3 4 5 6 7 8 9
*/
- Console.print("Elements: ");
+ Console.print("Elements: ");
q6.iterator.foreach(e => Console.print(" "+ e + " "))
- Console.println;
+ Console.println;
/* Testing mkString
- * Expected: String: <1-2-3-4-5-6-7-8-9>
+ * Expected: String: <1-2-3-4-5-6-7-8-9>
*/
Console.println("String: " + q6.mkString("<","-",">"))
@@ -89,7 +89,7 @@ object iq {
/* Testing front
* Expected: Front: 1
*/
- Console.println("Front: " + q6.front);
+ Console.println("Front: " + q6.front);
}
}
diff --git a/test/files/run/is-valid-num.scala b/test/files/run/is-valid-num.scala
index 6e423e946e..f919a21dee 100644
--- a/test/files/run/is-valid-num.scala
+++ b/test/files/run/is-valid-num.scala
@@ -1,7 +1,7 @@
object Test {
def x = BigInt("10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")
def y = BigDecimal("" + (Short.MaxValue + 1) + ".0")
-
+
def l1 = Int.MaxValue.toLong + 1
def l2 = Int.MinValue.toLong - 1
diff --git a/test/files/run/issue192.scala b/test/files/run/issue192.scala
index 8acd3a6345..d8db8b5816 100644
--- a/test/files/run/issue192.scala
+++ b/test/files/run/issue192.scala
@@ -1,16 +1,16 @@
object Test extends App {
-
+
def f1(p: Any{def unary_+ : Int}) = +p
def f2(p: Any{def unary_- : Int}) = -p
def f3(p: Any{def unary_~ : Int}) = ~p
def f4(p: Any{def unary_! : Boolean}) = !p
-
+
def f5(p: Any{def +(q: Int): Int}) = p + 7
def f6(p: Any{def -(q: Int): Int}) = p - 7
def f7(p: Any{def *(q: Int): Int}) = p * 7
def f8(p: Any{def /(q: Int): Int}) = p / 7
def f9(p: Any{def %(q: Int): Int}) = p % 7
-
+
def f10(p: Any{def |(q: Int): Int}) = p | 7
def f11(p: Any{def |(q: Boolean): Boolean}) = p | true
def f12(p: Any{def ^(q: Int): Int}) = p ^ 7
@@ -19,11 +19,11 @@ object Test extends App {
def f15(p: Any{def &(q: Boolean): Boolean}) = p & true
def f16(p: Any{def ||(q: Boolean): Boolean}) = p || true
def f17(p: Any{def &&(q: Boolean): Boolean}) = p && true
-
+
def f18(p: Any{def <<(q: Int): Int}) = p << 7
def f19(p: Any{def >>(q: Int): Int}) = p >> 7
def f20(p: Any{def >>>(q: Int): Int}) = p >>> 7
-
+
def f21(p: Any{def toByte: Byte}) = p.toByte
def f22(p: Any{def toShort: Short}) = p.toShort
def f23(p: Any{def toChar: Char}) = p.toChar
@@ -31,28 +31,28 @@ object Test extends App {
def f25(p: Any{def toLong: Long}) = p.toLong
def f26(p: Any{def toFloat: Float}) = p.toFloat
def f27(p: Any{def toDouble: Double}) = p.toDouble
-
+
def f28(p: Any{def ==(q: Int): Boolean}) = p == 7
def f29(p: Any{def !=(q: Int): Boolean}) = p != 7
def f30(p: Any{def ==(q: Boolean): Boolean}) = p == true
def f31(p: Any{def !=(q: Boolean): Boolean}) = p != true
-
+
def f32(p: Any{def <(q: Int): Boolean}) = p < 7
def f33(p: Any{def <=(q: Int): Boolean}) = p <= 7
def f34(p: Any{def >=(q: Int): Boolean}) = p >= 7
def f35(p: Any{def >(q: Int): Boolean}) = p > 7
-
+
print("f1 = "); println(f1(1) == +1)
print("f2 = "); println(f2(1) == -1)
print("f3 = "); println(f3(1) == ~1)
print("f4 = "); println(f4(true) == !true)
-
+
print("f5 = "); println(f5(4) == (4 + 7))
print("f6 = "); println(f6(4) == (4 - 7))
print("f7 = "); println(f7(4) == (4 * 7))
print("f8 = "); println(f8(4) == (4 / 7))
print("f9 = "); println(f9(4) == (4 % 7))
-
+
print("f10 = "); println(f10(4) == (4 | 7))
print("f11 = "); println(f11(false) == (false | true))
print("f12 = "); println(f12(4) == (4 ^ 7))
@@ -61,11 +61,11 @@ object Test extends App {
print("f15 = "); println(f15(false) == (false & true))
print("f16 = "); println(f16(false) == (false || true))
print("f17 = "); println(f17(false) == (false && true))
-
+
print("f18 = "); println(f18(4) == (4 << 7))
print("f19 = "); println(f19(-4) == (-4 >> 7))
print("f20 = "); println(f20(-4) == (-4 >>> 7))
-
+
print("f21 = "); println(f21(4.2) == (4.2.toByte))
print("f22 = "); println(f22(4.2) == (4.2.toShort))
print("f23 = "); println(f23(4.2) == (4.2.toChar))
@@ -73,17 +73,17 @@ object Test extends App {
print("f25 = "); println(f25(4.2) == (4.2.toLong))
print("f26 = "); println(f26(4.2) == (4.2.toFloat))
print("f27 = "); println(f27(4.2) == (4.2.toDouble))
-
+
print("f28 = "); println(f28(4) == (4 == 7))
print("f29 = "); println(f29(4) == (4 != 7))
print("f30 = "); println(f30(false) == (false == true))
print("f31 = "); println(f31(false) == (false != true))
-
+
print("f32 = "); println(f32(4) == (4 < 7))
print("f33 = "); println(f33(4) == (4 <= 7))
print("f34 = "); println(f34(4) == (4 >= 7))
print("f35 = "); println(f35(4) == (4 > 7))
-
+
println("ok")
-
+
}
diff --git a/test/files/run/iterator3444.scala b/test/files/run/iterator3444.scala
index 1d0713addc..2d0643bd56 100644
--- a/test/files/run/iterator3444.scala
+++ b/test/files/run/iterator3444.scala
@@ -2,22 +2,22 @@
// ticked #3444
object Test {
-
+
def main(args: Array[String]) {
val it = (1 to 12).toSeq.iterator
-
+
assert(it.next == 1)
assert(it.take(2).toList == List(2, 3))
-
+
val jt = (4 to 12).toSeq.iterator
assert(jt.next == 4)
assert(jt.drop(5).toList == List(10, 11, 12))
-
+
val kt = (1 until 10).toSeq.iterator
assert(kt.drop(50).toList == Nil)
-
+
val mt = (1 until 5).toSeq.iterator
assert(mt.take(50).toList == List(1, 2, 3, 4))
}
-
+
}
diff --git a/test/files/run/iterators.scala b/test/files/run/iterators.scala
index 60eccdc8cc..b85291cd72 100644
--- a/test/files/run/iterators.scala
+++ b/test/files/run/iterators.scala
@@ -82,16 +82,16 @@ object Test {
var xs4 = a.slice(0, 4).iterator.toList;
xs0.length + xs1.length + xs2.length + xs3.length + xs4.length
}
-
+
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)
val j = List(1, 2, 3, 4, 5).indexOf(16)
"" + i + "x" + j
}
-
+
def check_findIndexOf: String = {
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 }
diff --git a/test/files/run/java-erasure.scala b/test/files/run/java-erasure.scala
index c9f9b0ad51..0441ad705b 100644
--- a/test/files/run/java-erasure.scala
+++ b/test/files/run/java-erasure.scala
@@ -3,7 +3,7 @@ object Test {
list add "a"
list add "c"
list add "b"
-
+
def main(args: Array[String]): Unit = {
println(java.util.Collections.max(list))
}
diff --git a/test/files/run/json.scala b/test/files/run/json.scala
index 8ee8c347fd..7d3b635006 100644
--- a/test/files/run/json.scala
+++ b/test/files/run/json.scala
@@ -34,7 +34,7 @@ object Test extends App {
case Some(parsed) => println("Passed parse : " + sortJSON(parsed))
}
}
-
+
// For this usage, do a raw parse (to JSONObject/JSONArray)
def printJSON(given : String, expected : JSONType) {
printJSON(given, JSON.parseRaw, expected)
@@ -89,11 +89,11 @@ object Test extends App {
// The library should recurse into arrays to find objects (ticket #2207)
printJSON("[{\"a\" : \"team\"},{\"b\" : 52}]", JSONArray(List(JSONObject(Map("a" -> "team")), JSONObject(Map("b" -> 52.0)))))
-
+
// The library should differentiate between empty maps and lists (ticket #3284)
- printJSONFull("{}", Map())
+ printJSONFull("{}", Map())
printJSONFull("[]", List())
-
+
// Lists should be returned in the same order as specified
printJSON("[4,1,3,2,6,5,8,7]", JSONArray(List[Double](4,1,3,2,6,5,8,7)))
@@ -152,7 +152,7 @@ object Test extends App {
)
)
-
+
printJSONFull(sample1, sample1Obj)
println
@@ -188,7 +188,7 @@ object Test extends App {
// from http://json.org/example.html
val sample3 = """
{"web-app": {
- "servlet": [
+ "servlet": [
{
"servlet-name": "cofaxCDS",
"servlet-class": "org.cofax.cds.CDSServlet",
@@ -244,7 +244,7 @@ object Test extends App {
{
"servlet-name": "cofaxAdmin",
"servlet-class": "org.cofax.cds.AdminServlet"},
-
+
{
"servlet-name": "fileServlet",
"servlet-class": "org.cofax.cds.FileServlet"},
@@ -271,7 +271,7 @@ object Test extends App {
"cofaxAdmin": "/admin/*",
"fileServlet": "/static/*",
"cofaxTools": "/tools/*"},
-
+
"taglib": {
"taglib-uri": "cofax.tld",
"taglib-location": "/WEB-INF/tlds/cofax.tld"}
diff --git a/test/files/run/kmpSliceSearch.scala b/test/files/run/kmpSliceSearch.scala
index e72f78bfed..0f7e052d5f 100644
--- a/test/files/run/kmpSliceSearch.scala
+++ b/test/files/run/kmpSliceSearch.scala
@@ -12,7 +12,7 @@ object Test {
}
def main(args: Array[String]) {
val rng = new scala.util.Random(java.lang.Integer.parseInt("kmp",36))
-
+
// Make sure we agree with naive implementation
for (h <- Array(2,5,1000)) {
for (i <- 0 to 100) {
@@ -38,7 +38,7 @@ object Test {
}
}
}
-
+
// Check performance^Wcorrectness of common small test cases
val haystacks = List[Seq[Int]](
Array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15),
@@ -52,8 +52,8 @@ object Test {
List(1,1,1,1,1,2),
5 to 9
)
- (haystacks zip needles) foreach {
- case (hay, nee) =>
+ (haystacks zip needles) foreach {
+ case (hay, nee) =>
println(hay.indexOfSlice(nee,2) + " " + hay.lastIndexOfSlice(nee,13))
}
}
diff --git a/test/files/run/lazy-exprs.scala b/test/files/run/lazy-exprs.scala
index 204c4b564b..fc724bd10b 100644
--- a/test/files/run/lazy-exprs.scala
+++ b/test/files/run/lazy-exprs.scala
@@ -2,7 +2,7 @@ object TestExpressions {
def patmatchScrut {
lazy val z1: Option[String] = { println("forced <z1>"); Some("lazy z1") }
-
+
val res = z1 match {
case Some(msg) => msg
case None => "failed"
@@ -17,10 +17,10 @@ object TestExpressions {
def patmatchCase {
val t: Option[String] = Some("test")
val res = t match {
- case Some(msg) =>
+ case Some(msg) =>
lazy val z1 = { println("forced <z1>"); "lazy z1" }
z1
-
+
case None => "failed"
}
print("lazy val in case: ")
@@ -36,9 +36,9 @@ object TestExpressions {
print("lazy val in case: ")
val t: Option[String] = Some("lazy Z1")
t match {
- case Some(Z1) =>
+ case Some(Z1) =>
println("ok")
-
+
case None =>
println("failed")
}
@@ -60,13 +60,13 @@ object TestExpressions {
print("lazy val in pattern: ")
val t: Option[String] = Some("LazyField")
t match {
- case Some(LazyField) =>
+ case Some(LazyField) =>
println("ok")
-
+
case None =>
println("failed")
}
- }
+ }
lazy val (x, y) = ({print("x"); "x"}, {print("y"); "y"})
def testPatLazyVal {
diff --git a/test/files/run/lazy-locals.scala b/test/files/run/lazy-locals.scala
index ba555daf95..696aeeba96 100644
--- a/test/files/run/lazy-locals.scala
+++ b/test/files/run/lazy-locals.scala
@@ -163,18 +163,18 @@ object Test extends App {
// see #1589
object NestedLazyVals {
- lazy val x = {
+ lazy val x = {
lazy val y = { println("forcing y"); 42; }
println("forcing x")
- y
+ y
}
-
+
val x1 = 5 + { lazy val y = 10 ; y }
-
+
println(x)
println(x1)
}
-
+
trait TNestedLazyVals {
lazy val x = { lazy val y = 42; y }
}
diff --git a/test/files/run/lazy-override-run.scala b/test/files/run/lazy-override-run.scala
index 6016c3c8be..d197408775 100644
--- a/test/files/run/lazy-override-run.scala
+++ b/test/files/run/lazy-override-run.scala
@@ -20,7 +20,7 @@ object Test extends App {
val b = new B
print("b.x=")
- println(b.x)
+ println(b.x)
print("b.z=")
- println(b.z)
+ println(b.z)
}
diff --git a/test/files/run/lazy-traits.scala b/test/files/run/lazy-traits.scala
index 38207672db..f04c0b8b1f 100644
--- a/test/files/run/lazy-traits.scala
+++ b/test/files/run/lazy-traits.scala
@@ -1,5 +1,5 @@
trait A {
- lazy val z1 = {
+ lazy val z1 = {
println("<forced z1>")
"lazy z1"
}
@@ -7,7 +7,7 @@ trait A {
/** Simple class which mixes in one lazy val. */
class Cls extends AnyRef with A {
- override def toString =
+ override def toString =
"z1 = " + z1
}
@@ -18,7 +18,7 @@ class Cls2 extends AnyRef with A {
"lazy z2"
}
- override def toString =
+ override def toString =
"z1 = " + z1 + " z2 = " + z2
}
@@ -34,7 +34,7 @@ class ClsB extends Object with B {
println("<forced zc1>")
"lazy zc1"
}
- override def toString =
+ override def toString =
"z1 = " + z1 + " zb1 = " + zb1 + " zc1 = " + zc1
}
@@ -73,39 +73,39 @@ class OverflownLazyFields extends Object with A {
lazy val zc30 = { println("<forced zc30>"); "lazy zc30" }
lazy val zc31 = { println("<forced zc31>"); "lazy zc31" }
- override def toString =
- "\nzc00 = " + zc00 +
- "\nzc01 = " + zc01 +
- "\nzc02 = " + zc02 +
- "\nzc03 = " + zc03 +
- "\nzc04 = " + zc04 +
- "\nzc05 = " + zc05 +
- "\nzc06 = " + zc06 +
- "\nzc07 = " + zc07 +
- "\nzc08 = " + zc08 +
- "\nzc09 = " + zc09 +
- "\nzc10 = " + zc10 +
- "\nzc11 = " + zc11 +
- "\nzc12 = " + zc12 +
- "\nzc13 = " + zc13 +
- "\nzc14 = " + zc14 +
- "\nzc15 = " + zc15 +
- "\nzc16 = " + zc16 +
- "\nzc17 = " + zc17 +
- "\nzc18 = " + zc18 +
- "\nzc19 = " + zc19 +
- "\nzc20 = " + zc20 +
- "\nzc21 = " + zc21 +
- "\nzc22 = " + zc22 +
- "\nzc23 = " + zc23 +
- "\nzc24 = " + zc24 +
- "\nzc25 = " + zc25 +
- "\nzc26 = " + zc26 +
- "\nzc27 = " + zc27 +
- "\nzc28 = " + zc28 +
- "\nzc29 = " + zc29 +
- "\nzc30 = " + zc30 +
- "\nzc31 = " + zc31 +
+ override def toString =
+ "\nzc00 = " + zc00 +
+ "\nzc01 = " + zc01 +
+ "\nzc02 = " + zc02 +
+ "\nzc03 = " + zc03 +
+ "\nzc04 = " + zc04 +
+ "\nzc05 = " + zc05 +
+ "\nzc06 = " + zc06 +
+ "\nzc07 = " + zc07 +
+ "\nzc08 = " + zc08 +
+ "\nzc09 = " + zc09 +
+ "\nzc10 = " + zc10 +
+ "\nzc11 = " + zc11 +
+ "\nzc12 = " + zc12 +
+ "\nzc13 = " + zc13 +
+ "\nzc14 = " + zc14 +
+ "\nzc15 = " + zc15 +
+ "\nzc16 = " + zc16 +
+ "\nzc17 = " + zc17 +
+ "\nzc18 = " + zc18 +
+ "\nzc19 = " + zc19 +
+ "\nzc20 = " + zc20 +
+ "\nzc21 = " + zc21 +
+ "\nzc22 = " + zc22 +
+ "\nzc23 = " + zc23 +
+ "\nzc24 = " + zc24 +
+ "\nzc25 = " + zc25 +
+ "\nzc26 = " + zc26 +
+ "\nzc27 = " + zc27 +
+ "\nzc28 = " + zc28 +
+ "\nzc29 = " + zc29 +
+ "\nzc30 = " + zc30 +
+ "\nzc31 = " + zc31 +
"\nz1 = " + z1
}
diff --git a/test/files/run/lift-and-unlift.scala b/test/files/run/lift-and-unlift.scala
index 5a59f63ae4..b944c70155 100644
--- a/test/files/run/lift-and-unlift.scala
+++ b/test/files/run/lift-and-unlift.scala
@@ -5,21 +5,21 @@ object Test {
def evens2: PartialFunction[Int, Int] = {
case x if x % 2 == 0 => x
}
-
+
def main(args: Array[String]): Unit = {
val f1 = evens1 _
val f2 = evens2.lift
-
+
assert(1 to 10 forall (x => f1(x) == f2(x)))
-
+
val f3 = unlift(f1)
val f4 = unlift(f2)
-
+
assert(1 to 10 forall { x =>
if (!f3.isDefinedAt(x)) !f4.isDefinedAt(x)
else f3(x) == f4(x)
})
-
+
assert(f1 eq f3.lift)
// Hmm, why is this not true:
// assert(f2 eq f4.lift)
diff --git a/test/files/run/lists-run.scala b/test/files/run/lists-run.scala
index 13fca22982..ccfe5bc260 100644
--- a/test/files/run/lists-run.scala
+++ b/test/files/run/lists-run.scala
@@ -4,7 +4,7 @@
*/
object Test {
def main(args: Array[String]) {
- Test_multiset.run() // multiset operations: union, intersect, diff
+ Test_multiset.run() // multiset operations: union, intersect, diff
Test1.run() //count, exists, filter, ..
Test2.run() //#468
Test3.run() //#1691
@@ -54,7 +54,7 @@ object Test_multiset {
assert(List(3, 2) == (vs diff xs), "vs_diff_xs")
assert(isSubListOf(xs filterNot (vs contains), xs diff vs), "xs_subset_vs")
- // tests adapted from Thomas Jung
+ // tests adapted from Thomas Jung
assert({
def sort(zs: List[Int]) = zs sortWith ( _ > _ )
sort(xs intersect ys) == sort(ys intersect xs)
@@ -62,7 +62,7 @@ object Test_multiset {
assert({
def cardinality[A](zs: List[A], e: A): Int = zs count (e == _)
val intersection = xs intersect ys
- xs forall (e => cardinality(intersection, e) == (cardinality(xs, e)
+ xs forall (e => cardinality(intersection, e) == (cardinality(xs, e)
min cardinality(ys, e)))
}, "obey min cardinality")
assert({
@@ -133,7 +133,7 @@ object Test2 {
def run() {
val xs1 = List(1, 2, 3)
val xs2 = List(0)
-
+
val ys1 = xs1 ::: List(4)
assert(List(1, 2, 3, 4) == ys1, "check_:::")
diff --git a/test/files/run/manifests.scala b/test/files/run/manifests.scala
index ed6efab70d..1da06b8aee 100644
--- a/test/files/run/manifests.scala
+++ b/test/files/run/manifests.scala
@@ -4,15 +4,15 @@ object Test
val CO, IN, CONTRA = Value
}
import Variances.{ CO, IN, CONTRA }
-
+
object SubtypeRelationship extends Enumeration {
val NONE, SAME, SUB, SUPER = Value
}
import SubtypeRelationship.{ NONE, SAME, SUB, SUPER }
-
+
class VarianceTester[T, U, CC[_]](expected: Variances.Value)(
implicit ev1: Manifest[T], ev2: Manifest[U], ev3: Manifest[CC[T]], ev4: Manifest[CC[U]]) {
-
+
def elements = List(ev1 <:< ev2, ev2 <:< ev1)
def containers = List(ev3 <:< ev4, ev4 <:< ev3)
@@ -20,13 +20,13 @@ object Test
def isSame = typeCompare[T, U] == SAME
def isSub = typeCompare[T, U] == SUB
def isSuper = typeCompare[T, U] == SUPER
-
+
def showsCovariance = (elements == containers)
def showsContravariance = (elements == containers.reverse)
def showsInvariance = containers forall (_ == isSame)
def allContainerVariances = List(showsCovariance, showsInvariance, showsContravariance)
-
+
def showsExpectedVariance =
if (isUnrelated) allContainerVariances forall (_ == false)
else if (isSame) allContainerVariances forall (_ == true)
@@ -36,55 +36,55 @@ object Test
case CONTRA => showsContravariance && !showsCovariance && !showsInvariance
}
}
-
+
def showsCovariance[T, U, CC[_]](implicit ev1: Manifest[T], ev2: Manifest[U], ev3: Manifest[CC[T]], ev4: Manifest[CC[U]]) =
new VarianceTester[T, U, CC](CO) showsExpectedVariance
def showsInvariance[T, U, CC[_]](implicit ev1: Manifest[T], ev2: Manifest[U], ev3: Manifest[CC[T]], ev4: Manifest[CC[U]]) =
new VarianceTester[T, U, CC](IN) showsExpectedVariance
-
+
def showsContravariance[T, U, CC[_]](implicit ev1: Manifest[T], ev2: Manifest[U], ev3: Manifest[CC[T]], ev4: Manifest[CC[U]]) =
new VarianceTester[T, U, CC](CONTRA) showsExpectedVariance
-
+
def typeCompare[T, U](implicit ev1: Manifest[T], ev2: Manifest[U]) = (ev1 <:< ev2, ev2 <:< ev1) match {
case (true, true) => SAME
case (true, false) => SUB
case (false, true) => SUPER
case (false, false) => NONE
}
-
+
def assertAnyRef[T: Manifest] = List(
manifest[T] <:< manifest[Any],
manifest[T] <:< manifest[AnyRef],
!(manifest[T] <:< manifest[AnyVal])
) foreach (assert(_, "assertAnyRef"))
-
+
def assertAnyVal[T: Manifest] = List(
manifest[T] <:< manifest[Any],
!(manifest[T] <:< manifest[AnyRef]),
manifest[T] <:< manifest[AnyVal]
) foreach (assert(_, "assertAnyVal"))
-
+
def assertSameType[T: Manifest, U: Manifest] = assert(typeCompare[T, U] == SAME, "assertSameType")
def assertSuperType[T: Manifest, U: Manifest] = assert(typeCompare[T, U] == SUPER, "assertSuperType")
def assertSubType[T: Manifest, U: Manifest] = assert(typeCompare[T, U] == SUB, "assertSubType")
def assertNoRelationship[T: Manifest, U: Manifest] = assert(typeCompare[T, U] == NONE, "assertNoRelationship")
-
+
def testVariancesVia[T: Manifest, U: Manifest] = assert(
- typeCompare[T, U] == SUB &&
+ typeCompare[T, U] == SUB &&
showsCovariance[T, U, List] &&
showsInvariance[T, U, Set],
"testVariancesVia"
)
-
+
def runAllTests = {
assertAnyVal[AnyVal]
assertAnyVal[Unit]
- assertAnyVal[Int]
- assertAnyVal[Double]
+ assertAnyVal[Int]
+ assertAnyVal[Double]
assertAnyVal[Boolean]
assertAnyVal[Char]
-
+
assertAnyRef[AnyRef]
assertAnyRef[java.lang.Object]
assertAnyRef[java.lang.Integer]
@@ -94,7 +94,7 @@ object Test
assertAnyRef[String]
assertAnyRef[scala.List[String]]
assertAnyRef[scala.List[_]]
-
+
// variance doesn't work yet
// testVariancesVia[String, Any]
// testVariancesVia[String, AnyRef]
@@ -102,11 +102,11 @@ object Test
assertSubType[List[String], List[Any]]
assertSubType[List[String], List[AnyRef]]
assertNoRelationship[List[String], List[AnyVal]]
-
+
assertSubType[List[Int], List[Any]]
assertSubType[List[Int], List[AnyVal]]
assertNoRelationship[List[Int], List[AnyRef]]
-
+
// Nothing
assertSubType[Nothing, Any]
assertSubType[Nothing, AnyVal]
@@ -115,7 +115,7 @@ object Test
assertSubType[Nothing, List[String]]
assertSubType[Nothing, Null]
assertSameType[Nothing, Nothing]
-
+
// Null
assertSubType[Null, Any]
assertNoRelationship[Null, AnyVal]
@@ -124,7 +124,7 @@ object Test
assertSubType[Null, List[String]]
assertSameType[Null, Null]
assertSuperType[Null, Nothing]
-
+
// Any
assertSameType[Any, Any]
assertSuperType[Any, AnyVal]
@@ -133,7 +133,7 @@ object Test
assertSuperType[Any, List[String]]
assertSuperType[Any, Null]
assertSuperType[Any, Nothing]
-
+
// Misc unrelated types
assertNoRelationship[Unit, AnyRef]
assertNoRelationship[Unit, Int]
diff --git a/test/files/run/mapConserve.scala b/test/files/run/mapConserve.scala
index a285113b11..013095b1de 100644
--- a/test/files/run/mapConserve.scala
+++ b/test/files/run/mapConserve.scala
@@ -4,8 +4,8 @@ import scala.collection.mutable.ListBuffer
object Test {
val maxListLength = 7 // up to 16, but larger is slower
var testCount = 0
-
- def checkStackOverflow() = {
+
+ def checkStackOverflow() = {
var xs: List[String] = Nil
for (i <- 0 until 250000)
xs = "X" :: xs
@@ -47,7 +47,7 @@ object Test {
// Behaves like existing mapConserve with respect to eq
checkBehaviourUnchanged(data, data mapConserve lastHexDigit, data mapConserve lastHexDigit)
}
-
+
checkStackOverflow();
}
} \ No newline at end of file
diff --git a/test/files/run/mapValues.scala b/test/files/run/mapValues.scala
index d3266bd18f..bd1794bc51 100644
--- a/test/files/run/mapValues.scala
+++ b/test/files/run/mapValues.scala
@@ -1,7 +1,7 @@
object Test {
val m = Map(1 -> 1, 2 -> 2)
val mv = (m mapValues identity) - 1
-
+
def main(args: Array[String]): Unit = {
assert(mv.size == 1)
}
diff --git a/test/files/run/map_java_conversions.scala b/test/files/run/map_java_conversions.scala
index a41fae3695..7714b2cc74 100644
--- a/test/files/run/map_java_conversions.scala
+++ b/test/files/run/map_java_conversions.scala
@@ -4,20 +4,20 @@
object Test {
-
+
def main(args: Array[String]) {
import collection.JavaConversions._
-
+
test(new java.util.HashMap[String, String])
test(new java.util.Properties)
testConcMap
}
-
+
def testConcMap {
import collection.JavaConversions._
-
+
val concMap = new java.util.concurrent.ConcurrentHashMap[String, String]
-
+
test(concMap)
val cmap = asScalaConcurrentMap(concMap)
cmap.putIfAbsent("absentKey", "absentValue")
@@ -26,31 +26,31 @@ object Test {
assert(cmap.replace("absentKey", "newAbsentValue") == Some("absentValue"))
assert(cmap.replace("absentKey", "newAbsentValue", ".......") == true)
}
-
+
def test(m: collection.mutable.Map[String, String]) {
m.clear
assert(m.size == 0)
-
+
m.put("key", "value")
assert(m.size == 1)
-
+
assert(m.put("key", "anotherValue") == Some("value"))
assert(m.put("key2", "value2") == None)
assert(m.size == 2)
-
+
m += (("key3", "value3"))
assert(m.size == 3)
-
+
m -= "key2"
assert(m.size == 2)
assert(m.nonEmpty)
assert(m.remove("key") == Some("anotherValue"))
-
+
m.clear
for (i <- 0 until 10) m += (("key" + i, "value" + i))
for ((k, v) <- m) assert(k.startsWith("key"))
}
-
+
}
diff --git a/test/files/run/matchbytes.scala b/test/files/run/matchbytes.scala
index f2cea06eb3..7190886bab 100644
--- a/test/files/run/matchbytes.scala
+++ b/test/files/run/matchbytes.scala
@@ -4,4 +4,4 @@ object Test extends App{
case 1 => println(1);
case _ => println("????");
}
-}
+}
diff --git a/test/files/run/matchintasany.scala b/test/files/run/matchintasany.scala
index 03f6ca2a84..c6764b31b9 100644
--- a/test/files/run/matchintasany.scala
+++ b/test/files/run/matchintasany.scala
@@ -5,4 +5,4 @@ object Test extends App{
case 1L => println(1);
case _ => println("????");
}
-}
+}
diff --git a/test/files/run/matchnull.scala b/test/files/run/matchnull.scala
index 2cc8550d47..cfb3049239 100644
--- a/test/files/run/matchnull.scala
+++ b/test/files/run/matchnull.scala
@@ -3,7 +3,7 @@ object Test
def f1 = null match { case x: AnyRef => 1 case _ => -1 }
def f2(x: Any) = x match { case 52 => 1 ; case null => -1 ; case _ => 0 }
def f3(x: AnyRef) = x match { case x: String => 1 ; case List(_) => 0 ; case null => -1 ; case _ => -2 }
-
+
def main(args: Array[String]): Unit = {
println(f1)
println(f2(null))
diff --git a/test/files/run/misc.scala b/test/files/run/misc.scala
index 2ae76bd968..139d2d70f7 100644
--- a/test/files/run/misc.scala
+++ b/test/files/run/misc.scala
@@ -60,7 +60,7 @@ object Test {
Console.println;
val x = 13;
x;
- // !!! why are DefDef replaced by Block(Tree[0])? we should use Empty!
+ // !!! why are DefDef replaced by Block(Tree[0])? we should use Empty!
def f = 19;
f;
def f0() = 11;
diff --git a/test/files/run/missingparams.scala b/test/files/run/missingparams.scala
index fbc4d2a4f7..e9b1d27d68 100644
--- a/test/files/run/missingparams.scala
+++ b/test/files/run/missingparams.scala
@@ -6,8 +6,8 @@ final class Foo(val x: Int) {
// test that the closure elimination is not wrongly replacing
// 'that' by 'this'
- def intersect(that: Foo) =
- filter { dummy =>
+ def intersect(that: Foo) =
+ filter { dummy =>
// x // dummy
that.x > 0
}
diff --git a/test/files/run/mock.scala b/test/files/run/mock.scala
index e414e51e2d..8778e20ef5 100644
--- a/test/files/run/mock.scala
+++ b/test/files/run/mock.scala
@@ -5,11 +5,11 @@ import java.io.Closeable
object Test {
// It'd be really nice about now if functions had a common parent.
implicit def interfaceify(x: AnyRef): UniversalFn = UniversalFn(x)
-
+
def runner(x: Runnable) = x.run()
def caller[T](x: Callable[T]): T = x.call()
def closer(x: Closeable) = x.close()
-
+
def main(args: Array[String]): Unit = {
var counter = 0
val closure = () => {
@@ -21,7 +21,7 @@ object Test {
val int1 = closure.as[Runnable]
val int2 = closure.as[Callable[Int]]
val int3 = closure.as[Closeable]
-
+
runner(int1)
caller(int2)
closer(int3)
diff --git a/test/files/run/nodebuffer-array.scala b/test/files/run/nodebuffer-array.scala
index f9cfbc50df..4e1ffe1e5e 100644
--- a/test/files/run/nodebuffer-array.scala
+++ b/test/files/run/nodebuffer-array.scala
@@ -1,5 +1,5 @@
object Test {
-
+
def f(s: String) = {
<entry>
{
@@ -8,7 +8,7 @@ object Test {
}
</entry>
}
-
+
def main(args: Array[String]): Unit = {
println(f("a,b,c"))
}
diff --git a/test/files/run/null-and-intersect.scala b/test/files/run/null-and-intersect.scala
index 7266dabe6d..1437fa4b25 100644
--- a/test/files/run/null-and-intersect.scala
+++ b/test/files/run/null-and-intersect.scala
@@ -2,7 +2,7 @@ object Test {
trait Immortal
class Bippy extends Immutable with Immortal
class Boppy extends Immutable
-
+
def f[T](x: Traversable[T]) = x match {
case _: Map[_, _] => 3
case _: Seq[_] => 2
@@ -23,10 +23,10 @@ object Test {
println(f(Seq(1)))
println(f(Map(1 -> 2)))
println(f(null))
-
+
println(g(new Bippy))
println(g(null))
-
+
println(h(new Bippy))
println(h(new Boppy))
println(h(null))
diff --git a/test/files/run/null-hash.scala b/test/files/run/null-hash.scala
index 9b1f28b083..abf15e8166 100644
--- a/test/files/run/null-hash.scala
+++ b/test/files/run/null-hash.scala
@@ -2,7 +2,7 @@ object Test {
def f1 = List(5, 10, null: String).##
def f2(x: Any) = x.##
def f3 = ((55, "abc", null: List[Int])).##
-
+
def main(args: Array[String]): Unit = {
f1
f2(null)
diff --git a/test/files/run/number-parsing.scala b/test/files/run/number-parsing.scala
index ad1481063e..21551a3a07 100644
--- a/test/files/run/number-parsing.scala
+++ b/test/files/run/number-parsing.scala
@@ -2,12 +2,12 @@ object Test {
def numTests() = {
val MinusZero = Float.box(-0.0f)
val PlusZero = Float.box(0.0f)
-
+
assert(PlusZero match { case MinusZero => false ; case _ => true })
assert(MinusZero match { case PlusZero => false ; case _ => true })
assert((MinusZero: scala.Float) == (PlusZero: scala.Float))
assert(!(MinusZero equals PlusZero))
-
+
List(
-5f.max(2) ,
-5f max 2 ,
diff --git a/test/files/run/numbereq.scala b/test/files/run/numbereq.scala
index b07c83dc3e..77a217df36 100644
--- a/test/files/run/numbereq.scala
+++ b/test/files/run/numbereq.scala
@@ -13,25 +13,25 @@ object Test {
if (x >= Byte.MinValue && x <= Byte.MaxValue) List(new java.lang.Byte(x.toByte)) else Nil,
if (x >= Char.MinValue && x <= Char.MaxValue) List(new java.lang.Character(x.toChar)) else Nil
).flatten
-
+
base ::: extras
}
-
-
+
+
def main(args: Array[String]): Unit = {
val ints = (0 to 15).toList map (Short.MinValue >> _)
val ints2 = ints map (x => -x)
val ints3 = ints map (_ + 1)
val ints4 = ints2 map (_ - 1)
-
+
val setneg1 = ints map mkNumbers
val setneg2 = ints3 map mkNumbers
val setpos1 = ints2 map mkNumbers
val setpos2 = ints4 map mkNumbers
val zero = mkNumbers(0)
-
- val sets = setneg1 ++ setneg2 ++ List(zero) ++ setpos1 ++ setpos2
-
+
+ val sets = setneg1 ++ setneg2 ++ List(zero) ++ setpos1 ++ setpos2
+
for (set <- sets ; x <- set ; y <- set) {
// println("'%s' == '%s' (%s == %s) (%s == %s)".format(x, y, x.hashCode, y.hashCode, x.##, y.##))
assert(x == y, "%s/%s != %s/%s".format(x, x.getClass, y, y.getClass))
diff --git a/test/files/run/origins.scala b/test/files/run/origins.scala
index 4c98e7a66c..ab873bca89 100644
--- a/test/files/run/origins.scala
+++ b/test/files/run/origins.scala
@@ -14,7 +14,7 @@ object Test {
def f1() = 1 to 5 map boop
def f2() = 1 to 10 map boop
def f3() = 1 to 50 map boop
-
+
def main(args: Array[String]): Unit = {
f1() ; f2() ; f3()
}
diff --git a/test/files/run/packrat1.scala b/test/files/run/packrat1.scala
index 31a1ea55e5..b5a4687378 100644
--- a/test/files/run/packrat1.scala
+++ b/test/files/run/packrat1.scala
@@ -21,15 +21,15 @@ object Test extends App{
}
object grammars extends StandardTokenParsers with PackratParsers{
-
+
def extractResult(r : ParseResult[_]) = r match {
case Success(a,_) => a
case NoSuccess(a,_) => a
}
-
+
lexical.delimiters ++= List("+","-","*","/","(",")")
lexical.reserved ++= List("Hello","World")
-
+
/****
* term = term + fact | term - fact | fact
* fact = fact * num | fact / num | num
@@ -39,7 +39,7 @@ object grammars extends StandardTokenParsers with PackratParsers{
val term: PackratParser[Int] = (term~("+"~>fact) ^^ {case x~y => x+y}
|term~("-"~>fact) ^^ {case x~y => x-y}
|fact)
-
+
val fact: PackratParser[Int] = (fact~("*"~>numericLit) ^^ {case x~y => x*y.toInt}
|fact~("/"~>numericLit) ^^ {case x~y => x/y.toInt}
|"("~>term<~")"
diff --git a/test/files/run/packrat2.scala b/test/files/run/packrat2.scala
index b91a2eae46..f55021a6a8 100644
--- a/test/files/run/packrat2.scala
+++ b/test/files/run/packrat2.scala
@@ -22,15 +22,15 @@ object Test extends App{
}
object grammars2 extends StandardTokenParsers with PackratParsers{
-
+
def extractResult(r : ParseResult[_]) = r match{
case Success(a,_) => a
case NoSuccess(a,_) => a
}
-
+
lexical.delimiters ++= List("+","-","*","/","(",")")
lexical.reserved ++= List("Hello","World")
-
+
/*
* exp = sum | prod | num
* sum = exp ~ "+" ~ num
@@ -40,18 +40,18 @@ object grammars2 extends StandardTokenParsers with PackratParsers{
val exp : PackratParser[Int] = sum | prod | numericLit ^^{_.toInt} | "("~>exp<~")"
val sum : PackratParser[Int] = exp~("+"~>exp) ^^ {case x~y => x+y}
val prod: PackratParser[Int] = exp~("*"~>(numericLit ^^{_.toInt} | exp)) ^^ {case x~y => x*y}
-
-
+
+
/* lexical.reserved ++= List("a","b", "c")
val a : PackratParser[Any] = numericLit^^{x => primeFactors(x.toInt)}
val b : PackratParser[Any] = memo("b")
val c : PackratParser[Any] = memo("c")
- val AnBnCn : PackratParser[Any] =
+ val AnBnCn : PackratParser[Any] =
parseButDontEat(repMany1(a,b))~not(b)~>rep1(a)~repMany1(b,c)// ^^{case x~y => x:::y}
//val c : PackratParser[Any] = parseButDontEat(a)~a~a
//println(c((new PackratReader(new lexical.Scanner("45 24")))))
val r = new PackratReader(new lexical.Scanner("45 b c"))
println(AnBnCn(r))
println(r.getCache.size)
-*/
+*/
}
diff --git a/test/files/run/packrat3.scala b/test/files/run/packrat3.scala
index 8eab8ec6d0..216ef8f0af 100644
--- a/test/files/run/packrat3.scala
+++ b/test/files/run/packrat3.scala
@@ -24,28 +24,28 @@ object Test {
}
object grammars3 extends StandardTokenParsers with PackratParsers {
-
+
def extractResult(r: ParseResult[_]) = r match {
case Success(a,_) => a
case NoSuccess(a,_) => a
}
-
+
lexical.reserved ++= List("a","b", "c")
val a: PackratParser[Any] = memo("a")
val b: PackratParser[Any] = memo("b")
val c: PackratParser[Any] = memo("c")
- val AnBnCn: PackratParser[Any] =
+ val AnBnCn: PackratParser[Any] =
guard(repMany1(a,b) ~ not(b)) ~ rep1(a) ~ repMany1(b,c)// ^^{case x~y => x:::y}
- private def repMany[T](p: => Parser[T], q: => Parser[T]): Parser[List[T]] =
+ private def repMany[T](p: => Parser[T], q: => Parser[T]): Parser[List[T]] =
( p~repMany(p,q)~q ^^ {case x~xs~y => x::xs:::(y::Nil)}
| success(Nil)
)
- def repMany1[T](p: => Parser[T], q: => Parser[T]): Parser[List[T]] =
+ def repMany1[T](p: => Parser[T], q: => Parser[T]): Parser[List[T]] =
p~opt(repMany(p,q))~q ^^ {case x~Some(xs)~y => x::xs:::(y::Nil)}
-}
+}
diff --git a/test/files/run/parmap-ops.scala b/test/files/run/parmap-ops.scala
index 01972174f6..31828d9522 100644
--- a/test/files/run/parmap-ops.scala
+++ b/test/files/run/parmap-ops.scala
@@ -5,10 +5,10 @@ import collection._
object Test {
-
+
def main(args: Array[String]) {
val gm: GenMap[Int, Int] = GenMap(0 -> 0, 1 -> 1).par
-
+
// ops
assert(gm.isDefinedAt(1))
assert(gm.contains(1))
@@ -25,11 +25,11 @@ object Test {
} catch {
case e: NoSuchElementException => // ok
}
-
+
assert(gm.filterKeys(_ % 2 == 0)(0) == 0)
assert(gm.filterKeys(_ % 2 == 0).get(1) == None)
assert(gm.mapValues(_ + 1)(0) == 1)
-
+
// with defaults
val pm = parallel.mutable.ParMap(0 -> 0, 1 -> 1)
val dm = pm.withDefault(x => -x)
@@ -41,12 +41,12 @@ object Test {
assert(dm(3) == 3)
assert(pm(3) == 3)
assert(dm(4) == -4)
-
+
val imdm = parallel.immutable.ParMap(0 -> 0, 1 -> 1).withDefault(x => -x)
assert(imdm(0) == 0)
assert(imdm(1) == 1)
assert(imdm(2) == -2)
assert(imdm.updated(2, 2) == parallel.ParMap(0 -> 0, 1 -> 1, 2 -> 2))
}
-
+
}
diff --git a/test/files/run/patch-boundary.scala b/test/files/run/patch-boundary.scala
index ed1a0e9fc1..8381956859 100644
--- a/test/files/run/patch-boundary.scala
+++ b/test/files/run/patch-boundary.scala
@@ -1,8 +1,8 @@
object Test {
def f = collection.mutable.ArrayBuffer(1, 2, 3, 4, 5, 6, 7, 8)
def g = f.patch(4, List(1, 2), 10)
-
+
def main(args: Array[String]): Unit = {
- assert(g.size == 6)
+ assert(g.size == 6)
}
}
diff --git a/test/files/run/patmat-exprs.scala b/test/files/run/patmat-exprs.scala
index f502a14832..dfc78e2ca5 100644
--- a/test/files/run/patmat-exprs.scala
+++ b/test/files/run/patmat-exprs.scala
@@ -37,7 +37,7 @@ trait Pattern {
//
// type Numeric[T]
// import java.io.Serializable
- //
+ //
// implicit def compat27a[T](x: Iterable[T]) = new {
// def iterator: Iterator[T] = x.elements
// def sum: Int = 5
@@ -278,8 +278,8 @@ trait Pattern {
case Mul(Mul(y, Const(z)), Const(x)) => Mul(const(num.mul(x, z)), y)
case Const(x) if x == num.one => One[T]
- case Const(x) if x == num.zero => Zero[T]
-
+ case Const(x) if x == num.zero => Zero[T]
+
case Sub(x, Neg(y)) => Add(List(x, y))
case Sub(Neg(x), y) => Neg(Add(List(x, y)))
case Neg(Neg(x)) => x
diff --git a/test/files/run/patmat-seqs.scala b/test/files/run/patmat-seqs.scala
index b5c47b4b4b..e23711697c 100644
--- a/test/files/run/patmat-seqs.scala
+++ b/test/files/run/patmat-seqs.scala
@@ -7,14 +7,14 @@ object Test {
case Seq(_, _, _, _, _, x: String) => "ss6"
case _ => "d"
}
-
+
def f2(x: Any) = x match {
case Seq("a", "b", _*) => "s2"
case Seq(1, _*) => "s1"
case Seq(5, 6, 7, _*) => "s3"
case _ => "d"
}
-
+
def main(args: Array[String]): Unit = {
val xs1 = List(
List(1,2,3),
@@ -24,9 +24,9 @@ object Test {
Seq(1, 2, 3, 4, 5, "abcd"),
"abc"
) map f1
-
+
xs1 foreach println
-
+
val xs2 = List(
Seq(5, 6, 7),
Seq(5, 6, 7, 8, 9),
@@ -36,7 +36,7 @@ object Test {
Nil,
5
) map f2
-
+
xs2 foreach println
}
}
diff --git a/test/files/run/patmatnew.scala b/test/files/run/patmatnew.scala
index 9e91a48258..a6f8199457 100644
--- a/test/files/run/patmatnew.scala
+++ b/test/files/run/patmatnew.scala
@@ -251,7 +251,7 @@ object Test {
}
// (not regular) fancy guards / bug#644
- object TestSequence06 {
+ object TestSequence06 {
case class A(i: Any)
@@ -447,7 +447,7 @@ object Test {
object Get extends Sync
var ps: PartialFunction[Any, Any] = {
- case Get(y) if y > 4 => // y gets a wildcard type for some reason?! hack
+ case Get(y) if y > 4 => // y gets a wildcard type for some reason?! hack
}
}
def run() {
diff --git a/test/files/run/pc-conversions.scala b/test/files/run/pc-conversions.scala
index 6be0f99355..60ee59c3c4 100644
--- a/test/files/run/pc-conversions.scala
+++ b/test/files/run/pc-conversions.scala
@@ -5,11 +5,11 @@ import collection._
// test conversions between collections
object Test {
-
+
def main(args: Array[String]) {
testConversions
}
-
+
def testConversions {
// seq conversions
assertSeq(parallel.mutable.ParArray(1, 2, 3))
@@ -18,7 +18,7 @@ object Test {
assertSeq(parallel.immutable.ParRange(1, 50, 1, false))
assertSeq(parallel.immutable.ParHashMap(1 -> 2, 2 -> 4))
assertSeq(parallel.immutable.ParHashSet(1, 2, 3))
-
+
// par conversions
assertPar(Array(1, 2, 3))
assertPar(mutable.ArrayBuffer(1, 2, 3))
@@ -29,7 +29,7 @@ object Test {
assertPar(immutable.Range(1, 50, 1))
assertPar(immutable.HashMap(1 -> 1, 2 -> 2))
assertPar(immutable.HashSet(1, 2, 3))
-
+
// par.to* and to*.par tests
assertToPar(List(1 -> 1, 2 -> 2, 3 -> 3))
assertToPar(Stream(1 -> 1, 2 -> 2))
@@ -47,19 +47,19 @@ object Test {
assertToPar(parallel.mutable.ParHashSet(1 -> 2))
assertToPar(parallel.immutable.ParHashMap(1 -> 2))
assertToPar(parallel.immutable.ParHashSet(1 -> 3))
-
+
assertToParWoMap(immutable.Range(1, 10, 2))
-
+
// seq and par again conversions)
assertSeqPar(parallel.mutable.ParArray(1, 2, 3))
}
-
+
def assertSeqPar[T](pc: parallel.ParIterable[T]) = pc.seq.par == pc
-
+
def assertSeq[T](pc: parallel.ParIterable[T]) = assert(pc.seq == pc)
-
+
def assertPar[T, P <: Parallel](xs: GenIterable[T]) = assert(xs == xs.par)
-
+
def assertToPar[K, V](xs: GenTraversable[(K, V)]) {
xs match {
case _: Seq[_] =>
@@ -67,26 +67,26 @@ object Test {
assert(xs.par.toIterable == xs)
case _ =>
}
-
+
assert(xs.toSeq.par == xs.toSeq)
assert(xs.par.toSeq == xs.toSeq)
-
+
assert(xs.toSet.par == xs.toSet)
assert(xs.par.toSet == xs.toSet)
-
+
assert(xs.toMap.par == xs.toMap)
assert(xs.par.toMap == xs.toMap)
}
-
+
def assertToParWoMap[T](xs: GenSeq[T]) {
assert(xs.toIterable.par == xs.toIterable)
assert(xs.par.toIterable == xs.toIterable)
-
+
assert(xs.toSeq.par == xs.toSeq)
assert(xs.par.toSeq == xs.toSeq)
-
+
assert(xs.toSet.par == xs.toSet)
assert(xs.par.toSet == xs.toSet)
}
-
+
}
diff --git a/test/files/run/pf-catch.scala b/test/files/run/pf-catch.scala
index f0b8baeeb3..ba0781fe89 100644
--- a/test/files/run/pf-catch.scala
+++ b/test/files/run/pf-catch.scala
@@ -6,12 +6,12 @@ object Test {
case x: java.util.NoSuchElementException => shortName(x)
case x: java.lang.IllegalArgumentException => shortName(x)
}
-
+
def fn[T: Handler](body: => T): T = {
try body
catch implicitly[Handler[T]]
}
-
+
def f1 = {
implicit val myHandler = standardHandler
println(fn(Nil.head))
@@ -28,7 +28,7 @@ object Test {
def main(args: Array[String]): Unit = {
try f1
catch { case x => println(shortName(x) + " slipped by.") }
-
+
f2
}
}
diff --git a/test/files/run/primitive-sigs-2.scala b/test/files/run/primitive-sigs-2.scala
index b17305a033..b7152f7e3d 100644
--- a/test/files/run/primitive-sigs-2.scala
+++ b/test/files/run/primitive-sigs-2.scala
@@ -25,7 +25,7 @@ object Test {
val c1: Class[_] = classOf[T[_]]
val c2: Class[_] = classOf[C]
val c3: Class[_] = classOf[Arr]
-
+
val c1m = c1.getMethods.toList filter (_.getName == "f") map (_.getGenericReturnType.toString)
val c2m = c2.getMethods.toList filter (_.getName == "f") map (_.getGenericReturnType.toString)
val c3m = c3.getDeclaredMethods.toList map (_.toGenericString)
diff --git a/test/files/run/priorityQueue.scala b/test/files/run/priorityQueue.scala
index 327d8bf137..edc0e32b02 100644
--- a/test/files/run/priorityQueue.scala
+++ b/test/files/run/priorityQueue.scala
@@ -31,23 +31,23 @@ object Test {
// val pq2 = new PriorityQueue[String]
// val pq3 = new PriorityQueue[String]
// val pq4 = new PriorityQueue[String]
-
+
// val strings = (1 to 20).toList map (i => List.fill((Math.abs(nextInt % 20)) + 1)("x").mkString)
-
+
// pq1 ++= strings
// pq2 ++= strings.reverse
// for (s <- strings) pq3 += s
// for (s <- strings.reverse) pq4 += s
-
+
// val pqs = List(pq1, pq2, pq3, pq4, pq1.clone, pq2.clone)
-
+
// for (queue1 <- pqs ; queue2 <- pqs) {
// val l1: List[String] = queue1.dequeueAll[String, List[String]]
// val l2: List[String] = queue2.dequeueAll[String, List[String]]
// assert(l1 == l2)
// assert(queue1.max == queue2.max)
// }
-
+
// assertPriorityDestructive(pq1)
// }
@@ -83,7 +83,7 @@ object Test {
// }
// for (i <- 0 until 100) assert(intpq(i) == (99 - i))
// }
-
+
// def testTails {
// val pq = new PriorityQueue[Int]
// for (i <- 0 until 10) pq += i * 4321 % 200
@@ -108,13 +108,13 @@ object Test {
// prev = curr
// }
// }
-
+
// def testInits {
// val pq = new PriorityQueue[Long]
// for (i <- 0 until 20) pq += (i + 313) * 111 % 300
-
+
// assert(pq.size == 20)
-
+
// val initpq = pq.init
// assert(initpq.size == 19)
// assertPriorityDestructive(initpq)
@@ -123,19 +123,19 @@ object Test {
// def testFilters {
// val pq = new PriorityQueue[String]
// for (i <- 0 until 100) pq += "Some " + (i * 312 % 200)
-
+
// val filpq = pq.filter(_.indexOf('0') != -1)
// assertPriorityDestructive(filpq)
// }
// def testIntensiveEnqueueDequeue {
// val pq = new PriorityQueue[Int]
-
+
// testIntensive(1000, pq)
// pq.clear
// testIntensive(200, pq)
// }
-
+
// def testIntensive(sz: Int, pq: PriorityQueue[Int]) {
// val lst = new collection.mutable.ArrayBuffer[Int] ++ (0 until sz)
// val rand = new util.Random(7)
@@ -153,7 +153,7 @@ object Test {
// pq ++= (0 until 100)
// val droppq = pq.drop(50)
// assertPriority(droppq)
-
+
// pq.clear
// pq ++= droppq
// assertPriorityDestructive(droppq)
@@ -173,7 +173,7 @@ object Test {
// // assertPriority(pq)
// // pq.clear
-
+
// // pq ++= (1 to 100)
// // pq(5) = 200
// // assert(pq(0) == 200)
@@ -204,7 +204,7 @@ object Test {
// def testEquality {
// val pq1 = new PriorityQueue[Int]
// val pq2 = new PriorityQueue[Int]
-
+
// pq1 ++= (0 until 50)
// var i = 49
// while (i >= 0) {
@@ -213,7 +213,7 @@ object Test {
// }
// assert(pq1 == pq2)
// assertPriority(pq2)
-
+
// pq1 += 100
// assert(pq1 != pq2)
// pq2 += 100
@@ -230,7 +230,7 @@ object Test {
// val pq = new PriorityQueue[Int]
// pq ++= (0 until 100)
// assert(pq.size == 100)
-
+
// val (p1, p2) = pq.partition(_ < 50)
// assertPriorityDestructive(p1)
// assertPriorityDestructive(p2)
@@ -252,13 +252,13 @@ object Test {
// assert(pq.lastIndexWhere(_ == 9) == 0)
// assert(pq.lastIndexOf(8) == 1)
// assert(pq.lastIndexOf(7) == 2)
-
+
// pq += 5
// pq += 9
// assert(pq.lastIndexOf(9) == 1)
// assert(pq.lastIndexWhere(_ % 2 == 1) == 10)
// assert(pq.lastIndexOf(5) == 6)
-
+
// val lst = pq.reverseIterator.toList
// for (i <- 0 until 5) assert(lst(i) == i)
// assert(lst(5) == 5)
@@ -268,13 +268,13 @@ object Test {
// assert(lst(9) == 8)
// assert(lst(10) == 9)
// assert(lst(11) == 9)
-
+
// pq.clear
// assert(pq.reverseIterator.toList.isEmpty)
-
+
// pq ++= (50 to 75)
// assert(pq.lastIndexOf(70) == 5)
-
+
// pq += 55
// pq += 70
// assert(pq.lastIndexOf(70) == 6)
@@ -284,11 +284,11 @@ object Test {
// assert(pq.lastIndexWhere(_ > 54, 21) == 21)
// assert(pq.lastIndexWhere(_ > 69, 5) == 5)
// }
-
+
// def testReverse {
// val pq = new PriorityQueue[(Int, Int)]
// pq ++= (for (i <- 0 until 10) yield (i, i * i % 10))
-
+
// assert(pq.reverse.size == pq.reverseIterator.toList.size)
// assert((pq.reverse zip pq.reverseIterator.toList).forall(p => p._1 == p._2))
// assert(pq.reverse.sameElements(pq.reverseIterator.toSeq))
@@ -296,19 +296,19 @@ object Test {
// assert(pq.reverse(1)._1 == pq(8)._1)
// assert(pq.reverse(4)._1 == pq(5)._1)
// assert(pq.reverse(9)._1 == pq(0)._1)
-
+
// pq += ((7, 7))
// pq += ((7, 9))
// pq += ((7, 8))
// assert(pq.reverse.reverse == pq)
// assert(pq.reverse.lastIndexWhere(_._2 == 6) == 6)
// assertPriorityDestructive(pq.reverse.reverse)
-
+
// val iq = new PriorityQueue[Int]
// iq ++= (0 until 50)
// assert(iq.reverse == iq.reverseIterator.toSeq)
// assert(iq.reverse.reverse == iq)
-
+
// iq += 25
// iq += 40
// iq += 10
@@ -317,10 +317,10 @@ object Test {
// assert(iq.reverse.lastIndexWhere(_ == 10) == 11)
// assertPriorityDestructive(iq.reverse.reverse)
// }
-
+
// def testToList {
// val pq = new PriorityQueue[Int]
-
+
// pq += 1
// pq += 4
// pq += 0
@@ -330,16 +330,16 @@ object Test {
// assert(pq.toList == pq)
// assert(pq == List(5, 4, 3, 2, 1, 0))
// assert(pq.reverse == List(0, 1, 2, 3, 4, 5))
-
+
// pq.clear
// for (i <- -50 until 50) pq += i
// assert(pq.toList == pq)
// assert(pq.toList == (-50 until 50).reverse)
// }
-
+
// def testForeach {
// val pq = new PriorityQueue[Char]
-
+
// pq += 't'
// pq += 'o'
// pq += 'b'
@@ -351,7 +351,7 @@ object Test {
// assert(sbf.toString == sbi.toString)
// assert(sbf.toString == "ytob")
// }
-
+
}
diff --git a/test/files/run/private-inline.scala b/test/files/run/private-inline.scala
index 5181ac8ba3..a45300b026 100644
--- a/test/files/run/private-inline.scala
+++ b/test/files/run/private-inline.scala
@@ -2,7 +2,7 @@
final class A {
private var x1 = false
var x2 = false
-
+
// manipulates private var
@inline private def wrapper1[T](body: => T): T = {
val saved = x1
@@ -17,35 +17,35 @@ final class A {
try body
finally x2 = saved
}
-
+
// not inlined
def f1a() = wrapper1(5)
// inlined!
def f1b() = identity(wrapper1(5))
-
+
// not inlined
def f2a() = wrapper2(5)
// inlined!
- def f2b() = identity(wrapper2(5))
+ def f2b() = identity(wrapper2(5))
}
object Test {
def methodClasses = List("f1a", "f1b", "f2a", "f2b") map ("A$$anonfun$" + _ + "$1")
-
+
def main(args: Array[String]): Unit = {
val a = new A
import a._
println(f1a() + f1b() + f2a() + f2b())
-
+
// Don't know how else to test this: all these should have been
// inlined, so all should fail.
methodClasses foreach { clazz =>
-
+
val foundClass = (
try Class.forName(clazz)
catch { case _ => null }
)
-
+
assert(foundClass == null, foundClass)
}
}
diff --git a/test/files/run/programmatic-main.scala b/test/files/run/programmatic-main.scala
index 7fec0f3f98..7bc5c5dfcf 100644
--- a/test/files/run/programmatic-main.scala
+++ b/test/files/run/programmatic-main.scala
@@ -5,7 +5,7 @@ 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 = {
Console.withErr(Console.out) {
Main process (baseargs ++ "-Xpluginsdir /does/not/exist/foo/quux -Xshow-phases".split(' '))
diff --git a/test/files/run/proxy.scala b/test/files/run/proxy.scala
index 8a6385dc85..ea222cb496 100644
--- a/test/files/run/proxy.scala
+++ b/test/files/run/proxy.scala
@@ -1,16 +1,16 @@
object Test extends App {
val p = new Proxy {
- def self = 2
+ def self = 2
}
println(p equals 1)
println(p equals 2)
println(p equals 3)
println(p equals null)
-
+
case class Bippy(a: String) extends Proxy {
def self = a
}
-
+
val label = Bippy("bippy!")
println(label == label)
println(label == "bippy!")
diff --git a/test/files/run/range.scala b/test/files/run/range.scala
index 2dc0bae330..f08b2105d3 100644
--- a/test/files/run/range.scala
+++ b/test/files/run/range.scala
@@ -6,7 +6,7 @@ object Test {
range.foreach(buffer += _);
assert(buffer.toList == range.iterator.toList, buffer.toList+"/"+range.iterator.toList)
}
-
+
def boundaryTests() = {
// #4321
assert((Int.MinValue to Int.MaxValue by Int.MaxValue).size == 3)
@@ -17,31 +17,31 @@ object Test {
)
assert(caught)
}
-
+
case class GR[T](val x: T)(implicit val num: Integral[T]) {
import num._
-
+
def negated = GR[T](-x)
-
+
def gr1 = NumericRange(x, x, x)
def gr2 = NumericRange.inclusive(x, x, x)
def gr3 = NumericRange(x, x * fromInt(10), x)
def gr4 = NumericRange.inclusive(x, x * fromInt(10), x)
def gr5 = gr3.toList ::: negated.gr3.toList
-
+
def check = {
assert(gr1.isEmpty && !gr2.isEmpty)
- assert(gr3.size == 9 && gr4.size == 10)
+ assert(gr3.size == 9 && gr4.size == 10)
assert(gr5.sum == num.zero, gr5.toString)
assert(!(gr3 contains (x * fromInt(10))))
assert((gr4 contains (x * fromInt(10))))
}
}
-
+
def main(args: Array[String]): Unit = {
implicit val imp1 = Numeric.BigDecimalAsIfIntegral
implicit val imp2 = Numeric.DoubleAsIfIntegral
-
+
val _grs = List[GR[_]](
GR(BigDecimal(5.0)),
GR(BigInt(5)),
@@ -51,21 +51,21 @@ object Test {
)
val grs = _grs ::: (_grs map (_.negated))
grs foreach (_.check)
-
+
assert(NumericRange(1, 10, 1) sameElements (1 until 10))
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);
rangeForeach(10 until 1 by -1);
rangeForeach(10 to 1 by -3);
rangeForeach(10 until 1 by -3);
-
+
// living on the edges
boundaryTests()
}
diff --git a/test/files/run/records.scala b/test/files/run/records.scala
index c1dc7b67e8..96b0b4cb0f 100644
--- a/test/files/run/records.scala
+++ b/test/files/run/records.scala
@@ -16,10 +16,10 @@ object Test {
val y = new C {
def f = 2
def g = " world"
- }
-
+ }
+
val z: T = y
-
+
def main(args: Array[String]): Unit = {
assert(x.f+z.f == 3)
assert(x.g+z.g == "hello world")
diff --git a/test/files/run/repl-backticks.scala b/test/files/run/repl-backticks.scala
index 94e34d1438..11c58e18a1 100644
--- a/test/files/run/repl-backticks.scala
+++ b/test/files/run/repl-backticks.scala
@@ -1,18 +1,18 @@
-import scala.tools.nsc._
+import scala.tools.nsc._
object Test {
val testCode = <code>
import java.lang.Thread.`yield`
import scala.`package`.Throwable
-
- `yield`
+
+ `yield`
</code>.text
-
+
def main(args: Array[String]) = {
val settings = new Settings()
settings.classpath.value = System.getProperty("java.class.path")
val repl = new Interpreter(settings)
- repl.interpret(testCode)
+ repl.interpret(testCode)
}
}
diff --git a/test/files/run/repl-suppressed-warnings.scala b/test/files/run/repl-suppressed-warnings.scala
index a79131fb2f..a78b00f36e 100644
--- a/test/files/run/repl-suppressed-warnings.scala
+++ b/test/files/run/repl-suppressed-warnings.scala
@@ -20,7 +20,7 @@ object o {
}
case class DingDangDoobie(ding: Int, dang: Int, doobie: Double)
case class Dongoo
- @serializable case class Heyooooo
+ @serializable case class Heyooooo
@deprecated("I'm an ironic deprecation warning") def f0 = 5 // where's this disappearing?
def f1 = Double.Epsilon // and this?
diff --git a/test/files/run/run-bug4840.scala b/test/files/run/run-bug4840.scala
index dda280fd17..5f98bc9f4b 100644
--- a/test/files/run/run-bug4840.scala
+++ b/test/files/run/run-bug4840.scala
@@ -1,6 +1,6 @@
object Test {
def g(x: Boolean): Option[String] = if (x) Some("booya") else None
-
+
def f1() = {
for (x <- g(true)) yield {
g(false) match {
@@ -9,11 +9,11 @@ object Test {
}
}
}
-
+
def f2() = {
for (x <- g(true) ; y <- g(true) ; z <- g(true)) yield {
for (x <- g(true) ; y <- g(true) ; z <- g(true)) yield {
- g(true) map { _ =>
+ g(true) map { _ =>
(null: Any) match {
case Some(x: Int) => x
case _ => 5
@@ -21,7 +21,7 @@ object Test {
}
}
}
- }
+ }
def main(args: Array[String]): Unit = {
println(f1())
diff --git a/test/files/run/runtime-richChar.scala b/test/files/run/runtime-richChar.scala
index dceb70e74d..cf18a1d302 100644
--- a/test/files/run/runtime-richChar.scala
+++ b/test/files/run/runtime-richChar.scala
@@ -5,19 +5,19 @@ object Test extends App {
else
println(name + " failed: " + expected + " differs from " + got)
}
-
+
testSeq("'a' to 'c'", List('a', 'b', 'c'), 'a' to 'c')
testSeq("'a' until 'c'", List('a', 'b'), 'a' until 'c')
-
+
testSeq("'a' to 'b'", List('a', 'b'), 'a' to 'b')
testSeq("'a' until 'b'", List('a'), 'a' until 'b')
-
+
testSeq("'a' to 'a'", List('a'), 'a' to 'a')
testSeq("'a' until 'a'", List(), 'a' until 'a')
-
+
testSeq("'b' to 'a'", List(), 'b' to 'a')
testSeq("'b' until 'a'", List(), 'b' until 'a')
-
+
testSeq("'c' to 'a'", List(), 'c' to 'a')
testSeq("'c' until 'a'", List(), 'c' until 'a')
}
diff --git a/test/files/run/scan.scala b/test/files/run/scan.scala
index 47e0a7d976..f056c77ba1 100644
--- a/test/files/run/scan.scala
+++ b/test/files/run/scan.scala
@@ -6,17 +6,17 @@ 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))
}
diff --git a/test/files/run/seqlike-kmp.scala b/test/files/run/seqlike-kmp.scala
index af39fda9af..514990cfa2 100644
--- a/test/files/run/seqlike-kmp.scala
+++ b/test/files/run/seqlike-kmp.scala
@@ -2,7 +2,7 @@ object Test {
val source = 0 to 99
val idxes = (-1 to 2) ++ (97 to 100)
def str(xs: Seq[Int]) = xs.mkString("(", ", ", ")")
-
+
def f(tgt: Seq[Int]) = {
println("indexOfSlice")
// the first index `>= from` such that...
@@ -17,11 +17,11 @@ object Test {
println(" %s with idx <= %d = %d".format(str(tgt), x, res))
}
}
-
+
def g(idx: Int, len: Int) = {
f(source.slice(idx, idx + len))
}
-
+
def main(args: Array[String]): Unit = {
g(97, 1)
g(97, 2)
diff --git a/test/files/run/sequenceComparisons.scala b/test/files/run/sequenceComparisons.scala
index c2f7ddc697..5d7958bc7e 100644
--- a/test/files/run/sequenceComparisons.scala
+++ b/test/files/run/sequenceComparisons.scala
@@ -2,12 +2,12 @@ import scala.collection.{ mutable, immutable }
import collection.{ Seq, Traversable }
object Test {
- // TODO:
+ // TODO:
//
// SeqProxy
// SeqForwarder
// the commented out ones in seqMakers
-
+
val seqMakers = List[List[Int] => Seq[Int]](
// scala.Array(_: _*),
mutable.ArrayBuffer(_: _*),
@@ -23,13 +23,13 @@ object Test {
immutable.Seq(_: _*),
mutable.Seq(_: _*),
immutable.Stack(_: _*),
- // mutable.Stack(_: _*),
+ // mutable.Stack(_: _*),
immutable.IndexedSeq(_: _*), // was Vector
//mutable.Vector(_: _*),
immutable.List(_: _*),
immutable.Stream(_: _*)
)
-
+
abstract class Data[T] {
val seq: Seq[T]
private def seqList = seq.toList
@@ -45,50 +45,50 @@ object Test {
}
lazy val eqeq = Method(_ == _, (List(seqList), List(Nil, seqList drop 1, seqList ::: seqList)), "%s == %s")
-
+
val startsWithInputs: Inputs
lazy val startsWith = Method(_ startsWith _, startsWithInputs, "%s startsWith %s")
-
+
val endsWithInputs: Inputs
lazy val endsWith = Method(_ endsWith _, endsWithInputs, "%s endsWith %s")
val indexOfSliceInputs: Inputs
private def subseqTest(s1: Seq[T], s2: Seq[T]) = (s1 indexOfSlice s2) != -1
lazy val indexOfSlice = Method(subseqTest _, indexOfSliceInputs, "(%s indexOfSlice %s) != -1")
-
+
val sameElementsInputs: Inputs
lazy val sameElements = Method(_ sameElements _, sameElementsInputs, "%s sameElements %s")
-
+
def methodList = List(eqeq, startsWith, endsWith, indexOfSlice, sameElements)
}
-
+
object test1 extends Data[Int] {
val seq = List(1,2,3,4,5)
-
+
val startsWithInputs = (
List(Nil, List(1), List(1,2), seq),
List(List(1,2,3,4,6), seq ::: List(5), List(0))
)
-
+
val endsWithInputs = (
List(Nil, List(5), List(4,5), seq),
List(0 :: seq, List(5,2,3,4,5), List(3,4), List(5,6))
)
-
+
val indexOfSliceInputs = (
List(Nil, List(1), List(3), List(5), List(1,2), List(2,3,4), List(4,5), seq),
List(List(1,2,3,5), List(6), List(5,4,3,2,1), List(2,1))
)
-
+
val sameElementsInputs = (
List(List(1,2,3,4,5)),
List(Nil, List(1), List(1,2), List(2,3,4), List(2,3,4,5), List(2,3,4,5,1), List(1,2,3,5,4), seq reverse)
)
}
-
+
val failures = new mutable.ListBuffer[String]
var testCount = 0
-
+
def assertOne(op1: Any, op2: Any, res: Boolean, str: String) {
testCount += 1
val resStr = str.format(op1, op2)
@@ -97,25 +97,25 @@ object Test {
failures += ("FAIL: " + resStr)
// assert(res, resStr)
}
-
+
def runSeqs() = {
for (s1f <- seqMakers ; s2f <- seqMakers ; testData <- List(test1)) {
import testData._
val scrut = s1f(seq)
-
+
for (Method(f, (trueList, falseList), descr) <- methodList) {
for (s <- trueList; rhs = s2f(s))
assertOne(scrut, rhs, f(scrut, rhs), descr)
-
+
for (s <- falseList; rhs = s2f(s))
assertOne(scrut, rhs, !f(scrut, rhs), "!(" + descr + ")")
}
}
}
-
+
def main(args: Array[String]) {
runSeqs()
-
+
assert(failures.isEmpty, failures mkString "\n")
}
}
diff --git a/test/files/run/serialize-stream.scala b/test/files/run/serialize-stream.scala
index 3ab9f2df34..e424d5b629 100644
--- a/test/files/run/serialize-stream.scala
+++ b/test/files/run/serialize-stream.scala
@@ -5,13 +5,13 @@ object Test {
val bos = new java.io.ByteArrayOutputStream()
val oos = new java.io.ObjectOutputStream(bos)
oos.writeObject(s)
-
+
val ois = new java.io.ObjectInputStream(new java.io.ByteArrayInputStream(bos.toByteArray))
val obj = ois.readObject()
println(obj)
println(obj.asInstanceOf[Seq[T]].toList)
}
-
+
def main(args: Array[String]) {
ser(Stream(1, 2, 3))
ser(Stream(1))
diff --git a/test/files/run/slice-strings.scala b/test/files/run/slice-strings.scala
index 129314387a..23085866f5 100644
--- a/test/files/run/slice-strings.scala
+++ b/test/files/run/slice-strings.scala
@@ -1,7 +1,7 @@
-object Test {
+object Test {
def cmp(x1: String) = {
val x2 = x1.toList
-
+
-10 to 10 foreach { i =>
assert(x1.take(i) == x2.take(i).mkString)
assert(x1.drop(i) == x2.drop(i).mkString)
@@ -12,7 +12,7 @@ object Test {
assert(x1.slice(idx1, idx2) == x2.slice(idx1, idx2).mkString)
}
}
-
+
def main(args: Array[String]): Unit = {
cmp("abcde")
}
diff --git a/test/files/run/streamWithFilter.scala b/test/files/run/streamWithFilter.scala
index cb919d4f55..7f8f9a09d2 100644
--- a/test/files/run/streamWithFilter.scala
+++ b/test/files/run/streamWithFilter.scala
@@ -4,7 +4,7 @@ object Test {
def isBuzz(x: Int) = x % 5 == 0
// next line will run forever if withFilter isn't doing its thing.
val fizzbuzzes = for (n <- nums ; if isFizz(n) ; if isBuzz(n)) yield n
-
+
def main(args: Array[String]): Unit = {
fizzbuzzes take 5 foreach println
}
diff --git a/test/files/run/streams.scala b/test/files/run/streams.scala
index edf7ae368e..51b4e5d76c 100644
--- a/test/files/run/streams.scala
+++ b/test/files/run/streams.scala
@@ -29,7 +29,7 @@ object Test extends App {
def powers(x: Int) = if ((x&(x-1)) == 0) Some(x) else None
println(s3.flatMap(powers).reverse.head)
- // large enough to generate StackOverflows (on most systems)
+ // large enough to generate StackOverflows (on most systems)
// unless the following methods are tail call optimized.
val size = 100000
diff --git a/test/files/run/stringbuilder.scala b/test/files/run/stringbuilder.scala
index cc3eb032dc..ef85fc02a6 100644
--- a/test/files/run/stringbuilder.scala
+++ b/test/files/run/stringbuilder.scala
@@ -1,21 +1,21 @@
object Test extends App {
val str = "ABCDEFGHIJKLMABCDEFGHIJKLM"
val surrogateStr = "an old Turkic letter: \uD803\uDC22"
-
- type SB = {
+
+ type SB = {
def indexOf(str: String): Int
def indexOf(str: String, fromIndex: Int): Int
def lastIndexOf(str: String): Int
def lastIndexOf(str: String, fromIndex: Int): Int
}
-
+
import scala.collection.mutable.{ StringBuilder => ScalaStringBuilder }
import java.lang.{ StringBuilder => JavaStringBuilder }
-
+
val sbScala = new ScalaStringBuilder() append str
val sbJava = new JavaStringBuilder() append str
val sbs: List[SB] = List[SB](sbScala, sbJava)
-
+
def sameAnswers(f: (SB) => Int) = assert(f(sbScala) == f(sbJava))
sameAnswers(_.indexOf(""))
@@ -31,10 +31,10 @@ object Test extends App {
sameAnswers(_.lastIndexOf("QZV"))
sameAnswers(_.lastIndexOf("GHI", 22))
sameAnswers(_.lastIndexOf("KLM", 22))
-
+
// testing that the "reverse" implementation avoids reversing surrogate pairs
val jsb = new JavaStringBuilder(surrogateStr) reverse
val ssb = new ScalaStringBuilder(surrogateStr) reverseContents ;
-
+
assert(jsb.toString == ssb.toString)
}
diff --git a/test/files/run/structural.scala b/test/files/run/structural.scala
index 97627b8da1..36af8c4bfc 100644
--- a/test/files/run/structural.scala
+++ b/test/files/run/structural.scala
@@ -1,18 +1,18 @@
object test1 {
-
+
val o1 = new Object { override def toString = "ohone" }
val o2 = new Object { override def toString = "ohtwo" }
-
+
val t1 = new Tata("tieone")
val t2 = new Tata("tietwo")
-
+
class Tata(name: String) {
override def toString = name
def tatMe = "oy"
}
-
+
class Titi extends Tata("titi")
-
+
object Rec {
val a = 1
val b = 2
@@ -41,7 +41,7 @@ object test1 {
val y: Tata = null
def z(t: Tata) = ()
}
-
+
type rt = Object {
val a: Int;
val c: String;
@@ -65,7 +65,7 @@ object test1 {
var v: Int
val y: Tata
}
-
+
def l (r: rt) {
println(" 1. " + r.c)
println(" 2. " + r.a + 1)
@@ -94,33 +94,33 @@ object test1 {
println("25. " + r.y)
println("26. " + r.e(null))
}
-
+
/*def ma[T](r: Object{def e(x: T): T; val x: T}) {
println("30. " + r.e(r.x)) // static error
}*/
-
+
def mb(r: Object { def e[T](x: T): T }) {
println("31. " + r.e[Int](4)) // while this is ok
}
-
+
def m1(r: Object { def z(x: Tata): Unit }) {
println("32. " + r.z(new Titi)) // while this is ok
}
-
+
def m2[T](r: Object { def e(x: Tata): T; val x: Tata }) {
println("33. " + r.e(r.x)) // and this too
}
-
+
class Rec3[T] {
def e(x: T): T = x
}
-
+
def m3[T](r: Rec3[T], x: T) {
println("33. " + r.e(x)) // and this too
}
-
+
Rec.g(11)
-
+
this.l(Rec)
this.mb(new Object{def e[T](x: T): T = x})
this.m1(Rec)
@@ -132,7 +132,7 @@ object test2 {
class C extends { def f() { println("1") } }
val x1 = new C
x1.f()
-
+
abstract class D extends { def f() }
val x2 = new D { def f() { println("2") } }
x2.f()
@@ -153,11 +153,11 @@ object test2 {
object test3 {
case class Exc extends Exception
-
+
object Rec {
def f = throw Exc()
}
-
+
def m(r: { def f: Nothing }) =
try {
r.f
@@ -166,31 +166,31 @@ object test3 {
case e: Exc => println("caught")
case e => println(e)
}
-
+
m(Rec)
-
+
}
object test4 {
class A
-
+
val aar = Array(new A, new A, new A)
val nar = Array(1, 2)
-
+
def f(p: {def size: Int}) = println(p.size)
//def g[T <: {def size: Int}](p: T) = println(p.size) // open issue
//def h[T <% {def size: Int}](p: T) = println(p.size) // open issue
-
+
f(aar)
f(nar)
-
+
//g(aar)
//g(nar)
-
+
//h(aar)
//h(nar)
-
+
}
object Test extends App {
diff --git a/test/files/run/sysprops.scala b/test/files/run/sysprops.scala
index bdad677221..4d98e2cdd0 100644
--- a/test/files/run/sysprops.scala
+++ b/test/files/run/sysprops.scala
@@ -3,16 +3,16 @@ import sys._
/** Basic sys.Prop test. */
object Test {
val key = "ding.dong.doobie"
-
+
def bool() = {
val prop = BooleanProp.valueIsTrue(key)
assert(prop.key == key)
-
+
prop.clear()
assert(!prop.value)
assert(!prop.isSet)
assert(prop.get != null)
-
+
prop set "dingus"
assert(prop.get == "dingus")
assert(!prop.value)
@@ -32,7 +32,7 @@ object Test {
prop.set("523")
assert(prop.value == 523)
prop.set("DingusInt")
-
+
try { println(prop.value) ; assert(false, "should not get here") }
catch { case _: Exception => () }
}
@@ -41,7 +41,7 @@ object Test {
prop.set("55.0")
assert(prop.value == 55.0)
}
-
+
def main(args: Array[String]): Unit = {
bool()
int()
diff --git a/test/files/run/t0017.scala b/test/files/run/t0017.scala
index 245cbb7e42..e976f453d8 100644
--- a/test/files/run/t0017.scala
+++ b/test/files/run/t0017.scala
@@ -7,7 +7,7 @@ def transpose[A](arr: Array[Array[A]]) = {
var my_arr = Array(Array(1,2),Array(3,4))
-for (i <- Array.range(0, my_arr(0).length)) yield
+for (i <- Array.range(0, my_arr(0).length)) yield
for (row <- my_arr) yield row(i)
val transposed = transpose(my_arr)
diff --git a/test/files/run/t0325.scala b/test/files/run/t0325.scala
index 236f1b101f..92331ab05f 100644
--- a/test/files/run/t0325.scala
+++ b/test/files/run/t0325.scala
@@ -7,7 +7,7 @@ case class RS(self: String) {
}
def split(separator: Char): Array[String] = self.split(escape(separator))
-
+
def split(separators: Array[Char]): Array[String] = {
val re = separators.foldLeft("[")(_+escape(_)) + "]"
self.split(re)
@@ -27,7 +27,7 @@ object Test {
case e@_ => println(which + " failed with " + e.getClass)
}
}
-
+
def main(args: Array[String]) {
val badChars = "?*{+([\\^.$"
@@ -46,8 +46,8 @@ object Test {
for ((c,str) <- badCases)
test(("a"+c+"b").split(str.toArray),"RichString split(\""+ str + "\")")
println
-
+
for ((c,str) <- badCases)
- test(RS("a"+c+"b").split(str.toArray),"RS split(\""+ str + "\")")
+ test(RS("a"+c+"b").split(str.toArray),"RS split(\""+ str + "\")")
}
}
diff --git a/test/files/run/t0421.scala b/test/files/run/t0421.scala
index 62be08c0fe..8d51013924 100644
--- a/test/files/run/t0421.scala
+++ b/test/files/run/t0421.scala
@@ -7,17 +7,17 @@ object Test extends App {
}
def scalprod(xs: Array[Double], ys: Array[Double]) = {
- var acc = 0.0
- for ((x, y) <- xs zip ys) acc = acc + x * y
+ var acc = 0.0
+ for ((x, y) <- xs zip ys) acc = acc + x * y
acc
}
def matmul(xss: Array[Array[Double]], yss: Array[Array[Double]]) = {
- val ysst = transpose(yss)
+ val ysst = transpose(yss)
val ysst1: Array[Array[Double]] = yss.transpose
assert(ysst.deep == ysst1.deep)
for (xs <- xss) yield
- for (yst <- ysst) yield
+ for (yst <- ysst) yield
scalprod(xs, yst)
}
@@ -25,6 +25,6 @@ object Test extends App {
println(transpose(a1).deep.mkString("[", ",", "]"))
println(matmul(Array(Array(2, 3)), Array(Array(5), Array(7))).deep.mkString("[", ",", "]"))
-
+
println(matmul(Array(Array(4)), Array(Array(6, 8))).deep.mkString("[", ",", "]"))
}
diff --git a/test/files/run/t0508.scala b/test/files/run/t0508.scala
index 2283c46c36..0f4325e629 100644
--- a/test/files/run/t0508.scala
+++ b/test/files/run/t0508.scala
@@ -9,5 +9,5 @@ object Test extends App {
}
}
- foo(Foo.unapply, Foo("this might be fun", 10))
+ foo(Foo.unapply, Foo("this might be fun", 10))
}
diff --git a/test/files/run/t0631.scala b/test/files/run/t0631.scala
index c401ed31cb..5bceab6193 100644
--- a/test/files/run/t0631.scala
+++ b/test/files/run/t0631.scala
@@ -1,5 +1,5 @@
object Test extends App {
- class Foo {
+ class Foo {
override def equals(that: Any) = {
println("Foo.equals called")
super.equals(that)
diff --git a/test/files/run/t0677.scala b/test/files/run/t0677.scala
index 131fcc24a6..6c8a3a7e99 100644
--- a/test/files/run/t0677.scala
+++ b/test/files/run/t0677.scala
@@ -1,5 +1,5 @@
object Test extends App {
- class X[T: ClassManifest] {
+ class X[T: ClassManifest] {
val a = Array.ofDim[T](3, 4)
}
val x = new X[String]
diff --git a/test/files/run/t0807.scala b/test/files/run/t0807.scala
index 1e2a26664a..1a1add6b3a 100644
--- a/test/files/run/t0807.scala
+++ b/test/files/run/t0807.scala
@@ -1,5 +1,5 @@
trait A
-trait B extends A { val x = println("early") }
+trait B extends A { val x = println("early") }
object Test extends App {
new B {}
}
diff --git a/test/files/run/t0883.scala b/test/files/run/t0883.scala
index c8ed06dbfe..adde95197b 100644
--- a/test/files/run/t0883.scala
+++ b/test/files/run/t0883.scala
@@ -1,14 +1,14 @@
object Foo { def apply(x: String) = new Foo(x) }
class Foo(name: String)
case object Bar extends Foo("Bar")
-case class Baz() extends Foo("Baz")
+case class Baz() extends Foo("Baz")
object Test extends App {
- Foo("Bar") match {
- case Bar => println("What?")
+ Foo("Bar") match {
+ case Bar => println("What?")
case _ => println("OK")
}
- Foo("Baz") match {
- case Baz() => println("What?")
+ Foo("Baz") match {
+ case Baz() => println("What?")
case _ => println("OK")
- }
+ }
}
diff --git a/test/files/run/t1005.scala b/test/files/run/t1005.scala
index 5ccd89dd85..60129bcc51 100644
--- a/test/files/run/t1005.scala
+++ b/test/files/run/t1005.scala
@@ -10,7 +10,7 @@ object Test
object FromPoly{
def main(args : Array[String]) = (new Bar[AnyRef](Array[AnyRef]("Halp!"))).bar
}
-
+
def main(args: Array[String]): Unit = {
println(FromMono main null mkString)
println(FromPoly main null mkString)
diff --git a/test/files/run/t1141.scala b/test/files/run/t1141.scala
index 9641343c7e..ee4f2e7fd2 100644
--- a/test/files/run/t1141.scala
+++ b/test/files/run/t1141.scala
@@ -2,6 +2,6 @@ object Test extends App {
val foo = new {
def apply(args : String*) = args foreach println
}
-
+
foo("var", "args")
}
diff --git a/test/files/run/t1167.scala b/test/files/run/t1167.scala
index 3dd0a30c00..c2ec4cff4e 100644
--- a/test/files/run/t1167.scala
+++ b/test/files/run/t1167.scala
@@ -10,17 +10,17 @@ trait Test1 {
/* getName
* Returns the binary name of the class if this class object represents a
- * reference type that is not an array type.
+ * reference type that is not an array type.
* getSimpleName
* Returns the simple name of the underlying class as given in the source
* code. Returns an empty string if the underlying class is anonymous.
*/
abstract class Foo {
override def toString = getClass.getSimpleName
-
+
abstract class Bar {
override def toString = getClass.getSimpleName
- }
+ }
}
object Test extends App {
diff --git a/test/files/run/t1220.scala b/test/files/run/t1220.scala
index 75e0ea07e8..0ba188d02d 100644
--- a/test/files/run/t1220.scala
+++ b/test/files/run/t1220.scala
@@ -1,7 +1,7 @@
object Test extends App {
class QSRichIterable[A](self: Iterable[A]) {
- def filterMap[R](f: PartialFunction[A,R]) =
+ def filterMap[R](f: PartialFunction[A,R]) =
self filter (f.isDefinedAt) map f
}
diff --git a/test/files/run/t1300.scala b/test/files/run/t1300.scala
index aa3580e33c..ce2f80eb4e 100644
--- a/test/files/run/t1300.scala
+++ b/test/files/run/t1300.scala
@@ -4,10 +4,10 @@ object Test extends App
// val a1 = x1.toArray[Any]
val a2 = Array('a','b','c','d').toArray[Any]
val a3 = Array("e","f","g","h").toArray[Any]
-
+
Array.copy(a3, 0, a1, 0, 4)
Array.copy(a2, 0, a3, 0, 4)
Array.copy(a2, 0, a1, 0, 4)
-
+
println(a1.mkString + a2.mkString + a3.mkString)
}
diff --git a/test/files/run/t1309.scala b/test/files/run/t1309.scala
index 84963549a2..b6a75fe6ae 100644
--- a/test/files/run/t1309.scala
+++ b/test/files/run/t1309.scala
@@ -1,6 +1,6 @@
object Test {
def f(ras: => IndexedSeq[Byte]): IndexedSeq[Byte] = ras
-
+
def main(args: Array[String]): Unit = {
f(new Array[Byte](0))
}
diff --git a/test/files/run/t1323.scala b/test/files/run/t1323.scala
index 94b51bd2a4..8209b85219 100644
--- a/test/files/run/t1323.scala
+++ b/test/files/run/t1323.scala
@@ -3,9 +3,9 @@ object Test extends App {
println(" 2:" + List(1,2,3,4).indexOfSlice(List(1,2))) // 0
println(" 3:" + List(1,2,3,4).indexOfSlice(List(2,3))) // 1
println(" 4:" + List(1,2,3,4).indexOfSlice(List(3,4))) // 2
- println(" 5:" + List(1,2,3,4).indexOfSlice(List(4,5))) // -1
+ println(" 5:" + List(1,2,3,4).indexOfSlice(List(4,5))) // -1
println(" 6:" + List(1,2,3,4).indexOfSlice(List(2,4))) // -1
- println(" 7:" + List(1,2,3,4).indexOfSlice(List(4,3))) // -1
+ println(" 7:" + List(1,2,3,4).indexOfSlice(List(4,3))) // -1
println(" 8:" + List(1,2,3,4).indexOfSlice(List(1,3))) // -1
println(" 9:" + List(1,2,3,4).indexOfSlice(List(1,3))) // -1
println("10:" + List(1,2,3,4).indexOfSlice(List(1,2,3,4))) // 0
diff --git a/test/files/run/t1333.scala b/test/files/run/t1333.scala
index 1696629cbb..514b4ffc8a 100644
--- a/test/files/run/t1333.scala
+++ b/test/files/run/t1333.scala
@@ -1,11 +1,11 @@
object Test {
case class A(x: Int)(y: Int)(z: String)
-
+
def f(x: Any) = x match {
case A(x) => x
case _ => -1
}
-
+
def main(args: Array[String]): Unit = {
println(f(A(10)(20)("abc")))
println(f(A(-10)(20)("abc")))
diff --git a/test/files/run/t1423.scala b/test/files/run/t1423.scala
index 073483aeee..44c6653287 100644
--- a/test/files/run/t1423.scala
+++ b/test/files/run/t1423.scala
@@ -5,4 +5,4 @@ object Test extends App{
case 1L => println(1);
case _ => println("????");
}
-}
+}
diff --git a/test/files/run/t1427.scala b/test/files/run/t1427.scala
index ab0a42c7b7..21bd71ffef 100644
--- a/test/files/run/t1427.scala
+++ b/test/files/run/t1427.scala
@@ -9,7 +9,7 @@ object Test {
def main(args: Array[String]): Unit = {
val x = new Bob[List]
val results = List(x, new Bob[Set], 55) map (x foo _)
-
+
assert(results == List(true, true, false))
}
}
diff --git a/test/files/run/t1500.scala b/test/files/run/t1500.scala
index ce6278cd05..c312a9a883 100644
--- a/test/files/run/t1500.scala
+++ b/test/files/run/t1500.scala
@@ -1,23 +1,23 @@
-import scala.tools.nsc._
+import scala.tools.nsc._
object Test {
-
+
/**
* Type inference overlooks constraints posed by type parameters in annotations on types.
*/
-
+
val testCode = <code>
-
+
class posingAs[A] extends TypeConstraint
-
+
def resolve[A,B](x: A @posingAs[B]): B = x.asInstanceOf[B]
-
+
val x = resolve(7: @posingAs[Any])
-
+
</code>.text
-
+
def main(args: Array[String]) = {
-
+
val settings = new Settings()
settings.classpath.value = System.getProperty("java.class.path")
val tool = new Interpreter(settings)
@@ -35,11 +35,11 @@ object Test {
}
}
-
+
global.addAnnotationChecker(checker)
-
+
tool.interpret(testCode)
-
+
}
}
diff --git a/test/files/run/t1501.scala b/test/files/run/t1501.scala
index f1eb8f287d..05e4da8c7a 100644
--- a/test/files/run/t1501.scala
+++ b/test/files/run/t1501.scala
@@ -1,15 +1,15 @@
-import scala.tools.nsc._
+import scala.tools.nsc._
object Test {
-
+
/**
* ...
*/
-
+
val testCode = <code>
-
+
class xyz[A] extends TypeConstraint
-
+
def loopWhile[T](cond: =>Boolean)(body: =>(Unit @xyz[T])): Unit @ xyz[T] = {{
if (cond) {{
body
@@ -24,9 +24,9 @@ object Test {
(): @xyz[Int]
}}
}}
-
+
</code>.text
-
+
def main(args: Array[String]) = {
val settings = new Settings()
settings.classpath.value = System.getProperty("java.class.path")
@@ -45,11 +45,11 @@ object Test {
}
}
-
+
global.addAnnotationChecker(checker)
-
+
tool.interpret(testCode)
-
+
}
}
diff --git a/test/files/run/t1537.scala b/test/files/run/t1537.scala
index 1dce501990..ddbfb29ac4 100644
--- a/test/files/run/t1537.scala
+++ b/test/files/run/t1537.scala
@@ -4,15 +4,15 @@ trait Syntax {
trait Evaluation {
val syntax: Syntax
-
+
def equalInTrait = this.syntax.Foo == this.syntax.Foo
}
object Test extends Evaluation with App {
- object syntax extends Syntax
+ object syntax extends Syntax
def equalInObject = this.syntax.Foo == this.syntax.Foo
-
+
println(equalInTrait)
println(equalInObject)
}
diff --git a/test/files/run/t1591.scala b/test/files/run/t1591.scala
index 6dd9605042..bd43f0b23d 100644
--- a/test/files/run/t1591.scala
+++ b/test/files/run/t1591.scala
@@ -1,8 +1,8 @@
abstract class A {
-
+
lazy val lazyBar = bar
-
- object bar {
+
+ object bar {
val foo = 12
}
diff --git a/test/files/run/t1718.scala b/test/files/run/t1718.scala
index d1b19c38cd..358bd1be5a 100644
--- a/test/files/run/t1718.scala
+++ b/test/files/run/t1718.scala
@@ -1,10 +1,10 @@
object Test extends App{
- def matchesNull[T](mightBeNull: Array[T]): Boolean = mightBeNull match {
+ def matchesNull[T](mightBeNull: Array[T]): Boolean = mightBeNull match {
case null => true
case x => false
}
val nullArray: Array[String] = null
- println(matchesNull(nullArray))
+ println(matchesNull(nullArray))
}
diff --git a/test/files/run/t1766.scala b/test/files/run/t1766.scala
index 638384d4f9..2afd883755 100644
--- a/test/files/run/t1766.scala
+++ b/test/files/run/t1766.scala
@@ -1,16 +1,16 @@
object Test extends App {
-
+
class C(s: String) {
-
+
def this(i: Int) = this("bar")
-
+
def f = {
val v: { def n: Int } = new { val n = 3 }
v.n
}
-
+
}
-
+
new C("foo").f
-
+
}
diff --git a/test/files/run/t1773.scala b/test/files/run/t1773.scala
index 7c95df62f8..c50b62512f 100644
--- a/test/files/run/t1773.scala
+++ b/test/files/run/t1773.scala
@@ -7,6 +7,6 @@ object Test extends App
<a>{""}</a>,
<a>{ if (true) "" else "I like turtles" }</a>
)
-
+
for (x1 <- xs; x2 <- xs) assert (x1 xml_== x2)
}
diff --git a/test/files/run/t1829.scala b/test/files/run/t1829.scala
index 8240527424..7c39d33ae9 100644
--- a/test/files/run/t1829.scala
+++ b/test/files/run/t1829.scala
@@ -1,6 +1,6 @@
object Test{
def main(args : Array[String]){
- import scala.collection.immutable._
+ import scala.collection.immutable._
assert(IntMap.empty == HashMap.empty);
assert(HashMap.empty == IntMap.empty);
assert(LongMap.empty == HashMap.empty);
diff --git a/test/files/run/t2029.scala b/test/files/run/t2029.scala
index 32b04f0b47..1cbe97a350 100644
--- a/test/files/run/t2029.scala
+++ b/test/files/run/t2029.scala
@@ -3,10 +3,10 @@ object Test{
import scala.collection.immutable.TreeSet;
val mainSet = TreeSet(1 to 5 :_*)
-
+
var compareCalled = false;
val smallerSet = TreeSet(2 to 4 :_*)(Ordering[Int].reverse)
-
+
println(mainSet.mkString(","))
println(smallerSet.mkString(","))
println(smallerSet.subsetOf(mainSet));
diff --git a/test/files/run/t2074_2.scala b/test/files/run/t2074_2.scala
index 4624170f89..1f59e0b8a1 100644
--- a/test/files/run/t2074_2.scala
+++ b/test/files/run/t2074_2.scala
@@ -12,7 +12,7 @@ object Test {
def iterator = underlying.iterator
}
val w = IndexedSeq(1, 2, 3).view
-
+
def main(args: Array[String]): Unit = {
println(v)
println(w)
diff --git a/test/files/run/t2087-and-2400.scala b/test/files/run/t2087-and-2400.scala
index 19a5df26e3..93cd633ffb 100644
--- a/test/files/run/t2087-and-2400.scala
+++ b/test/files/run/t2087-and-2400.scala
@@ -3,14 +3,14 @@ object Test
def negativeCharMaker = new (Short => Char) { def apply(x: Short) = x.toChar }
def main(args: Array[String]): Unit = {
// throws exception if -100 gets to Character.valueOf
- val x = negativeCharMaker(-100)
-
+ val x = negativeCharMaker(-100)
+
// chars are unsigned, they should never be equal to negative values
assert((-100).toShort != (-100).toChar)
assert((-100).toChar != (-100).toShort)
assert((-100).toChar != (-100).toByte)
assert((-100).toByte != (-100).toChar)
-
+
// BoxesRunTime must agree as well
assert(((-100).toShort: Any) != (-100).toChar)
assert(((-100).toChar: Any) != (-100).toShort)
diff --git a/test/files/run/t2124.scala b/test/files/run/t2124.scala
index e72deb09bc..a4fd654d76 100644
--- a/test/files/run/t2124.scala
+++ b/test/files/run/t2124.scala
@@ -9,7 +9,7 @@ object Test {
println(new RuleTransformer(new RewriteRule {
- override def transform(n: Node): NodeSeq = {
+ override def transform(n: Node): NodeSeq = {
val result = n match {
case <t>{_*}</t> => <q/>
diff --git a/test/files/run/t2125.scala b/test/files/run/t2125.scala
index 8314e4f019..a10ed9827b 100644
--- a/test/files/run/t2125.scala
+++ b/test/files/run/t2125.scala
@@ -5,11 +5,11 @@ import scala.xml.transform._
object Test {
val sampleXml = <xml:group><p><lost/><t><s><r></r></s></t></p></xml:group>
-
+
def main(args: scala.Array[String]) {
println(new RuleTransformer(new RewriteRule {
- override def transform(n: Node): NodeSeq = {
+ override def transform(n: Node): NodeSeq = {
val result = n match {
diff --git a/test/files/run/t2276.scala b/test/files/run/t2276.scala
index ed5714e9fa..f0404e5fab 100644
--- a/test/files/run/t2276.scala
+++ b/test/files/run/t2276.scala
@@ -2,7 +2,7 @@ import scala.xml._
import scala.xml.transform._
object Test extends App {
- val inputXml : Node =
+ val inputXml : Node =
<root>
<subnode>
<version>1</version>
diff --git a/test/files/run/t2308a.scala b/test/files/run/t2308a.scala
index fff158c772..abb568064a 100644
--- a/test/files/run/t2308a.scala
+++ b/test/files/run/t2308a.scala
@@ -1,7 +1,7 @@
object Test {
trait T[M[_]]
-
+
def f1 = classOf[T[X] forSome { type X[_] } ]
-
+
def main(args: Array[String]): Unit = println(f1)
}
diff --git a/test/files/run/t2354.scala b/test/files/run/t2354.scala
index f46db13a95..5419911ac3 100644
--- a/test/files/run/t2354.scala
+++ b/test/files/run/t2354.scala
@@ -8,7 +8,7 @@ object Test
val parser1 = ConstructingParser.fromSource(Source.fromString(xml_good),false)
val parser2 = ConstructingParser.fromSource(Source.fromString(xml_bad),false)
-
+
def main(args: Array[String]): Unit = {
parser1.document
parser2.document
diff --git a/test/files/run/t2417.scala b/test/files/run/t2417.scala
index 6200e33025..2d0bc2d405 100644
--- a/test/files/run/t2417.scala
+++ b/test/files/run/t2417.scala
@@ -1,6 +1,6 @@
// #2417
object Test {
-
+
def parallel(numThreads: Int)(block: => Unit) {
var failure: Throwable = null
val threads = Array.tabulate(numThreads)(i => new Thread {
@@ -16,7 +16,7 @@ object Test {
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) {
@@ -32,7 +32,7 @@ object Test {
}
}
}
-
+
def testMap(initialSize: Int, numThreads: Int, passes: Int) {
val orig = Map.empty ++ ((1 to initialSize) map ((_,"v")))
parallel(numThreads) {
@@ -48,28 +48,28 @@ object Test {
}
}
}
-
+
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()
diff --git a/test/files/run/t2512.scala b/test/files/run/t2512.scala
index 8166839a9a..de20af5e72 100644
--- a/test/files/run/t2512.scala
+++ b/test/files/run/t2512.scala
@@ -3,11 +3,11 @@ import scala.tools.nsc.util.HashSet
object Test {
val runs = 10000
class Bop
-
+
def main(args: Array[String]): Unit = {
val set: HashSet[Bop] = HashSet("Bop", 16)
(1 to runs).toList foreach (_ => set addEntry new Bop)
-
+
assert(runs == set.size && set.size == set.iterator.length)
}
}
diff --git a/test/files/run/t2514.scala b/test/files/run/t2514.scala
index e23b441ecf..21c4afb472 100644
--- a/test/files/run/t2514.scala
+++ b/test/files/run/t2514.scala
@@ -1,7 +1,7 @@
object Test
{
implicit def x[A](a: A) = new { def xx = a }
-
+
def main(args: Array[String]): Unit = {
val r1 = 12 xx;
val r2 = 12.xx
@@ -9,7 +9,7 @@ object Test
val r4 = 12.xx + 12.xx
val r5 = 12.`xx` + 12.xx
val r6 = 12.3.`xx` + 12.xx
-
+
assert(r5 == 24)
}
} \ No newline at end of file
diff --git a/test/files/run/t2526.scala b/test/files/run/t2526.scala
index 53f3059135..d37185535f 100644
--- a/test/files/run/t2526.scala
+++ b/test/files/run/t2526.scala
@@ -4,18 +4,18 @@
*/
object Test {
import collection._
-
+
def main(args: Array[String]) {
val m = new mutable.HashMap[String, String]
-
+
/* Use non hash-based structure for verification */
val keys = List("a", "b", "c", "d", "e")
val valueSuffix = "value"
val values = keys.map(_ + valueSuffix)
val entries = keys.zip(values)
-
+
for (k <- keys) m(k) = k + valueSuffix
-
+
assertForeach(keys, m.keySet.iterator)
assertForeach(keys, m.keysIterator)
assertForeach(keys, m.keySet)
@@ -25,7 +25,7 @@ object Test {
assertForeach(entries, m)
}
-
+
/* Checks foreach of `actual` goes over all the elements in `expected` */
private def assertForeach[E](expected: Traversable[E], actual: Iterator[E]): Unit = {
val notYetFound = new mutable.ArrayBuffer[E]() ++= expected
@@ -35,12 +35,12 @@ object Test {
}
assert(notYetFound.size == 0, "mutable.HashMap.foreach should have iterated over: " + notYetFound)
}
-
- /*
+
+ /*
* Checks foreach of `actual` goes over all the elements in `expected`
* 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.
+ * we mean to test.
*/
private def assertForeach[E](expected: Traversable[E], actual: Traversable[E]): Unit = {
val notYetFound = new mutable.ArrayBuffer[E]() ++= expected
diff --git a/test/files/run/t2552.scala b/test/files/run/t2552.scala
index 0c6b4f005b..17dcac596b 100644
--- a/test/files/run/t2552.scala
+++ b/test/files/run/t2552.scala
@@ -2,11 +2,11 @@ object Test extends App {
def testTakeWhile = {
val numbers = Iterator.range(0, 50)
val zeroTo9 = numbers.takeWhile(x => { println("p(" + x + ")"); x < 10 } )
-
+
zeroTo9.foreach(println _)
-
+
val zeroTo1 = Iterator.range(0, 20).takeWhile(x => { println("p(" + x + ")"); x < 2 } )
-
+
println(zeroTo1.hasNext)
println(zeroTo1.hasNext)
println(zeroTo1.next)
@@ -15,16 +15,16 @@ object Test extends App {
println(zeroTo1.hasNext)
println(zeroTo1.hasNext)
}
-
+
def testFilter = {
val predicate = (x: Int) => { println("p(" + x + ")"); x % 2 == 0 }
-
+
val evens = Iterator.range(0, 10).filter(predicate)
-
+
println(evens.hasNext)
println(evens.hasNext)
println(evens.next)
-
+
evens.foreach(println _)
}
diff --git a/test/files/run/t2636.scala b/test/files/run/t2636.scala
index 8c49a733fd..3271f79ffc 100644
--- a/test/files/run/t2636.scala
+++ b/test/files/run/t2636.scala
@@ -3,28 +3,28 @@ object Test
type Foo = { def update(x: Int, value: String): Unit }
type Foo2 = { def update(x: Int, value: String): Int }
type Foo3 = { def update(x: Int, value: String): Array[Int] }
-
+
def alen() = {
type L1 = { def length: Int }
def len(p: L1) = p.length
val x: L1 = Array(1,2,3)
len(x)
}
-
+
type A1 = { def apply(x: Int): String }
def arrApply(a: A1, x: Int) = a(x)
-
+
def main(args: Array[String]): Unit = {
val arr = new Array[String](3)
val p1: Foo = arr
def a1 = p1(0) = "b"
val p2: Foo2 = new { def update(x: Int, value: String) = { p1(1) = "o" ; 1 } }
- def a2 = p2(0) = "c"
-
+ def a2 = p2(0) = "c"
+
val p3: Foo3 = new { def update(x: Int, value: String) = { p1(2) = "b" ; Array(1) } }
def a3 = p3(10) = "hi mom"
-
+
a1 ; a2 ; a3 ;
assert(arr.mkString == "bob")
diff --git a/test/files/run/t266.scala b/test/files/run/t266.scala
index 20a29dabbb..1fd6dab185 100644
--- a/test/files/run/t266.scala
+++ b/test/files/run/t266.scala
@@ -2,9 +2,9 @@
trait O {
self: Test.type =>
-
+
Nil foreach identity
-
+
def f = (1 to 10).toList map identity
}
diff --git a/test/files/run/t2721.scala b/test/files/run/t2721.scala
index 8bd03bc838..93af884a60 100644
--- a/test/files/run/t2721.scala
+++ b/test/files/run/t2721.scala
@@ -2,9 +2,9 @@ object Test
{
val xml1 = <root xmlns:ns="nsUri" ns:at="rootVal"><sub ns:at="subVal"/></root>
val xml2= scala.xml.XML.loadString("""<root xmlns:ns="nsUri" ns:at="rootVal"><sub ns:at="subVal"/></root>""")
-
+
def backslashSearch(x: xml.Elem) = "root:-"+(x \ "@{nsUri}at") +"-sub:-"+(x \ "sub" \ "@{nsUri}at") +"-"
-
+
def main(args: Array[String]): Unit = {
println(backslashSearch(xml1))
println(backslashSearch(xml2))
diff --git a/test/files/run/t2755.scala b/test/files/run/t2755.scala
index 8d10b56734..c279ecc24e 100644
--- a/test/files/run/t2755.scala
+++ b/test/files/run/t2755.scala
@@ -28,7 +28,7 @@ object Test {
case x: Array[_] => 6
case _ => 7
}
-
+
def main(args: Array[String]): Unit = {
println(f1(Array(1, 2, 3)))
@@ -38,7 +38,7 @@ object Test {
println(f1(new Array[Any](10))) // should match as Array[AnyRef]
println(f1(Array(1L)))
println(f1(null))
-
+
println(f2(Array(1, 2, 3)))
println(f2(Array(1.0, -2.0, 3.0, 1.0)))
println(f2(Array(1.0f, 2.0f, 3.0f, -3.0f)))
@@ -46,7 +46,7 @@ object Test {
println(f2(new Array[Any](10))) // should match as Array[AnyRef]
println(f2(Array(1L)))
println(f2(null))
-
+
println(f3(Array(1, 2, 3)))
println(f3(Array(1.0, -2.0, 3.0, 1.0)))
println(f3(Array(1.0f, 2.0f, 3.0f, -3.0f)))
diff --git a/test/files/run/t2800.scala b/test/files/run/t2800.scala
index 84d1de0507..cc6fb30bbc 100644
--- a/test/files/run/t2800.scala
+++ b/test/files/run/t2800.scala
@@ -3,20 +3,20 @@ object Test {
def f2 = (5: Any) match { case List(x @ _*) => x ; case _ => false }
def f3 = (Nil: Any) match { case List(x @ _*) => x ; case _ => false }
def f4 = (Array(1): Any) match { case List(x @ _*) => x ; case _ => false }
-
+
def f5 = ("": Any) match { case Array(x @ _*) => x ; case _ => false }
def f6 = (5: Any) match { case Array(x @ _*) => x ; case _ => false }
def f7 = (Nil: Any) match { case Array(x @ _*) => x ; case _ => false }
def f8 = (Array(1): Any) match { case Array(x @ _*) => x ; case _ => false }
-
+
def f9 = ("": Any) match { case x @ List(_*) => x ; case _ => false }
def f10 = ("": Any) match { case List(_*) => true ; case _ => false }
def f11 = (Nil: Any) match { case List(_*) => true ; case _ => false }
def f12 = ("": Any) match { case x @ Array(_*) => x ; case _ => false }
def f13 = ("": Any) match { case Array(_*) => true ; case _ => false }
def f14 = (Nil: Any) match { case Array(_*) => true ; case _ => false }
-
-
+
+
def main(args: Array[String]): Unit = {
println(f1)
println(f2)
diff --git a/test/files/run/t2849.scala b/test/files/run/t2849.scala
index cadf605ae0..0995f64010 100644
--- a/test/files/run/t2849.scala
+++ b/test/files/run/t2849.scala
@@ -16,9 +16,9 @@ object Test {
def ticketExample {
var big = 100000
-
+
var aSortedSet: SortedSet[Int] = TreeSet(big)
-
+
for (i <- 1 until N) {
aSortedSet = (aSortedSet - big) ++ (TreeSet(i, big - 1))
big -= 1
@@ -42,7 +42,7 @@ object Test {
}
}
}
-
+
}
diff --git a/test/files/run/t2867.scala b/test/files/run/t2867.scala
index 25e55eaecd..0d30f95f8d 100644
--- a/test/files/run/t2867.scala
+++ b/test/files/run/t2867.scala
@@ -1,6 +1,6 @@
object Test {
- case class A(l: List[_]*)
-
+ 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.
@@ -9,7 +9,7 @@ object Test {
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/t2958.scala b/test/files/run/t2958.scala
index dcd24ecc36..b9563a1b77 100644
--- a/test/files/run/t2958.scala
+++ b/test/files/run/t2958.scala
@@ -2,14 +2,14 @@ object Test {
def f(args: Array[String]) = args match {
case Array("-p", prefix, from, to) =>
prefix + from + to
-
+
case Array(from, to) =>
from + to
case _ =>
"default"
}
-
+
def main(args: Array[String]) {
assert(f(Array("1", "2")) == "12")
}
diff --git a/test/files/run/t3026.scala b/test/files/run/t3026.scala
index 22dde9cc03..0231c7bcd1 100755
--- a/test/files/run/t3026.scala
+++ b/test/files/run/t3026.scala
@@ -3,6 +3,6 @@ object Test {
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/t3038.scala b/test/files/run/t3038.scala
index 7eb69f7fb5..986fc982e7 100644
--- a/test/files/run/t3038.scala
+++ b/test/files/run/t3038.scala
@@ -2,18 +2,18 @@ class A {
private lazy val a1 = "a1"
object B
private lazy val a2 = "a2"
-
+
@transient lazy val a3 = "a3"
@transient private lazy val a4 = "a4"
@transient lazy val a5 = "a5"
@transient private lazy val a6 = "a6"
-
+
final val a7 = "a7"
private final val a8 = "a8"
@transient final val a9 = "a9"
-
-
+
+
def run = {
@@ -27,13 +27,13 @@ class A {
println(a7)
println(a8)
println(a9)
- }
+ }
}
class C extends A {
private lazy val c1 = "c1"
lazy val c2 = "c2"
-
+
private lazy val c3 = "c3"
@transient lazy val c4 = "c4"
@@ -41,7 +41,7 @@ class C extends A {
@transient lazy val c6 = "c6"
@transient private lazy val c7 = "c7"
lazy val c8 = "c8"
-
+
final val c9 = "c9"
private final val c10 = "c10"
diff --git a/test/files/run/t3038c/A_1.scala b/test/files/run/t3038c/A_1.scala
index 91564e3021..14579fcf67 100644
--- a/test/files/run/t3038c/A_1.scala
+++ b/test/files/run/t3038c/A_1.scala
@@ -59,7 +59,7 @@ class A {
lazy val a57 = 58
lazy val a58 = 59
lazy val a59 = 60
- private lazy val a60 = 61
+ private lazy val a60 = 61
private lazy val a61 = 62
private lazy val a62 = 63
private lazy val a63 = 64
@@ -69,7 +69,7 @@ class A {
private lazy val a67 = 68
private lazy val a68 = 69
private lazy val a69 = 70
-
+
def run = {
println(List(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
a10, a11, a12, a13, a14, a15, a16, a17, a18, a19,
diff --git a/test/files/run/t3038d.scala b/test/files/run/t3038d.scala
index a92e3532a8..6cd2d83776 100644
--- a/test/files/run/t3038d.scala
+++ b/test/files/run/t3038d.scala
@@ -22,13 +22,13 @@ class Bar extends Foo {
@transient protected var first: Any = null
def size = a
@transient var second: Any = null
-
+
def checkMember { first }
-
+
private def writeObject(out: java.io.ObjectOutputStream) {
serializeTo(out)
}
-
+
private def readObject(in: java.io.ObjectInputStream) {
first = null
init(in)
@@ -40,7 +40,7 @@ object Test {
val in = new java.io.ObjectInputStream(new java.io.ByteArrayInputStream(bytes))
in.readObject.asInstanceOf[A]
}
-
+
private def toBytes(o: AnyRef): Array[Byte] = {
val bos = new java.io.ByteArrayOutputStream
val out = new java.io.ObjectOutputStream(bos)
@@ -49,7 +49,7 @@ object Test {
bos.toByteArray
}
-
+
def main(args: Array[String]) {
val a1 = new Bar()
val serialized:Array[Byte] = toBytes(a1)
diff --git a/test/files/run/t3050.scala b/test/files/run/t3050.scala
index d1f3f13bec..ca9d91e191 100644
--- a/test/files/run/t3050.scala
+++ b/test/files/run/t3050.scala
@@ -1,9 +1,9 @@
object Test {
def main(args: Array[String]): Unit = {
- val x =
+ val x =
try { ("": Any) match { case List(_*) => true } }
catch { case _ => false }
-
+
assert(!x)
}
}
diff --git a/test/files/run/t3112.scala b/test/files/run/t3112.scala
index eb8eec6327..88677fa09e 100644
--- a/test/files/run/t3112.scala
+++ b/test/files/run/t3112.scala
@@ -7,5 +7,5 @@ object Test {
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/t3150.scala b/test/files/run/t3150.scala
index 034703b5f7..8acdb50354 100644
--- a/test/files/run/t3150.scala
+++ b/test/files/run/t3150.scala
@@ -1,7 +1,7 @@
object Test {
case object Bob { override def equals(other: Any) = true }
def f(x: Any) = x match { case Bob => Bob }
-
+
def main(args: Array[String]): Unit = {
assert(f(Bob) eq Bob)
assert(f(0) eq Bob)
diff --git a/test/files/run/t3158.scala b/test/files/run/t3158.scala
index c824b62e96..2261b5cd81 100644
--- a/test/files/run/t3158.scala
+++ b/test/files/run/t3158.scala
@@ -1,6 +1,6 @@
object Test {
def main(args: Array[String]) {
- println(args.map(_ => foo _).deep)
+ println(args.map(_ => foo _).deep)
}
def foo(xs: String*) {
diff --git a/test/files/run/t3175.scala b/test/files/run/t3175.scala
index 78660d4085..aff2e67d0d 100644
--- a/test/files/run/t3175.scala
+++ b/test/files/run/t3175.scala
@@ -6,46 +6,46 @@ object Test {
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 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))
diff --git a/test/files/run/t3232.scala b/test/files/run/t3232.scala
index acb1a1e0e9..feff7e7089 100644
--- a/test/files/run/t3232.scala
+++ b/test/files/run/t3232.scala
@@ -4,14 +4,14 @@ object Test {
val r2 = 1 to Int.MaxValue
val r3 = Int.MinValue to -2
val r4 = Int.MinValue until -1
-
+
// some exceptional conditions
val e1 = () => (0 to Int.MaxValue).length
val e2 = () => (5 until 5).last
-
+
def main(args: Array[String]): Unit = {
List(r1, r2, r3, r4) foreach (x => assert(x.length == Int.MaxValue))
-
+
// exception required
List(e1, e2) foreach { f =>
try { f() ; assert(false) }
diff --git a/test/files/run/t3269.scala b/test/files/run/t3269.scala
index 17e42cdb0e..6fe727111c 100644
--- a/test/files/run/t3269.scala
+++ b/test/files/run/t3269.scala
@@ -4,6 +4,6 @@ object Test {
println(it.next)
it.hasNext
it.hasNext
- it.hasNext
+ it.hasNext
}
}
diff --git a/test/files/run/t3273.scala b/test/files/run/t3273.scala
index 379a8a29c1..a4dfc4b30c 100644
--- a/test/files/run/t3273.scala
+++ b/test/files/run/t3273.scala
@@ -1,7 +1,7 @@
object Test {
val num1: Stream[Int] = 1 #:: num1.map(_ + 1)
val num2: Stream[Int] = 1 #:: num2.iterator.map(_ + 1).toStream
-
+
def main(args: Array[String]): Unit = {
val x1 = (num1 take 10).toList
val x2 = (num2 take 10).toList
diff --git a/test/files/run/t3361.scala b/test/files/run/t3361.scala
index 892e36dbd9..7fbc6777f2 100644
--- a/test/files/run/t3361.scala
+++ b/test/files/run/t3361.scala
@@ -40,7 +40,7 @@ object Test extends App {
def insert_1 {
val ten = DoubleLinkedList(1 to 10: _*)
ten.append(DoubleLinkedList(11))
-
+
// Post-insert size test
require(11 == ten.size)
// Post-insert data test
diff --git a/test/files/run/t3395.scala b/test/files/run/t3395.scala
index b4990a1716..01cc431871 100644
--- a/test/files/run/t3395.scala
+++ b/test/files/run/t3395.scala
@@ -1,11 +1,11 @@
object Test {
def main(args: Array[String]): Unit = {
- Seq("") match {
+ Seq("") match {
case Seq("") => println("abc")
case Seq(_, _, x) => println(x)
}
-
- Seq(1, 2, "def") match {
+
+ Seq(1, 2, "def") match {
case Seq("") => println("abc")
case Seq(_, _, x) => println(x)
}
diff --git a/test/files/run/t3397.scala b/test/files/run/t3397.scala
index 2c8cbed3ab..243fe766de 100644
--- a/test/files/run/t3397.scala
+++ b/test/files/run/t3397.scala
@@ -1,7 +1,7 @@
object Test {
def main(args: Array[String]): Unit = {
val x = Seq(Set(1,2,3),Set(4,5,6),Set(7,8,9)).transpose
-
+
()
}
}
diff --git a/test/files/run/t3493.scala b/test/files/run/t3493.scala
index aafe7a3a4a..b0b7589cfd 100644
--- a/test/files/run/t3493.scala
+++ b/test/files/run/t3493.scala
@@ -3,7 +3,7 @@
object Test {
-
+
def main(args: Array[String]) {
import scala.collection.immutable._
val x = TreeSet("a", "b", "c", "d")
@@ -11,5 +11,5 @@ object Test {
assert(x2.toString == "TreeSet(a, b, c, d, e)")
assert(x2.toString == runtime.ScalaRunTime.stringOf(x2).trim)
}
-
+
}
diff --git a/test/files/run/t3496.scala b/test/files/run/t3496.scala
index e1aa032ab1..80a4e6bd86 100644
--- a/test/files/run/t3496.scala
+++ b/test/files/run/t3496.scala
@@ -4,12 +4,12 @@
// ticket #3496
object Test {
-
+
def main(args: Array[String]) {
val s = Stream.from(1)
s.take(5)
s.drop(5)
s.splitAt(5)
}
-
+
}
diff --git a/test/files/run/t3502.scala b/test/files/run/t3502.scala
index cc78e54c86..9492b2d4d4 100644
--- a/test/files/run/t3502.scala
+++ b/test/files/run/t3502.scala
@@ -5,7 +5,7 @@
// ticket #3502
object Test {
-
+
object GeneratePrimeFactorsLazy extends (Int => List[Int]) {
override def apply(n:Int) = {
val s = Stream.range(2, n / 2).filter(n % _ == 0)
@@ -13,12 +13,12 @@ object Test {
s.headOption.map(x => x :: apply(n / x)).getOrElse(List(n))
}
}
-
+
def main(args:Array[String]) {
// a prime number
//val num = 623456789
val num = 2796203
assert(GeneratePrimeFactorsLazy(num) == List(num))
}
-
+
}
diff --git a/test/files/run/t3509.scala b/test/files/run/t3509.scala
index 76f8d6016e..7ec150eb01 100644
--- a/test/files/run/t3509.scala
+++ b/test/files/run/t3509.scala
@@ -1,7 +1,7 @@
object Test {
- class Foo(final var i:Int)
-
+ class Foo(final var i:Int)
+
def main(args : Array[String]) : Unit = {
val foo = new Foo(0)
foo.i += 1
diff --git a/test/files/run/t3511.scala b/test/files/run/t3511.scala
index 30757b1a66..9b4d581462 100644
--- a/test/files/run/t3511.scala
+++ b/test/files/run/t3511.scala
@@ -6,31 +6,31 @@ import scala.collection.immutable._
// ticket #3511
object Test {
-
+
def main(args: Array[String]) {
assert(Stream.from(0).view.force.take(5) == List(0, 1, 2, 3, 4))
-
+
val s = Stream.from(0)
val smap = s.view.map(_ * 2).force.take(5)
assert(smap == List(0, 2, 4, 6, 8))
-
+
val sfilter = s.view.filter(_ % 2 == 0).force.take(5)
assert(sfilter == List(0, 2, 4, 6, 8))
-
+
val sflatmap = s.view.flatMap(n => List(n, n * 2)).force.take(6)
assert(sflatmap == List(0, 0, 1, 2, 2, 4))
-
+
val stakewhile = s.view.takeWhile(_ < 10).force
assert(stakewhile == List.range(0, 10))
-
+
val szip = s.view.zip(s.map(_ / 2)).force.take(5)
assert(szip == List((0, 0), (1, 0), (2, 1), (3, 1), (4, 2)))
-
+
val szipall = s.view.zipAll(List(0, 1, 2), 0, 0).force.take(5)
assert(szipall == List((0, 0), (1, 1), (2, 2), (3, 0), (4, 0)))
-
+
val spatch = s.view.patch(1, List(5, 5, 5), 5).force.take(5)
assert(spatch == List(0, 5, 5, 5, 6))
}
-
+
}
diff --git a/test/files/run/t3516.scala b/test/files/run/t3516.scala
index aa302ce85a..82a97f27de 100644
--- a/test/files/run/t3516.scala
+++ b/test/files/run/t3516.scala
@@ -1,7 +1,7 @@
object Test {
def mkIterator = (1 to 5).iterator map (x => { println(x) ; x })
def mkInfinite = Iterator continually { println(1) ; 1 }
-
+
def main(args: Array[String]): Unit = {
// Stream is strict in its head so we should see 1 from each of them.
val s1 = mkIterator.toStream
diff --git a/test/files/run/t3518.scala b/test/files/run/t3518.scala
index 033cc19548..36ca9daaa2 100644
--- a/test/files/run/t3518.scala
+++ b/test/files/run/t3518.scala
@@ -4,7 +4,7 @@ object Test {
val r3 = 10.0 to 1.0 by -0.5
val r4 = 1.0 until 1.0 by 1.0
val r5 = 1 to 100 by 2
-
+
def main(args: Array[String]): Unit = {
assert(r3 forall (r1 contains _))
assert(r1 forall (r3 contains _))
diff --git a/test/files/run/t3530.scala b/test/files/run/t3530.scala
index f6f7fb4229..3fedc66dbe 100644
--- a/test/files/run/t3530.scala
+++ b/test/files/run/t3530.scala
@@ -5,7 +5,7 @@ object Test {
case xs @ List(_*) => "list: " + xs.length
case _ => "not a list"
})
-
+
def f2[T](x: List[T]) = println(x match {
case List(_, _) => "two"
case List(_, _, _) => "three"
@@ -21,9 +21,9 @@ object Test {
f(Nil)
f(List(1,2,3,4,5))
f(null)
-
+
println
-
+
f2(List(1, 2))
f2(List('a', 'b', 'c'))
f2(List('a', 'b', 'c', 'd'))
diff --git a/test/files/run/t3540.scala b/test/files/run/t3540.scala
index 5ffacb5dff..4eb3de780b 100644
--- a/test/files/run/t3540.scala
+++ b/test/files/run/t3540.scala
@@ -2,6 +2,6 @@ object Test {
def main(args: Array[String]): Unit = {
assert(List.iterate(List(1,2,3), 4)(_.tail).last.isEmpty)
assert(Stream.iterate(Stream(1,2,3), 4)(_.tail).last.isEmpty)
- assert(Array.iterate(Array(1,2,3), 4)(_.tail).last.isEmpty)
+ assert(Array.iterate(Array(1,2,3), 4)(_.tail).last.isEmpty)
}
}
diff --git a/test/files/run/t3563.scala b/test/files/run/t3563.scala
index 8abbb60803..2a80ef412a 100644
--- a/test/files/run/t3563.scala
+++ b/test/files/run/t3563.scala
@@ -5,17 +5,17 @@
// ticket #3563
object Test {
-
+
def main(args: Array[String]) {
var sum = 0
val setseq = Set(1, 2, 3, 4).toSeq
setseq.map( n => { sum += n; n * n }).head
assert(sum == 10)
-
+
sum = 0
val mapseq = Map(1 -> 1, 2 -> 2, 3 -> 3, 4 -> 4).toSeq
mapseq.map( n => { sum += n._1; (n._1 + n._1, n._2 * n._2) }).head
assert(sum == 10)
}
-
+
}
diff --git a/test/files/run/t3580.scala b/test/files/run/t3580.scala
index 50ff6c4551..ac9f81ab9e 100644
--- a/test/files/run/t3580.scala
+++ b/test/files/run/t3580.scala
@@ -4,14 +4,14 @@
object Test {
-
+
class Empty extends Traversable[Nothing] {
def foreach[U](f: Nothing => U) {}
}
-
+
def main(args: Array[String]) {
val t = new Empty
t.toStream
}
-
+
}
diff --git a/test/files/run/t3603.scala b/test/files/run/t3603.scala
index a89cb7080a..a0821a2a45 100644
--- a/test/files/run/t3603.scala
+++ b/test/files/run/t3603.scala
@@ -2,17 +2,17 @@
object Test {
-
+
def main(args: Array[String]) {
import collection.immutable._
-
+
val intmap = IntMap(1 -> 1, 2 -> 2)
val intres = intmap.map { case (a, b) => (a, b.toString) }
assert(intres.isInstanceOf[IntMap[_]])
-
+
val longmap = LongMap(1L -> 1, 2L -> 2)
val longres = longmap.map { case (a, b) => (a, b.toString) }
assert(longres.isInstanceOf[LongMap[_]])
}
-
+
}
diff --git a/test/files/run/t3613.scala b/test/files/run/t3613.scala
index 3763093d30..c3b249571b 100644
--- a/test/files/run/t3613.scala
+++ b/test/files/run/t3613.scala
@@ -1,7 +1,7 @@
class Boopy {
private val s = new Schnuck
def observer : PartialFunction[ Any, Unit ] = s.observer
-
+
private class Schnuck extends javax.swing.AbstractListModel {
model =>
val observer : PartialFunction[ Any, Unit ] = {
@@ -10,13 +10,13 @@ class Boopy {
def getSize = 0
def getElementAt( idx: Int ) : AnyRef = "egal"
}
-
+
}
object Test {
def main(args: Array[String]): Unit = {
val x = new Boopy
val o = x.observer
- o( "Boopy" ) // --> throws runtime error
+ o( "Boopy" ) // --> throws runtime error
}
}
diff --git a/test/files/run/t3619.scala b/test/files/run/t3619.scala
index 3f4c56ea53..46324b4d69 100644
--- a/test/files/run/t3619.scala
+++ b/test/files/run/t3619.scala
@@ -17,7 +17,7 @@ object Test extends App {
}
}
*/
-
+
new Meh
}
diff --git a/test/files/run/t363.scala b/test/files/run/t363.scala
index c747be2ec9..5f3f30a098 100644
--- a/test/files/run/t363.scala
+++ b/test/files/run/t363.scala
@@ -3,7 +3,7 @@ object Test {
println("I love the smell of (Array[String])Unit in the morning.")
}
}
-
+
class Test {
def kurtz() = "We must kill them. We must incinerate them."
}
diff --git a/test/files/run/t3647.scala b/test/files/run/t3647.scala
index a970e887f6..434a13f414 100644
--- a/test/files/run/t3647.scala
+++ b/test/files/run/t3647.scala
@@ -13,10 +13,10 @@ object Test {
"line4"
).iterator)
assert(ps.filter(_ == '\n').size == 3)
-
+
val ps1 = PagedSeq.fromLines(List("Ok").iterator)
assert(ps1.filter(_ == '\n').size == 0)
-
+
val eps = PagedSeq.fromLines(List().iterator)
assert(eps.filter(_ == '\n').size == 0)
}
diff --git a/test/files/run/t3714.scala b/test/files/run/t3714.scala
index 2d600f97f1..c344b40f1f 100644
--- a/test/files/run/t3714.scala
+++ b/test/files/run/t3714.scala
@@ -21,7 +21,7 @@ object Test {
case BreakImpl(x) => x
case _ => -1
}
-
+
def main(args: Array[String]) {
val break = BreakImpl(22)
// assert(f1(break) == 22)
diff --git a/test/files/run/t3719.scala b/test/files/run/t3719.scala
index 01dc205545..4649f11bb1 100644
--- a/test/files/run/t3719.scala
+++ b/test/files/run/t3719.scala
@@ -1,7 +1,7 @@
object Days extends Enumeration {
type Day = DayValue
val Mon, Tue, Wed, Thu, Fri, Sat, Sun = new DayValue // DayValue
-
+
protected class DayValue extends Val {
def isWeekday: Boolean =
this match {
@@ -21,7 +21,7 @@ object Test extends App {
val d: Day = Mon
d.toString
}
-
+
def nameOfTue(): String = {
import Days._
val d: Day = Tue
diff --git a/test/files/run/t3822.scala b/test/files/run/t3822.scala
index c35804035e..eaf0a145d3 100644
--- a/test/files/run/t3822.scala
+++ b/test/files/run/t3822.scala
@@ -1,17 +1,17 @@
import scala.collection.{ mutable, immutable, generic }
import immutable.ListSet
-object Test {
+object Test {
def main(args: Array[String]): Unit = {
val xs = ListSet(-100000 to 100001: _*)
-
+
assert(xs.size == 200002)
assert(xs.sum == 100001)
-
+
val ys = ListSet[Int]()
val ys1 = (1 to 12).grouped(3).foldLeft(ys)(_ ++ _)
val ys2 = (1 to 12).foldLeft(ys)(_ + _)
-
+
assert(ys1 == ys2)
}
}
diff --git a/test/files/run/t3829.scala b/test/files/run/t3829.scala
index 780a6a95b7..e3d8c56882 100644
--- a/test/files/run/t3829.scala
+++ b/test/files/run/t3829.scala
@@ -1,11 +1,11 @@
// ticket #3829
object Test {
import collection.{ mutable, immutable }
-
+
def main(args: Array[String]) {
val map = immutable.Map(1 -> 2, 3 -> 4)
assert(map.get(0) == None)
-
+
// Since r24255 defaultMap.get(x) returns None rather than
// using the default, so these mostly use apply.
val defmap = map.withDefaultValue(-1)
@@ -19,10 +19,10 @@ object Test {
assert((defmap - 1)(0) == -1)
assert((defmap - 1)(1) == -1)
assert((defmap - 1)(3) == 4)
-
+
val mutmap = mutable.Map(1 -> 2, 2 -> 3)
assert(mutmap.get(0) == None)
-
+
val defmutmap = mutmap.withDefaultValue(-1)
assert(defmutmap(0) == -1)
assert(defmutmap(3) == -1)
@@ -36,5 +36,5 @@ object Test {
assert(defmutmap(1) == 2)
assert(mutmap(1) == 2)
}
-
+
}
diff --git a/test/files/run/t3855.scala b/test/files/run/t3855.scala
index 32dfb1e23d..e55714201f 100644
--- a/test/files/run/t3855.scala
+++ b/test/files/run/t3855.scala
@@ -1,7 +1,7 @@
object Test {
def byval[A](a: => A) = a
def closure[A](f: () => A) = f()
-
+
def f1(s: String) = {
var n = try { s.toInt } catch { case _ => 1 }
byval(n)
diff --git a/test/files/run/t3877.scala b/test/files/run/t3877.scala
index 5710e982a0..ce1e9283a7 100644
--- a/test/files/run/t3877.scala
+++ b/test/files/run/t3877.scala
@@ -11,7 +11,7 @@ object Test {
println("test1: " + d)
}
}
-
+
def test2 {
var d = 2
var i = 0
@@ -25,7 +25,7 @@ object Test {
return
}
}
-
+
def test3 {
var d = 2
var i = 0
@@ -34,9 +34,9 @@ object Test {
d = b
i += 1
println("test3: " + d)
- } while (d < LIMIT && i < LIMIT)
+ } while (d < LIMIT && i < LIMIT)
}
-
+
def test4 {
var d = 2
var i = 0
@@ -47,9 +47,9 @@ object Test {
println("test4: " + d)
if (d >= LIMIT || i >= LIMIT)
return
- } while (true)
+ } while (true)
}
-
+
def test5 {
var d = 2
var i = 0
@@ -58,7 +58,7 @@ object Test {
d = b
i += 1
println("test5.1: " + d)
-
+
var e = 2
var j = 0
while (e < LIMIT && j < LIMIT) {
@@ -69,7 +69,7 @@ object Test {
}
}
}
-
+
def main(args: Array[String]) {
test1
diff --git a/test/files/run/t3887.scala b/test/files/run/t3887.scala
index 16ce983efc..81fa7a917e 100644
--- a/test/files/run/t3887.scala
+++ b/test/files/run/t3887.scala
@@ -13,4 +13,4 @@ object Test {
val option1: (Int, String) = (1, "abc")
-}
+}
diff --git a/test/files/run/t3888.scala b/test/files/run/t3888.scala
index ecdf87e925..e0f1453b1d 100644
--- a/test/files/run/t3888.scala
+++ b/test/files/run/t3888.scala
@@ -3,13 +3,13 @@ object Test {
val T1 = new P
private[this] val T2 = T1
- def m1 =
+ def m1 =
(1, 2) match {
case T1 => true
case _ => false
}
- def m2 =
+ def m2 =
(1, 2) match {
case T2 => true
case _ => false
diff --git a/test/files/run/t3897/J_2.java b/test/files/run/t3897/J_2.java
index a4c9a98fb1..178412dc92 100644
--- a/test/files/run/t3897/J_2.java
+++ b/test/files/run/t3897/J_2.java
@@ -7,7 +7,7 @@ public class J_2 {
String name = fields[i].getName();
if (name.length() >= 7 && name.substring(0, 7).equals("bitmap$")) { }
else System.out.println("(" + name + "," + fields[i].getGenericType() + ")");
- }
+ }
}
public void f2(Class<?> clazz) {
Method[] methods = clazz.getDeclaredMethods();
@@ -15,7 +15,7 @@ public class J_2 {
String name = methods[i].getName();
if (name.length() >= 7 && name.substring(0, 7).equals("bitmap$")) { }
else System.out.println("(" + name + "," + methods[i].getGenericReturnType() + ")");
- }
+ }
}
public void javaRun() {
diff --git a/test/files/run/t3897/a_2.scala b/test/files/run/t3897/a_2.scala
index 7a161fcbe4..4d9e59ef05 100644
--- a/test/files/run/t3897/a_2.scala
+++ b/test/files/run/t3897/a_2.scala
@@ -1,12 +1,12 @@
object Test {
def f1(clazz: Class[_]) = (
- clazz.getDeclaredFields.toList
+ clazz.getDeclaredFields.toList
. filterNot (_.getName contains "bitmap$")
. map (f => (f.getName, f.getGenericType))
. foreach (println)
)
def f2(clazz: Class[_]) = (
- clazz.getDeclaredMethods.toList
+ clazz.getDeclaredMethods.toList
. filterNot (_.getName contains "bitmap$")
. map (f => (f.getName, f.getGenericReturnType))
. foreach (println)
@@ -17,7 +17,7 @@ object Test {
f2(classOf[One])
f1(classOf[Two])
f2(classOf[Two])
-
+
new J_2().javaRun
}
}
diff --git a/test/files/run/t3932.scala b/test/files/run/t3932.scala
index f577ef8315..51fc16d6ea 100644
--- a/test/files/run/t3932.scala
+++ b/test/files/run/t3932.scala
@@ -23,10 +23,10 @@ object Test {
def main(args: Array[String]): Unit = {
println(O1.g1)
println(O1.g2)
-
+
println(O2.g1)
println(O2.g2)
-
+
val o3 = new O3()
println(o3.g1)
println(o3.g2)
diff --git a/test/files/run/t3964.scala b/test/files/run/t3964.scala
index df1eb716e8..80ba361a20 100644
--- a/test/files/run/t3964.scala
+++ b/test/files/run/t3964.scala
@@ -1,13 +1,13 @@
object Test {
- class Base
+ class Base
object Bob extends Base
class Foo { def bippy = 42 }
class Oof { def bippy = -21 }
-
+
// I am more specific than you
implicit def f1(x: Bob.type): Foo = new Foo
implicit def f2(x: Base): Oof = new Oof
-
+
def main(args: Array[String]): Unit = {
// this would of course print an unambiguous 42
println(Bob.bippy)
diff --git a/test/files/run/t3970.scala b/test/files/run/t3970.scala
index 35b5ce6e1b..f8c763bc85 100644
--- a/test/files/run/t3970.scala
+++ b/test/files/run/t3970.scala
@@ -9,11 +9,11 @@ object Test {
def main(args: Array[String]) {
val dl = DoubleLinkedList[Int]()
dl.remove()
-
+
val dl2 = DoubleLinkedList[Int](1, 2, 3)
dl2.next.remove()
assert(dl2 == DoubleLinkedList(1, 3))
-
+
val dl3 = DoubleLinkedList[Int](1, 2, 3)
assert(dl3.drop(1) == DoubleLinkedList(2, 3))
assert(dl3.drop(1).prev == null)
diff --git a/test/files/run/t3980.scala b/test/files/run/t3980.scala
index c140176ce4..4e693eba9b 100644
--- a/test/files/run/t3980.scala
+++ b/test/files/run/t3980.scala
@@ -2,7 +2,7 @@ object A {
def run1 {
lazy val x: Unit = {(); println("once")}
x
- x
+ x
}
def run2 {
lazy val y: Int = 2
diff --git a/test/files/run/t3984.scala b/test/files/run/t3984.scala
index 0747b0ee25..9a2e00a2a8 100644
--- a/test/files/run/t3984.scala
+++ b/test/files/run/t3984.scala
@@ -36,7 +36,7 @@ object MapBug {
im = im + ((ih,ih))
mm = mm + ((ih,ih))
}
- assert(im == mm)
+ assert(im == mm)
val x = IH(6,4)
im = im - x
mm = mm - x
diff --git a/test/files/run/t4013.scala b/test/files/run/t4013.scala
index 7060559317..da7fbc5b3f 100644
--- a/test/files/run/t4013.scala
+++ b/test/files/run/t4013.scala
@@ -5,12 +5,12 @@ trait Base[B] {
}
-class Suba[@specialized B](override val data: Array[B]) extends Base[B] {
+class Suba[@specialized B](override val data: Array[B]) extends Base[B] {
assert(data != null)
}
-class Subopt[@specialized B](override val data: Option[B]) extends Base[B] {
+class Subopt[@specialized B](override val data: Option[B]) extends Base[B] {
assert(data != null)
}
diff --git a/test/files/run/t4013b.scala b/test/files/run/t4013b.scala
index 1262e261f5..f17eaea3d3 100644
--- a/test/files/run/t4013b.scala
+++ b/test/files/run/t4013b.scala
@@ -8,7 +8,7 @@ trait Base[B] {
class M[@specialized(Int) A]
-class Sub3[@specialized(Int) B](override val data: M[B]) extends Base[B] {
+class Sub3[@specialized(Int) B](override val data: M[B]) extends Base[B] {
assert(data != null)
}
diff --git a/test/files/run/t4024.scala b/test/files/run/t4024.scala
index 4ab383ebc3..ef768beb99 100644
--- a/test/files/run/t4024.scala
+++ b/test/files/run/t4024.scala
@@ -1,9 +1,9 @@
object Test extends App {
- val x = "abc"
+ val x = "abc"
val m = x.getClass.getMethod("toString")
-
+
assert(m.invoke(x, (Nil: List[AnyRef]): _*) == "abc")
}
diff --git a/test/files/run/t4054.scala b/test/files/run/t4054.scala
index 83a58ef97c..8f1f685854 100644
--- a/test/files/run/t4054.scala
+++ b/test/files/run/t4054.scala
@@ -9,7 +9,7 @@
object Test {
def main(args: Array[String]) {
val it = Iterator.from(1).map(n => n * n).scanLeft(0)(_+_)
-
+
assert(it.next == 0)
assert(it.next == 1)
assert(it.next == 5)
diff --git a/test/files/run/t4062.scala b/test/files/run/t4062.scala
index f5478e7593..6a5aea5b47 100644
--- a/test/files/run/t4062.scala
+++ b/test/files/run/t4062.scala
@@ -1,7 +1,7 @@
class A(val f : String)
class B(f: String) extends A(f) {
- def foo(x: String) = x match {
+ def foo(x: String) = x match {
case `f` => true
case _ => false
}
diff --git a/test/files/run/t4072.scala b/test/files/run/t4072.scala
index 371b8ccd5f..872072a4ce 100644
--- a/test/files/run/t4072.scala
+++ b/test/files/run/t4072.scala
@@ -2,11 +2,11 @@ import scala.tools.nsc._
object Test {
class DryRun {
- val compiler = new Global(new Settings()) {
+ val compiler = new Global(new Settings()) {
lazy val test1 = new AnyRef
}
}
-
+
def main(args: Array[String]) {
new DryRun().compiler.test1
}
diff --git a/test/files/run/t408.scala b/test/files/run/t408.scala
index 9e51e881ed..4d3dcbcb84 100644
--- a/test/files/run/t408.scala
+++ b/test/files/run/t408.scala
@@ -2,7 +2,7 @@ object Test
{
val a = scala.collection.immutable.Set.empty ++ (0 to 100000)
val b = scala.collection.immutable.Set.empty ++ (0 to 100000)
-
+
def main(args: Array[String]): Unit = {
a -- b
a -- b
diff --git a/test/files/run/t4110.scala b/test/files/run/t4110.scala
index a42646ce52..4bd377b73e 100644
--- a/test/files/run/t4110.scala
+++ b/test/files/run/t4110.scala
@@ -3,7 +3,7 @@ object Test extends App {
trait A
trait B
-
+
inferredType(new A with B)
val name = new A with B
diff --git a/test/files/run/t4119/J.java b/test/files/run/t4119/J.java
index ee65d33e22..42508993ea 100644
--- a/test/files/run/t4119/J.java
+++ b/test/files/run/t4119/J.java
@@ -1,6 +1,6 @@
package foo.bar;
-public abstract class J {
+public abstract class J {
protected void foo(J j) {
return;
}
diff --git a/test/files/run/t4119/S.scala b/test/files/run/t4119/S.scala
index d6ae5f1b87..e5e3db5da3 100644
--- a/test/files/run/t4119/S.scala
+++ b/test/files/run/t4119/S.scala
@@ -1,6 +1,6 @@
class S extends foo.bar.J {
sss =>
-
+
val fn = () => {
foo(S.this)
}
diff --git a/test/files/run/t4122.scala b/test/files/run/t4122.scala
index 5ff570c009..7ead2b7742 100644
--- a/test/files/run/t4122.scala
+++ b/test/files/run/t4122.scala
@@ -4,7 +4,7 @@ object Test {
val sw3 = Seq('a', 'b')
val sw4 = "ab".toList
val all = List(sw, sw2, sw3, sw4)
-
+
def main(args: Array[String]): Unit = {
for (s1 <- all ; s2 <- all) {
assert(s1 == s2, s1 + " != " + s2)
diff --git a/test/files/run/t4148.scala b/test/files/run/t4148.scala
index a7d181268d..0739403594 100644
--- a/test/files/run/t4148.scala
+++ b/test/files/run/t4148.scala
@@ -2,7 +2,7 @@ object Test {
val x1 = try { "aaa".asInstanceOf[Int] } catch { case _ => "cce1" }
val x2 = try { (5: Any).asInstanceOf[Int] } catch { case _ => "cce2" }
val x3 = try { (new java.lang.Short(100.toShort).asInstanceOf[Int]) } catch { case _ => "cce3" }
-
+
def main(args: Array[String]): Unit = {
List(x1, x2, x3) foreach println
}
diff --git a/test/files/run/t4238/J_1.java b/test/files/run/t4238/J_1.java
index 47a9c21000..21a4b182ad 100644
--- a/test/files/run/t4238/J_1.java
+++ b/test/files/run/t4238/J_1.java
@@ -3,14 +3,14 @@ import scala.*;
class J_1 {
scala.collection.mutable.HashMap<String, String> map =
new scala.collection.mutable.HashMap<String, String>();
-
+
Function1<Tuple2<String, String>, Integer> f =
new scala.runtime.AbstractFunction1<Tuple2<String, String>, Integer>() {
public Integer apply(Tuple2<String, String> s) {
return s._1().length();
}
};
-
+
scala.collection.Seq<Integer> counts =
map.groupBy(f).keys().toList();
}
diff --git a/test/files/run/t4288.scala b/test/files/run/t4288.scala
index 4e7b366f60..eafd2808f1 100644
--- a/test/files/run/t4288.scala
+++ b/test/files/run/t4288.scala
@@ -6,7 +6,7 @@ object Test {
def f5 = (1 to 9).toArray.slice(-5, -1)
def f6 = (1 to 9).toStream.slice(-5, -1)
def f7 = (1 to 9).slice(-5, -1)
-
+
def main(args: Array[String]): Unit = {
List[Traversable[Int]](f1, f2, f3, f4, f5, f6, f7) foreach (x => assert(x.isEmpty, x))
}
diff --git a/test/files/run/t4294.scala b/test/files/run/t4294.scala
index 50c83ac819..fafaf1d8ef 100644
--- a/test/files/run/t4294.scala
+++ b/test/files/run/t4294.scala
@@ -1,7 +1,7 @@
object Test {
def main(args: Array[String]) {
(Stream.from(1).collect{case x if x > 5000000 => x}: Stream[Int])
-
+
assert((Stream from 1 take 10 collect { case x if x <= 3 => x*x }).sum == 14)
}
}
diff --git a/test/files/run/t4317/S_3.scala b/test/files/run/t4317/S_3.scala
index ce8e2330e3..dd04ea31ef 100644
--- a/test/files/run/t4317/S_3.scala
+++ b/test/files/run/t4317/S_3.scala
@@ -1,4 +1,4 @@
-object Test {
+object Test {
def main(args: Array[String]): Unit = {
val j = new J_2()
println(j.bar1())
diff --git a/test/files/run/t4387.scala b/test/files/run/t4387.scala
index f51c9b0572..68cbe97d08 100644
--- a/test/files/run/t4387.scala
+++ b/test/files/run/t4387.scala
@@ -1,11 +1,11 @@
object Test {
import xml.XML.loadString
def mkElem(arg: String) = <foo a="1" b="2" c="3" d="4" e={arg} />
-
+
val x1 = mkElem("5")
val x2 = mkElem("50")
- def main(args: Array[String]): Unit = {
+ def main(args: Array[String]): Unit = {
assert(x1 == loadString("" + x1))
assert(x2 != loadString("" + x1))
}
diff --git a/test/files/run/t4396.scala b/test/files/run/t4396.scala
index d67eaa378e..ca143165b7 100644
--- a/test/files/run/t4396.scala
+++ b/test/files/run/t4396.scala
@@ -1,4 +1,4 @@
-// #43896
+// #43896
trait M extends DelayedInit {
def delayedInit(body : => Unit) {
println("hallo")
diff --git a/test/files/run/t4426.scala b/test/files/run/t4426.scala
index 1cbd42da25..95759444d6 100644
--- a/test/files/run/t4426.scala
+++ b/test/files/run/t4426.scala
@@ -5,7 +5,7 @@ object Test {
val settings = new Settings()
settings.classpath.value = System.getProperty("java.class.path")
- object cc extends Global(settings) {
+ object cc extends Global(settings) {
object dummy
override def computePluginPhases() = {
@@ -16,9 +16,9 @@ object Test {
new cc.Run
()
}
-
+
def main(args: Array[String]): Unit = {
-
+
}
}
diff --git a/test/files/run/t4461.scala b/test/files/run/t4461.scala
index d1f80a6012..99da122f6b 100644
--- a/test/files/run/t4461.scala
+++ b/test/files/run/t4461.scala
@@ -9,7 +9,7 @@ object Test {
buf.subscribe(new Subscriber[Message[Int], ObservableBuffer[Int]] {
def notify(pub: ObservableBuffer[Int], event: Message[Int]) = println(event)
})
-
+
buf += 1 // works
buf ++= Array(2) // works
buf ++= ArrayBuffer(3, 4) // works
diff --git a/test/files/run/t4532.check b/test/files/run/t4532.check
index 018bbf2fa3..47a9809248 100644
--- a/test/files/run/t4532.check
+++ b/test/files/run/t4532.check
@@ -1,7 +1,7 @@
Type in expressions to have them evaluated.
Type :help for more information.
-scala>
+scala>
scala> object Bippy { class Dingus ; object Bop }
defined module Bippy
@@ -10,6 +10,6 @@ scala> :javap Bippy.Dingus
Compiled from "<console>"public class Bippy$Dingus extends java.lang.Object implements scala.ScalaObject{ public Bippy$Dingus();}
scala> :javap Bippy.Bop
Compiled from "<console>"public final class Bippy$Bop$ extends java.lang.Object implements scala.ScalaObject{ public static final Bippy$Bop$ MODULE$; public static {}; public Bippy$Bop$();}
-scala>
+scala>
-scala>
+scala>
diff --git a/test/files/run/t4532.scala b/test/files/run/t4532.scala
index 2e100f2cc7..0dabd2dca4 100644
--- a/test/files/run/t4532.scala
+++ b/test/files/run/t4532.scala
@@ -2,13 +2,13 @@ import scala.tools.partest.ReplTest
import scala.tools.util.Javap
object Test extends ReplTest {
-
+
// ugh, windows
def expectedOutput =
"""Type in expressions to have them evaluated.
Type :help for more information.
-scala>
+scala>
scala> object Bippy { class Dingus ; object Bop }
defined module Bippy
@@ -17,12 +17,12 @@ scala> :javap Bippy.Dingus
Compiled from "<console>"public class Bippy$Dingus extends java.lang.Object implements scala.ScalaObject{ public Bippy$Dingus();}
scala> :javap Bippy.Bop
Compiled from "<console>"public final class Bippy$Bop$ extends java.lang.Object implements scala.ScalaObject{ public static final Bippy$Bop$ MODULE$; public static {}; public Bippy$Bop$();}
-scala>
+scala>
-scala>
+scala>
"""
- override def eval() =
+ override def eval() =
if (Javap.isAvailable()) super.eval()
else expectedOutput.lines
diff --git a/test/files/run/t4535.scala b/test/files/run/t4535.scala
index 91c13a28cd..eba79431c9 100644
--- a/test/files/run/t4535.scala
+++ b/test/files/run/t4535.scala
@@ -5,26 +5,26 @@ import collection._
// #4535
object Test {
-
+
def main(args: Array[String]) {
val as = new mutable.ArrayStack[Int]
as push 1
as push 2
as push 3
println(as.reverse)
-
+
as push 4
as push 5
as push 6
println(as.reverse)
-
+
println(as map { x => x })
-
+
for (i <- 0 until 100) {
as push i
assert(as == as.map(x => x))
assert(as == as.reverse.reverse)
}
}
-
+
}
diff --git a/test/files/run/t4560.scala b/test/files/run/t4560.scala
index f809e67898..1392077e46 100644
--- a/test/files/run/t4560.scala
+++ b/test/files/run/t4560.scala
@@ -35,5 +35,5 @@ object Test extends A with B {
}
}
-object Test2 extends A2 with B2
+object Test2 extends A2 with B2
diff --git a/test/files/run/t4570.scala b/test/files/run/t4570.scala
index 5e1a20c52d..5408caf6db 100644
--- a/test/files/run/t4570.scala
+++ b/test/files/run/t4570.scala
@@ -1,8 +1,8 @@
object Test extends Enumeration {
val foo = Value
def bar = withName("foo")
-
+
def main(args: Array[String]): Unit = {
- values foreach println
+ values foreach println
}
}
diff --git a/test/files/run/t4608.scala b/test/files/run/t4608.scala
index a25d2fea05..3601adc275 100644
--- a/test/files/run/t4608.scala
+++ b/test/files/run/t4608.scala
@@ -3,9 +3,9 @@
// #4608
object Test {
-
+
def main(args: Array[String]) {
((1 to 100) sliding 10).toList.par.map{_.map{i => i * i}}.flatten
}
-
+
}
diff --git a/test/files/run/t4617.scala b/test/files/run/t4617.scala
index 2fea5e29ec..3a877c1915 100644
--- a/test/files/run/t4617.scala
+++ b/test/files/run/t4617.scala
@@ -3,7 +3,7 @@ object Test {
def f2 = {
lazy val d = 4D
lazy val f = 4f
-
+
def bar = "Str " + (d + f)
bar
}
diff --git a/test/files/run/t4656.scala b/test/files/run/t4656.scala
index 4f3d189c8f..ab3e3cf53d 100644
--- a/test/files/run/t4656.scala
+++ b/test/files/run/t4656.scala
@@ -6,7 +6,7 @@ object Test {
buf prependToList List(4, 5, 6)
l
}
-
+
def main(args: Array[String]): Unit = {
println(f)
}
diff --git a/test/files/run/t4671.check b/test/files/run/t4671.check
index 797c0d8905..4699818cd4 100644
--- a/test/files/run/t4671.check
+++ b/test/files/run/t4671.check
@@ -10,7 +10,7 @@ s: scala.io.BufferedSource = non-empty iterator
scala> println(s.getLines.mkString("\n"))
import scala.tools.partest.ReplTest
-object Test extends ReplTest {
+object Test extends ReplTest {
// My god...it's full of quines
def code = """
object o { val file = sys.props("partest.cwd") + "/t4671.scala" }
@@ -30,7 +30,7 @@ s: scala.io.BufferedSource = non-empty iterator
scala> println(s.mkString(""))
import scala.tools.partest.ReplTest
-object Test extends ReplTest {
+object Test extends ReplTest {
// My god...it's full of quines
def code = """
object o { val file = sys.props("partest.cwd") + "/t4671.scala" }
diff --git a/test/files/run/t4671.scala b/test/files/run/t4671.scala
index 6170104c33..aba0138aad 100644
--- a/test/files/run/t4671.scala
+++ b/test/files/run/t4671.scala
@@ -1,6 +1,6 @@
import scala.tools.partest.ReplTest
-object Test extends ReplTest {
+object Test extends ReplTest {
// My god...it's full of quines
def code = """
object o { val file = sys.props("partest.cwd") + "/t4671.scala" }
diff --git a/test/files/run/t4680.scala b/test/files/run/t4680.scala
index d5c8d0e7af..88611df7ae 100644
--- a/test/files/run/t4680.scala
+++ b/test/files/run/t4680.scala
@@ -43,13 +43,13 @@ class E() extends D() {
object Test {
def p(msg: String) = println("\n\n// " + msg)
-
+
def main(args: Array[String]) {
p("new C { }")
new C { }
p("new C { 5 }")
new C { 5 }
-
+
p("new D()")
new D()
p("new D() { }")
diff --git a/test/files/run/t4697.scala b/test/files/run/t4697.scala
index 95592172e0..728d095ff8 100644
--- a/test/files/run/t4697.scala
+++ b/test/files/run/t4697.scala
@@ -1,7 +1,7 @@
object Test {
var st = Stream(0)
for (i <- 1 to 10000) st = i +: st
-
+
def main(args: Array[String]): Unit = {
println(st.take(10000).sum)
}
diff --git a/test/files/run/t4752.scala b/test/files/run/t4752.scala
index 3d5c166a7a..2a9fc5361f 100644
--- a/test/files/run/t4752.scala
+++ b/test/files/run/t4752.scala
@@ -2,8 +2,8 @@ object Test {
object Bippy {
case object Dingus
}
-
- def main(args: Array[String]): Unit = {
+
+ def main(args: Array[String]): Unit = {
assert(None.## == "None".##, None)
assert(Test.Bippy.Dingus.## == "Dingus".##, Test.Bippy.Dingus)
}
diff --git a/test/files/run/t4753.scala b/test/files/run/t4753.scala
index cfb252cbe5..98f3e92678 100644
--- a/test/files/run/t4753.scala
+++ b/test/files/run/t4753.scala
@@ -1,4 +1,4 @@
-trait A {
+trait A {
val actualType: Class[_]
}
trait B extends A {
diff --git a/test/files/run/t4761.scala b/test/files/run/t4761.scala
index 205798b00e..82818379f5 100644
--- a/test/files/run/t4761.scala
+++ b/test/files/run/t4761.scala
@@ -7,7 +7,7 @@ object Test {
val gs = for (x <- (1 to 5)) yield { if (x % 2 == 0) List(1).seq else List(1).par }
println(gs.flatten)
println(gs.transpose)
-
+
val s = Stream(Vector(1).par, Vector(2).par)
println(s.flatten.toList)
println(s.transpose.map(_.toList).toList)
diff --git a/test/files/run/t4894.scala b/test/files/run/t4894.scala
index 2b70da141d..aa3b4340af 100644
--- a/test/files/run/t4894.scala
+++ b/test/files/run/t4894.scala
@@ -4,24 +4,24 @@
object Test {
-
+
def main(args: Array[String]) {
import collection._
val hs = mutable.HashSet[Int]()
hs ++= 1 to 10
hs --= 1 to 10
-
+
val phs = parallel.mutable.ParHashSet[Int]()
phs ++= 1 to 10
for (i <- 1 to 10) assert(phs(i))
phs --= 1 to 10
assert(phs.isEmpty)
-
+
val phm = parallel.mutable.ParHashMap[Int, Int]()
phm ++= ((1 to 10) zip (1 to 10))
for (i <- 1 to 10) assert(phm(i) == i)
phm --= 1 to 10
assert(phm.isEmpty)
}
-
+
}
diff --git a/test/files/run/t4895.scala b/test/files/run/t4895.scala
index 14f6761209..c6e6cc18b4 100644
--- a/test/files/run/t4895.scala
+++ b/test/files/run/t4895.scala
@@ -3,18 +3,18 @@
object Test {
-
+
def checkPar(sz: Int) {
import collection._
val hs = mutable.HashSet[Int]() ++ (1 to sz)
assert(hs.par.map(_ + 1).seq.toSeq.sorted == (2 to (sz + 1)))
}
-
+
def main(args: Array[String]) {
for (i <- 0 until 100) checkPar(i)
for (i <- 100 until 1000 by 50) checkPar(i)
for (i <- 1000 until 10000 by 500) checkPar(i)
for (i <- 10000 until 100000 by 5000) checkPar(i)
}
-
+
}
diff --git a/test/files/run/t576.scala b/test/files/run/t576.scala
index 2fc929f325..dc09d8dc98 100644
--- a/test/files/run/t576.scala
+++ b/test/files/run/t576.scala
@@ -12,7 +12,7 @@ object Dingus {
object Test {
val x1 = new A
val x2 = new A
-
+
val x3 = new { self =>
override def equals(other : Any) = other match {
case that: self.type => true
@@ -35,11 +35,11 @@ object Test {
assert(x1 != x2)
assert(x1 != ())
assert(x2 != x1)
-
+
assert(x3 == x3)
assert(x3 != x2)
assert(x2 != x3)
-
+
List(x1, x2, x3, x4, Dingus) map x4.f foreach println
}
} \ No newline at end of file
diff --git a/test/files/run/t603.scala b/test/files/run/t603.scala
index 361cef1f41..b8825c933b 100644
--- a/test/files/run/t603.scala
+++ b/test/files/run/t603.scala
@@ -22,7 +22,7 @@ object forceDelay {
object Test {
import forceDelay._
-
+
def main(args: Array[String]) = {
val s: Susp[Int] = delay { Console.println("evaluating..."); 3 }
Console.println("s = " + s)
diff --git a/test/files/run/t744.scala b/test/files/run/t744.scala
index 4895e9baa0..d5e9f6df34 100644
--- a/test/files/run/t744.scala
+++ b/test/files/run/t744.scala
@@ -5,7 +5,7 @@ trait Linked {
}
}
object Test {
- class Test extends Linked {
+ class Test extends Linked {
trait FileImpl extends super.FileImpl {
// val x: int = 1
}
diff --git a/test/files/run/t874.scala b/test/files/run/t874.scala
index d83014651b..41d124f728 100644
--- a/test/files/run/t874.scala
+++ b/test/files/run/t874.scala
@@ -5,7 +5,7 @@ object Test {
}
U("xyz")(2)
}
- class Mix extends Base {
+ class Mix extends Base {
case class U[A](x1: A)(x2: Int) {
Console.println("U created with "+x1+" and "+x2)
}
diff --git a/test/files/run/t920.scala b/test/files/run/t920.scala
index 6a7f122d55..1e12e6ba87 100644
--- a/test/files/run/t920.scala
+++ b/test/files/run/t920.scala
@@ -7,7 +7,7 @@ object Test {
trait Foo extends Test.Foo0 {
def foo : B.this.type = B.this;
}
- class baz extends Baz with Foo {
+ class baz extends Baz with Foo {
override def toString = "baz"
}
Console.println(new baz);
diff --git a/test/files/run/tailcalls.scala b/test/files/run/tailcalls.scala
index 77b123f5ce..04a1a8ba19 100644
--- a/test/files/run/tailcalls.scala
+++ b/test/files/run/tailcalls.scala
@@ -194,10 +194,10 @@ object FancyTailCalls {
}
object PolyObject extends App {
- def tramp[A](x: Int): Int =
+ def tramp[A](x: Int): Int =
if (x > 0)
tramp[A](x - 1)
- else
+ else
0
}
@@ -233,7 +233,7 @@ class NonTailCall {
if (n == 0) 0
else f2(n - 1)
}
-
+
}
//############################################################################
@@ -273,7 +273,7 @@ object Test {
}
println
}
-
+
def check_overflow(name: String, closure: => Int) {
print("test " + name)
try {
@@ -367,7 +367,7 @@ object Test {
check_success("TailCall.g3", TailCall.g3(max, max, Nil), 0)
check_success("TailCall.h1", TailCall.h1(max, max ), 0)
println
-
+
val NonTailCall = new NonTailCall
check_success("NonTailCall.f1", NonTailCall.f1(2), 0)
check_overflow("NonTailCall.f2", NonTailCall.f2(max))
@@ -382,17 +382,17 @@ object Test {
}
// testing explicit tailcalls.
-
+
import scala.util.control.TailCalls._
def isEven(xs: List[Int]): TailRec[Boolean] =
if (xs.isEmpty) done(true) else tailcall(isOdd(xs.tail))
def isOdd(xs: List[Int]): TailRec[Boolean] =
- if (xs.isEmpty) done(false) else tailcall(isEven(xs.tail))
+ if (xs.isEmpty) done(false) else tailcall(isEven(xs.tail))
assert(isEven((1 to 100000).toList).result)
-
+
}
//############################################################################
diff --git a/test/files/run/takeAndDrop.scala b/test/files/run/takeAndDrop.scala
index 8d2dff0bfa..6e87838e11 100644
--- a/test/files/run/takeAndDrop.scala
+++ b/test/files/run/takeAndDrop.scala
@@ -1,9 +1,9 @@
-object Test {
+object Test {
def main(args: Array[String]): Unit = {
val range = 1 to 10
val target = (3 to 8).toList
val confirm = (xs: Seq[Int]) => assert(xs.toList == target, xs)
-
+
confirm(range drop 2 dropRight 2)
confirm(range drop 1 dropRight 1 drop 1 dropRight 1)
confirm(range take 8 drop 2)
diff --git a/test/files/run/tcpoly_monads.scala b/test/files/run/tcpoly_monads.scala
index e437010481..cffbcc963b 100644
--- a/test/files/run/tcpoly_monads.scala
+++ b/test/files/run/tcpoly_monads.scala
@@ -4,15 +4,15 @@ trait Monads {
* (>>=) :: m a -> (a -> m b) -> m b
* return :: a -> m a
*
- * MonadTC encodes the above Haskell type class,
+ * MonadTC encodes the above Haskell type class,
* an instance of MonadTC corresponds to a method dictionary.
* (see http://lampwww.epfl.ch/~odersky/talks/wg2.8-boston06.pdf)
*
* Note that the identity (`this') of the method dictionary does not really correspond
- * to the instance of m[x] (`self') that is `wrapped': e.g., unit does not use `self' (which
+ * to the instance of m[x] (`self') that is `wrapped': e.g., unit does not use `self' (which
* corresponds to the argument of the implicit conversion that encodes an instance of this type class)
*/
- trait MonadTC[m[x], a] {
+ trait MonadTC[m[x], a] {
def unit[a](orig: a): m[a]
// >>='s first argument comes from the implicit definition constructing this "method dictionary"
@@ -27,7 +27,7 @@ trait Monads {
*/
trait OptionMonad extends Monads {
// this implicit method encodes the Monad type class instance for Option
- implicit def OptionInstOfMonad[a](self: Option[a]): MonadTC[Option, a]
+ implicit def OptionInstOfMonad[a](self: Option[a]): MonadTC[Option, a]
= new MonadTC[Option, a] {
def unit[a](orig: a) = Some(orig)
def >>=[b](fun: a => Option[b]): Option[b] = self match {
diff --git a/test/files/run/tcpoly_parseridioms.scala b/test/files/run/tcpoly_parseridioms.scala
index 741be05af1..634240e44d 100644
--- a/test/files/run/tcpoly_parseridioms.scala
+++ b/test/files/run/tcpoly_parseridioms.scala
@@ -1,10 +1,10 @@
trait Parsers {
type Input = List[Char]
-
+
sealed class ParseResult[+t](val next: Input)
- case class Success[+t](override val next: Input, result: t) extends ParseResult[t](next)
+ case class Success[+t](override val next: Input, result: t) extends ParseResult[t](next)
case class Failure(override val next: Input, msg: String) extends ParseResult[Nothing](next)
-
+
abstract class Parser[+t] {
def apply(in: Input): ParseResult[t]
}
@@ -16,7 +16,7 @@ trait Parsers {
case Success(next2, y) => Success(next2, Pair(x,y))
case Failure(_, msg) => Failure(in, msg)
}
- case Failure(_, msg) => Failure(in, msg)
+ case Failure(_, msg) => Failure(in, msg)
}
}
@@ -38,20 +38,20 @@ trait Parsers {
case Failure(n, msg) => Failure(n, msg)
}
}
-
+
def accept[T](c: Char, r: T): Parser[T] = new Parser[T] {
def apply(in: Input) = in match {
case c2 :: n if c2 == c => Success(n, r)
case n => Failure(n, "expected "+c+" at the head of "+n)
}
}
-
- def apply_++[s, tt](fun: Parser[s => tt], arg: Parser[s]): Parser[tt] = lift[Pair[s=>tt, s], tt]({case Pair(f, a) => f(a)})(sq(fun, arg))
-
+
+ def apply_++[s, tt](fun: Parser[s => tt], arg: Parser[s]): Parser[tt] = lift[Pair[s=>tt, s], tt]({case Pair(f, a) => f(a)})(sq(fun, arg))
+
def success[u](v: u): Parser[u] = new Parser[u] {
def apply(in: Input) = Success(in, v)
}
-
+
}
trait Idioms {
@@ -61,21 +61,21 @@ trait Idioms {
def pureMethod[a](name: String, x: a): idi[a] = pure(x) // hack for Mirrors: allow passing of method names
}
- class IdiomaticTarget[idi[x], idiom <: Idiom[idi], s](i: idiom, tgt: s) {
+ class IdiomaticTarget[idi[x], idiom <: Idiom[idi], s](i: idiom, tgt: s) {
def dot [t](fun: s => t, name: String) = new IdiomaticApp2[idi, idiom, t](i, i.liftedApply(i.pureMethod(name, fun))(i.pure(tgt)))
} // TODO: `.` --> java.lang.ClassFormatError: Illegal method name "." in class Idioms$Id$
- class IdiomaticFunction[idi[x], idiom <: Idiom[idi], s, t](i: idiom, fun: s => t) {
+ class IdiomaticFunction[idi[x], idiom <: Idiom[idi], s, t](i: idiom, fun: s => t) {
def <| (a: idi[s]) = new IdiomaticApp[idi, idiom, t](i, i.liftedApply(i.pure(fun))(a))
}
class IdiomaticApp[idi[x], idiom <: Idiom[idi], x](i: idiom, a: idi[x]) {
// where x <: s=>t -- TODO can this be expressed without generalised constraints?
def <> [s, t](b: idi[s]) = new IdiomaticApp[idi, idiom, t](i, i.liftedApply(a.asInstanceOf[idi[s=>t]])(b))
-
+
def |> : idi[x] = a
}
-
+
class IdiomaticApp2[idi[x], idiom <: Idiom[idi], x](i: idiom, a: idi[x]) extends IdiomaticApp[idi, idiom, x](i, a) {
def <| [s, t](b: idi[s]) = <>[s,t](b)
}
@@ -86,22 +86,22 @@ trait ParserIdioms extends Parsers with Idioms {
def liftedApply[s, t](fun: Parser[s => t])(arg: Parser[s]): Parser[t] = apply_++(fun, arg)
def pure[a](x: a): Parser[a] = success(x)
}
-
- implicit def parserIdiomFun[s, t](fun: s=>t): IdiomaticFunction[Parser, ParserIdiom.type, s, t] =
+
+ implicit def parserIdiomFun[s, t](fun: s=>t): IdiomaticFunction[Parser, ParserIdiom.type, s, t] =
new IdiomaticFunction[Parser, ParserIdiom.type, s, t](ParserIdiom, fun)
- implicit def parserIdiomTgt[s](tgt: s): IdiomaticTarget[Parser, ParserIdiom.type, s] =
+ implicit def parserIdiomTgt[s](tgt: s): IdiomaticTarget[Parser, ParserIdiom.type, s] =
new IdiomaticTarget[Parser, ParserIdiom.type, s](ParserIdiom, tgt)
-
+
trait Expr
case class Plus(a: Int, b: Int) extends Expr
-
+
def num = or(accept('0', 0), or(accept('1', 1),accept('2', 2)))
-
- // TODO: how can parserIdiom(curry2(_)) be omitted?
+
+ // TODO: how can parserIdiom(curry2(_)) be omitted?
def expr: Parser[Expr] = parserIdiomFun(curry2(Plus)) <| num <> num |>
-
+
implicit def curry2[s,t,u](fun: (s, t)=>u)(a: s)(b: t) = fun(a, b)
- implicit def curry3[r,s,t,u](fun: (r,s, t)=>u)(a: r)(b: s)(c: t) = fun(a, b, c)
+ implicit def curry3[r,s,t,u](fun: (r,s, t)=>u)(a: r)(b: s)(c: t) = fun(a, b, c)
}
object Test extends ParserIdioms with App {
diff --git a/test/files/run/transform.scala b/test/files/run/transform.scala
index 250df95df0..5cc1c49d6f 100644
--- a/test/files/run/transform.scala
+++ b/test/files/run/transform.scala
@@ -1,6 +1,6 @@
object Test {
val x = 1 to 10 toBuffer
-
+
def main(args: Array[String]): Unit = {
x transform (_ * 2)
assert(x.sum == (1 to 10).sum * 2)
diff --git a/test/files/run/transpose.scala b/test/files/run/transpose.scala
index 2761a24ff5..3bea74b365 100644
--- a/test/files/run/transpose.scala
+++ b/test/files/run/transpose.scala
@@ -1,8 +1,8 @@
object Test {
- def wrap[T >: Null](body: => T) =
+ def wrap[T >: Null](body: => T) =
try body
catch { case _: IllegalArgumentException => null }
-
+
def main(args: Array[String]): Unit = {
assert(wrap(Nil.transpose) == Nil)
assert(wrap(List(List(1, 2), List(1)).transpose) == null)
diff --git a/test/files/run/treePrint.scala b/test/files/run/treePrint.scala
index 452aaf390d..745c2150c2 100644
--- a/test/files/run/treePrint.scala
+++ b/test/files/run/treePrint.scala
@@ -4,7 +4,7 @@ object Test {
import scala.tools.nsc._
import interpreter._
import java.io.{ OutputStream, BufferedReader, StringReader, PrintWriter, Writer, OutputStreamWriter}
-
+
val code = """
def foo = {
var q: Boolean = false
@@ -22,11 +22,11 @@ object Test {
else 20
}
else 30
-
+
(x == 5) || !q || true
}
- """
-
+ """
+
class NullOutputStream extends OutputStream { def write(b: Int) { } }
def main(args: Array[String]) {
diff --git a/test/files/run/triple-quoted-expr.scala b/test/files/run/triple-quoted-expr.scala
index 6d91ac5888..0b30946de2 100644
--- a/test/files/run/triple-quoted-expr.scala
+++ b/test/files/run/triple-quoted-expr.scala
@@ -1,18 +1,18 @@
class A {
def f1 = {
val x = 5
-
+
"""
hi"""
}
def f2 = {
val x = 5
-
+
"""hi"""
- }
+ }
def f3 = {
val x = 5
-
+
"\nhi"
}
}
diff --git a/test/files/run/try-2.scala b/test/files/run/try-2.scala
index 909a68bbd2..677f0b48eb 100644
--- a/test/files/run/try-2.scala
+++ b/test/files/run/try-2.scala
@@ -7,7 +7,7 @@
object Test {
- def tryAllUnit: Unit =
+ def tryAllUnit: Unit =
try {
throw new Error();
}
@@ -15,28 +15,28 @@ object Test {
case _ => Console.println("exception happened\n");
}
- def tryUnitAll: Unit =
+ def tryUnitAll: Unit =
try {
Console.println("Nothin");
} catch {
case _ => error("Bad, bad, lama!");
}
- def tryAllAll: Unit =
+ def tryAllAll: Unit =
try {
throw new Error();
} catch {
case _ => error("Bad, bad, lama!");
}
- def tryUnitUnit: Unit =
+ def tryUnitUnit: Unit =
try {
Console.println("Nothin");
} catch {
case _ => Console.println("Nothin");
}
- def tryIntUnit: Unit =
+ def tryIntUnit: Unit =
try {
10;
} catch {
@@ -55,7 +55,7 @@ object Test {
execute(tryAllUnit);
execute(tryUnitAll);
execute(tryAllAll);
- execute(tryUnitUnit);
+ execute(tryUnitUnit);
execute(tryIntUnit);
}
}
diff --git a/test/files/run/try.scala b/test/files/run/try.scala
index 5545bcbec1..ad3d606246 100644
--- a/test/files/run/try.scala
+++ b/test/files/run/try.scala
@@ -17,8 +17,8 @@ object Test extends AnyRef with App {
Console.println(
(try { x } catch {
case _: Error => 1;
- })
- +
+ })
+ +
(try { x } catch {
case _: Error => 1;
})
@@ -116,7 +116,7 @@ object Test extends AnyRef with App {
}
*/
-
+
try1;
try2;
try3;
diff --git a/test/files/run/tuple-match.scala b/test/files/run/tuple-match.scala
index fcaefbff5b..57ba9cf6e1 100644
--- a/test/files/run/tuple-match.scala
+++ b/test/files/run/tuple-match.scala
@@ -1,7 +1,7 @@
object Test {
val FOUR = (-1, -2, -3, "bingo donkey vegas")
val THREE = (-1, -2, -3)
-
+
def f(x: Any) = x match {
case FOUR => "FOUR"
case (_, _, 3, _) => "4, #3"
@@ -13,7 +13,7 @@ object Test {
case (_, 2) => "2, #2"
case _ => "default"
}
-
+
def main(args: Array[String]): Unit = {
println(f((1, 2, 3, 4)))
println(f((1, 2, 30, 4)))
diff --git a/test/files/run/tuple-zipped.scala b/test/files/run/tuple-zipped.scala
index 8f482dc3bf..a9851346bc 100644
--- a/test/files/run/tuple-zipped.scala
+++ b/test/files/run/tuple-zipped.scala
@@ -8,32 +8,32 @@ object Test {
val as1 = 1 to 100 toArray
val as2 = as1.view
val as3 = as1 take 10
-
+
def xss1 = List[Seq[Int]](xs1, xs2, xs3, ss1, ss2, ss3, as1, as2, as3)
def xss2 = List[Seq[Int]](xs1, xs2, xs3, ss3, as1, as2, as3) // no infinities
def xss3 = List[Seq[Int]](xs2, xs3, ss3, as1) // representative sampling
-
+
def main(args: Array[String]): Unit = {
for (cc1 <- xss1 ; cc2 <- xss2) {
val sum1 = (cc1, cc2).zip map { case (x, y) => x + y } sum
val sum2 = (cc1, cc2).zipped map (_ + _) sum
-
+
assert(sum1 == sum2)
}
-
+
for (cc1 <- xss1 ; cc2 <- xss2 ; cc3 <- xss3) {
val sum1 = (cc1, cc2, cc3).zip map { case (x, y, z) => x + y + z } sum
val sum2 = (cc1, cc2, cc3).zipped map (_ + _ + _) sum
-
+
assert(sum1 == sum2)
}
-
+
assert((ss1, ss1).zipped exists ((x, y) => true))
assert((ss1, ss1, ss1).zipped exists ((x, y, z) => true))
-
+
assert(!(ss1, ss2, 1 to 3).zipped.exists(_ + _ + _ > 100000))
assert((1 to 3, ss1, ss2).zipped.forall(_ + _ + _ > 0))
assert((ss1, 1 to 3, ss2).zipped.map(_ + _ + _).size == 3)
}
}
-
+
diff --git a/test/files/run/typealias_overriding.scala b/test/files/run/typealias_overriding.scala
index 4b6a0037ec..8a2d1312ab 100644
--- a/test/files/run/typealias_overriding.scala
+++ b/test/files/run/typealias_overriding.scala
@@ -1,21 +1,21 @@
// this bug (http://scala-webapps.epfl.ch/bugtracking/bugs/displayItem.do?id=1065)
-// was caused by Uncurry not normalizing all the types
+// was caused by Uncurry not normalizing all the types
// (more specifically the argument/return types of an anonymous Function)
object Test extends App {
trait AddRemove {
type TNode <: NodeImpl;
trait NodeImpl;
-
+
object removing {
type TNode = AddRemove.this.TNode;
def printNode(node: TNode, f: TNode => String) = Console.println(f(node))
}
}
-
+
class Linked extends AddRemove {
type TNode = Node // can also directly write `class Node extends super.NodeImpl' -- doesn't change the bug
class Node extends super.NodeImpl { override def toString = "LinkedNode" }
-
+
removing.printNode(new Node, (x: removing.TNode) => x.toString) // make inference explicit, doesn't affect the bug
}
diff --git a/test/files/run/unapply.scala b/test/files/run/unapply.scala
index 0c5a70e768..90dd4fae73 100644
--- a/test/files/run/unapply.scala
+++ b/test/files/run/unapply.scala
@@ -22,7 +22,7 @@ object Faa {
def unapply(x: Any): Option[String] = if(x.isInstanceOf[Bar]) Some(x.asInstanceOf[Bar].name) else None
}
object FaaPrecise {
- def unapply(x: Bar): Option[String] = Some(x.name)
+ def unapply(x: Bar): Option[String] = Some(x.name)
}
object FaaPreciseSome {
def unapply(x: Bar) = Some(x.name) // return type Some[String]
@@ -108,14 +108,14 @@ object Test1256 {
class Sync {
def unapply(scrut: Any): Boolean = false
}
-
+
class Buffer {
val Get = new Sync
val jp: PartialFunction[Any, Any] = {
case Get() =>
}
}
-
+
def run() {
assert(!(new Buffer).jp.isDefinedAt(42))
}
diff --git a/test/files/run/unittest_collection.scala b/test/files/run/unittest_collection.scala
index 822e2b0c98..3639b496b3 100644
--- a/test/files/run/unittest_collection.scala
+++ b/test/files/run/unittest_collection.scala
@@ -12,7 +12,7 @@ object Test {
}
def test(x: Buffer[String]) {
- // testing method +=
+ // testing method +=
x += "one"
assert(x(0) == "one", "retrieving 'one'")
assert(x.length == 1, "length A")
@@ -25,10 +25,10 @@ object Test {
assert(x.length == 1, "length C")
- try { x(1); sys.error("no exception for removed element") }
+ try { x(1); sys.error("no exception for removed element") }
catch { case i:IndexOutOfBoundsException => }
- try { x.remove(1); sys.error("no exception for removed element") }
+ try { x.remove(1); sys.error("no exception for removed element") }
catch { case i:IndexOutOfBoundsException => }
x += "two2"
diff --git a/test/files/run/unittest_iterator.scala b/test/files/run/unittest_iterator.scala
index 21dc64c3c5..89ccdb9d58 100644
--- a/test/files/run/unittest_iterator.scala
+++ b/test/files/run/unittest_iterator.scala
@@ -1,5 +1,5 @@
// Some iterator grouped/sliding unit tests
-object Test {
+object Test {
def it = (1 to 10).iterator
def assertThat[T](expectedLength: Int, expectedLast: Seq[T])(it: Iterator[Seq[T]]) {
val xs = it.toList
@@ -7,15 +7,15 @@ object Test {
assert(xs.size == expectedLength, fail("expected length " + expectedLength))
assert(xs.last == expectedLast, fail("expected last " + expectedLast))
}
-
+
def main(args: Array[String]): Unit = {
val itSum = it.toStream.sum
for (i <- it) {
// sum of the groups == sum of the original
val thisSum = ((it grouped i) map (_.sum)).toStream.sum
- assert(thisSum == itSum, thisSum + " != " + itSum)
+ assert(thisSum == itSum, thisSum + " != " + itSum)
}
-
+
// grouped
assertThat(4, List(10)) { it grouped 3 }
assertThat(3, List(7, 8, 9)) { it grouped 3 withPartial false }
@@ -32,11 +32,11 @@ 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 }
-
+
// larger step than window
assertThat(5, List(9)) { it.sliding(1, 2) }
assertThat(3, List(9, 10)) { it.sliding(2, 4) }
-
+
// make sure it throws past the end
val thrown = try {
val it = List(1,2,3).sliding(2)
diff --git a/test/files/run/vector1.scala b/test/files/run/vector1.scala
index e8785e2b16..b37cfe82e8 100644
--- a/test/files/run/vector1.scala
+++ b/test/files/run/vector1.scala
@@ -9,7 +9,7 @@ import scala.collection.mutable.Builder
object Test {
-
+
def vector(label: String, n: Int): Vector[String] = {
val a = new VectorBuilder[String]
for (i <- 0 until n)
@@ -67,7 +67,7 @@ object Test {
def test1() = {
println("===== test1 =====")
-
+
val N = 150000
val a = vector("a", N)
val b = vectorForward("b", N)
@@ -81,22 +81,22 @@ object Test {
println("===== test2 =====")
var a: Vector[String] = Vector.empty
-
+
val rand = new java.util.Random
-
+
val N = 150000
var min = N/2//rand.nextInt(N)
var max = min
-
+
val chunkLimit = 11
-
+
def nextChunkSize = 3 //rand.nextInt(chunkLimit)
-
+
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 {
-
+
while (min > 0 || max < N) {
seqFront()
seqBack()
@@ -107,7 +107,7 @@ object Test {
//a.debug
throw ex
}
-
+
assertVector(a, "a", 0, N)
}
@@ -122,14 +122,14 @@ object Test {
val pos = scala.util.Random.shuffle(scala.collection.mutable.WrappedArray.make[Int](Array.tabulate[Int](N)(i => i)))
var b = a
-
+
{
var i = 0
while (i < N) {
b = b.updated(pos(i), "b"+(pos(i)))
i += 1
}
-
+
assertVector(b, "b", 0, N)
}
diff --git a/test/files/run/view-headoption.scala b/test/files/run/view-headoption.scala
index 659c7e6b82..629b974c19 100644
--- a/test/files/run/view-headoption.scala
+++ b/test/files/run/view-headoption.scala
@@ -2,13 +2,13 @@ object Test {
val failer = () => { println("fail") ; None }
val succeeder = () => { println("success") ; Some(5) }
val fs = List(failer, succeeder, failer, failer, succeeder, failer, failer, failer, succeeder)
-
+
def f0 = fs.view flatMap (f => f())
def f1 = f0.headOption
def f2 = f0.head
def f3 = f0.lastOption
def f4 = f0.last
-
+
def main(args: Array[String]): Unit = {
println("f1: " + f1)
println("f2: " + f2)
diff --git a/test/files/run/view-iterator-stream.scala b/test/files/run/view-iterator-stream.scala
index 5ac299a34d..f91407f92c 100644
--- a/test/files/run/view-iterator-stream.scala
+++ b/test/files/run/view-iterator-stream.scala
@@ -18,7 +18,7 @@ object Test {
}
def and(g: Perturber): Perturber =
new Perturber(this.labels ++ g.labels, f andThen g.f)
-
+
override def toString = labels mkString " -> "
}
object Perturber {
@@ -39,14 +39,14 @@ object Test {
"slice(%d, %d)".format(from, until),
_.toTraversable.slice(from, until)
)
-
+
val fns = List[Perturber](toV, toI, toS, toIS)
def tds(n: Int): Perturber = p(drop(n), take(n / 2), slice(1, n / 4))
def dts(n: Int): Perturber = p(take(n), drop(n / 2), slice(1, n / 4))
def sdt(n: Int): Perturber = p(slice(n, n * 2), drop(n / 2), take(n / 4))
def std(n: Int): Perturber = p(slice(n, n * 2), take(n / 2), drop(n / 4))
-
+
val transforms = (fns.permutations map (xs => p(xs take 3: _*))).toList.distinct
def mkOps(n: Int) = List[Perturber](tds(n), dts(n), sdt(n), std(n))
def runOps(n: Int) = {
@@ -60,7 +60,7 @@ object Test {
}
()
}
-
+
def main(args: Array[String]): Unit = {
runOps(20)
}
diff --git a/test/files/run/viewtest.scala b/test/files/run/viewtest.scala
index 581958e9a6..bb2c28d68a 100755
--- a/test/files/run/viewtest.scala
+++ b/test/files/run/viewtest.scala
@@ -25,8 +25,8 @@ object Test extends App {
2.8 regression: CCE when zipping list projection with stream
Reported by: szeiger Owned by: odersky
Priority: normal Component: Standard Library
-Keywords: collections, zip Cc:
-Fixed in version:
+Keywords: collections, zip Cc:
+Fixed in version:
Description
Welcome to Scala version 2.8.0.r18784-b20090925021043 (Java HotSpot(TM) Client VM, Java 1.6.0_11).
diff --git a/test/files/run/virtpatmat_apply.scala b/test/files/run/virtpatmat_apply.scala
index b8776f4afb..34cb80e449 100644
--- a/test/files/run/virtpatmat_apply.scala
+++ b/test/files/run/virtpatmat_apply.scala
@@ -1,5 +1,5 @@
object Test extends App {
- List(1, 2, 3) match {
+ List(1, 2, 3) match {
case Nil => println("FAIL")
case x :: y :: xs if xs.length == 2 => println("FAIL")
case x :: y :: xs if xs.length == 1 => println("OK "+ y)
diff --git a/test/files/run/virtpatmat_casting.scala b/test/files/run/virtpatmat_casting.scala
index 7c5e1c7117..d970abae90 100644
--- a/test/files/run/virtpatmat_casting.scala
+++ b/test/files/run/virtpatmat_casting.scala
@@ -1,7 +1,7 @@
object Test extends App {
- println(List(1,2,3) match {
- case Nil => List(0)
-// since the :: extractor's argument must be a ::, there has to be a cast before its unapply is invoked
+ println(List(1,2,3) match {
+ case Nil => List(0)
+// since the :: extractor's argument must be a ::, there has to be a cast before its unapply is invoked
case x :: y :: z :: a :: xs => xs ++ List(x)
case x :: y :: z :: xs => xs ++ List(x)
})
diff --git a/test/files/run/virtpatmat_literal.scala b/test/files/run/virtpatmat_literal.scala
index 460811eba9..cb72b1d2a5 100644
--- a/test/files/run/virtpatmat_literal.scala
+++ b/test/files/run/virtpatmat_literal.scala
@@ -1,21 +1,21 @@
object Test extends App {
- 1 match {
- case 2 => println("FAILED")
- case 1 => println("OK")
- case 1 => println("FAILED")
+ 1 match {
+ case 2 => println("FAILED")
+ case 1 => println("OK")
+ case 1 => println("FAILED")
}
val one = 1
- 1 match {
- case 2 => println("FAILED")
- case `one` => println("OK")
- case 1 => println("FAILED")
+ 1 match {
+ case 2 => println("FAILED")
+ case `one` => println("OK")
+ case 1 => println("FAILED")
}
- 1 match {
- case 2 => println("FAILED")
- case Test.one => println("OK")
- case 1 => println("FAILED")
+ 1 match {
+ case 2 => println("FAILED")
+ case Test.one => println("OK")
+ case 1 => println("FAILED")
}
} \ No newline at end of file
diff --git a/test/files/run/virtpatmat_partial.scala b/test/files/run/virtpatmat_partial.scala
index d30944efb4..c408b31983 100644
--- a/test/files/run/virtpatmat_partial.scala
+++ b/test/files/run/virtpatmat_partial.scala
@@ -36,7 +36,7 @@ object Test extends App {
// else
// o9
// })
- //
+ //
// def isDefinedAt(x_1: (String, Option[Int])): Boolean = MatchingStrategy.OptionMatchingStrategy.isSuccess[(String, Option[Int]), (String, Int)](x_1)(
// (x1: (String, Option[Int])) => {
// val o9: Option[(String, Int)] = ({
diff --git a/test/files/run/virtpatmat_typed.scala b/test/files/run/virtpatmat_typed.scala
index cdd6d3c749..a9863cc48a 100644
--- a/test/files/run/virtpatmat_typed.scala
+++ b/test/files/run/virtpatmat_typed.scala
@@ -1,7 +1,7 @@
object Test extends App {
- ("foo": Any) match {
- case x: Int => println("FAILED")
- case x: String => println("OK "+ x)
- case x: String => println("FAILED")
+ ("foo": Any) match {
+ case x: Int => println("FAILED")
+ case x: String => println("OK "+ x)
+ case x: String => println("FAILED")
}
} \ No newline at end of file
diff --git a/test/files/run/virtpatmat_unapply.scala b/test/files/run/virtpatmat_unapply.scala
index a6e71f3963..6d7b4dbe68 100644
--- a/test/files/run/virtpatmat_unapply.scala
+++ b/test/files/run/virtpatmat_unapply.scala
@@ -6,12 +6,12 @@ object IntList {
}
object Test extends App {
- IntList(1, IntList(2, NilIL)) match {
+ IntList(1, IntList(2, NilIL)) match {
case IntList(a1, IntList(a2, IntList(a3, y))) => println(a1 + a2 + a3)
case IntList(x, y) => println(x)
}
- IntList(1, IntList(2, IntList(3, NilIL))) match {
+ IntList(1, IntList(2, IntList(3, NilIL))) match {
case IntList(a1, IntList(a2, IntList(a3, y))) => println(a1 + a2 + a3)
case IntList(x, y) => println(x)
}
@@ -20,12 +20,12 @@ object Test extends App {
// ((x1: IntList) => IntList.unapply(x1).flatMap(((x4: (Int, IntList)) => IntList.unapply(x4._2).flatMap(((x5: (Int, IntList)) => IntList.unapply(x5._2).flatMap(((x6: (Int, IntList)) => implicitly[Predef.MatchingStrategy[Option]].success(Predef.println(x4._1.+(x5._1).+(x6._1))))))))).orElse(IntList.unapply(x1).flatMap(((x7: (Int, IntList)) => implicitly[scala.Predef.MatchingStrategy[Option]].success(Predef.println(x7._1))))).orElse(implicitly[scala.Predef.MatchingStrategy[Option]].fail))(IntList.apply(1, IntList.apply(2, IntList.apply(3, null))))
/*
- ((x1: IntList) =>
- IntList.this.unapply(x1).flatMap[Int](((x4: (Int, IntList)) =>
- IntList.this.unapply(x4._2).flatMap[Int](((x5: (Int, IntList)) =>
- IntList.this.unapply(x5._2).flatMap[Int](((x6: (Int, IntList)) =>
+ ((x1: IntList) =>
+ IntList.this.unapply(x1).flatMap[Int](((x4: (Int, IntList)) =>
+ IntList.this.unapply(x4._2).flatMap[Int](((x5: (Int, IntList)) =>
+ IntList.this.unapply(x5._2).flatMap[Int](((x6: (Int, IntList)) =>
Predef.this.implicitly[scala.Predef.MatchingStrategy[Option]](scala.this.Predef.OptionMatching).success[Int](x6._1))))))).orElse[Int](
- IntList.this.unapply(x1).flatMap[Int](((x7: (Int, IntList)) =>
+ IntList.this.unapply(x1).flatMap[Int](((x7: (Int, IntList)) =>
Predef.this.implicitly[scala.Predef.MatchingStrategy[Option]](scala.this.Predef.OptionMatching).success[Int](x7._1)))).orElse[Int](
Predef.this.implicitly[scala.Predef.MatchingStrategy[Option]](scala.this.Predef.OptionMatching).fail)
).apply(IntList.apply(1, null))
diff --git a/test/files/run/xml-loop-bug.scala b/test/files/run/xml-loop-bug.scala
index 3894779f7c..378ae9bc2b 100644
--- a/test/files/run/xml-loop-bug.scala
+++ b/test/files/run/xml-loop-bug.scala
@@ -1,6 +1,6 @@
object Test {
def main(args: Array[String]): Unit = {
scala.tools.nsc.io.NullPrintStream.setOutAndErr()
- scala.xml.parsing.ConstructingParser.fromSource(scala.io.Source.fromString("<!DOCTYPE xmeml SYSTEM> <xmeml> <sequence> </sequence> </xmeml> "), true).document.docElem
+ scala.xml.parsing.ConstructingParser.fromSource(scala.io.Source.fromString("<!DOCTYPE xmeml SYSTEM> <xmeml> <sequence> </sequence> </xmeml> "), true).document.docElem
}
}
diff --git a/test/files/scalacheck/CheckEither.scala b/test/files/scalacheck/CheckEither.scala
index 0651b90b2e..a7e50877a7 100644
--- a/test/files/scalacheck/CheckEither.scala
+++ b/test/files/scalacheck/CheckEither.scala
@@ -9,7 +9,7 @@ import org.scalacheck.ConsoleReporter.testStatsEx
import Function.tupled
object CheckEither extends Properties("Either") {
- implicit def arbitraryEither[X, Y](implicit xa: Arbitrary[X], ya: Arbitrary[Y]): Arbitrary[Either[X, Y]] =
+ implicit def arbitraryEither[X, Y](implicit xa: Arbitrary[X], ya: Arbitrary[Y]): Arbitrary[Either[X, Y]] =
Arbitrary[Either[X, Y]](oneOf(arbitrary[X].map(Left(_)), arbitrary[Y].map(Right(_))))
val prop_either1 = forAll((n: Int) => Left(n).fold(x => x, b => error("fail")) == n)
@@ -20,7 +20,7 @@ object CheckEither extends Properties("Either") {
case Left(a) => e.swap.right.get == a
case Right(b) => e.swap.left.get == b
})
-
+
val prop_isLeftRight = forAll((e: Either[Int, Int]) => e.isLeft != e.isRight)
object CheckLeftProjection {
@@ -36,7 +36,7 @@ object CheckEither extends Properties("Either") {
val prop_exists = forAll((e: Either[Int, Int]) =>
e.left.exists(_ % 2 == 0) == (e.isLeft && e.left.get % 2 == 0))
-
+
val prop_flatMapLeftIdentity = forAll((e: Either[Int, Int], n: Int, s: String) => {
def f(x: Int) = if(x % 2 == 0) Left(s) else Right(s)
Left(n).left.flatMap(f(_)) == f(n)})
@@ -116,7 +116,7 @@ object CheckEither extends Properties("Either") {
}
val prop_Either_left = forAll((n: Int) => Left(n).left.get == n)
-
+
val prop_Either_right = forAll((n: Int) => Right(n).right.get == n)
val prop_Either_joinLeft = forAll((e: Either[Either[Int, Int], Int]) => e match {
@@ -129,12 +129,12 @@ object CheckEither extends Properties("Either") {
case Right(ee) => e.joinRight == ee
})
- val prop_Either_reduce = forAll((e: Either[Int, Int]) =>
+ val prop_Either_reduce = forAll((e: Either[Int, Int]) =>
e.merge == (e match {
case Left(a) => a
case Right(a) => a
}))
-
+
/** Hard to believe I'm "fixing" a test to reflect B before A ... */
val prop_Either_cond = forAll((c: Boolean, a: Int, b: Int) =>
Either.cond(c, a, b) == (if(c) Right(a) else Left(b)))
@@ -169,19 +169,19 @@ object CheckEither extends Properties("Either") {
("Right.prop_seq", CheckRightProjection.prop_seq),
("Right.prop_option", CheckRightProjection.prop_option),
("prop_Either_left", prop_Either_left),
- ("prop_Either_right", prop_Either_right),
+ ("prop_Either_right", prop_Either_right),
("prop_Either_joinLeft", prop_Either_joinLeft),
- ("prop_Either_joinRight", prop_Either_joinRight),
- ("prop_Either_reduce", prop_Either_reduce),
+ ("prop_Either_joinRight", prop_Either_joinRight),
+ ("prop_Either_reduce", prop_Either_reduce),
("prop_Either_cond", prop_Either_cond)
)
-
+
for ((label, prop) <- tests) {
property(label) = prop
}
-
+
import org.scalacheck.{ Test => STest }
-
+
def runTests() = {
STest.checkProperties(STest.Params(testCallback = ConsoleReporter(0)), this)
}
diff --git a/test/files/scalacheck/HashTrieSplit.scala b/test/files/scalacheck/HashTrieSplit.scala
index e959a3d535..908c878f54 100644
--- a/test/files/scalacheck/HashTrieSplit.scala
+++ b/test/files/scalacheck/HashTrieSplit.scala
@@ -14,7 +14,7 @@ object Test {
def main(args: Array[String]) {
doesSplitOk
}
-
+
def doesSplitOk = {
val sz = 2000
var ht = new parallel.immutable.ParHashMap[Int, Int]
diff --git a/test/files/scalacheck/Unrolled.scala b/test/files/scalacheck/Unrolled.scala
index 34604b8667..8067a44501 100644
--- a/test/files/scalacheck/Unrolled.scala
+++ b/test/files/scalacheck/Unrolled.scala
@@ -5,7 +5,7 @@ import Gen._
import collection.mutable.UnrolledBuffer
object Test extends Properties("UnrolledBuffer") {
-
+
property("concat size") = forAll { (l1: List[Int], l2: List[Int]) =>
val u1 = new UnrolledBuffer[Int]
u1 ++= l1
@@ -15,12 +15,12 @@ object Test extends Properties("UnrolledBuffer") {
u1 concat u2
totalsz == u1.size
}
-
+
property("adding") = forAll { (l: List[Int]) =>
val u = new UnrolledBuffer[Int]
u ++= l
u == l
}
-
+
}
diff --git a/test/files/scalacheck/array.scala b/test/files/scalacheck/array.scala
index 03c0217180..f262bc6320 100644
--- a/test/files/scalacheck/array.scala
+++ b/test/files/scalacheck/array.scala
@@ -11,7 +11,7 @@ object Test extends Properties("Array") {
*/
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]]],
@@ -20,7 +20,7 @@ object Test extends Properties("Array") {
arbitrary[Array[Boolean]],
arbitrary[Array[AnyVal]]
)
-
+
// inspired by #1857 and #2352
property("eq/ne") = forAll(arrGen, arrGen) { (c1, c2) =>
(c1 eq c2) || (c1 ne c2)
@@ -32,6 +32,6 @@ object Test extends Properties("Array") {
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/list.scala b/test/files/scalacheck/list.scala
index 5f6de95237..4e1cf1fc80 100644
--- a/test/files/scalacheck/list.scala
+++ b/test/files/scalacheck/list.scala
@@ -12,7 +12,7 @@ object Test extends Properties("List") {
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) =>
+ forAll { (x: Int) =>
val xs = List.fill(count)(x)
(xs.length == count) && (xs.distinct == List(x))
}
diff --git a/test/files/scalacheck/parallel-collections/IntOperators.scala b/test/files/scalacheck/parallel-collections/IntOperators.scala
index 4a74b91da8..5c997962ba 100644
--- a/test/files/scalacheck/parallel-collections/IntOperators.scala
+++ b/test/files/scalacheck/parallel-collections/IntOperators.scala
@@ -106,7 +106,7 @@ trait IntSeqOperators extends IntOperators with SeqOperators[Int] {
List(4, 5, 6, 7, 8, 9, 10),
List(4, 5, 6, 7, 8, 9, 0),
List(-4, -3, -2, -1)
- )
+ )
}
diff --git a/test/files/scalacheck/parallel-collections/PairOperators.scala b/test/files/scalacheck/parallel-collections/PairOperators.scala
index fe851114be..4711e21c34 100644
--- a/test/files/scalacheck/parallel-collections/PairOperators.scala
+++ b/test/files/scalacheck/parallel-collections/PairOperators.scala
@@ -7,76 +7,76 @@ import scala.collection.parallel._
trait PairOperators[K, V] extends Operators[(K, V)] {
def koperators: Operators[K]
def voperators: Operators[V]
-
+
private def zipPredicates(kps: List[K => Boolean], vps: List[V => Boolean]): List[((K, V)) => Boolean] = for {
(kp, vp) <- koperators.countPredicates zip voperators.countPredicates
} yield new Function1[(K, V), Boolean] {
def apply(kv: (K, V)) = kp(kv._1) && vp(kv._2)
}
-
+
/* operators */
-
+
def reduceOperators = for {
(kop, vop) <- koperators.reduceOperators zip voperators.reduceOperators
} yield new Function2[(K, V), (K, V), (K, V)] {
def apply(kv1: (K, V), kv2: (K, V)) = (kop(kv1._1, kv2._1), vop(kv1._2, kv2._2))
}
-
+
def countPredicates = zipPredicates(koperators.countPredicates, voperators.countPredicates)
-
+
def forallPredicates = zipPredicates(koperators.forallPredicates, voperators.forallPredicates)
-
+
def existsPredicates = zipPredicates(koperators.existsPredicates, voperators.existsPredicates)
-
+
def findPredicates = zipPredicates(koperators.findPredicates, voperators.findPredicates)
-
+
def mapFunctions = for {
(km, vm) <- koperators.mapFunctions zip voperators.mapFunctions
} yield new Function1[(K, V), (K, V)] {
def apply(kv: (K, V)) = (km(kv._1), vm(kv._2))
}
-
+
def partialMapFunctions = for {
(kpm, vpm) <- koperators.partialMapFunctions zip voperators.partialMapFunctions
} yield new PartialFunction[(K, V), (K, V)] {
def isDefinedAt(kv: (K, V)) = kpm.isDefinedAt(kv._1) && vpm.isDefinedAt(kv._2)
def apply(kv: (K, V)) = (kpm(kv._1), vpm(kv._2))
}
-
+
def flatMapFunctions = for {
(kfm, vfm) <- koperators.flatMapFunctions zip voperators.flatMapFunctions
} yield new Function1[(K, V), Traversable[(K, V)]] {
def apply(kv: (K, V)) = kfm(kv._1).toIterable zip vfm(kv._2).toIterable
}
-
+
def filterPredicates = zipPredicates(koperators.filterPredicates, voperators.filterPredicates)
-
+
def filterNotPredicates = filterPredicates
-
+
def partitionPredicates = filterPredicates
-
+
def takeWhilePredicates = zipPredicates(koperators.takeWhilePredicates, voperators.takeWhilePredicates)
-
+
def dropWhilePredicates = takeWhilePredicates
-
+
def spanPredicates = takeWhilePredicates
-
+
def foldArguments = for {
((kinit, kop), (vinit, vop)) <- koperators.foldArguments zip voperators.foldArguments
} yield ((kinit, vinit), new Function2[(K, V), (K, V), (K, V)] {
def apply(kv1: (K, V), kv2: (K, V)) = (kop(kv1._1, kv2._1), vop(kv1._2, kv2._2))
})
-
+
def addAllTraversables = for {
(kt, vt) <- koperators.addAllTraversables zip voperators.addAllTraversables
} yield kt.toIterable zip vt.toIterable
-
+
def newArray(sz: Int) = new Array[(K, V)](sz)
-
+
def groupByFunctions = (koperators.groupByFunctions zip voperators.groupByFunctions) map {
opt => { (p: (K, V)) => (opt._1(p._1), opt._2(p._2)) }
}
-
+
}
diff --git a/test/files/scalacheck/parallel-collections/PairValues.scala b/test/files/scalacheck/parallel-collections/PairValues.scala
index 864dad2425..5007c4598b 100644
--- a/test/files/scalacheck/parallel-collections/PairValues.scala
+++ b/test/files/scalacheck/parallel-collections/PairValues.scala
@@ -17,7 +17,7 @@ import org.scalacheck.Arbitrary._
trait PairValues[K, V] {
def kvalues: Seq[Gen[K]]
def vvalues: Seq[Gen[V]]
-
+
def values = for {
kg <- kvalues
vg <- vvalues
diff --git a/test/files/scalacheck/parallel-collections/ParallelArrayCheck.scala b/test/files/scalacheck/parallel-collections/ParallelArrayCheck.scala
index 255c04498e..a01c8c7dbe 100644
--- a/test/files/scalacheck/parallel-collections/ParallelArrayCheck.scala
+++ b/test/files/scalacheck/parallel-collections/ParallelArrayCheck.scala
@@ -17,11 +17,11 @@ import scala.collection.parallel.ops._
abstract class ParallelArrayCheck[T](tp: String) extends ParallelSeqCheck[T]("ParArray[" + tp + "]") {
// ForkJoinTasks.defaultForkJoinPool.setMaximumPoolSize(Runtime.getRuntime.availableProcessors * 2)
// ForkJoinTasks.defaultForkJoinPool.setParallelism(Runtime.getRuntime.availableProcessors * 2)
-
+
type CollType = ParArray[T]
-
+
def isCheckingViews = false
-
+
def hasStrictOrder = true
def ofSize(vals: Seq[Gen[T]], sz: Int) = {
@@ -30,7 +30,7 @@ abstract class ParallelArrayCheck[T](tp: String) extends ParallelSeqCheck[T]("Pa
for (i <- 0 until sz) a += sample(gen)
a
}
-
+
def fromSeq(a: Seq[T]) = {
val pa = new ParArray[T](a.size)
var i = 0
@@ -40,20 +40,20 @@ abstract class ParallelArrayCheck[T](tp: String) extends ParallelSeqCheck[T]("Pa
}
pa
}
-
+
property("array mappings must be equal") = forAll(collectionPairs) { case (t, coll) =>
val results = for ((f, ind) <- mapFunctions.zipWithIndex)
yield ("op index: " + ind) |: t.map(f) == coll.map(f)
results.reduceLeft(_ && _)
}
-
+
}
object IntParallelArrayCheck extends ParallelArrayCheck[Int]("Int") with IntSeqOperators with IntValues {
override def instances(vals: Seq[Gen[Int]]) = oneOf(super.instances(vals), sized { sz =>
(0 until sz).toArray.toSeq
- }, sized { sz =>
+ }, sized { sz =>
(-sz until 0).toArray.toSeq
})
}
diff --git a/test/files/scalacheck/parallel-collections/ParallelArrayTest.scala b/test/files/scalacheck/parallel-collections/ParallelArrayTest.scala
index db2b1ea01e..680f6e1d28 100644
--- a/test/files/scalacheck/parallel-collections/ParallelArrayTest.scala
+++ b/test/files/scalacheck/parallel-collections/ParallelArrayTest.scala
@@ -15,7 +15,7 @@
// /**
// * this currently passes, but do we want it to?
-// * does it have meaning to have an empty parallel array?
+// * does it have meaning to have an empty parallel array?
// */
// new ParallelArray(0)
// ()
diff --git a/test/files/scalacheck/parallel-collections/ParallelArrayViewCheck.scala b/test/files/scalacheck/parallel-collections/ParallelArrayViewCheck.scala
index 9805e2644f..d2a8fa7c22 100644
--- a/test/files/scalacheck/parallel-collections/ParallelArrayViewCheck.scala
+++ b/test/files/scalacheck/parallel-collections/ParallelArrayViewCheck.scala
@@ -24,18 +24,18 @@
// extends ParallelSeqCheck[T]("ParallelSeqView[" + tp + ", ParallelArray[" + tp + "]]") {
// // ForkJoinTasks.defaultForkJoinPool.setMaximumPoolSize(Runtime.getRuntime.availableProcessors * 2)
// // ForkJoinTasks.defaultForkJoinPool.setParallelism(Runtime.getRuntime.availableProcessors * 2)
-
+
// type CollType = ParallelSeqView[T, ParallelArray[T], ArraySeq[T]]
-
+
// def isCheckingViews = true
-
+
// def instances(vals: Seq[Gen[T]]): Gen[Seq[T]] = sized { sz =>
// val a = new ArrayBuffer[T](sz)
// val gen = vals(rnd.nextInt(vals.size))
// for (i <- 0 until sz) a += sample(gen)
// a
// }
-
+
// def fromSeq(a: Seq[T]) = {
// val pa = new ParallelArray[T](a.size)
// var i = 0
@@ -45,13 +45,13 @@
// }
// pa.view
// }
-
+
// property("forces must be equal") = forAll(collectionPairs) { case (s, coll) =>
// val smodif = (s ++ s).reverse.take(s.length).reverse.zip(s).drop(s.length / 2)
// val cmodif = (coll ++ s).reverse.take(s.length).reverse.zip(s).drop(s.length / 2).force
// smodif == cmodif
// }
-
+
// }
@@ -68,18 +68,18 @@
// extends ParallelSeqCheck[T]("ParallelSeqView[" + tp + "], ParallelArray[" + tp + "].++.patch.reverse.take.reverse") {
// ForkJoinTasks.defaultForkJoinPool.setMaximumPoolSize(Runtime.getRuntime.availableProcessors * 2)
// ForkJoinTasks.defaultForkJoinPool.setParallelism(Runtime.getRuntime.availableProcessors * 2)
-
+
// type CollType = collection.parallel.ParallelSeq[T]
-
+
// def isCheckingViews = true
-
+
// def instances(vals: Seq[Gen[T]]): Gen[Seq[T]] = sized { sz =>
// val a = new ArrayBuffer[T](sz)
// val gen = vals(rnd.nextInt(vals.size))
// for (i <- 0 until sz) a += sample(gen)
// a
// }
-
+
// def fromSeq(a: Seq[T]) = {
// val pa = new ParallelArray[T](a.size)
// var i = 0
@@ -91,7 +91,7 @@
// val original = modified.take(modified.length / 2).reverse
// original
// }
-
+
// }
diff --git a/test/files/scalacheck/parallel-collections/ParallelHashMapCheck.scala b/test/files/scalacheck/parallel-collections/ParallelHashMapCheck.scala
index 9299a201a1..0152b1b435 100644
--- a/test/files/scalacheck/parallel-collections/ParallelHashMapCheck.scala
+++ b/test/files/scalacheck/parallel-collections/ParallelHashMapCheck.scala
@@ -17,20 +17,20 @@ import scala.collection.parallel.ops._
abstract class ParallelHashMapCheck[K, V](tp: String) extends ParallelMapCheck[K, V]("mutable.ParHashMap[" + tp + "]") {
// ForkJoinTasks.defaultForkJoinPool.setMaximumPoolSize(Runtime.getRuntime.availableProcessors * 2)
// ForkJoinTasks.defaultForkJoinPool.setParallelism(Runtime.getRuntime.availableProcessors * 2)
-
+
type CollType = ParHashMap[K, V]
-
+
def isCheckingViews = false
-
+
def hasStrictOrder = false
- def ofSize(vals: Seq[Gen[(K, V)]], sz: Int) = {
+ def ofSize(vals: Seq[Gen[(K, V)]], sz: Int) = {
val hm = new mutable.HashMap[K, V]
val gen = vals(rnd.nextInt(vals.size))
for (i <- 0 until sz) hm += sample(gen)
hm
}
-
+
def fromTraversable(t: Traversable[(K, V)]) = {
val phm = new ParHashMap[K, V]
var i = 0
@@ -40,7 +40,7 @@ abstract class ParallelHashMapCheck[K, V](tp: String) extends ParallelMapCheck[K
}
phm
}
-
+
}
@@ -51,22 +51,22 @@ with PairValues[Int, Int]
def intvalues = new IntValues {}
def kvalues = intvalues.values
def vvalues = intvalues.values
-
+
val intoperators = new IntOperators {}
def voperators = intoperators
def koperators = intoperators
-
+
override def printDataStructureDebugInfo(ds: AnyRef) = ds match {
case pm: ParHashMap[k, v] =>
println("Mutable parallel hash map\n" + pm.hashTableContents.debugInformation)
case _ =>
println("could not match data structure type: " + ds.getClass)
}
-
+
override def checkDataStructureInvariants(orig: Traversable[(Int, Int)], ds: AnyRef) = ds match {
// case pm: ParHashMap[k, v] if 1 == 0 => // disabled this to make tests faster
// val invs = pm.brokenInvariants
-
+
// val containsall = (for ((k, v) <- orig) yield {
// if (pm.asInstanceOf[ParHashMap[Int, Int]].get(k) == Some(v)) true
// else {
@@ -74,8 +74,8 @@ with PairValues[Int, Int]
// false
// }
// }).foldLeft(true)(_ && _)
-
-
+
+
// if (invs.isEmpty) containsall
// else {
// println("Invariants broken:\n" + invs.mkString("\n"))
@@ -83,7 +83,7 @@ with PairValues[Int, Int]
// }
case _ => true
}
-
+
}
diff --git a/test/files/scalacheck/parallel-collections/ParallelHashSetCheck.scala b/test/files/scalacheck/parallel-collections/ParallelHashSetCheck.scala
index 8b41908a26..a0a6d1ae5e 100644
--- a/test/files/scalacheck/parallel-collections/ParallelHashSetCheck.scala
+++ b/test/files/scalacheck/parallel-collections/ParallelHashSetCheck.scala
@@ -17,20 +17,20 @@ import scala.collection.parallel.ops._
abstract class ParallelHashSetCheck[T](tp: String) extends ParallelSetCheck[T]("mutable.ParHashSet[" + tp + "]") {
// ForkJoinTasks.defaultForkJoinPool.setMaximumPoolSize(Runtime.getRuntime.availableProcessors * 2)
// ForkJoinTasks.defaultForkJoinPool.setParallelism(Runtime.getRuntime.availableProcessors * 2)
-
+
type CollType = ParHashSet[T]
-
+
def isCheckingViews = false
-
+
def hasStrictOrder = false
- def ofSize(vals: Seq[Gen[T]], sz: Int) = {
+ def ofSize(vals: Seq[Gen[T]], sz: Int) = {
val hm = new mutable.HashSet[T]
val gen = vals(rnd.nextInt(vals.size))
for (i <- 0 until sz) hm += sample(gen)
hm
}
-
+
def fromTraversable(t: Traversable[T]) = {
val phm = new ParHashSet[T]
var i = 0
@@ -40,7 +40,7 @@ abstract class ParallelHashSetCheck[T](tp: String) extends ParallelSetCheck[T]("
}
phm
}
-
+
}
@@ -54,12 +54,12 @@ with IntValues
case _ =>
println("could not match data structure type: " + ds.getClass)
}
-
+
override def checkDataStructureInvariants(orig: Traversable[Int], ds: AnyRef) = ds match {
// case pm: ParHashSet[t] if 1 == 0 =>
// // for an example of how not to write code proceed below
// val invs = pm.brokenInvariants
-
+
// val containsall = (for (elem <- orig) yield {
// if (pm.asInstanceOf[ParHashSet[Int]](elem) == true) true
// else {
@@ -69,8 +69,8 @@ with IntValues
// false
// }
// }).foldLeft(true)(_ && _)
-
-
+
+
// if (invs.isEmpty) {
// if (!containsall) println(pm.debugInformation)
// containsall
@@ -80,7 +80,7 @@ with IntValues
// }
case _ => true
}
-
+
}
diff --git a/test/files/scalacheck/parallel-collections/ParallelHashTrieCheck.scala b/test/files/scalacheck/parallel-collections/ParallelHashTrieCheck.scala
index bbec52dc92..3a2893f48a 100644
--- a/test/files/scalacheck/parallel-collections/ParallelHashTrieCheck.scala
+++ b/test/files/scalacheck/parallel-collections/ParallelHashTrieCheck.scala
@@ -17,20 +17,20 @@ import scala.collection.parallel.ops._
abstract class ParallelHashMapCheck[K, V](tp: String) extends ParallelMapCheck[K, V]("immutable.ParHashMap[" + tp + "]") {
// ForkJoinTasks.defaultForkJoinPool.setMaximumPoolSize(Runtime.getRuntime.availableProcessors * 2)
// ForkJoinTasks.defaultForkJoinPool.setParallelism(Runtime.getRuntime.availableProcessors * 2)
-
+
type CollType = ParHashMap[K, V]
-
+
def isCheckingViews = false
-
+
def hasStrictOrder = false
-
+
def ofSize(vals: Seq[Gen[(K, V)]], sz: Int) = {
var hm = new immutable.HashMap[K, V]
val gen = vals(rnd.nextInt(vals.size))
for (i <- 0 until sz) hm += sample(gen)
hm
}
-
+
def fromTraversable(t: Traversable[(K, V)]) = {
var phm = new ParHashMap[K, V]
var i = 0
@@ -40,7 +40,7 @@ abstract class ParallelHashMapCheck[K, V](tp: String) extends ParallelMapCheck[K
}
phm
}
-
+
}
@@ -51,11 +51,11 @@ with PairValues[Int, Int]
def intvalues = new IntValues {}
def kvalues = intvalues.values
def vvalues = intvalues.values
-
+
val intoperators = new IntOperators {}
def voperators = intoperators
def koperators = intoperators
-
+
override def printDataStructureDebugInfo(ds: AnyRef) = ds match {
case pm: ParHashMap[k, v] =>
pm.printDebugInfo
@@ -69,20 +69,20 @@ with PairValues[Int, Int]
abstract class ParallelHashSetCheck[T](tp: String) extends ParallelSetCheck[T]("immutable.ParHashSet[" + tp + "]") {
// ForkJoinTasks.defaultForkJoinPool.setMaximumPoolSize(Runtime.getRuntime.availableProcessors * 2)
// ForkJoinTasks.defaultForkJoinPool.setParallelism(Runtime.getRuntime.availableProcessors * 2)
-
+
type CollType = ParHashSet[T]
-
+
def isCheckingViews = false
-
+
def hasStrictOrder = false
-
+
def ofSize(vals: Seq[Gen[T]], sz: Int) = {
var hm = new immutable.HashSet[T]
val gen = vals(rnd.nextInt(vals.size))
for (i <- 0 until sz) hm += sample(gen)
hm
}
-
+
def fromTraversable(t: Traversable[T]) = {
var phm = new ParHashSet[T]
var i = 0
@@ -92,14 +92,14 @@ abstract class ParallelHashSetCheck[T](tp: String) extends ParallelSetCheck[T]("
}
phm
}
-
+
override def printDataStructureDebugInfo(ds: AnyRef) = ds match {
case pm: ParHashSet[t] =>
println("Parallel hash set")
case _ =>
println("could not match data structure type: " + ds.getClass)
}
-
+
}
@@ -110,7 +110,7 @@ with IntValues
def intvalues = new IntValues {}
def kvalues = intvalues.values
def vvalues = intvalues.values
-
+
override def printDataStructureDebugInfo(ds: AnyRef) = ds match {
case pm: ParHashMap[k, v] =>
pm.printDebugInfo
diff --git a/test/files/scalacheck/parallel-collections/ParallelIterableCheck.scala b/test/files/scalacheck/parallel-collections/ParallelIterableCheck.scala
index ac3493e56c..fbacb9f45c 100644
--- a/test/files/scalacheck/parallel-collections/ParallelIterableCheck.scala
+++ b/test/files/scalacheck/parallel-collections/ParallelIterableCheck.scala
@@ -16,14 +16,14 @@ import scala.collection.parallel._
abstract class ParallelIterableCheck[T](collName: String) extends Properties(collName) with Operators[T] {
type CollType <: ParIterable[T]
-
+
def values: Seq[Gen[T]]
def ofSize(vals: Seq[Gen[T]], sz: Int): Iterable[T]
def fromTraversable(t: Traversable[T]): CollType
def isCheckingViews: Boolean
def hasStrictOrder: Boolean
-
-
+
+
def instances(vals: Seq[Gen[T]]): Gen[Iterable[T]] = oneOf(
sized(
sz =>
@@ -31,46 +31,46 @@ abstract class ParallelIterableCheck[T](collName: String) extends Properties(col
),
for (sz <- choose(1000, 2000)) yield ofSize(vals, sz),
for (sz <- choose(4000, 4001)) yield ofSize(vals, sz),
- for (sz <- choose(10000, 10001)) yield ofSize(vals, sz)
+ for (sz <- choose(10000, 10001)) yield ofSize(vals, sz)
)
-
+
// used to check if constructed collection is valid
def checkDataStructureInvariants(orig: Traversable[T], cf: AnyRef) = {
// can be overriden in subclasses
true
}
-
+
def printDataStructureDebugInfo(cf: AnyRef) {
// can be overridden in subclasses
}
-
+
val rnd = new scala.util.Random
-
+
def sample(gen: Gen[T]): T = {
var s = gen.sample
while (s == None) s = gen.sample
s.get
}
-
+
def sampleValue: T = sample(values(rnd.nextInt(values.length)))
-
+
def collectionPairs = for (inst <- instances(values)) yield (inst, fromTraversable(inst))
-
+
def collectionPairsWithLengths = for (inst <- instances(values); s <- choose(0, inst.size))
yield (inst, fromTraversable(inst), s)
-
+
def collectionPairsWith2Indices = for (
inst <- instances(values);
f <- choose(0, inst.size);
s <- choose(0, inst.size))
yield (inst, fromTraversable(inst), f, s)
-
- def collectionTriplets = for (inst <- instances(values);
+
+ def collectionTriplets = for (inst <- instances(values);
updStart <- choose(0, inst.size); howMany <- choose(0, inst.size)) yield {
val modif = inst.toSeq.patch(updStart, inst.toSeq, howMany)
(inst, fromTraversable(inst), modif)
}
-
+
def areEqual(t1: GenTraversable[T], t2: GenTraversable[T]) = if (hasStrictOrder) {
t1 == t2 && t2 == t1
} else (t1, t2) match { // it is slightly delicate what `equal` means if the order is not strict
@@ -81,14 +81,14 @@ abstract class ParallelIterableCheck[T](collName: String) extends Properties(col
i1s == i2s && i2s == i1s
case _ => t1 == t2 && t2 == t1
}
-
+
def printDebugInfo(coll: ParIterableLike[_, _, _]) {
println("Collection debug info: ")
coll.printDebugBuffer
println("Task debug info: ")
println(tasksupport.debugMessages.mkString("\n"))
}
-
+
def printComparison(t: Traversable[_], coll: ParIterable[_], tf: Traversable[_], cf: ParIterable[_], ind: Int) {
printDebugInfo(coll)
println("Operator: " + ind)
@@ -108,7 +108,7 @@ abstract class ParallelIterableCheck[T](collName: String) extends Properties(col
println("tf == cf - " + (tf == cf))
println("cf == tf - " + (cf == tf))
}
-
+
property("reductions must be equal for assoc. operators") = forAll(collectionPairs) { case (t, coll) =>
if (t.size != 0) {
val results = for ((op, ind) <- reduceOperators.zipWithIndex) yield {
@@ -126,7 +126,7 @@ abstract class ParallelIterableCheck[T](collName: String) extends Properties(col
results.reduceLeft(_ && _)
} else "has size 0" |: true
}
-
+
property("counts must be equal") = forAll(collectionPairs) { case (t, coll) =>
val results = for ((pred, ind) <- countPredicates.zipWithIndex) yield {
val tc = t.count(pred)
@@ -142,19 +142,19 @@ abstract class ParallelIterableCheck[T](collName: String) extends Properties(col
}
results.reduceLeft(_ && _)
}
-
+
property("forall must be equal") = forAll(collectionPairs) { case (t, coll) =>
val results = for ((pred, ind) <- forallPredicates.zipWithIndex)
yield ("op index: " + ind) |: t.forall(pred) == coll.forall(pred)
results.reduceLeft(_ && _)
}
-
+
property("exists must be equal") = forAll(collectionPairs) { case (t, coll) =>
val results = for ((pred, ind) <- existsPredicates.zipWithIndex)
yield ("op index: " + ind) |: t.exists(pred) == coll.exists(pred)
results.reduceLeft(_ && _)
}
-
+
property("both must find or not find an element") = forAll(collectionPairs) { case (t, coll) =>
val results = for ((pred, ind) <- findPredicates.zipWithIndex) yield {
val ft = t.find(pred)
@@ -163,7 +163,7 @@ abstract class ParallelIterableCheck[T](collName: String) extends Properties(col
}
results.reduceLeft(_ && _)
}
-
+
property("mappings must be equal") = forAll(collectionPairs) { case (t, coll) =>
val results = for ((f, ind) <- mapFunctions.zipWithIndex) yield {
val ms = t.map(f)
@@ -184,7 +184,7 @@ abstract class ParallelIterableCheck[T](collName: String) extends Properties(col
}
results.reduceLeft(_ && _)
}
-
+
property("collects must be equal") = forAll(collectionPairs) { case (t, coll) =>
val results = for ((f, ind) <- partialMapFunctions.zipWithIndex) yield {
val ps = t.collect(f)
@@ -200,12 +200,12 @@ abstract class ParallelIterableCheck[T](collName: String) extends Properties(col
}
results.reduceLeft(_ && _)
}
-
+
property("flatMaps must be equal") = forAll(collectionPairs) { case (t, coll) =>
(for ((f, ind) <- flatMapFunctions.zipWithIndex)
yield ("op index: " + ind) |: areEqual(t.flatMap(f), coll.flatMap(f))).reduceLeft(_ && _)
}
-
+
property("filters must be equal") = forAll(collectionPairs) { case (t, coll) =>
(for ((p, ind) <- filterPredicates.zipWithIndex) yield {
val tf = t.filter(p)
@@ -234,7 +234,7 @@ abstract class ParallelIterableCheck[T](collName: String) extends Properties(col
("op index: " + ind) |: tf == cf && cf == tf && invs
}).reduceLeft(_ && _)
}
-
+
property("filterNots must be equal") = forAll(collectionPairs) { case (t, coll) =>
(for ((p, ind) <- filterNotPredicates.zipWithIndex) yield {
val tf = t.filterNot(p)
@@ -243,7 +243,7 @@ abstract class ParallelIterableCheck[T](collName: String) extends Properties(col
("op index: " + ind) |: tf == cf && cf == tf
}).reduceLeft(_ && _)
}
-
+
if (!isCheckingViews) property("partitions must be equal") = forAll(collectionPairs) { case (t, coll) =>
(for ((p, ind) <- partitionPredicates.zipWithIndex) yield {
val tpart = t.partition(p)
@@ -257,15 +257,15 @@ abstract class ParallelIterableCheck[T](collName: String) extends Properties(col
("op index: " + ind) |: tpart == cpart
}).reduceLeft(_ && _)
}
-
+
if (hasStrictOrder) property("takes must be equal") = forAll(collectionPairsWithLengths) { case (t, coll, n) =>
("take " + n + " elements") |: t.take(n) == coll.take(n)
}
-
+
if (hasStrictOrder) property("drops must be equal") = forAll(collectionPairsWithLengths) { case (t, coll, n) =>
("drop " + n + " elements") |: t.drop(n) == coll.drop(n)
}
-
+
if (hasStrictOrder) property("slices must be equal") = forAll(collectionPairsWith2Indices)
{ case (t, coll, fr, slicelength) =>
val from = if (fr < 0) 0 else fr
@@ -289,7 +289,7 @@ abstract class ParallelIterableCheck[T](collName: String) extends Properties(col
}
("slice from " + from + " until " + until) |: tsl == collsl
}
-
+
if (hasStrictOrder) property("splits must be equal") = forAll(collectionPairsWithLengths) { case (t, coll, n) =>
val tspl = t.splitAt(n)
val cspl = coll.splitAt(n)
@@ -302,7 +302,7 @@ abstract class ParallelIterableCheck[T](collName: String) extends Properties(col
}
("splitAt " + n) |: tspl == cspl
}
-
+
if (hasStrictOrder) property("takeWhiles must be equal") = forAll(collectionPairs) { case (t, coll) =>
(for ((pred, ind) <- takeWhilePredicates.zipWithIndex) yield {
val tt = t.takeWhile(pred)
@@ -317,7 +317,7 @@ abstract class ParallelIterableCheck[T](collName: String) extends Properties(col
("operator " + ind) |: tt == ct
}).reduceLeft(_ && _)
}
-
+
if (hasStrictOrder) property("spans must be equal") = forAll(collectionPairs) { case (t, coll) =>
(for ((pred, ind) <- spanPredicates.zipWithIndex) yield {
val tsp = t.span(pred)
@@ -335,13 +335,13 @@ abstract class ParallelIterableCheck[T](collName: String) extends Properties(col
("operator " + ind) |: tsp == csp
}).reduceLeft(_ && _)
}
-
+
if (hasStrictOrder) property("dropWhiles must be equal") = forAll(collectionPairs) { case (t, coll) =>
(for ((pred, ind) <- dropWhilePredicates.zipWithIndex) yield {
("operator " + ind) |: t.dropWhile(pred) == coll.dropWhile(pred)
}).reduceLeft(_ && _)
}
-
+
property("folds must be equal for assoc. operators") = forAll(collectionPairs) { case (t, coll) =>
(for (((first, op), ind) <- foldArguments.zipWithIndex) yield {
val tres = t.foldLeft(first)(op)
@@ -356,7 +356,7 @@ abstract class ParallelIterableCheck[T](collName: String) extends Properties(col
("operator " + ind) |: tres == cres
}).reduceLeft(_ && _)
}
-
+
property("++s must be equal") = forAll(collectionTriplets) { case (t, coll, colltoadd) =>
val toadd = colltoadd
val tr = t ++ toadd.iterator
@@ -383,7 +383,7 @@ abstract class ParallelIterableCheck[T](collName: String) extends Properties(col
("traversable " + ind) |: areEqual(tadded, cadded)
}).reduceLeft(_ && _)
}
-
+
if (hasStrictOrder) property("copies to array must be equal") = forAll(collectionPairs) { case (t, coll) =>
val tarr = newArray(t.size)
val collarr = newArray(coll.size)
@@ -397,7 +397,7 @@ abstract class ParallelIterableCheck[T](collName: String) extends Properties(col
}
tarr.toSeq == collarr.toSeq
}
-
+
if (hasStrictOrder) property("scans must be equal") = forAll(collectionPairs) {
case (t, coll) =>
(for (((first, op), ind) <- foldArguments.zipWithIndex) yield {
@@ -413,7 +413,7 @@ abstract class ParallelIterableCheck[T](collName: String) extends Properties(col
("operator " + ind) |: tscan == cscan && cscan == tscan
}).reduceLeft(_ && _)
}
-
+
// property("groupBy must be equal") = forAll(collectionPairs) {
// case (t, coll) =>
// (for ((f, ind) <- groupByFunctions.zipWithIndex) yield {
@@ -429,7 +429,7 @@ abstract class ParallelIterableCheck[T](collName: String) extends Properties(col
// ("operator " + ind) |: tgroup == cgroup && cgroup == tgroup
// }).reduceLeft(_ && _)
// }
-
+
}
diff --git a/test/files/scalacheck/parallel-collections/ParallelMapCheck1.scala b/test/files/scalacheck/parallel-collections/ParallelMapCheck1.scala
index 53e56e9700..05237bace8 100644
--- a/test/files/scalacheck/parallel-collections/ParallelMapCheck1.scala
+++ b/test/files/scalacheck/parallel-collections/ParallelMapCheck1.scala
@@ -16,15 +16,15 @@ import scala.collection.parallel._
abstract class ParallelMapCheck[K, V](collname: String) extends ParallelIterableCheck[(K, V)](collname) {
type CollType <: ParMap[K, V]
-
+
property("gets iterated keys") = forAll(collectionPairs) {
case (t, coll) =>
val containsT = for ((k, v) <- t) yield (coll.get(k) == Some(v))
val containsSelf = for ((k, v) <- coll) yield (coll.get(k) == Some(v))
("Par contains elements of seq map" |: containsT.forall(_ == true)) &&
("Par contains elements of itself" |: containsSelf.forall(_ == true))
- }
-
+ }
+
}
diff --git a/test/files/scalacheck/parallel-collections/ParallelRangeCheck.scala b/test/files/scalacheck/parallel-collections/ParallelRangeCheck.scala
index 372d6b9fbd..3c6a35d8f1 100644
--- a/test/files/scalacheck/parallel-collections/ParallelRangeCheck.scala
+++ b/test/files/scalacheck/parallel-collections/ParallelRangeCheck.scala
@@ -20,15 +20,15 @@ import scala.collection.parallel.ops._
object ParallelRangeCheck extends ParallelSeqCheck[Int]("ParallelRange[Int]") with ops.IntSeqOperators {
// ForkJoinTasks.defaultForkJoinPool.setMaximumPoolSize(Runtime.getRuntime.availableProcessors * 2)
// ForkJoinTasks.defaultForkJoinPool.setParallelism(Runtime.getRuntime.availableProcessors * 2)
-
+
type CollType = collection.parallel.ParSeq[Int]
-
+
def hasStrictOrder = true
-
+
def isCheckingViews = false
-
+
def ofSize(vals: Seq[Gen[Int]], sz: Int) = unsupported
-
+
override def instances(vals: Seq[Gen[Int]]): Gen[Seq[Int]] = sized { start =>
sized { end =>
sized { step =>
@@ -36,7 +36,7 @@ object ParallelRangeCheck extends ParallelSeqCheck[Int]("ParallelRange[Int]") wi
}
}
}
-
+
def fromSeq(a: Seq[Int]) = a match {
case r: Range => ParRange(r.start, r.end, r.step, false)
case _ =>
@@ -44,14 +44,14 @@ object ParallelRangeCheck extends ParallelSeqCheck[Int]("ParallelRange[Int]") wi
for (i <- 0 until a.length) pa(i) = a(i)
pa
}
-
+
override def traversable2Seq(t: Traversable[Int]): Seq[Int] = t match {
case r: Range => r
case _ => t.toSeq
}
-
+
def values = Seq(choose(-100, 100))
-
+
}
diff --git a/test/files/scalacheck/parallel-collections/ParallelSeqCheck.scala b/test/files/scalacheck/parallel-collections/ParallelSeqCheck.scala
index 3f8a8ad4f5..dd897412ae 100644
--- a/test/files/scalacheck/parallel-collections/ParallelSeqCheck.scala
+++ b/test/files/scalacheck/parallel-collections/ParallelSeqCheck.scala
@@ -16,13 +16,13 @@ import scala.collection.parallel._
abstract class ParallelSeqCheck[T](collName: String) extends ParallelIterableCheck[T](collName) with SeqOperators[T] {
-
+
type CollType <: collection.parallel.ParSeq[T]
-
+
def ofSize(vals: Seq[Gen[T]], sz: Int): Seq[T]
def fromSeq(s: Seq[T]): CollType
-
+
override def instances(vals: Seq[Gen[T]]): Gen[Seq[T]] = oneOf(
sized(
sz =>
@@ -31,17 +31,17 @@ abstract class ParallelSeqCheck[T](collName: String) extends ParallelIterableChe
for (sz <- choose(1000, 2000)) yield ofSize(vals, sz)
)
-
+
def fromTraversable(t: Traversable[T]) = fromSeq(traversable2Seq(t))
def traversable2Seq(t: Traversable[T]): Seq[T] = {
if (t.isInstanceOf[Iterable[_]]) t.asInstanceOf[Iterable[T]].iterator.toList else t.toList
}
-
+
override def collectionPairs: Gen[(Seq[T], CollType)] = for (inst <- instances(values)) yield (inst, fromSeq(inst))
-
+
override def collectionPairsWithLengths: Gen[(Seq[T], CollType, Int)] =
for (inst <- instances(values); s <- choose(0, inst.size)) yield (inst, fromSeq(inst), s);
-
+
def collectionPairsWithModifiedWithLengths: Gen[(Seq[T], CollType, ParSeq[T], Int)] =
for (inst <- instances(values); s <- choose(0, inst.size);
updateStart <- choose(0, inst.size); howMany <- choose(0, inst.size)) yield {
@@ -49,31 +49,31 @@ abstract class ParallelSeqCheck[T](collName: String) extends ParallelIterableChe
val parcollmodif = fromSeq(modifySlightly(inst, updateStart, howMany))
(inst, parcoll, parcollmodif, s)
}
-
+
def collectionPairsWithModified: Gen[(Seq[T], CollType, ParSeq[T])] =
for (inst <- instances(values); updateStart <- choose(0, inst.size); howMany <- choose(0, inst.size)) yield {
val parcoll = fromSeq(inst)
val parcollmodif = fromSeq(modifySlightly(inst, updateStart, howMany))
(inst, parcoll, parcollmodif)
}
-
+
def collectionPairsWithSliced: Gen[(Seq[T], CollType, ParSeq[T])] =
for (inst <- instances(values); sliceStart <- choose(0, inst.size); howMany <- choose(0, inst.size)) yield {
val parcoll = fromSeq(inst)
val parcollsliced = fromSeq(inst.slice(sliceStart, sliceStart + howMany))
(inst, parcoll, parcollsliced)
}
-
+
def collectionTripletsWith2Indices: Gen[(Seq[T], CollType, Seq[T], Int, Int)] =
for (inst <- instances(values); f <- choose(0, inst.size); s <- choose(0, inst.size - f);
third <- instances(values); sliceStart <- choose(0, inst.size); howMany <- choose(0, inst.size)) yield {
(inst, fromSeq(inst), inst.slice(sliceStart, sliceStart + howMany), f, s)
}
-
+
private def modifySlightly(coll: Seq[T], updateStart: Int, howMany: Int) = {
coll.patch(updateStart, coll, howMany)
}
-
+
property("segmentLengths must be equal") = forAll(collectionPairsWithLengths) { case (s, coll, len) =>
(for ((pred, ind) <- segmentLengthPredicates.zipWithIndex) yield {
val slen = s.segmentLength(pred, if (len < 0) 0 else len)
@@ -87,13 +87,13 @@ abstract class ParallelSeqCheck[T](collName: String) extends ParallelIterableChe
("operator " + ind) |: slen == clen
}).reduceLeft(_ && _)
}
-
+
property("prefixLengths must be equal") = forAll(collectionPairs) { case (s, coll) =>
(for ((pred, ind) <- segmentLengthPredicates.zipWithIndex) yield {
("operator " + ind) |: s.prefixLength(pred) == coll.prefixLength(pred)
}).reduceLeft(_ && _)
}
-
+
property("indexWheres must be equal") = forAll(collectionPairsWithLengths) { case (s, coll, len) =>
(for ((pred, ind) <- indexWherePredicates.zipWithIndex) yield {
val sind = s.indexWhere(pred, len)
@@ -108,7 +108,7 @@ abstract class ParallelSeqCheck[T](collName: String) extends ParallelIterableChe
("operator " + ind) |: sind == cind
}).reduceLeft(_ && _)
}
-
+
property("lastIndexWheres must be equal") = forAll(collectionPairsWithLengths) { case (s, coll, len) =>
(for ((pred, ind) <- lastIndexWherePredicates.zipWithIndex) yield {
val end = if (len >= s.size) s.size - 1 else len
@@ -117,7 +117,7 @@ abstract class ParallelSeqCheck[T](collName: String) extends ParallelIterableChe
("operator " + ind) |: sind == cind
}).reduceLeft(_ && _)
}
-
+
property("reverses must be equal") = forAll(collectionPairs) { case (s, coll) =>
(s.length == 0 && s.getClass == classOf[collection.immutable.Range]) ||
{
@@ -132,13 +132,13 @@ abstract class ParallelSeqCheck[T](collName: String) extends ParallelIterableChe
sr == cr
}
}
-
+
property("reverseMaps must be equal") = forAll(collectionPairs) { case (s, coll) =>
(for ((f, ind) <- reverseMapFunctions.zipWithIndex) yield {
("operator " + ind) |: s.reverseMap(f) == coll.reverseMap(f)
}).reduceLeft(_ && _)
}
-
+
property("sameElements must be equal") = forAll(collectionPairsWithModifiedWithLengths) {
case (s, coll, collmodif, len) =>
val pos = if (len < 0) 0 else len
@@ -170,7 +170,7 @@ abstract class ParallelSeqCheck[T](collName: String) extends ParallelIterableChe
("collection " + ind) |: sres == pres
}).reduceLeft(_ && _)
}
-
+
property("startsWiths must be equal") = forAll(collectionPairsWithModifiedWithLengths) {
case (s, coll, collmodif, len) =>
val pos = if (len < 0) 0 else len
@@ -194,7 +194,7 @@ abstract class ParallelSeqCheck[T](collName: String) extends ParallelIterableChe
("seq " + sq) |: ss == cs
}).reduceLeft(_ && _)
}
-
+
property("endsWiths must be equal") = forAll(collectionPairsWithModified) {
case (s, coll, collmodif) =>
("ends with self" |: s.endsWith(s) == coll.endsWith(s)) &&
@@ -213,18 +213,18 @@ abstract class ParallelSeqCheck[T](collName: String) extends ParallelIterableChe
("seq " + sq) |: sew == cew
}).reduceLeft(_ && _)
}
-
+
property("unions must be equal") = forAll(collectionPairsWithModified) { case (s, coll, collmodif) =>
("modified" |: s.union(collmodif.seq) == coll.union(collmodif)) &&
("empty" |: s.union(Nil) == coll.union(fromSeq(Nil)))
}
-
+
// This is failing with my views patch: array index out of bounds in the array iterator.
// Couldn't see why this and only this was impacted, could use a second pair of eyes.
- //
+ //
// This was failing because some corner cases weren't added to the patch method in ParSeqLike.
// Curiously, this wasn't detected before.
- //
+ //
if (!isCheckingViews) property("patches must be equal") = forAll(collectionTripletsWith2Indices) {
case (s, coll, pat, from, repl) =>
("with seq" |: s.patch(from, pat, repl) == coll.patch(from, pat, repl)) &&
@@ -232,7 +232,7 @@ abstract class ParallelSeqCheck[T](collName: String) extends ParallelIterableChe
("with empty" |: s.patch(from, Nil, repl) == coll.patch(from, fromSeq(Nil), repl)) &&
("with one" |: (s.length == 0 || s.patch(from, List(s(0)), 1) == coll.patch(from, fromSeq(List(coll(0))), 1)))
}
-
+
if (!isCheckingViews) property("updates must be equal") = forAll(collectionPairsWithLengths) { case (s, coll, len) =>
val pos = if (len >= s.length) s.length - 1 else len
if (s.length > 0) {
@@ -247,15 +247,15 @@ abstract class ParallelSeqCheck[T](collName: String) extends ParallelIterableChe
"from first" |: (supd == cupd)
} else "trivially" |: true
}
-
+
property("prepends must be equal") = forAll(collectionPairs) { case (s, coll) =>
s.length == 0 || s(0) +: s == coll(0) +: coll
}
-
+
property("appends must be equal") = forAll(collectionPairs) { case (s, coll) =>
s.length == 0 || s :+ s(0) == coll :+ coll(0)
}
-
+
property("padTos must be equal") = forAll(collectionPairsWithLengths) { case (s, coll, len) =>
val someValue = sampleValue
val sdoub = s.padTo(len * 2, someValue)
@@ -269,14 +269,14 @@ abstract class ParallelSeqCheck[T](collName: String) extends ParallelIterableChe
("smaller" |: s.padTo(len / 2, someValue) == coll.padTo(len / 2, someValue)) &&
("bigger" |: sdoub == cdoub)
}
-
+
property("corresponds must be equal") = forAll(collectionPairsWithModified) { case (s, coll, modified) =>
val modifcut = modified.toSeq.slice(0, modified.length)
("self" |: s.corresponds(s)(_ == _) == coll.corresponds(coll)(_ == _)) &&
("modified" |: s.corresponds(modified.seq)(_ == _) == coll.corresponds(modified)(_ == _)) &&
("modified2" |: s.corresponds(modifcut)(_ == _) == coll.corresponds(modifcut)(_ == _))
}
-
+
}
diff --git a/test/files/scalacheck/parallel-collections/ParallelSetCheck.scala b/test/files/scalacheck/parallel-collections/ParallelSetCheck.scala
index 56f7832fed..4211abbd16 100644
--- a/test/files/scalacheck/parallel-collections/ParallelSetCheck.scala
+++ b/test/files/scalacheck/parallel-collections/ParallelSetCheck.scala
@@ -16,15 +16,15 @@ import scala.collection.parallel._
abstract class ParallelSetCheck[T](collname: String) extends ParallelIterableCheck[T](collname) {
type CollType <: ParSet[T]
-
+
property("gets iterated keys") = forAll(collectionPairs) {
case (t, coll) =>
val containsT = for (elem <- t) yield (coll.contains(elem))
val containsSelf = for (elem <- coll) yield (coll.contains(elem))
("Par contains elements of seq map" |: containsT.forall(_ == true)) &&
("Par contains elements of itself" |: containsSelf.forall(_ == true))
- }
-
+ }
+
}
diff --git a/test/files/scalacheck/parallel-collections/ParallelVectorCheck.scala b/test/files/scalacheck/parallel-collections/ParallelVectorCheck.scala
index a2b6cef96d..e4bb588fa7 100644
--- a/test/files/scalacheck/parallel-collections/ParallelVectorCheck.scala
+++ b/test/files/scalacheck/parallel-collections/ParallelVectorCheck.scala
@@ -23,11 +23,11 @@ import immutable.VectorBuilder
abstract class ParallelVectorCheck[T](tp: String) extends collection.parallel.ParallelSeqCheck[T]("ParVector[" + tp + "]") {
// ForkJoinTasks.defaultForkJoinPool.setMaximumPoolSize(Runtime.getRuntime.availableProcessors * 2)
// ForkJoinTasks.defaultForkJoinPool.setParallelism(Runtime.getRuntime.availableProcessors * 2)
-
+
type CollType = ParVector[T]
-
+
def isCheckingViews = false
-
+
def hasStrictOrder = true
def ofSize(vals: Seq[Gen[T]], sz: Int) = {
@@ -36,13 +36,13 @@ abstract class ParallelVectorCheck[T](tp: String) extends collection.parallel.Pa
for (i <- 0 until sz) vb += sample(gen)
vb.result
}
-
+
def fromSeq(a: Seq[T]) = {
val pa = ParVector.newCombiner[T]
for (elem <- a.toList) pa += elem
pa.result
}
-
+
}
diff --git a/test/files/scalacheck/parallel-collections/pc.scala b/test/files/scalacheck/parallel-collections/pc.scala
index 103b5e2993..cc0382303a 100644
--- a/test/files/scalacheck/parallel-collections/pc.scala
+++ b/test/files/scalacheck/parallel-collections/pc.scala
@@ -9,25 +9,25 @@ import scala.collection.parallel._
class ParCollProperties extends Properties("Parallel collections") {
/* Collections */
-
+
// parallel arrays
include(mutable.IntParallelArrayCheck)
-
+
// parallel ranges
include(immutable.ParallelRangeCheck)
-
+
// parallel immutable hash maps (tries)
include(immutable.IntIntParallelHashMapCheck)
-
+
// parallel immutable hash sets (tries)
include(immutable.IntParallelHashSetCheck)
-
+
// parallel mutable hash maps (tables)
include(mutable.IntIntParallelHashMapCheck)
-
+
// parallel mutable hash sets (tables)
include(mutable.IntParallelHashSetCheck)
-
+
// parallel vectors
include(immutable.IntParallelVectorCheck)
}
diff --git a/test/files/scalacheck/primitive-eqeq.scala b/test/files/scalacheck/primitive-eqeq.scala
index 60fe63c207..a783805e46 100644
--- a/test/files/scalacheck/primitive-eqeq.scala
+++ b/test/files/scalacheck/primitive-eqeq.scala
@@ -4,7 +4,7 @@ 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
@@ -14,15 +14,15 @@ object Test extends Properties("==") {
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 {
+
+ 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 (_ == _)) &&
+ ((anyvals, anyvals).zipped forall equalObjectsEqualHashcodes) &&
+ ((shortAndLarger, shortAndLarger).zipped forall (_ == _)) &&
((shortAndLarger, shortAndLarger).zipped forall ((x, y) => (x: Any) == (y: Any)))
)
result
diff --git a/test/files/scalacheck/substringTests.scala b/test/files/scalacheck/substringTests.scala
index 76260b9dd2..a48356e1fa 100644
--- a/test/files/scalacheck/substringTests.scala
+++ b/test/files/scalacheck/substringTests.scala
@@ -6,11 +6,11 @@ object Test extends Properties("String") {
property("endsWith") = Prop.forAll((a: String, b: String) => (a+b).endsWith(b))
- property("concat") = Prop.forAll((a: String, b: String) =>
+ property("concat") = Prop.forAll((a: String, b: String) =>
(a+b).length >= a.length && (a+b).length >= b.length
)
- property("substring") = Prop.forAll((a: String, b: String) =>
+ property("substring") = Prop.forAll((a: String, b: String) =>
(a+b).substring(a.length) == b
)
diff --git a/test/files/scalap/caseClass/A.scala b/test/files/scalap/caseClass/A.scala
index be86714898..95f9984519 100644
--- a/test/files/scalap/caseClass/A.scala
+++ b/test/files/scalap/caseClass/A.scala
@@ -1,3 +1,3 @@
case class CaseClass[A <: Seq[Int]](i: A, s: String) {
- def foo = 239
+ def foo = 239
}
diff --git a/test/files/scalap/caseObject/A.scala b/test/files/scalap/caseObject/A.scala
index 809341ade9..6a3ff10d75 100644
--- a/test/files/scalap/caseObject/A.scala
+++ b/test/files/scalap/caseObject/A.scala
@@ -1,3 +1,3 @@
case object CaseObject {
- def bar = 239
+ def bar = 239
}
diff --git a/test/files/scalap/cbnParam/A.scala b/test/files/scalap/cbnParam/A.scala
index 978a718032..2f366df64a 100644
--- a/test/files/scalap/cbnParam/A.scala
+++ b/test/files/scalap/cbnParam/A.scala
@@ -1 +1 @@
-class CbnParam(s: => String)
+class CbnParam(s: => String)
diff --git a/test/files/specialized/arrays-traits.scala b/test/files/specialized/arrays-traits.scala
index ee62622635..de54d22d18 100644
--- a/test/files/specialized/arrays-traits.scala
+++ b/test/files/specialized/arrays-traits.scala
@@ -28,19 +28,19 @@ class BaseG[T](val arr: Array[T]) extends SuperG[T] {
object Test {
-
+
def main(args: Array[String]) {
(new BaseS(new Array[String](1)): SuperS[String]).foo
println(arrayApplyCount)
(new BaseS(new Array[String](1)): SuperS[String]).bar(new Array[String](1))
println(arrayApplyCount)
println(arrayUpdateCount)
-
+
(new BaseG(new Array[String](1)): SuperG[String]).foo
println(arrayApplyCount)
(new BaseG(new Array[String](1)): SuperG[String]).bar(new Array[String](1))
println(arrayApplyCount)
println(arrayUpdateCount)
}
-
+
}
diff --git a/test/files/specialized/arrays.scala b/test/files/specialized/arrays.scala
index 505f482486..c946a8fc55 100644
--- a/test/files/specialized/arrays.scala
+++ b/test/files/specialized/arrays.scala
@@ -15,23 +15,23 @@ class Spec[@specialized(AnyRef) T](a: Array[T]) {
object Test {
-
+
def main(args: Array[String]) {
val len = 50
-
+
testSpec(new Array[String](len))
println(arrayApplyCount)
-
+
(new Spec(new Array[String](len)))()
println(arrayApplyCount)
-
+
testGeneric(new Array[String](len))
println(arrayApplyCount)
-
+
(new Generic(new Array[String](len)))()
println(arrayApplyCount)
}
-
+
def testGeneric[T](a: Array[T]) = {
var i = 0
var sum = 0
@@ -41,7 +41,7 @@ object Test {
}
sum
}
-
+
def testSpec[@specialized(AnyRef) T](a: Array[T]) = {
var i = 0
var sum = 0
@@ -51,5 +51,5 @@ object Test {
}
sum
}
-
+
}
diff --git a/test/files/specialized/fft.scala b/test/files/specialized/fft.scala
index 76029832a9..62a6a2abb9 100644
--- a/test/files/specialized/fft.scala
+++ b/test/files/specialized/fft.scala
@@ -1,13 +1,13 @@
/*
* http://local.wasp.uwa.edu.au/~pbourke/miscellaneous/dft/
- Modification of Paul Bourkes FFT code by Peter Cusack
+ Modification of Paul Bourkes FFT code by Peter Cusack
to utilise the Microsoft complex type.
- This computes an in-place complex-to-complex FFT
+ This computes an in-place complex-to-complex FFT
x and y are the real and imaginary arrays of 2^m points.
dir = 1 gives forward transform
- dir = -1 gives reverse transform
+ dir = -1 gives reverse transform
*/
import Math.{sqrt, pow}
@@ -24,19 +24,19 @@ object Test {
x(j) = tmp
}
- def times(x: Complex, y: Complex): Complex =
+ def times(x: Complex, y: Complex): Complex =
(x._1 * y._1 - x._2 * y._2, x._1 * y._2 + x._2 * y._1)
-
+
def div(x: Complex, y: Complex): Complex = {
val num = pow(y._1, 2) + pow(y._2, 2)
((x._1 * y._1 + x._2 * y._2)/num,
(x._2 * y._1 - x._1 * y._2)/num)
}
- def div(x: Complex, y: Long) =
+ def div(x: Complex, y: Long) =
(x._1 / y, x._2 / y)
- def add(x: Complex, y: Complex) =
+ def add(x: Complex, y: Complex) =
(x._1 + y._1, x._2 + y._2)
def minus(x: Complex, y: Complex) =
@@ -49,8 +49,8 @@ object Test {
/*Calculate the number of points */
n = 1
- for (i <- 0l until m)
- n <<= 1
+ for (i <- 0l until m)
+ n <<= 1
/* Do the bit reversal */
i2 = n >> 1
@@ -86,7 +86,7 @@ object Test {
for (i <- j.until(n, l2)) {
i1 = i + l1;
t1 = times(u, x(i1.toInt))
- x(i1.toInt) = minus(x(i.toInt), t1)
+ x(i1.toInt) = minus(x(i.toInt), t1)
x(i.toInt) = add(x(i.toInt), t1)
}
@@ -97,7 +97,7 @@ object Test {
c = (c._1, sqrt( (1.0 - c._1) / 2.0 ))
// if (dir == 1)
// c.imag(-c.imag());
- if (dir == 1)
+ if (dir == 1)
c = (c._1, -c._2)
// c.real(sqrt((1.0 + c.real()) / 2.0));
@@ -107,8 +107,8 @@ object Test {
/* Scaling for forward transform */
if (dir == 1) {
for (i <- 0l until n)
- x(i.toInt) = div(x(i.toInt), n)
- }
+ x(i.toInt) = div(x(i.toInt), n)
+ }
}
def run() {
diff --git a/test/files/specialized/spec-ame.scala b/test/files/specialized/spec-ame.scala
index 45e88266eb..79ee4217ed 100644
--- a/test/files/specialized/spec-ame.scala
+++ b/test/files/specialized/spec-ame.scala
@@ -1,13 +1,13 @@
// ticket #3432
object Test {
trait B[@specialized(Int) T] {
- def value: T
+ def value: T
}
- class A[@specialized(Int) T](x: T) {
- def foo: B[T] = new B[T] {
- def value = x
- }
+ class A[@specialized(Int) T](x: T) {
+ def foo: B[T] = new B[T] {
+ def value = x
+ }
}
def main(args: Array[String]) {
diff --git a/test/files/specialized/spec-init.scala b/test/files/specialized/spec-init.scala
index 94cd0ee82b..5f27062ed2 100644
--- a/test/files/specialized/spec-init.scala
+++ b/test/files/specialized/spec-init.scala
@@ -36,7 +36,7 @@ object Test {
(new TouchGlobal(new Object))
Global.msg = "ok" // reset the value
(new TouchGlobal(42))
-
+
println(runtime.BoxesRunTime.integerBoxCount)
}
}
diff --git a/test/files/specialized/spec-matrix.scala b/test/files/specialized/spec-matrix.scala
index 463a454692..98735c8c03 100644
--- a/test/files/specialized/spec-matrix.scala
+++ b/test/files/specialized/spec-matrix.scala
@@ -3,7 +3,7 @@
class Matrix[@specialized A: ClassManifest](val rows: Int, val cols: Int) {
private val arr: Array[Array[A]] = Array.ofDim[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))
@@ -29,7 +29,7 @@ object Test {
def main(args: Array[String]) {
val m = randomMatrix(200, 100)
val n = randomMatrix(100, 200)
-
+
val p = mult(m, n)
println(p(0, 0))
println("Boxed doubles: " + runtime.BoxesRunTime.doubleBoxCount)
@@ -38,7 +38,7 @@ object Test {
def randomMatrix(n: Int, m: Int) = {
val r = new util.Random(10)
- val x = new Matrix[Double](n, m)
+ val x = new Matrix[Double](n, m)
for (i <- 0 until n; j <- 0 until m)
x(i, j) = (r.nextInt % 1000).toDouble
x
@@ -46,7 +46,7 @@ object Test {
def printMatrix[Double](m: Matrix[Double]) {
for (i <- 0 until m.rows) {
- for (j <- 0 until m.cols)
+ for (j <- 0 until m.cols)
print("%5.3f ".format(m(i, j)))
println
}
@@ -56,7 +56,7 @@ object Test {
val p = new Matrix[T](m.rows, n.cols)
import num._
- for (i <- 0 until m.rows)
+ for (i <- 0 until m.rows)
for (j <- 0 until n.cols) {
var sum = num.zero
for (k <- 0 until n.rows)
@@ -68,7 +68,7 @@ object Test {
def mult(m: Matrix[Double], n: Matrix[Double]) = {
val p = new Matrix[Double](m.rows, n.cols)
- for (i <- 0 until m.rows)
+ for (i <- 0 until m.rows)
for (j <- 0 until n.cols) {
var sum = 0.0
for (k <- 0 until n.rows)
diff --git a/test/files/specialized/spec-overrides.scala b/test/files/specialized/spec-overrides.scala
index 994dd9d245..90dd5a4e72 100644
--- a/test/files/specialized/spec-overrides.scala
+++ b/test/files/specialized/spec-overrides.scala
@@ -17,6 +17,6 @@ object Test extends App {
assert(d2.default == 1.0, d2.default)
assert((d2: Base[_]).default == 1.0, (d2: Base[_]).default)
assert((d2: D1).default == 1.0, (d2: D1).default)
-
+
println(runtime.BoxesRunTime.integerBoxCount)
}
diff --git a/test/files/specialized/spec-patmatch.scala b/test/files/specialized/spec-patmatch.scala
index 909629455d..979d143fe2 100644
--- a/test/files/specialized/spec-patmatch.scala
+++ b/test/files/specialized/spec-patmatch.scala
@@ -46,7 +46,7 @@ object Test {
(new Foo).test(42.0)
(new Foo).test(42.0f)
(new Foo).test(new Object)
-
+
println(runtime.BoxesRunTime.integerBoxCount)
}
diff --git a/test/files/specialized/spec-super.scala b/test/files/specialized/spec-super.scala
index 056a7712f0..a77f65b2cf 100644
--- a/test/files/specialized/spec-super.scala
+++ b/test/files/specialized/spec-super.scala
@@ -7,13 +7,13 @@ object Test {
val i = new Extended(1)
println(i.foo) //infinite loop with StackOverflowError
-
+
println(runtime.BoxesRunTime.integerBoxCount)
}
}
-class Base[@specialized(Int) T](val t: T) {
- def foo() :T = t
+class Base[@specialized(Int) T](val t: T) {
+ def foo() :T = t
}
class Extended [@specialized(Int) T](t: T) extends Base[T](t) {
override def foo() :T = super.foo
diff --git a/test/files/specialized/spec-t3896.scala b/test/files/specialized/spec-t3896.scala
index 89326b4284..605ed0df9d 100644
--- a/test/files/specialized/spec-t3896.scala
+++ b/test/files/specialized/spec-t3896.scala
@@ -1,7 +1,7 @@
// see ticket #3896. Tests interaction between overloading, specialization and default params
trait Atomic[@specialized(Boolean) T] {
def x: T
-
+
// crash depends on the overloading: if second method is "g", no crash.
def f(fn: T => T): Boolean = f(fn(x))
def f[R](a: T, b: R = true) = b
@@ -14,7 +14,7 @@ object Test {
val x = e.f( (a : Boolean) => !a ) // ok
println( e.f( (a : Boolean) => !a ) toString ) // ok
println( e.f( (a : Boolean) => !a) ) // compiler crash
-
+
println(runtime.BoxesRunTime.integerBoxCount)
}
}
diff --git a/test/files/specialized/td3651.scala b/test/files/specialized/td3651.scala
index 117710b6dc..19a4ab616c 100644
--- a/test/files/specialized/td3651.scala
+++ b/test/files/specialized/td3651.scala
@@ -11,7 +11,7 @@ object Test {
val b: Base[Double] = new Derived(10)
b.a
println(runtime.BoxesRunTime.doubleBoxCount)
-
+
val der = new Derived(10)
der.a
println(runtime.BoxesRunTime.doubleBoxCount)