summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitattributes26
-rw-r--r--build.xml190
-rw-r--r--gitconfig.SAMPLE8
-rw-r--r--src/actors-migration/scala/actors/Pattern.scala2
-rw-r--r--src/actors-migration/scala/actors/StashingActor.scala2
-rw-r--r--src/actors-migration/scala/actors/Timeout.scala2
-rw-r--r--src/actors/scala/actors/ActorRef.scala2
-rw-r--r--src/build/bnd/continuations.bnd5
-rw-r--r--src/build/bnd/scala-actors-migration.bnd5
-rw-r--r--src/build/bnd/scala-actors.bnd5
-rw-r--r--src/build/bnd/scala-compiler.bnd8
-rw-r--r--src/build/bnd/scala-library.bnd6
-rw-r--r--src/build/bnd/scala-reflect.bnd6
-rw-r--r--src/build/bnd/scala-swing.bnd5
-rw-r--r--src/compiler/scala/reflect/macros/runtime/Enclosures.scala2
-rw-r--r--src/compiler/scala/reflect/reify/package.scala2
-rw-r--r--src/compiler/scala/tools/ant/templates/tool-windows.tmpl182
-rw-r--r--src/compiler/scala/tools/nsc/Global.scala2
-rw-r--r--src/compiler/scala/tools/nsc/io/package.scala17
-rw-r--r--src/compiler/scala/tools/nsc/transform/Erasure.scala98
-rw-r--r--src/compiler/scala/tools/nsc/transform/ExtensionMethods.scala7
-rw-r--r--src/compiler/scala/tools/nsc/transform/OverridingPairs.scala39
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Macros.scala4
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Tags.scala15
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/TreeCheckers.scala2
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala49
-rw-r--r--src/compiler/scala/tools/reflect/ToolBoxFactory.scala2
-rw-r--r--src/library/scala/BoxingConversions.scala5
-rw-r--r--src/library/scala/collection/TraversableLike.scala2
-rw-r--r--src/library/scala/collection/mutable/LinkedHashSet.scala2
-rw-r--r--src/library/scala/collection/mutable/Subscriber.scala2
-rw-r--r--src/library/scala/concurrent/Awaitable.scala2
-rw-r--r--src/library/scala/concurrent/duration/Deadline.scala81
-rw-r--r--src/library/scala/concurrent/duration/Duration.scala (renamed from src/library/scala/concurrent/util/Duration.scala)253
-rw-r--r--src/library/scala/concurrent/duration/DurationConversions.scala92
-rw-r--r--src/library/scala/concurrent/duration/package.scala75
-rw-r--r--src/library/scala/concurrent/impl/Promise.scala12
-rw-r--r--src/library/scala/concurrent/package.scala2
-rw-r--r--src/library/scala/concurrent/util/duration/Classifier.scala9
-rw-r--r--src/library/scala/concurrent/util/duration/IntMult.scala18
-rw-r--r--src/library/scala/concurrent/util/duration/package.scala31
-rw-r--r--src/partest/scala/tools/partest/nest/DirectRunner.scala2
-rw-r--r--src/partest/scala/tools/partest/nest/RunnerManager.scala25
-rw-r--r--src/reflect/scala/reflect/api/Symbols.scala2
-rw-r--r--src/reflect/scala/reflect/internal/Constants.scala9
-rw-r--r--src/reflect/scala/reflect/internal/Definitions.scala7
-rw-r--r--src/reflect/scala/reflect/internal/Symbols.scala2
-rw-r--r--src/reflect/scala/reflect/internal/Types.scala39
-rw-r--r--src/reflect/scala/reflect/internal/transform/Erasure.scala22
-rw-r--r--src/reflect/scala/reflect/internal/util/SourceFile.scala2
-rw-r--r--src/reflect/scala/reflect/io/AbstractFile.scala (renamed from src/reflect/scala/tools/nsc/io/AbstractFile.scala)8
-rw-r--r--src/reflect/scala/reflect/io/Directory.scala (renamed from src/reflect/scala/tools/nsc/io/Directory.scala)8
-rw-r--r--src/reflect/scala/reflect/io/File.scala (renamed from src/reflect/scala/tools/nsc/io/File.scala)8
-rw-r--r--src/reflect/scala/reflect/io/FileOperationException.scala (renamed from src/reflect/scala/tools/nsc/io/FileOperationException.scala)4
-rw-r--r--src/reflect/scala/reflect/io/NoAbstractFile.scala (renamed from src/reflect/scala/tools/nsc/io/NoAbstractFile.scala)4
-rw-r--r--src/reflect/scala/reflect/io/Path.scala (renamed from src/reflect/scala/tools/nsc/io/Path.scala)7
-rw-r--r--src/reflect/scala/reflect/io/PlainFile.scala (renamed from src/reflect/scala/tools/nsc/io/PlainFile.scala)8
-rw-r--r--src/reflect/scala/reflect/io/Streamable.scala (renamed from src/reflect/scala/tools/nsc/io/Streamable.scala)9
-rw-r--r--src/reflect/scala/reflect/io/VirtualDirectory.scala (renamed from src/reflect/scala/tools/nsc/io/VirtualDirectory.scala)4
-rw-r--r--src/reflect/scala/reflect/io/VirtualFile.scala (renamed from src/reflect/scala/tools/nsc/io/VirtualFile.scala)4
-rw-r--r--src/reflect/scala/reflect/io/ZipArchive.scala (renamed from src/reflect/scala/tools/nsc/io/ZipArchive.scala)13
-rw-r--r--src/reflect/scala/reflect/runtime/ReflectionUtils.scala2
-rw-r--r--src/reflect/scala/reflect/runtime/SynchronizedSymbols.scala2
-rw-r--r--src/scalap/scala/tools/scalap/Main.scala11
-rwxr-xr-xtest/disabled-windows/script/utf8.bat22
-rwxr-xr-xtest/disabled/script/fact.bat34
-rwxr-xr-xtest/disabled/script/second.bat6
-rwxr-xr-xtest/disabled/script/t1015.bat24
-rwxr-xr-xtest/disabled/script/t1017.bat30
-rw-r--r--test/files/disabled/A.scala (renamed from test/files/buildmanager/overloaded_1/A.scala)2
-rw-r--r--test/files/disabled/overloaded_1.check (renamed from test/files/buildmanager/overloaded_1/overloaded_1.check)0
-rw-r--r--test/files/disabled/overloaded_1.test (renamed from test/files/buildmanager/overloaded_1/overloaded_1.test)0
-rw-r--r--test/files/disabled/t4245/A.scala (renamed from test/files/buildmanager/t4245/A.scala)0
-rw-r--r--test/files/disabled/t4245/t4245.check (renamed from test/files/buildmanager/t4245/t4245.check)0
-rw-r--r--test/files/disabled/t4245/t4245.test (renamed from test/files/buildmanager/t4245/t4245.test)0
-rw-r--r--test/files/jvm/actmig-PinS.scala2
-rw-r--r--test/files/jvm/actmig-PinS_1.scala2
-rw-r--r--test/files/jvm/actmig-PinS_2.scala2
-rw-r--r--test/files/jvm/actmig-PinS_3.scala2
-rw-r--r--test/files/jvm/actmig-public-methods_1.scala2
-rw-r--r--test/files/jvm/actmig-react-receive.scala2
-rw-r--r--test/files/jvm/duration-java/Test.java2
-rw-r--r--test/files/jvm/duration-tck.scala34
-rw-r--r--test/files/jvm/future-spec/FutureTests.scala4
-rw-r--r--test/files/jvm/future-spec/PromiseTests.scala4
-rw-r--r--test/files/jvm/future-spec/main.scala2
-rw-r--r--test/files/jvm/manifests-new.check116
-rwxr-xr-xtest/files/jvm/mkLibNatives.bat140
-rw-r--r--test/files/jvm/scala-concurrent-tck.scala2
-rw-r--r--test/files/neg/checksensible.check200
-rw-r--r--test/files/neg/classmanifests_new_deprecations.check122
-rw-r--r--test/files/neg/classtags_contextbound_a.check8
-rw-r--r--test/files/neg/classtags_contextbound_b.check8
-rw-r--r--test/files/neg/classtags_contextbound_c.check8
-rw-r--r--test/files/neg/classtags_dont_use_typetags.check8
-rw-r--r--test/files/neg/deadline-inf-illegal.check12
-rw-r--r--test/files/neg/deadline-inf-illegal.scala2
-rw-r--r--test/files/neg/interop_abstypetags_arenot_classmanifests.check8
-rw-r--r--test/files/neg/interop_abstypetags_arenot_classtags.check8
-rw-r--r--test/files/neg/interop_abstypetags_arenot_manifests.check8
-rw-r--r--test/files/neg/interop_classmanifests_arenot_typetags.check8
-rw-r--r--test/files/neg/interop_classtags_arenot_manifests.check8
-rw-r--r--test/files/neg/interop_typetags_arenot_classmanifests.check8
-rw-r--r--test/files/neg/interop_typetags_arenot_classtags.check8
-rw-r--r--test/files/neg/interop_typetags_without_classtags_arenot_manifests.check12
-rw-r--r--test/files/neg/macro-basic-mamdmi.check8
-rw-r--r--test/files/neg/macro-deprecate-idents.check104
-rw-r--r--test/files/neg/macro-invalidimpl-a.check8
-rw-r--r--test/files/neg/macro-invalidimpl-b.check8
-rw-r--r--test/files/neg/macro-invalidimpl-c.check8
-rw-r--r--test/files/neg/macro-invalidimpl-d.check8
-rw-r--r--test/files/neg/macro-invalidimpl-e.check26
-rw-r--r--test/files/neg/macro-invalidimpl-f.check14
-rw-r--r--test/files/neg/macro-invalidimpl-g.check14
-rw-r--r--test/files/neg/macro-invalidimpl-h.check8
-rw-r--r--test/files/neg/macro-invalidimpl-i.check8
-rw-r--r--test/files/neg/macro-invalidret-nontree.check14
-rw-r--r--test/files/neg/macro-invalidret-nonuniversetree.check14
-rw-r--r--test/files/neg/macro-invalidshape-a.check10
-rw-r--r--test/files/neg/macro-invalidshape-b.check10
-rw-r--r--test/files/neg/macro-invalidshape-c.check18
-rw-r--r--test/files/neg/macro-invalidshape-d.check16
-rw-r--r--test/files/neg/macro-invalidsig-context-bounds.check14
-rw-r--r--test/files/neg/macro-invalidsig-ctx-badargc.check14
-rw-r--r--test/files/neg/macro-invalidsig-ctx-badtype.check14
-rw-r--r--test/files/neg/macro-invalidsig-ctx-badvarargs.check14
-rw-r--r--test/files/neg/macro-invalidsig-ctx-noctx.check14
-rw-r--r--test/files/neg/macro-invalidsig-implicit-params.check14
-rw-r--r--test/files/neg/macro-invalidsig-params-badargc.check14
-rw-r--r--test/files/neg/macro-invalidsig-params-badtype.check14
-rw-r--r--test/files/neg/macro-invalidsig-params-badvarargs.check14
-rw-r--r--test/files/neg/macro-invalidsig-params-namemismatch.check14
-rw-r--r--test/files/neg/macro-invalidsig-tparams-badtype.check14
-rw-r--r--test/files/neg/macro-invalidsig-tparams-bounds-a.check8
-rw-r--r--test/files/neg/macro-invalidsig-tparams-bounds-b.check8
-rw-r--r--test/files/neg/macro-invalidsig-tparams-notparams-a.check8
-rw-r--r--test/files/neg/macro-invalidsig-tparams-notparams-b.check8
-rw-r--r--test/files/neg/macro-invalidsig-tparams-notparams-c.check8
-rw-r--r--test/files/neg/macro-invalidusage-badargs.check12
-rw-r--r--test/files/neg/macro-invalidusage-badbounds-a.check8
-rw-r--r--test/files/neg/macro-invalidusage-badtargs.check8
-rw-r--r--test/files/neg/macro-invalidusage-methodvaluesyntax.check8
-rw-r--r--test/files/neg/macro-noexpand.check8
-rw-r--r--test/files/neg/macro-nontypeablebody.check8
-rw-r--r--test/files/neg/macro-override-macro-overrides-abstract-method-a.check10
-rw-r--r--test/files/neg/macro-override-macro-overrides-abstract-method-b.check10
-rw-r--r--test/files/neg/macro-override-method-overrides-macro.check10
-rw-r--r--test/files/neg/macro-reify-typetag-hktypeparams-notags.check14
-rw-r--r--test/files/neg/macro-reify-typetag-typeparams-notags.check14
-rw-r--r--test/files/neg/macro-reify-typetag-useabstypetag.check14
-rw-r--r--test/files/neg/reify_ann2b.check8
-rw-r--r--test/files/neg/reify_metalevel_breach_+0_refers_to_1.check14
-rw-r--r--test/files/neg/reify_metalevel_breach_-1_refers_to_0_a.check14
-rw-r--r--test/files/neg/reify_metalevel_breach_-1_refers_to_0_b.check14
-rw-r--r--test/files/neg/reify_metalevel_breach_-1_refers_to_1.check14
-rw-r--r--test/files/neg/reify_nested_inner_refers_to_local.check14
-rw-r--r--test/files/neg/structural.check18
-rw-r--r--test/files/neg/t0565.check2
-rw-r--r--test/files/neg/t2144.check2
-rw-r--r--test/files/neg/t2775.check8
-rw-r--r--test/files/neg/t3507-old.check8
-rw-r--r--test/files/neg/t5452-new.check16
-rw-r--r--test/files/neg/t5452-old.check16
-rw-r--r--test/files/neg/t5689.check14
-rw-r--r--test/files/neg/t5692a.check8
-rw-r--r--test/files/neg/t5692b.check8
-rw-r--r--test/files/neg/t5878.check16
-rw-r--r--test/files/neg/t6260.check13
-rw-r--r--test/files/neg/t6260.scala17
-rw-r--r--test/files/neg/t6323a.check18
-rw-r--r--test/files/neg/t6336.check7
-rw-r--r--test/files/neg/t6336.scala1
-rw-r--r--test/files/neg/t6337.check7
-rw-r--r--test/files/neg/t6337.scala21
-rw-r--r--test/files/neg/t6385.check7
-rw-r--r--test/files/neg/t6385.scala13
-rw-r--r--test/files/neg/valueclasses-pavlov.check7
-rw-r--r--test/files/neg/valueclasses-pavlov.scala23
-rw-r--r--test/files/pos/t5245.scala2
-rw-r--r--test/files/run/Meter.scala11
-rw-r--r--test/files/run/MeterCaseClass.scala11
-rw-r--r--test/files/run/abstypetags_core.check60
-rw-r--r--test/files/run/abstypetags_serialize.check4
-rw-r--r--test/files/run/classmanifests_new_alias.check4
-rw-r--r--test/files/run/classmanifests_new_core.check4
-rw-r--r--test/files/run/classtags_contextbound.check2
-rw-r--r--test/files/run/classtags_core.check60
-rw-r--r--test/files/run/classtags_multi.check10
-rw-r--r--test/files/run/constant-type.check30
-rw-r--r--test/files/run/constant-type.scala17
-rw-r--r--test/files/run/existentials3-new.check48
-rw-r--r--test/files/run/exprs_serialize.check4
-rw-r--r--test/files/run/freetypes_false_alarm1.check2
-rw-r--r--test/files/run/interop_classtags_are_classmanifests.check6
-rw-r--r--test/files/run/interop_manifests_are_abstypetags.check6
-rw-r--r--test/files/run/interop_manifests_are_classtags.check36
-rw-r--r--test/files/run/interop_manifests_are_typetags.check6
-rw-r--r--test/files/run/interop_typetags_are_manifests.check6
-rw-r--r--test/files/run/macro-abort-fresh.check12
-rw-r--r--test/files/run/macro-declared-in-annotation.check2
-rw-r--r--test/files/run/macro-declared-in-block.check4
-rw-r--r--test/files/run/macro-declared-in-class-class.check4
-rw-r--r--test/files/run/macro-declared-in-class-object.check4
-rw-r--r--test/files/run/macro-declared-in-class.check4
-rw-r--r--test/files/run/macro-declared-in-default-param.check10
-rw-r--r--test/files/run/macro-declared-in-implicit-class.check4
-rw-r--r--test/files/run/macro-declared-in-method.check4
-rw-r--r--test/files/run/macro-declared-in-object-class.check4
-rw-r--r--test/files/run/macro-declared-in-object-object.check4
-rw-r--r--test/files/run/macro-declared-in-object.check4
-rw-r--r--test/files/run/macro-declared-in-package-object.check4
-rw-r--r--test/files/run/macro-declared-in-refinement.check4
-rw-r--r--test/files/run/macro-declared-in-trait.check30
-rw-r--r--test/files/run/macro-def-infer-return-type-b.check12
-rw-r--r--test/files/run/macro-def-path-dependent-a.check2
-rw-r--r--test/files/run/macro-def-path-dependent-b.check2
-rw-r--r--test/files/run/macro-def-path-dependent-c.check2
-rw-r--r--test/files/run/macro-def-path-dependent-d1.check2
-rw-r--r--test/files/run/macro-def-path-dependent-d2.check2
-rw-r--r--test/files/run/macro-expand-implicit-argument.check2
-rw-r--r--test/files/run/macro-expand-implicit-macro-has-implicit.check2
-rw-r--r--test/files/run/macro-expand-implicit-macro-is-implicit.check4
-rw-r--r--test/files/run/macro-expand-implicit-macro-is-val.check2
-rw-r--r--test/files/run/macro-expand-implicit-macro-is-view.check2
-rw-r--r--test/files/run/macro-expand-nullary-generic.check12
-rw-r--r--test/files/run/macro-expand-overload.check12
-rw-r--r--test/files/run/macro-expand-override.check30
-rw-r--r--test/files/run/macro-expand-recursive.check2
-rw-r--r--test/files/run/macro-expand-tparams-explicit.check2
-rw-r--r--test/files/run/macro-expand-tparams-implicit.check4
-rw-r--r--test/files/run/macro-expand-tparams-optional.check2
-rw-r--r--test/files/run/macro-expand-tparams-prefix-a.check8
-rw-r--r--test/files/run/macro-expand-tparams-prefix-b.check4
-rw-r--r--test/files/run/macro-expand-tparams-prefix-c1.check6
-rw-r--r--test/files/run/macro-expand-tparams-prefix-c2.check6
-rw-r--r--test/files/run/macro-expand-tparams-prefix-d1.check6
-rw-r--r--test/files/run/macro-expand-varargs-explicit-over-nonvarargs-bad.check6
-rw-r--r--test/files/run/macro-expand-varargs-explicit-over-nonvarargs-good.check2
-rw-r--r--test/files/run/macro-expand-varargs-explicit-over-varargs.check2
-rw-r--r--test/files/run/macro-expand-varargs-implicit-over-nonvarargs.check2
-rw-r--r--test/files/run/macro-expand-varargs-implicit-over-varargs.check2
-rw-r--r--test/files/run/macro-impl-default-params.check10
-rw-r--r--test/files/run/macro-impl-rename-context.check4
-rw-r--r--test/files/run/macro-invalidret-doesnt-conform-to-def-rettype.check6
-rw-r--r--test/files/run/macro-invalidret-nontypeable.check6
-rw-r--r--test/files/run/macro-invalidusage-badret.check6
-rw-r--r--test/files/run/macro-invalidusage-partialapplication-with-tparams.check6
-rw-r--r--test/files/run/macro-invalidusage-partialapplication.check6
-rw-r--r--test/files/run/macro-openmacros.check6
-rw-r--r--test/files/run/macro-reify-abstypetag-notypeparams.check4
-rw-r--r--test/files/run/macro-reify-abstypetag-typeparams-notags.check4
-rw-r--r--test/files/run/macro-reify-abstypetag-typeparams-tags.check4
-rw-r--r--test/files/run/macro-reify-abstypetag-usetypetag.check4
-rw-r--r--test/files/run/macro-reify-basic.check2
-rw-r--r--test/files/run/macro-reify-freevars.check6
-rw-r--r--test/files/run/macro-reify-ref-to-packageless.check2
-rw-r--r--test/files/run/macro-reify-splice-outside-reify.check2
-rw-r--r--test/files/run/macro-reify-splice-splice.check2
-rw-r--r--test/files/run/macro-reify-tagful-a.check2
-rw-r--r--test/files/run/macro-reify-tagless-a.check6
-rw-r--r--test/files/run/macro-reify-typetag-notypeparams.check4
-rw-r--r--test/files/run/macro-reify-typetag-typeparams-tags.check4
-rw-r--r--test/files/run/macro-reify-unreify.check2
-rw-r--r--test/files/run/macro-repl-basic.check108
-rw-r--r--test/files/run/macro-repl-dontexpand.check24
-rw-r--r--test/files/run/macro-settings.check2
-rw-r--r--test/files/run/macro-sip19-revised.check10
-rw-r--r--test/files/run/macro-sip19.check10
-rw-r--r--test/files/run/macro-typecheck-implicitsdisabled.check4
-rw-r--r--test/files/run/macro-typecheck-macrosdisabled.check64
-rw-r--r--test/files/run/macro-typecheck-macrosdisabled2.check64
-rw-r--r--test/files/run/macro-undetparams-consfromsls.check10
-rw-r--r--test/files/run/macro-undetparams-implicitval.check2
-rw-r--r--test/files/run/macro-undetparams-macroitself.check4
-rw-r--r--test/files/run/newTags.check6
-rw-r--r--test/files/run/partialfun.check12
-rw-r--r--test/files/run/partialfun.scala172
-rw-r--r--test/files/run/primitive-sigs-2-new.check14
-rw-r--r--test/files/run/primitive-sigs-2-old.check14
-rw-r--r--test/files/run/reflection-allmirrors-tostring.check28
-rw-r--r--test/files/run/reflection-constructormirror-inner-badpath.check4
-rw-r--r--test/files/run/reflection-constructormirror-inner-good.check2
-rw-r--r--test/files/run/reflection-constructormirror-nested-badpath.check4
-rw-r--r--test/files/run/reflection-constructormirror-nested-good.check2
-rw-r--r--test/files/run/reflection-constructormirror-toplevel-badpath.check4
-rw-r--r--test/files/run/reflection-constructormirror-toplevel-good.check2
-rw-r--r--test/files/run/reflection-enclosed-basic.check36
-rw-r--r--test/files/run/reflection-enclosed-inner-basic.check40
-rw-r--r--test/files/run/reflection-enclosed-inner-inner-basic.check40
-rw-r--r--test/files/run/reflection-fieldmirror-accessorsareokay.check12
-rw-r--r--test/files/run/reflection-fieldmirror-ctorparam.check2
-rw-r--r--test/files/run/reflection-fieldmirror-getsetval.check4
-rw-r--r--test/files/run/reflection-fieldmirror-getsetvar.check4
-rw-r--r--test/files/run/reflection-fieldmirror-nmelocalsuffixstring.check2
-rw-r--r--test/files/run/reflection-fieldmirror-privatethis.check6
-rw-r--r--test/files/run/reflection-fieldsymbol-navigation.check12
-rw-r--r--test/files/run/reflection-implicit.check4
-rw-r--r--test/files/run/reflection-magicsymbols-invoke.check236
-rw-r--r--test/files/run/reflection-magicsymbols-repl.check78
-rw-r--r--test/files/run/reflection-magicsymbols-vanilla.check16
-rw-r--r--test/files/run/reflection-methodsymbol-params.check16
-rw-r--r--test/files/run/reflection-methodsymbol-returntype.check16
-rw-r--r--test/files/run/reflection-methodsymbol-typeparams.check16
-rw-r--r--test/files/run/reflection-modulemirror-inner-badpath.check4
-rw-r--r--test/files/run/reflection-modulemirror-inner-good.check2
-rw-r--r--test/files/run/reflection-modulemirror-nested-badpath.check4
-rw-r--r--test/files/run/reflection-modulemirror-nested-good.check2
-rw-r--r--test/files/run/reflection-modulemirror-toplevel-badpath.check4
-rw-r--r--test/files/run/reflection-repl-classes.check70
-rw-r--r--test/files/run/reflection-repl-elementary.check18
-rw-r--r--test/files/run/reflection-sorted-decls.check6
-rw-r--r--test/files/run/reflection-sorted-members.check8
-rw-r--r--test/files/run/reflection-valueclasses-derived.check6
-rw-r--r--test/files/run/reflection-valueclasses-standard.check54
-rw-r--r--test/files/run/reify-aliases.check2
-rw-r--r--test/files/run/reify-repl-fail-gracefully.check42
-rw-r--r--test/files/run/reify-staticXXX.check48
-rw-r--r--test/files/run/reify_ann1a.check60
-rw-r--r--test/files/run/reify_ann1b.check60
-rw-r--r--test/files/run/reify_ann2a.check88
-rw-r--r--test/files/run/reify_ann3.check42
-rw-r--r--test/files/run/reify_ann4.check64
-rw-r--r--test/files/run/reify_ann5.check44
-rw-r--r--test/files/run/reify_classfileann_a.check36
-rw-r--r--test/files/run/reify_classfileann_b.check40
-rw-r--r--test/files/run/reify_closure8b.check6
-rw-r--r--test/files/run/reify_copypaste1.check4
-rw-r--r--test/files/run/reify_nested_inner_refers_to_global.check2
-rw-r--r--test/files/run/reify_nested_outer_refers_to_global.check2
-rw-r--r--test/files/run/reify_nested_outer_refers_to_local.check2
-rw-r--r--test/files/run/reify_newimpl_11.check4
-rw-r--r--test/files/run/reify_newimpl_13.check4
-rw-r--r--test/files/run/reify_newimpl_18.check2
-rw-r--r--test/files/run/reify_newimpl_19.check4
-rw-r--r--test/files/run/reify_newimpl_20.check2
-rw-r--r--test/files/run/reify_newimpl_21.check2
-rw-r--r--test/files/run/reify_newimpl_22.check58
-rw-r--r--test/files/run/reify_newimpl_23.check56
-rw-r--r--test/files/run/reify_newimpl_25.check38
-rw-r--r--test/files/run/reify_newimpl_26.check42
-rw-r--r--test/files/run/reify_newimpl_27.check2
-rw-r--r--test/files/run/reify_newimpl_29.check2
-rw-r--r--test/files/run/reify_newimpl_30.check2
-rw-r--r--test/files/run/reify_newimpl_31.check2
-rw-r--r--test/files/run/reify_newimpl_33.check2
-rw-r--r--test/files/run/reify_newimpl_35.check34
-rw-r--r--test/files/run/reify_newimpl_36.check2
-rw-r--r--test/files/run/reify_newimpl_37.check2
-rw-r--r--test/files/run/reify_newimpl_38.check2
-rw-r--r--test/files/run/reify_newimpl_39.check2
-rw-r--r--test/files/run/reify_newimpl_40.check2
-rw-r--r--test/files/run/repl-power.check64
-rw-r--r--test/files/run/runtimeEval2.check2
-rw-r--r--test/files/run/showraw_mods.check2
-rw-r--r--test/files/run/showraw_tree.check4
-rw-r--r--test/files/run/showraw_tree_ids.check4
-rw-r--r--test/files/run/showraw_tree_kinds.check4
-rw-r--r--test/files/run/showraw_tree_types_ids.check20
-rw-r--r--test/files/run/showraw_tree_types_typed.check20
-rw-r--r--test/files/run/showraw_tree_types_untyped.check4
-rw-r--r--test/files/run/showraw_tree_ultimate.check20
-rw-r--r--test/files/run/t1195-new.check12
-rw-r--r--test/files/run/t1195-old.check12
-rw-r--r--test/files/run/t2386-new.check4
-rw-r--r--test/files/run/t2886.check10
-rw-r--r--test/files/run/t3507-new.check2
-rw-r--r--test/files/run/t4110-new.check4
-rw-r--r--test/files/run/t4216.check74
-rw-r--r--test/files/run/t4835.check14
-rw-r--r--test/files/run/t4835.scala76
-rw-r--r--test/files/run/t4935.check2
-rw-r--r--test/files/run/t4935.scala18
-rw-r--r--test/files/run/t5224.check18
-rw-r--r--test/files/run/t5225_1.check8
-rw-r--r--test/files/run/t5225_2.check8
-rw-r--r--test/files/run/t5256c.check6
-rw-r--r--test/files/run/t5256g.check6
-rw-r--r--test/files/run/t5256h.check6
-rw-r--r--test/files/run/t5271_1.check24
-rw-r--r--test/files/run/t5271_2.check28
-rw-r--r--test/files/run/t5271_3.check42
-rw-r--r--test/files/run/t5418a.check1
-rw-r--r--test/files/run/t5418a.scala3
-rw-r--r--test/files/run/t5418b.check2
-rw-r--r--test/files/run/t5418b.scala11
-rw-r--r--test/files/run/t5419.check2
-rw-r--r--test/files/run/t5680.check6
-rw-r--r--test/files/run/t5704.check2
-rw-r--r--test/files/run/t5713.check2
-rw-r--r--test/files/run/t5770.check20
-rw-r--r--test/files/run/t5816.check2
-rw-r--r--test/files/run/t5881.check4
-rw-r--r--test/files/run/t5943a1.check1
-rw-r--r--test/files/run/t5943a1.scala9
-rw-r--r--test/files/run/t5943a2.check1
-rw-r--r--test/files/run/t5943a2.scala9
-rw-r--r--test/files/run/t6086-repl.check24
-rw-r--r--test/files/run/t6086-vanilla.check2
-rw-r--r--test/files/run/t6188.check2
-rw-r--r--test/files/run/t6199-mirror.check2
-rw-r--r--test/files/run/t6199-toolbox.check2
-rw-r--r--test/files/run/t6260.check1
-rw-r--r--test/files/run/t6260.scala12
-rw-r--r--test/files/run/t6287.check6
-rw-r--r--test/files/run/t6318_derived.check6
-rw-r--r--test/files/run/t6318_primitives.check72
-rw-r--r--test/files/run/t6323b.check2
-rw-r--r--test/files/run/t6329_repl.check26
-rw-r--r--test/files/run/t6329_repl_bug.check26
-rw-r--r--test/files/run/t6329_vanilla.check4
-rw-r--r--test/files/run/t6329_vanilla_bug.check4
-rw-r--r--test/files/run/t6337a.scala16
-rw-r--r--test/files/run/t6392a.check2
-rw-r--r--test/files/run/t6392b.check2
-rw-r--r--test/files/run/t6394a.check1
-rw-r--r--test/files/run/t6394a.flags1
-rw-r--r--test/files/run/t6394a/Macros_1.scala12
-rw-r--r--test/files/run/t6394a/Test_2.scala4
-rw-r--r--test/files/run/t6394b.check2
-rw-r--r--test/files/run/test-cpp.check130
-rw-r--r--test/files/run/toolbox_default_reporter_is_silent.check2
-rw-r--r--test/files/run/toolbox_typecheck_implicitsdisabled.check10
-rw-r--r--test/files/run/toolbox_typecheck_inferimplicitvalue.check2
-rw-r--r--test/files/run/toolbox_typecheck_macrosdisabled.check82
-rw-r--r--test/files/run/toolbox_typecheck_macrosdisabled2.check82
-rw-r--r--test/files/run/typetags_core.check60
-rw-r--r--test/files/run/typetags_serialize.check4
-rw-r--r--test/files/run/typetags_without_scala_reflect_manifest_lookup.check0
-rw-r--r--test/files/run/typetags_without_scala_reflect_manifest_lookup.scala29
-rw-r--r--test/files/run/typetags_without_scala_reflect_typetag_lookup.check3
-rw-r--r--test/files/run/typetags_without_scala_reflect_typetag_lookup.scala45
-rw-r--r--test/files/run/typetags_without_scala_reflect_typetag_manifest_interop.check3
-rw-r--r--test/files/run/typetags_without_scala_reflect_typetag_manifest_interop.scala46
-rw-r--r--test/files/run/valueclasses-classmanifest-basic.check2
-rw-r--r--test/files/run/valueclasses-classmanifest-existential.check2
-rw-r--r--test/files/run/valueclasses-classmanifest-generic.check2
-rw-r--r--test/files/run/valueclasses-classtag-basic.check2
-rw-r--r--test/files/run/valueclasses-classtag-existential.check2
-rw-r--r--test/files/run/valueclasses-classtag-generic.check2
-rw-r--r--test/files/run/valueclasses-manifest-basic.check2
-rw-r--r--test/files/run/valueclasses-manifest-existential.check2
-rw-r--r--test/files/run/valueclasses-manifest-generic.check2
-rw-r--r--test/files/run/valueclasses-pavlov.check2
-rw-r--r--test/files/run/valueclasses-pavlov.scala26
-rw-r--r--test/files/run/valueclasses-typetag-basic.check2
-rw-r--r--test/files/run/valueclasses-typetag-existential.check2
-rw-r--r--test/files/run/valueclasses-typetag-generic.check2
-rw-r--r--test/files/run/virtpatmat_typetag.check20
-rw-r--r--test/files/scalacheck/duration.scala69
-rw-r--r--test/osgi/src/BasicLibrary.scala37
-rw-r--r--test/osgi/src/BasicReflection.scala66
-rw-r--r--test/osgi/src/BasicTest.scala33
-rw-r--r--test/osgi/src/ReflectionToolboxTest.scala49
-rw-r--r--test/osgi/src/ScalaOsgiHelper.scala36
-rwxr-xr-xtest/partest.bat208
-rw-r--r--test/pending/neg/macro-invalidusage-badbounds-b.check8
-rw-r--r--test/pending/neg/reify_packed.check8
-rw-r--r--test/pending/run/macro-expand-implicit-macro-defeats-type-inference.check12
-rw-r--r--test/pending/run/macro-reify-tagless-b.check4
-rw-r--r--test/pending/run/macro-reify-typetag-hktypeparams-notags.check4
-rw-r--r--test/pending/run/t5943b1.scala10
-rw-r--r--test/pending/run/t5943b2.scala10
-rwxr-xr-xtools/binary-repo-lib.sh2
-rwxr-xr-xtools/class-dump6
-rw-r--r--tools/get-scala-commit-date.bat16
-rw-r--r--tools/get-scala-commit-sha.bat16
-rwxr-xr-xtools/jar-dump4
467 files changed, 4620 insertions, 3424 deletions
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000000..958b0b9f28
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,26 @@
+# These files are text and should be normalized (convert crlf => lf)
+*.c text
+*.check text
+*.css text
+*.html text
+*.java text
+*.js text
+*.sbt text
+*.scala text
+*.sh text
+*.txt text
+*.xml text
+
+# Windows-specific files get windows endings
+*.bat eol=crlf
+*.cmd eol=crlf
+*-windows.tmpl eol=crlf
+
+# Some binary file types for completeness
+# (binary is a macro for -text -diff)
+*.dll binary
+*.gif binary
+*.jpg binary
+*.png binary
+*.class -text diff=class
+*.jar -text diff=jar
diff --git a/build.xml b/build.xml
index 99b68ced84..ac25e1e757 100644
--- a/build.xml
+++ b/build.xml
@@ -22,7 +22,7 @@ END-USER TARGETS
<target name="clean" depends="quick.clean"
description="Removes binaries of compiler and library. Distributions are untouched."/>
- <target name="test" depends="test.done"
+ <target name="test" depends="test.done, osgi.test"
description="Runs test suite and bootstrapping test on Scala compiler and library."/>
<target name="test-opt"
@@ -217,6 +217,7 @@ PROPERTIES
<property name="build-palo.dir" value="${build.dir}/palo"/>
<property name="build-quick.dir" value="${build.dir}/quick"/>
<property name="build-pack.dir" value="${build.dir}/pack"/>
+ <property name="build-osgi.dir" value="${build.dir}/osgi"/>
<property name="build-strap.dir" value="${build.dir}/strap"/>
<property name="build-docs.dir" value="${build.dir}/scaladoc"/>
<property name="build-libs.dir" value="${build.dir}/libs"/>
@@ -279,6 +280,28 @@ INITIALISATION
<property name="init.maven.tasks.finished" value="true" />
</target>
+ <target name="init.extra.tasks" depends="init.maven.tasks" unless="init.extra.tasks.finished">
+ <artifact:dependencies pathId="extra.tasks.classpath" filesetId="extra.tasks.fileset">
+ <dependency groupId="biz.aQute" artifactId="bnd" version="1.50.0"/>
+ </artifact:dependencies>
+ <!-- Pax runner -->
+ <property name="pax.exam.version" value="2.5.0"/>
+ <artifact:dependencies pathId="pax.exam.classpath" filesetId="pax.exam.fileset">
+ <dependency groupId="org.ops4j.pax.exam" artifactId="pax-exam-container-native" version="${pax.exam.version}"/>
+ <dependency groupId="org.ops4j.pax.exam" artifactId="pax-exam-junit4" version="${pax.exam.version}"/>
+ <dependency groupId="org.ops4j.pax.exam" artifactId="pax-exam-link-assembly" version="${pax.exam.version}"/>
+ <dependency groupId="org.ops4j.pax.url" artifactId="pax-url-aether" version="1.4.0"/>
+ <dependency groupId="org.ops4j.pax.swissbox" artifactId="pax-swissbox-framework" version="1.5.1"/>
+ <dependency groupId="ch.qos.logback" artifactId="logback-core" version="0.9.20"/>
+ <dependency groupId="ch.qos.logback" artifactId="logback-classic" version="0.9.20"/>
+ <dependency groupId="junit" artifactId="junit" version="4.10"/>
+ <dependency groupId="org.apache.felix" artifactId="org.apache.felix.framework" version="3.2.2"/>
+ </artifact:dependencies>
+ <!-- BND support -->
+ <typedef resource="aQute/bnd/ant/taskdef.properties" classpathref="extra.tasks.classpath" />
+ <property name="init.maven.tasks.finished" value="true" />
+ </target>
+
<!-- Resolve maven dependencies -->
<target name="init.maven.jars" depends="init.maven.tasks">
<!-- This target has an issue where if the user directory does not exist, we BOMB. ugh. -->
@@ -400,7 +423,7 @@ INITIALISATION
</echo>
</target>
- <target name="init" depends="init.jars, init.maven.jars, init.version.done, init.fail.bad.jdk, init.warn.jdk7">
+ <target name="init" depends="init.jars, init.maven.jars, init.version.done, init.fail.bad.jdk, init.warn.jdk7, init.extra.tasks">
<property name="scalac.args.always" value="-Yreify-copypaste" />
<!-- scalac.args.optimise is selectively overridden in certain antcall tasks. -->
<property name="scalac.args.optimise" value=""/>
@@ -1673,6 +1696,139 @@ PACKED QUICK BUILD (PACK)
</target>
<!-- ===========================================================================
+OSGi Artifacts
+============================================================================ -->
+
+ <target name="osgi.init" depends="pack.done">
+ <mkdir dir="${build-osgi.dir}"/>
+
+ <property name="osgi.test.src" value="${partest.dir}/osgi/src"/>
+ <property name="osgi.test.classes" value="${build-osgi.dir}/classes"/>
+
+ <!-- simplify fixing pom versions -->
+ <macrodef name="make-bundle">
+ <attribute name="name" />
+ <attribute name="version" />
+ <sequential>
+ <copy file="${src.dir}/build/bnd/@{name}.bnd" tofile="${build-osgi.dir}/@{name}.bnd" overwrite="true">
+ <filterset>
+ <filter token="VERSION" value="@{version}" />
+ </filterset>
+ </copy>
+ <bnd classpath="${build-pack.dir}/lib/@{name}.jar"
+ eclipse="false"
+ failok="false"
+ exceptions="true"
+ files="${build-osgi.dir}/@{name}.bnd"
+ output="${build-osgi.dir}"/>
+ </sequential>
+ </macrodef>
+ <macrodef name="make-plugin-bundle">
+ <attribute name="name" />
+ <attribute name="version" />
+ <sequential>
+ <copy file="${src.dir}/build/bnd/@{name}.bnd" tofile="${build-osgi.dir}/@{name}.bnd" overwrite="true">
+ <filterset>
+ <filter token="VERSION" value="@{version}" />
+ </filterset>
+ </copy>
+ <bnd classpath="${build-pack.dir}/misc/scala-devel/plugins/@{name}.jar"
+ eclipse="false"
+ failok="false"
+ exceptions="true"
+ files="${build-osgi.dir}/@{name}.bnd"
+ output="${build-osgi.dir}"/>
+ </sequential>
+ </macrodef>
+ <uptodate property="osgi.bundles.available" targetfile="${build-osgi.dir}/bundles.complete">
+ <srcfiles dir="${basedir}">
+ <include name="build.xml"/>
+ <include name="src/build/bnd/*.bnd"/>
+ </srcfiles>
+ </uptodate>
+ </target>
+
+ <target name="osgi.bundles" depends="osgi.init" unless="osgi.bundles.available">
+ <stopwatch name="osgi.bundle.timer"/>
+ <make-bundle name="scala-library" version="${osgi.version.number}" />
+ <make-bundle name="scala-actors" version="${osgi.version.number}" />
+ <make-bundle name="scala-actors-migration" version="${osgi.version.number}" />
+ <make-bundle name="scala-reflect" version="${osgi.version.number}" />
+ <make-bundle name="scala-compiler" version="${osgi.version.number}" />
+ <make-plugin-bundle name="continuations" version="${osgi.version.number}" />
+ <touch file="${build-osgi.dir}/bundles.complete" verbose="no"/>
+ <stopwatch name="osgi.bundle.timer" action="total"/>
+ </target>
+
+ <target name="osgi.bundles.swing" depends="osgi.init" if="has.java6" unless="osgi.bundles.available">
+ <!-- TODO - only if JDK6 -->
+ <make-bundle name="scala-swing" version="${osgi.version.number}"/>
+ </target>
+
+ <target name="osgi.done" depends="osgi.bundles, osgi.bundles.swing"/>
+
+ <target name="osgi.test.init" depends="osgi.done">
+ <path id="osgi.bundle.classpath">
+ <pathelement location="${build-osgi.dir}/org.scala-lang.scala-library.jar"/>
+ <pathelement location="${build-osgi.dir}/org.scala-lang.scala-reflect.jar"/>
+ <pathelement location="${build-osgi.dir}/org.scala-lang.scala-compiler.jar"/>
+ <pathelement location="${build-osgi.dir}/org.scala-lang.scala-actors.jar"/>
+ <pathelement location="${build-osgi.dir}/org.scala-lang.scala-actors-migration.jar"/>
+ </path>
+
+ <uptodate property="osgi.test.available" targetfile="${build-osgi.dir}/test-compile.complete">
+ <srcfiles dir="${osgi.test.src}">
+ <include name="**/*.scala"/>
+ </srcfiles>
+ </uptodate>
+ </target>
+
+ <target name="osgi.test.comp" depends="osgi.test.init, quick.done" unless="osgi.test.available">
+ <stopwatch name="osgi.test.comp.timer"/>
+ <mkdir dir="${osgi.test.classes}"/>
+ <scalacfork
+ destdir="${osgi.test.classes}"
+ compilerpathref="quick.classpath"
+ params="${scalac.args.quick}"
+ srcdir="${osgi.test.src}"
+ jvmargs="${scalacfork.jvmargs}">
+ <include name="**/*.scala"/>
+ <compilationpath>
+ <pathelement location="${osgi.test.classes}"/>
+ <path refid="osgi.bundle.classpath"/>
+ <path refid="pax.exam.classpath"/>
+ <path refid="forkjoin.classpath"/>
+ </compilationpath>
+ </scalacfork>
+ <touch file="${build-osgi.dir}/test-compile.complete" verbose="no"/>
+ <stopwatch name="osgi.test.comp.timer" action="total"/>
+ </target>
+
+ <target name="osgi.test" depends="osgi.test.comp">
+ <stopwatch name="osgi.test.timer"/>
+ <mkdir dir="${osgi.test.classes}"/>
+ <junit fork="yes" haltonfailure="yes">
+ <classpath>
+ <pathelement location="${osgi.test.classes}"/>
+ <path refid="osgi.bundle.classpath"/>
+ <path refid="pax.exam.classpath"/>
+ <path refid="forkjoin.classpath"/>
+ </classpath>
+ <batchtest fork="yes" todir="${build-osgi.dir}">
+ <fileset dir="${osgi.test.classes}">
+ <include name="**/*Test.class"/>
+ </fileset>
+ </batchtest>
+ <formatter type="brief" usefile="false" />
+ </junit>
+ <stopwatch name="osgi.test.timer" action="total"/>
+ </target>
+
+ <target name="osgi.clean">
+ <delete dir="${build-osgi.dir}" includeemptydirs="yes" quiet="yes" failonerror="no"/>
+ </target>
+
+<!-- ===========================================================================
BOOTSTRAPPING BUILD (STRAP)
============================================================================ -->
@@ -2553,9 +2709,24 @@ BOOTRAPING TEST AND TEST SUITE
DISTRIBUTION
============================================================================ -->
- <target name="dist.start" depends="pack.done">
+ <target name="dist.start" depends="pack.done, osgi.done">
<property name="dist.name" value="scala-${version.number}"/>
<property name="dist.dir" value="${dists.dir}/${dist.name}"/>
+
+ <macrodef name="copy-bundle">
+ <attribute name="name" />
+ <sequential>
+ <copy file="${build-osgi.dir}/org.scala-lang.@{name}.jar"
+ tofile="${dist.dir}/lib/@{name}.jar"/>
+ </sequential>
+ </macrodef>
+ <macrodef name="copy-plugin-bundle">
+ <attribute name="name" />
+ <sequential>
+ <copy file="${build-osgi.dir}/org.scala-lang.plugins.@{name}.jar"
+ tofile="${dist.dir}/misc/scala-devel/plugins/@{name}.jar"/>
+ </sequential>
+ </macrodef>
</target>
<target name="dist.base" depends="dist.start">
@@ -2564,6 +2735,13 @@ DISTRIBUTION
<fileset dir="${build-pack.dir}/lib"/>
</copy>
<mkdir dir="${dist.dir}/bin"/>
+ <!-- TODO - Stop being inefficient and don't copy OSGi bundles overtop other jars. -->
+ <copy-bundle name="scala-library"/>
+ <copy-bundle name="scala-reflect"/>
+ <copy-bundle name="scala-swing"/>
+ <copy-bundle name="scala-actors"/>
+ <copy-bundle name="scala-actors-migration"/>
+ <copy-bundle name="scala-compiler"/>
<copy toDir="${dist.dir}/bin">
<fileset dir="${build-pack.dir}/bin"/>
</copy>
@@ -2573,9 +2751,7 @@ DISTRIBUTION
<chmod perm="ugo+rx" file="${dist.dir}/bin/fsc"/>
<chmod perm="ugo+rx" file="${dist.dir}/bin/scalap"/>
<mkdir dir="${dist.dir}/misc/scala-devel/plugins"/>
- <copy toDir="${dist.dir}/misc/scala-devel/plugins">
- <fileset dir="${build-pack.dir}/misc/scala-devel/plugins"/>
- </copy>
+ <copy-plugin-bundle name="continuations"/>
</target>
<target name="dist.doc" depends="dist.base, docs.done">
@@ -2663,7 +2839,7 @@ TEST AND DISTRIBUTION BUNDLE (ALL)
<target name="all.done" depends="dist.done, test.done"/>
- <target name="all.clean" depends="locker.clean, docs.clean, dist.clean, sbt.clean"/>
+ <target name="all.clean" depends="locker.clean, docs.clean, dist.clean, sbt.clean, osgi.clean"/>
<!-- ===========================================================================
STABLE REFERENCE (STARR)
diff --git a/gitconfig.SAMPLE b/gitconfig.SAMPLE
new file mode 100644
index 0000000000..d90c3bfb02
--- /dev/null
+++ b/gitconfig.SAMPLE
@@ -0,0 +1,8 @@
+# With something like this in .git/config or ~/.gitconfig
+# you can diff class files and jar files.
+[diff "class"]
+ textconv = tools/class-dump
+ cachetextconv = true
+[diff "jar"]
+ textconv = tools/jar-dump
+ cachetextconv = true
diff --git a/src/actors-migration/scala/actors/Pattern.scala b/src/actors-migration/scala/actors/Pattern.scala
index fa2db79152..a97ee3ba07 100644
--- a/src/actors-migration/scala/actors/Pattern.scala
+++ b/src/actors-migration/scala/actors/Pattern.scala
@@ -1,6 +1,6 @@
package scala.actors
-import scala.concurrent.util.Duration
+import scala.concurrent.duration.Duration
import scala.language.implicitConversions
object pattern {
diff --git a/src/actors-migration/scala/actors/StashingActor.scala b/src/actors-migration/scala/actors/StashingActor.scala
index 29f370a3e2..775d115d0b 100644
--- a/src/actors-migration/scala/actors/StashingActor.scala
+++ b/src/actors-migration/scala/actors/StashingActor.scala
@@ -1,7 +1,7 @@
package scala.actors
import scala.collection._
-import scala.concurrent.util.Duration
+import scala.concurrent.duration.Duration
import java.util.concurrent.TimeUnit
import scala.language.implicitConversions
diff --git a/src/actors-migration/scala/actors/Timeout.scala b/src/actors-migration/scala/actors/Timeout.scala
index 5540d2880e..c3017d8569 100644
--- a/src/actors-migration/scala/actors/Timeout.scala
+++ b/src/actors-migration/scala/actors/Timeout.scala
@@ -8,7 +8,7 @@
package scala.actors
-import scala.concurrent.util.Duration
+import scala.concurrent.duration.Duration
import java.util.concurrent.TimeUnit
import scala.language.implicitConversions
diff --git a/src/actors/scala/actors/ActorRef.scala b/src/actors/scala/actors/ActorRef.scala
index 8f70b13e01..7768f04c2b 100644
--- a/src/actors/scala/actors/ActorRef.scala
+++ b/src/actors/scala/actors/ActorRef.scala
@@ -1,7 +1,7 @@
package scala.actors
import java.util.concurrent.TimeoutException
-import scala.concurrent.util.Duration
+import scala.concurrent.duration.Duration
/**
* Trait used for migration of Scala actors to Akka.
diff --git a/src/build/bnd/continuations.bnd b/src/build/bnd/continuations.bnd
new file mode 100644
index 0000000000..748502f653
--- /dev/null
+++ b/src/build/bnd/continuations.bnd
@@ -0,0 +1,5 @@
+Bundle-Name: Scala Continuations Plugin
+Bundle-SymbolicName: org.scala-lang.plugins.continuations
+ver: @VERSION@
+Bundle-Version: ${ver}
+Export-Package: *;version=${ver}
diff --git a/src/build/bnd/scala-actors-migration.bnd b/src/build/bnd/scala-actors-migration.bnd
new file mode 100644
index 0000000000..2cddfb620a
--- /dev/null
+++ b/src/build/bnd/scala-actors-migration.bnd
@@ -0,0 +1,5 @@
+Bundle-Name: Scala Actors Migration
+Bundle-SymbolicName: org.scala-lang.scala-actors-migration
+ver: @VERSION@
+Bundle-Version: ${ver}
+Export-Package: *;version=${ver}
diff --git a/src/build/bnd/scala-actors.bnd b/src/build/bnd/scala-actors.bnd
new file mode 100644
index 0000000000..8d0555777f
--- /dev/null
+++ b/src/build/bnd/scala-actors.bnd
@@ -0,0 +1,5 @@
+Bundle-Name: Scala Actors
+Bundle-SymbolicName: org.scala-lang.scala-actors
+ver: @VERSION@
+Bundle-Version: ${ver}
+Export-Package: *;version=${ver}
diff --git a/src/build/bnd/scala-compiler.bnd b/src/build/bnd/scala-compiler.bnd
new file mode 100644
index 0000000000..c289843447
--- /dev/null
+++ b/src/build/bnd/scala-compiler.bnd
@@ -0,0 +1,8 @@
+Bundle-Name: Scala Compiler
+Bundle-SymbolicName: org.scala-lang.scala-compiler
+ver: @VERSION@
+Bundle-Version: ${ver}
+Export-Package: *;version=${ver}
+Import-Package: scala.tools.jline.*;resolution:=optional, \
+ org.apache.tools.ant.*;resolution:=optional, \
+ *
diff --git a/src/build/bnd/scala-library.bnd b/src/build/bnd/scala-library.bnd
new file mode 100644
index 0000000000..03aff45672
--- /dev/null
+++ b/src/build/bnd/scala-library.bnd
@@ -0,0 +1,6 @@
+Bundle-Name: Scala Standard Library
+Bundle-SymbolicName: org.scala-lang.scala-library
+ver: @VERSION@
+Bundle-Version: ${ver}
+Export-Package: *;version=${ver}
+Import-Package: sun.misc;resolution:=optional, *
diff --git a/src/build/bnd/scala-reflect.bnd b/src/build/bnd/scala-reflect.bnd
new file mode 100644
index 0000000000..6cda346d3a
--- /dev/null
+++ b/src/build/bnd/scala-reflect.bnd
@@ -0,0 +1,6 @@
+Bundle-Name: Scala Reflect
+Bundle-SymbolicName: org.scala-lang.scala-reflect
+ver: @VERSION@
+Bundle-Version: ${ver}
+Export-Package: *;version=${ver}
+Import-Package: scala.tools.nsc;resolution:=optional, *
diff --git a/src/build/bnd/scala-swing.bnd b/src/build/bnd/scala-swing.bnd
new file mode 100644
index 0000000000..eeacb9bd3f
--- /dev/null
+++ b/src/build/bnd/scala-swing.bnd
@@ -0,0 +1,5 @@
+Bundle-Name: Scala Swing
+Bundle-SymbolicName: org.scala-lang.scala-swing
+ver: @VERSION@
+Bundle-Version: ${ver}
+Export-Package: *;version=${ver}
diff --git a/src/compiler/scala/reflect/macros/runtime/Enclosures.scala b/src/compiler/scala/reflect/macros/runtime/Enclosures.scala
index ebde4447d7..b5c988ca83 100644
--- a/src/compiler/scala/reflect/macros/runtime/Enclosures.scala
+++ b/src/compiler/scala/reflect/macros/runtime/Enclosures.scala
@@ -14,7 +14,7 @@ trait Enclosures {
// vals are eager to simplify debugging
// after all we wouldn't save that much time by making them lazy
val macroApplication: Tree = expandee
- val enclosingClass: Tree = site.enclClass.tree
+ val enclosingClass: Tree = enclTrees collectFirst { case x: ImplDef => x } getOrElse EmptyTree
val enclosingImplicits: List[(Type, Tree)] = site.openImplicits
val enclosingMacros: List[Context] = this :: universe.analyzer.openMacros // include self
val enclosingMethod: Tree = site.enclMethod.tree
diff --git a/src/compiler/scala/reflect/reify/package.scala b/src/compiler/scala/reflect/reify/package.scala
index 2600956805..5a23ab7214 100644
--- a/src/compiler/scala/reflect/reify/package.scala
+++ b/src/compiler/scala/reflect/reify/package.scala
@@ -72,7 +72,7 @@ package object reify {
def reifyEnclosingRuntimeClass(global: Global)(typer0: global.analyzer.Typer): global.Tree = {
import global._
import definitions._
- def isThisInScope = typer0.context.enclosingContextChain exists (_.tree.isInstanceOf[Template])
+ def isThisInScope = typer0.context.enclosingContextChain exists (_.tree.isInstanceOf[ImplDef])
if (isThisInScope) {
val enclosingClasses = typer0.context.enclosingContextChain map (_.tree) collect { case classDef: ClassDef => classDef }
val classInScope = enclosingClasses.headOption getOrElse EmptyTree
diff --git a/src/compiler/scala/tools/ant/templates/tool-windows.tmpl b/src/compiler/scala/tools/ant/templates/tool-windows.tmpl
index 3c0d1d77ca..a347df6d6e 100644
--- a/src/compiler/scala/tools/ant/templates/tool-windows.tmpl
+++ b/src/compiler/scala/tools/ant/templates/tool-windows.tmpl
@@ -1,91 +1,91 @@
-@@echo off
-
-rem ##########################################################################
-rem # Copyright 2002-2012 LAMP/EPFL
-rem #
-rem # This is free software; see the distribution for copying conditions.
-rem # There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
-rem # PARTICULAR PURPOSE.
-rem ##########################################################################
-
-setlocal enableextensions enabledelayedexpansion
-
-set _LINE_TOOLCP=
-
-:another_param
-
-if "%1%"=="-toolcp" (
- set _LINE_TOOLCP=%2%
- shift
- shift
- goto another_param
-)
-
-set _LINE_PARAMS=%1
-:param_loop
-shift
-if [%1]==[] goto param_afterloop
-set _LINE_PARAMS=%_LINE_PARAMS% %1
-goto param_loop
-:param_afterloop
-if "%OS%" NEQ "Windows_NT" (
- echo "Warning, your version of Windows is not supported. Attempting to start scala anyway."
-)
-
-@@setlocal
-call :set_home
-
-rem We use the value of the JAVACMD environment variable if defined
-set _JAVACMD=%JAVACMD%
-
-if not defined _JAVACMD (
- if not "%JAVA_HOME%"=="" (
- if exist "%JAVA_HOME%\bin\java.exe" set "_JAVACMD=%JAVA_HOME%\bin\java.exe"
- )
-)
-
-if "%_JAVACMD%"=="" set _JAVACMD=java
-
-rem We use the value of the JAVA_OPTS environment variable if defined
-set _JAVA_OPTS=%JAVA_OPTS%
-if not defined _JAVA_OPTS set _JAVA_OPTS=@javaflags@
-
-set _TOOL_CLASSPATH=@classpath@
-if "%_TOOL_CLASSPATH%"=="" (
- for %%f in ("!_SCALA_HOME!\lib\*") do call :add_cpath "%%f"
- for /d %%f in ("!_SCALA_HOME!\lib\*") do call :add_cpath "%%f"
-)
-
-if not "%_LINE_TOOLCP%"=="" call :add_cpath "%_LINE_TOOLCP%"
-
-set _PROPS=-Dscala.home="!_SCALA_HOME!" -Denv.emacs="%EMACS%" -Dscala.usejavacp=true @properties@
-
-rem echo "%_JAVACMD%" %_JAVA_OPTS% %_PROPS% -cp "%_TOOL_CLASSPATH%" @class@ @toolflags@ %*
-"%_JAVACMD%" %_JAVA_OPTS% %_PROPS% -cp "%_TOOL_CLASSPATH%" @class@ @toolflags@ %*
-goto end
-
-rem ##########################################################################
-rem # subroutines
-
-:add_cpath
- if "%_TOOL_CLASSPATH%"=="" (
- set _TOOL_CLASSPATH=%~1
- ) else (
- set _TOOL_CLASSPATH=%_TOOL_CLASSPATH%;%~1
- )
-goto :eof
-
-rem Variable "%~dps0" works on WinXP SP2 or newer
-rem (see http://support.microsoft.com/?kbid=833431)
-rem set _SCALA_HOME=%~dps0..
-:set_home
- set _BIN_DIR=
- for %%i in (%~sf0) do set _BIN_DIR=%_BIN_DIR%%%~dpsi
- set _SCALA_HOME=%_BIN_DIR%..
-goto :eof
-
-:end
-@@endlocal
-
-REM exit code fix, see http://stackoverflow.com/questions/4632891/exiting-batch-with-exit-b-x-where-x-1-acts-as-if-command-completed-successfu
-@@%COMSPEC% /C exit %errorlevel% >nul
+@@echo off
+
+rem ##########################################################################
+rem # Copyright 2002-2012 LAMP/EPFL
+rem #
+rem # This is free software; see the distribution for copying conditions.
+rem # There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
+rem # PARTICULAR PURPOSE.
+rem ##########################################################################
+
+setlocal enableextensions enabledelayedexpansion
+
+set _LINE_TOOLCP=
+
+:another_param
+
+if "%1%"=="-toolcp" (
+ set _LINE_TOOLCP=%2%
+ shift
+ shift
+ goto another_param
+)
+
+set _LINE_PARAMS=%1
+:param_loop
+shift
+if [%1]==[] goto param_afterloop
+set _LINE_PARAMS=%_LINE_PARAMS% %1
+goto param_loop
+:param_afterloop
+if "%OS%" NEQ "Windows_NT" (
+ echo "Warning, your version of Windows is not supported. Attempting to start scala anyway."
+)
+
+@@setlocal
+call :set_home
+
+rem We use the value of the JAVACMD environment variable if defined
+set _JAVACMD=%JAVACMD%
+
+if not defined _JAVACMD (
+ if not "%JAVA_HOME%"=="" (
+ if exist "%JAVA_HOME%\bin\java.exe" set "_JAVACMD=%JAVA_HOME%\bin\java.exe"
+ )
+)
+
+if "%_JAVACMD%"=="" set _JAVACMD=java
+
+rem We use the value of the JAVA_OPTS environment variable if defined
+set _JAVA_OPTS=%JAVA_OPTS%
+if not defined _JAVA_OPTS set _JAVA_OPTS=@javaflags@
+
+set _TOOL_CLASSPATH=@classpath@
+if "%_TOOL_CLASSPATH%"=="" (
+ for %%f in ("!_SCALA_HOME!\lib\*") do call :add_cpath "%%f"
+ for /d %%f in ("!_SCALA_HOME!\lib\*") do call :add_cpath "%%f"
+)
+
+if not "%_LINE_TOOLCP%"=="" call :add_cpath "%_LINE_TOOLCP%"
+
+set _PROPS=-Dscala.home="!_SCALA_HOME!" -Denv.emacs="%EMACS%" -Dscala.usejavacp=true @properties@
+
+rem echo "%_JAVACMD%" %_JAVA_OPTS% %_PROPS% -cp "%_TOOL_CLASSPATH%" @class@ @toolflags@ %*
+"%_JAVACMD%" %_JAVA_OPTS% %_PROPS% -cp "%_TOOL_CLASSPATH%" @class@ @toolflags@ %*
+goto end
+
+rem ##########################################################################
+rem # subroutines
+
+:add_cpath
+ if "%_TOOL_CLASSPATH%"=="" (
+ set _TOOL_CLASSPATH=%~1
+ ) else (
+ set _TOOL_CLASSPATH=%_TOOL_CLASSPATH%;%~1
+ )
+goto :eof
+
+rem Variable "%~dps0" works on WinXP SP2 or newer
+rem (see http://support.microsoft.com/?kbid=833431)
+rem set _SCALA_HOME=%~dps0..
+:set_home
+ set _BIN_DIR=
+ for %%i in (%~sf0) do set _BIN_DIR=%_BIN_DIR%%%~dpsi
+ set _SCALA_HOME=%_BIN_DIR%..
+goto :eof
+
+:end
+@@endlocal
+
+REM exit code fix, see http://stackoverflow.com/questions/4632891/exiting-batch-with-exit-b-x-where-x-1-acts-as-if-command-completed-successfu
+@@%COMSPEC% /C exit %errorlevel% >nul
diff --git a/src/compiler/scala/tools/nsc/Global.scala b/src/compiler/scala/tools/nsc/Global.scala
index 6fb6b1736b..58fcee4b30 100644
--- a/src/compiler/scala/tools/nsc/Global.scala
+++ b/src/compiler/scala/tools/nsc/Global.scala
@@ -1094,6 +1094,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
// TODO - trim these to the absolute minimum.
@inline final def afterErasure[T](op: => T): T = afterPhase(currentRun.erasurePhase)(op)
+ @inline final def afterPostErasure[T](op: => T): T = afterPhase(currentRun.posterasurePhase)(op)
@inline final def afterExplicitOuter[T](op: => T): T = afterPhase(currentRun.explicitouterPhase)(op)
@inline final def afterFlatten[T](op: => T): T = afterPhase(currentRun.flattenPhase)(op)
@inline final def afterIcode[T](op: => T): T = afterPhase(currentRun.icodePhase)(op)
@@ -1403,6 +1404,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
val specializePhase = phaseNamed("specialize")
val explicitouterPhase = phaseNamed("explicitouter")
val erasurePhase = phaseNamed("erasure")
+ val posterasurePhase = phaseNamed("posterasure")
// val lazyvalsPhase = phaseNamed("lazyvals")
val lambdaliftPhase = phaseNamed("lambdalift")
// val constructorsPhase = phaseNamed("constructors")
diff --git a/src/compiler/scala/tools/nsc/io/package.scala b/src/compiler/scala/tools/nsc/io/package.scala
index 775ad6bde0..ae83a7728b 100644
--- a/src/compiler/scala/tools/nsc/io/package.scala
+++ b/src/compiler/scala/tools/nsc/io/package.scala
@@ -11,6 +11,23 @@ import java.util.jar.{ Attributes }
import scala.language.implicitConversions
package object io {
+ // Forwarders from scala.reflect.io
+ type AbstractFile = scala.reflect.io.AbstractFile
+ val AbstractFile = scala.reflect.io.AbstractFile
+ type Directory = scala.reflect.io.Directory
+ val Directory = scala.reflect.io.Directory
+ type File = scala.reflect.io.File
+ val File = scala.reflect.io.File
+ type Path = scala.reflect.io.Path
+ val Path = scala.reflect.io.Path
+ type PlainFile = scala.reflect.io.PlainFile
+ val PlainFile = scala.reflect.io.PlainFile
+ val Streamable = scala.reflect.io.Streamable
+ type VirtualDirectory = scala.reflect.io.VirtualDirectory
+ type VirtualFile = scala.reflect.io.VirtualFile
+ val ZipArchive = scala.reflect.io.ZipArchive
+ type ZipArchive = scala.reflect.io.ZipArchive
+
implicit def postfixOps = scala.language.postfixOps // make all postfix ops in this package compile without warning
type JManifest = java.util.jar.Manifest
diff --git a/src/compiler/scala/tools/nsc/transform/Erasure.scala b/src/compiler/scala/tools/nsc/transform/Erasure.scala
index b3b0c82d38..072d823c60 100644
--- a/src/compiler/scala/tools/nsc/transform/Erasure.scala
+++ b/src/compiler/scala/tools/nsc/transform/Erasure.scala
@@ -167,6 +167,8 @@ abstract class Erasure extends AddInterfaces
case tp => tp :: Nil
}
+ private def isErasedValueType(tpe: Type) = tpe.isInstanceOf[ErasedValueType]
+
/** The Java signature of type 'info', for symbol sym. The symbol is used to give the right return
* type for constructors.
*/
@@ -373,18 +375,18 @@ abstract class Erasure extends AddInterfaces
}
}
- class ComputeBridges(owner: Symbol) {
+ class ComputeBridges(unit: CompilationUnit, root: Symbol) {
assert(phase == currentRun.erasurePhase, phase)
var toBeRemoved = immutable.Set[Symbol]()
- val site = owner.thisType
+ val site = root.thisType
val bridgesScope = newScope
val bridgeTarget = mutable.HashMap[Symbol, Symbol]()
var bridges = List[Tree]()
val opc = beforeExplicitOuter {
- new overridingPairs.Cursor(owner) {
- override def parents = List(owner.info.firstParent)
+ new overridingPairs.Cursor(root) {
+ override def parents = List(root.info.firstParent)
override def exclude(sym: Symbol) = !sym.isMethod || sym.isPrivate || super.exclude(sym)
}
}
@@ -402,8 +404,58 @@ abstract class Erasure extends AddInterfaces
(bridges, toBeRemoved)
}
+ /** Check that a bridge only overrides members that are also overridden by the original member.
+ * This test is necessary only for members that have a value class in their type.
+ * Such members are special because their types after erasure and after post-erasure differ/.
+ * This means we generate them after erasure, but the post-erasure transform might introduce
+ * a name clash. The present method guards against these name clashes.
+ *
+ * @param member The original member
+ * @param other The overidden symbol for which the bridge was generated
+ * @param bridge The bridge
+ */
+ def checkBridgeOverrides(member: Symbol, other: Symbol, bridge: Symbol): Boolean = {
+ def fulldef(sym: Symbol) =
+ if (sym == NoSymbol) sym.toString
+ else s"$sym: ${sym.tpe} in ${sym.owner}"
+ var noclash = true
+ def clashError(what: String) = {
+ noclash = false
+ unit.error(
+ if (member.owner == root) member.pos else root.pos,
+ s"""bridge generated for member ${fulldef(member)}
+ |which overrides ${fulldef(other)}
+ |clashes with definition of $what;
+ |both have erased type ${afterPostErasure(bridge.tpe)}""".stripMargin)
+ }
+ for (bc <- root.baseClasses) {
+ if (settings.debug.value)
+ afterPostErasure(println(
+ s"""check bridge overrides in $bc
+ ${bc.info.nonPrivateDecl(bridge.name)}
+ ${site.memberType(bridge)}
+ ${site.memberType(bc.info.nonPrivateDecl(bridge.name) orElse IntClass)}
+ ${(bridge.matchingSymbol(bc, site))}""".stripMargin))
+
+ def overriddenBy(sym: Symbol) =
+ sym.matchingSymbol(bc, site).alternatives filter (sym => !sym.isBridge)
+ for (overBridge <- afterPostErasure(overriddenBy(bridge))) {
+ if (overBridge == member) {
+ clashError("the member itself")
+ } else {
+ val overMembers = overriddenBy(member)
+ if (!overMembers.exists(overMember =>
+ afterPostErasure(overMember.tpe =:= overBridge.tpe))) {
+ clashError(fulldef(overBridge))
+ }
+ }
+ }
+ }
+ noclash
+ }
+
def checkPair(member: Symbol, other: Symbol) {
- val otpe = erasure(owner)(other.tpe)
+ val otpe = erasure(root)(other.tpe)
val bridgeNeeded = afterErasure (
!(other.tpe =:= member.tpe) &&
!(deconstMap(other.tpe) =:= deconstMap(member.tpe)) &&
@@ -417,24 +469,29 @@ abstract class Erasure extends AddInterfaces
return
val newFlags = (member.flags | BRIDGE) & ~(ACCESSOR | DEFERRED | LAZY | lateDEFERRED)
- val bridge = other.cloneSymbolImpl(owner, newFlags) setPos owner.pos
+ val bridge = other.cloneSymbolImpl(root, newFlags) setPos root.pos
debuglog("generating bridge from %s (%s): %s to %s: %s".format(
other, flagsToString(newFlags),
otpe + other.locationString, member,
- erasure(owner)(member.tpe) + member.locationString)
+ erasure(root)(member.tpe) + member.locationString)
)
// the parameter symbols need to have the new owner
bridge setInfo (otpe cloneInfo bridge)
bridgeTarget(bridge) = member
- afterErasure(owner.info.decls enter bridge)
- if (other.owner == owner) {
- afterErasure(owner.info.decls.unlink(other))
- toBeRemoved += other
+
+ if (!(member.tpe exists (_.typeSymbol.isDerivedValueClass)) ||
+ checkBridgeOverrides(member, other, bridge)) {
+ afterErasure(root.info.decls enter bridge)
+ if (other.owner == root) {
+ afterErasure(root.info.decls.unlink(other))
+ toBeRemoved += other
+ }
+
+ bridgesScope enter bridge
+ bridges ::= makeBridgeDefDef(bridge, member, other)
}
- bridgesScope enter bridge
- bridges ::= makeBridgeDefDef(bridge, member, other)
}
def makeBridgeDefDef(bridge: Symbol, member: Symbol, other: Symbol) = afterErasure {
@@ -466,7 +523,7 @@ abstract class Erasure extends AddInterfaces
val rhs = member.tpe match {
case MethodType(Nil, ConstantType(c)) => Literal(c)
case _ =>
- val sel: Tree = Select(This(owner), member)
+ val sel: Tree = Select(This(root), member)
val bridgingCall = (sel /: bridge.paramss)((fun, vparams) => Apply(fun, vparams map Ident))
maybeWrap(bridgingCall)
@@ -480,8 +537,6 @@ abstract class Erasure extends AddInterfaces
private def isPrimitiveValueType(tpe: Type) = isPrimitiveValueClass(tpe.typeSymbol)
- private def isErasedValueType(tpe: Type) = tpe.isInstanceOf[ErasedValueType]
-
private def isDifferentErasedValueType(tpe: Type, other: Type) =
isErasedValueType(tpe) && (tpe ne other)
@@ -814,7 +869,6 @@ abstract class Erasure extends AddInterfaces
* but their erased types are the same.
*/
private def checkNoDoubleDefs(root: Symbol) {
- def afterErasure[T](op: => T): T = atPhase(phase.next.next)(op)
def doubleDefError(sym1: Symbol, sym2: Symbol) {
// the .toString must also be computed at the earlier phase
val tpe1 = afterRefchecks(root.thisType.memberType(sym1))
@@ -830,7 +884,7 @@ abstract class Erasure extends AddInterfaces
sym2 + ":" + afterRefchecks(tpe2.toString) +
(if (sym2.owner == root) " at line " + (sym2.pos).line else sym2.locationString) +
"\nhave same type" +
- (if (afterRefchecks(tpe1 =:= tpe2)) "" else " after erasure: " + afterErasure(sym1.tpe)))
+ (if (afterRefchecks(tpe1 =:= tpe2)) "" else " after erasure: " + afterPostErasure(sym1.tpe)))
sym1.setInfo(ErrorType)
}
@@ -840,7 +894,7 @@ abstract class Erasure extends AddInterfaces
if (e.sym.isTerm) {
var e1 = decls.lookupNextEntry(e)
while (e1 ne null) {
- if (afterErasure(e1.sym.info =:= e.sym.info)) doubleDefError(e.sym, e1.sym)
+ if (afterPostErasure(e1.sym.info =:= e.sym.info)) doubleDefError(e.sym, e1.sym)
e1 = decls.lookupNextEntry(e1)
}
}
@@ -854,7 +908,7 @@ abstract class Erasure extends AddInterfaces
|| !sym.hasTypeAt(currentRun.refchecksPhase.id))
override def matches(sym1: Symbol, sym2: Symbol): Boolean =
- afterErasure(sym1.tpe =:= sym2.tpe)
+ afterPostErasure(sym1.tpe =:= sym2.tpe)
}
while (opc.hasNext) {
if (!afterRefchecks(
@@ -902,7 +956,7 @@ abstract class Erasure extends AddInterfaces
private def bridgeDefs(owner: Symbol): (List[Tree], immutable.Set[Symbol]) = {
assert(phase == currentRun.erasurePhase, phase)
debuglog("computing bridges for " + owner)
- new ComputeBridges(owner) compute()
+ new ComputeBridges(unit, owner) compute()
}
def addBridges(stats: List[Tree], base: Symbol): List[Tree] =
@@ -1000,7 +1054,7 @@ abstract class Erasure extends AddInterfaces
preEraseIsInstanceOf
} else if (fn.symbol.owner.isRefinementClass && !fn.symbol.isOverridingSymbol) {
ApplyDynamic(qualifier, args) setSymbol fn.symbol setPos tree.pos
- } else if (fn.symbol.isMethodWithExtension) {
+ } else if (fn.symbol.isMethodWithExtension && !fn.symbol.tpe.isErroneous) {
Apply(gen.mkAttributedRef(extensionMethods.extensionMethod(fn.symbol)), qualifier :: args)
} else {
tree
diff --git a/src/compiler/scala/tools/nsc/transform/ExtensionMethods.scala b/src/compiler/scala/tools/nsc/transform/ExtensionMethods.scala
index 0820d3e714..8a9d0e58ec 100644
--- a/src/compiler/scala/tools/nsc/transform/ExtensionMethods.scala
+++ b/src/compiler/scala/tools/nsc/transform/ExtensionMethods.scala
@@ -70,7 +70,8 @@ abstract class ExtensionMethods extends Transform with TypingTransformers {
val companionInfo = imeth.owner.companionModule.info
val candidates = extensionNames(imeth) map (companionInfo.decl(_))
val matching = candidates filter (alt => normalize(alt.tpe, imeth.owner) matches imeth.tpe)
- assert(matching.nonEmpty, "no extension method found for "+imeth+" among "+candidates+"/"+extensionNames(imeth))
+ assert(matching.nonEmpty,
+ s"no extension method found for $imeth:${imeth.tpe}+among ${candidates map (c => c.name+":"+c.tpe)} / ${extensionNames(imeth)}")
matching.head
}
@@ -135,7 +136,9 @@ abstract class ExtensionMethods extends Transform with TypingTransformers {
tree match {
case Template(_, _, _) =>
if (currentOwner.isDerivedValueClass) {
- checkNonCyclic(currentOwner.pos, Set(), currentOwner)
+ /* This is currently redundant since value classes may not
+ wrap over other value classes anyway.
+ checkNonCyclic(currentOwner.pos, Set(), currentOwner) */
extensionDefs(currentOwner.companionModule) = new mutable.ListBuffer[Tree]
currentOwner.primaryConstructor.makeNotPrivate(NoSymbol)
super.transform(tree)
diff --git a/src/compiler/scala/tools/nsc/transform/OverridingPairs.scala b/src/compiler/scala/tools/nsc/transform/OverridingPairs.scala
index f9d8d19b10..0b58292f28 100644
--- a/src/compiler/scala/tools/nsc/transform/OverridingPairs.scala
+++ b/src/compiler/scala/tools/nsc/transform/OverridingPairs.scala
@@ -104,8 +104,11 @@ abstract class OverridingPairs {
/** A map from baseclasses of <base> to ints, with smaller ints meaning lower in
* linearization order.
+ * symbols that are not baseclasses map to -1.
*/
- private val index = new mutable.HashMap[Symbol, Int]
+ private val index = new mutable.HashMap[Symbol, Int] {
+ override def default(key: Symbol) = -1
+ }
// Note: overridingPairs can be called at odd instances by the Eclipse plugin
// Soemtimes symbols are not yet defined and we get missing keys.
@@ -133,28 +136,30 @@ abstract class OverridingPairs {
{ for (i <- List.range(0, size))
subParents(i) = new BitSet(size);
for (p <- parents) {
- index get p.typeSymbol match {
- case Some(pIndex) =>
- for (bc <- p.baseClasses)
- if (p.baseType(bc) =:= self.baseType(bc))
- index get bc match {
- case Some(bcIndex) =>
- include(subParents(bcIndex), pIndex)
- case None =>
- }
- else debuglog("SKIPPING "+p+" -> "+p.baseType(bc)+" / "+self.baseType(bc)+" from "+base)
- case None =>
- }
+ val pIndex = index(p.typeSymbol)
+ if (pIndex >= 0)
+ for (bc <- p.baseClasses)
+ if (p.baseType(bc) =:= self.baseType(bc)) {
+ val bcIndex = index(bc)
+ if (bcIndex >= 0)
+ include(subParents(bcIndex), pIndex)
+ }
}
}
/** Do `sym1` and `sym2` have a common subclass in `parents`?
* In that case we do not follow their overriding pairs
*/
- private def hasCommonParentAsSubclass(sym1: Symbol, sym2: Symbol) = (
- for (index1 <- index get sym1.owner ; index2 <- index get sym2.owner) yield
- intersectionContainsElementLeq(subParents(index1), subParents(index2), index1 min index2)
- ).exists(_ == true)
+ private def hasCommonParentAsSubclass(sym1: Symbol, sym2: Symbol) = {
+ val index1 = index(sym1.owner)
+ (index1 >= 0) && {
+ val index2 = index(sym2.owner)
+ (index2 >= 0) && {
+ intersectionContainsElementLeq(
+ subParents(index1), subParents(index2), index1 min index2)
+ }
+ }
+ }
/** The scope entries that have already been visited as overridden
* (maybe excluded because of hasCommonParentAsSubclass).
diff --git a/src/compiler/scala/tools/nsc/typechecker/Macros.scala b/src/compiler/scala/tools/nsc/typechecker/Macros.scala
index 9adf86e44b..f9a35ba9a0 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Macros.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Macros.scala
@@ -710,7 +710,7 @@ trait Macros extends scala.tools.reflect.FastTrack with Traces {
if (isNullaryInvocation(expandee)) expectedTpe = expectedTpe.finalResultType
var typechecked = typecheck("macro def return type", expanded, expectedTpe)
typechecked = typecheck("expected type", typechecked, pt)
- typechecked updateAttachment MacroExpansionAttachment(expandee)
+ typechecked
} finally {
popMacroContext()
}
@@ -776,7 +776,7 @@ trait Macros extends scala.tools.reflect.FastTrack with Traces {
macroLogLite("" + expanded.tree + "\n" + showRaw(expanded.tree))
val freeSyms = expanded.tree.freeTerms ++ expanded.tree.freeTypes
freeSyms foreach (sym => MacroFreeSymbolError(expandee, sym))
- Success(atPos(enclosingMacroPosition.focus)(expanded.tree))
+ Success(atPos(enclosingMacroPosition.focus)(expanded.tree updateAttachment MacroExpansionAttachment(expandee)))
case _ =>
MacroExpansionIsNotExprError(expandee, expanded)
}
diff --git a/src/compiler/scala/tools/nsc/typechecker/Tags.scala b/src/compiler/scala/tools/nsc/typechecker/Tags.scala
index 0dbeafadbe..d82fbd7c77 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Tags.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Tags.scala
@@ -59,11 +59,14 @@ trait Tags {
* EmptyTree if `concrete` is true and the result contains unresolved (i.e. not spliced) type parameters and abstract type members.
* EmptyTree if `allowMaterialization` is false, and there is no array tag in scope.
*/
- def resolveTypeTag(pos: Position, pre: Type, tp: Type, concrete: Boolean, allowMaterialization: Boolean = true): Tree = {
- val tagSym = if (concrete) TypeTagClass else WeakTypeTagClass
- val tagTp = if (pre == NoType) TypeRef(ApiUniverseClass.toTypeConstructor, tagSym, List(tp)) else singleType(pre, pre member tagSym.name)
- val taggedTp = appliedType(tagTp, List(tp))
- resolveTag(pos, taggedTp, allowMaterialization)
- }
+ def resolveTypeTag(pos: Position, pre: Type, tp: Type, concrete: Boolean, allowMaterialization: Boolean = true): Tree =
+ // if someone requests a type tag, but scala-reflect.jar isn't on the library classpath, then bail
+ if (pre == NoType && ApiUniverseClass == NoSymbol) EmptyTree
+ else {
+ val tagSym = if (concrete) TypeTagClass else WeakTypeTagClass
+ val tagTp = if (pre == NoType) TypeRef(ApiUniverseClass.toTypeConstructor, tagSym, List(tp)) else singleType(pre, pre member tagSym.name)
+ val taggedTp = appliedType(tagTp, List(tp))
+ resolveTag(pos, taggedTp, allowMaterialization)
+ }
}
} \ No newline at end of file
diff --git a/src/compiler/scala/tools/nsc/typechecker/TreeCheckers.scala b/src/compiler/scala/tools/nsc/typechecker/TreeCheckers.scala
index 07d457b17b..9bb88f152a 100644
--- a/src/compiler/scala/tools/nsc/typechecker/TreeCheckers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/TreeCheckers.scala
@@ -242,7 +242,7 @@ abstract class TreeCheckers extends Analyzer {
}
}
case ValDef(_, _, _, _) =>
- if (sym.hasGetter && !sym.isOuterField) {
+ if (sym.hasGetter && !sym.isOuterField && !sym.isOuterAccessor) {
assertFn(sym.getter(sym.owner) != NoSymbol, ownerstr(sym) + " has getter but cannot be found. " + sym.ownerChain)
}
case Apply(fn, args) =>
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index ae08a9f64d..af89af74d0 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -1197,7 +1197,7 @@ trait Typers extends Modes with Adaptations with Tags {
val found = tree.tpe
if (!found.isErroneous && !pt.isErroneous) {
- if (!context.reportErrors && isPastTyper) {
+ if ((!context.reportErrors && isPastTyper) || tree.attachments.get[MacroExpansionAttachment].isDefined) {
val (bound, req) = pt match {
case ExistentialType(qs, tpe) => (qs, tpe)
case _ => (Nil, pt)
@@ -1230,6 +1230,17 @@ trait Typers extends Modes with Adaptations with Tags {
// to consistently transform skolems and fix 6029), I'd like to
// investigate ways to avoid skolems completely.
//
+ // upd. The same problem happens when we try to typecheck the result of macro expansion against its expected type
+ // (which is the return type of the macro definition instantiated in the context of expandee):
+ //
+ // Test.scala:2: error: type mismatch;
+ // found : $u.Expr[Class[_ <: Object]]
+ // required: reflect.runtime.universe.Expr[Class[?0(in value <local Test>)]] where type ?0(in value <local Test>) <: Object
+ // scala.reflect.runtime.universe.reify(new Object().getClass)
+ // ^
+ // Therefore following Martin's advice I use this logic to recover from skolem errors after macro expansions
+ // (by adding the ` || tree.attachments.get[MacroExpansionAttachment].isDefined` clause to the conditional above).
+ //
log("recovering from existential or skolem type error in tree \n" + tree + "\nwith type " + tree.tpe + "\n expected type = " + pt + "\n context = " + context.tree)
return adapt(tree, mode, deriveTypeWithWildcards(boundOrSkolems)(pt))
}
@@ -1394,8 +1405,10 @@ trait Typers extends Modes with Adaptations with Tags {
case List(acc) =>
def isUnderlyingAcc(sym: Symbol) =
sym == acc || acc.hasAccessorFlag && sym == acc.accessed
- if (acc.accessBoundary(clazz) != rootMirror.RootClass)
+ if (acc.accessBoundary(clazz) != rootMirror.RootClass)
unit.error(acc.pos, "value class needs to have a publicly accessible val parameter")
+ else if (acc.tpe.typeSymbol.isDerivedValueClass)
+ unit.error(acc.pos, "value class may not wrap another user-defined value class")
for (stat <- body)
if (!treeInfo.isAllowedInUniversalTrait(stat) && !isUnderlyingAcc(stat.symbol))
unit.error(stat.pos,
@@ -1976,32 +1989,44 @@ trait Typers extends Modes with Adaptations with Tags {
* - the self-type of the refinement
* - a type member of the refinement
* - an abstract type declared outside of the refinement.
+ * - an instance of a value class
+ * Furthermore, the result type may not be a value class either
*/
- def checkMethodStructuralCompatible(meth: Symbol): Unit = {
- def fail(msg: String) = unit.error(meth.pos, msg)
+ def checkMethodStructuralCompatible(ddef: DefDef): Unit = {
+ val meth = ddef.symbol
+ def fail(pos: Position, msg: String) = unit.error(pos, msg)
val tp: Type = meth.tpe match {
case mt @ MethodType(_, _) => mt
case NullaryMethodType(restpe) => restpe // TODO_NMT: drop NullaryMethodType from resultType?
case PolyType(_, restpe) => restpe
case _ => NoType
}
- def failStruct(what: String) =
- fail(s"Parameter type in structural refinement may not refer to $what")
- for (paramType <- tp.paramTypes) {
+ def nthParamPos(n: Int) = ddef.vparamss match {
+ case xs :: _ if xs.length > n => xs(n).pos
+ case _ => meth.pos
+ }
+ def failStruct(pos: Position, what: String, where: String = "Parameter") =
+ fail(pos, s"$where type in structural refinement may not refer to $what")
+
+ foreachWithIndex(tp.paramTypes) { (paramType, idx) =>
val sym = paramType.typeSymbol
+ def paramPos = nthParamPos(idx)
if (sym.isAbstractType) {
if (!sym.hasTransOwner(meth.owner))
- failStruct("an abstract type defined outside that refinement")
+ failStruct(paramPos, "an abstract type defined outside that refinement")
else if (!sym.hasTransOwner(meth))
- failStruct("a type member of that refinement")
+ failStruct(paramPos, "a type member of that refinement")
}
if (sym.isDerivedValueClass)
- failStruct("a user-defined value class")
+ failStruct(paramPos, "a user-defined value class")
if (paramType.isInstanceOf[ThisType] && sym == meth.owner)
- failStruct("the type of that refinement (self type)")
+ failStruct(paramPos, "the type of that refinement (self type)")
}
+ if (tp.resultType.typeSymbol.isDerivedValueClass)
+ failStruct(ddef.tpt.pos, "a user-defined value class", where = "Result")
}
+
def typedUseCase(useCase: UseCase) {
def stringParser(str: String): syntaxAnalyzer.Parser = {
val file = new BatchSourceFile(context.unit.source.file, str) {
@@ -2118,7 +2143,7 @@ trait Typers extends Modes with Adaptations with Tags {
}
}
if (meth.isStructuralRefinementMember)
- checkMethodStructuralCompatible(meth)
+ checkMethodStructuralCompatible(ddef)
if (meth.isImplicit && !meth.isSynthetic) meth.info.paramss match {
case List(param) :: _ if !param.isImplicit =>
diff --git a/src/compiler/scala/tools/reflect/ToolBoxFactory.scala b/src/compiler/scala/tools/reflect/ToolBoxFactory.scala
index 6300297f65..f985eedf99 100644
--- a/src/compiler/scala/tools/reflect/ToolBoxFactory.scala
+++ b/src/compiler/scala/tools/reflect/ToolBoxFactory.scala
@@ -118,7 +118,7 @@ abstract class ToolBoxFactory[U <: JavaUniverse](val u: U) { factorySelf =>
val ownerClass = rootMirror.EmptyPackageClass.newClassSymbol(newTypeName("<expression-owner>"))
build.setTypeSignature(ownerClass, ClassInfoType(List(ObjectClass.tpe), newScope, ownerClass))
val owner = ownerClass.newLocalDummy(expr.pos)
- var currentTyper = typer.atOwner(expr, owner)
+ var currentTyper = analyzer.newTyper(analyzer.rootContext(NoCompilationUnit, EmptyTree).make(expr, owner))
val wrapper1 = if (!withImplicitViewsDisabled) (currentTyper.context.withImplicitsEnabled[Tree] _) else (currentTyper.context.withImplicitsDisabled[Tree] _)
val wrapper2 = if (!withMacrosDisabled) (currentTyper.context.withMacrosEnabled[Tree] _) else (currentTyper.context.withMacrosDisabled[Tree] _)
def wrapper (tree: => Tree) = wrapper1(wrapper2(tree))
diff --git a/src/library/scala/BoxingConversions.scala b/src/library/scala/BoxingConversions.scala
deleted file mode 100644
index fd1bd6c121..0000000000
--- a/src/library/scala/BoxingConversions.scala
+++ /dev/null
@@ -1,5 +0,0 @@
-package scala
-abstract class BoxingConversions[Boxed, Unboxed] {
- def box(x: Unboxed): Boxed
- def unbox(x: Boxed): Unboxed
-}
diff --git a/src/library/scala/collection/TraversableLike.scala b/src/library/scala/collection/TraversableLike.scala
index f5e479a514..ce0b130b86 100644
--- a/src/library/scala/collection/TraversableLike.scala
+++ b/src/library/scala/collection/TraversableLike.scala
@@ -40,7 +40,7 @@ import scala.language.higherKinds
* a non-strict collection class may defer computation of some of their
* elements until after the instance is available as a value.
* A typical example of a non-strict collection class is a
- * [[scala.collection.immutable/Stream]].
+ * [[scala.collection.immutable.Stream]].
* A more general class of examples are `TraversableViews`.
*
* If a collection is an instance of an ordered collection class, traversing
diff --git a/src/library/scala/collection/mutable/LinkedHashSet.scala b/src/library/scala/collection/mutable/LinkedHashSet.scala
index 88bad5ff9b..26a428c259 100644
--- a/src/library/scala/collection/mutable/LinkedHashSet.scala
+++ b/src/library/scala/collection/mutable/LinkedHashSet.scala
@@ -15,8 +15,6 @@ import generic._
/** This class implements mutable sets using a hashtable.
* The iterator and all traversal methods of this class visit elements in the order they were inserted.
*
- * $cannotStoreNull
- *
* @author Matthias Zenger
* @author Martin Odersky
* @author Pavel Pavlov
diff --git a/src/library/scala/collection/mutable/Subscriber.scala b/src/library/scala/collection/mutable/Subscriber.scala
index c9ae87d558..83192124af 100644
--- a/src/library/scala/collection/mutable/Subscriber.scala
+++ b/src/library/scala/collection/mutable/Subscriber.scala
@@ -11,7 +11,7 @@ package mutable
/** `Subscriber[A, B]` objects may subscribe to events of type `A`
* published by an object of type `B`. `B` is typically a subtype of
- * [[scala.collection.immutable.Publisher]].
+ * [[scala.collection.mutable.Publisher]].
*
* @author Matthias Zenger
* @author Martin Odersky
diff --git a/src/library/scala/concurrent/Awaitable.scala b/src/library/scala/concurrent/Awaitable.scala
index 655115349a..3bd7617bce 100644
--- a/src/library/scala/concurrent/Awaitable.scala
+++ b/src/library/scala/concurrent/Awaitable.scala
@@ -10,7 +10,7 @@ package scala.concurrent
-import scala.concurrent.util.Duration
+import scala.concurrent.duration.Duration
diff --git a/src/library/scala/concurrent/duration/Deadline.scala b/src/library/scala/concurrent/duration/Deadline.scala
new file mode 100644
index 0000000000..50e9a75ff7
--- /dev/null
+++ b/src/library/scala/concurrent/duration/Deadline.scala
@@ -0,0 +1,81 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2003-2012, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+package scala.concurrent.duration
+
+/**
+ * This class stores a deadline, as obtained via `Deadline.now` or the
+ * duration DSL:
+ *
+ * {{{
+ * import scala.concurrent.duration._
+ * 3.seconds.fromNow
+ * }}}
+ *
+ * Its main purpose is to manage repeated attempts to achieve something (like
+ * awaiting a condition) by offering the methods `hasTimeLeft` and `timeLeft`. All
+ * durations are measured according to `System.nanoTime` aka wall-time; this
+ * does not take into account changes to the system clock (such as leap
+ * seconds).
+ */
+case class Deadline private (time: FiniteDuration) extends Ordered[Deadline] {
+ /**
+ * Return a deadline advanced (i.e. moved into the future) by the given duration.
+ */
+ def +(other: FiniteDuration): Deadline = copy(time = time + other)
+ /**
+ * Return a deadline moved backwards (i.e. towards the past) by the given duration.
+ */
+ def -(other: FiniteDuration): Deadline = copy(time = time - other)
+ /**
+ * Calculate time difference between this and the other deadline, where the result is directed (i.e. may be negative).
+ */
+ def -(other: Deadline): FiniteDuration = time - other.time
+ /**
+ * Calculate time difference between this duration and now; the result is negative if the deadline has passed.
+ *
+ * '''''Note that on some systems this operation is costly because it entails a system call.'''''
+ * Check `System.nanoTime` for your platform.
+ */
+ def timeLeft: FiniteDuration = this - Deadline.now
+ /**
+ * Determine whether the deadline still lies in the future at the point where this method is called.
+ *
+ * '''''Note that on some systems this operation is costly because it entails a system call.'''''
+ * Check `System.nanoTime` for your platform.
+ */
+ def hasTimeLeft(): Boolean = !isOverdue()
+ /**
+ * Determine whether the deadline lies in the past at the point where this method is called.
+ *
+ * '''''Note that on some systems this operation is costly because it entails a system call.'''''
+ * Check `System.nanoTime` for your platform.
+ */
+ def isOverdue(): Boolean = (time.toNanos - System.nanoTime()) < 0
+ /**
+ * The natural ordering for deadline is determined by the natural order of the underlying (finite) duration.
+ */
+ def compare(other: Deadline) = time compare other.time
+}
+
+object Deadline {
+ /**
+ * Construct a deadline due exactly at the point where this method is called. Useful for then
+ * advancing it to obtain a future deadline, or for sampling the current time exactly once and
+ * then comparing it to multiple deadlines (using subtraction).
+ */
+ def now: Deadline = Deadline(Duration(System.nanoTime, NANOSECONDS))
+
+ /**
+ * The natural ordering for deadline is determined by the natural order of the underlying (finite) duration.
+ */
+ implicit object DeadlineIsOrdered extends Ordering[Deadline] {
+ def compare(a: Deadline, b: Deadline) = a compare b
+ }
+
+}
diff --git a/src/library/scala/concurrent/util/Duration.scala b/src/library/scala/concurrent/duration/Duration.scala
index 3f8b98831e..79f9b4db86 100644
--- a/src/library/scala/concurrent/util/Duration.scala
+++ b/src/library/scala/concurrent/duration/Duration.scala
@@ -6,90 +6,12 @@
** |/ **
\* */
-package scala.concurrent.util
+package scala.concurrent.duration
-import java.util.concurrent.TimeUnit
-import TimeUnit._
import java.lang.{ Double => JDouble, Long => JLong }
import scala.language.implicitConversions
-/**
- * This class stores a deadline, as obtained via `Deadline.now` or the
- * duration DSL:
- *
- * {{{
- * import scala.concurrent.util.duration._
- * 3.seconds.fromNow
- * }}}
- *
- * Its main purpose is to manage repeated attempts to achieve something (like
- * awaiting a condition) by offering the methods `hasTimeLeft` and `timeLeft`. All
- * durations are measured according to `System.nanoTime` aka wall-time; this
- * does not take into account changes to the system clock (such as leap
- * seconds).
- */
-case class Deadline private (time: FiniteDuration) extends Ordered[Deadline] {
- /**
- * Return a deadline advanced (i.e. moved into the future) by the given duration.
- */
- def +(other: FiniteDuration): Deadline = copy(time = time + other)
- /**
- * Return a deadline moved backwards (i.e. towards the past) by the given duration.
- */
- def -(other: FiniteDuration): Deadline = copy(time = time - other)
- /**
- * Calculate time difference between this and the other deadline, where the result is directed (i.e. may be negative).
- */
- def -(other: Deadline): FiniteDuration = time - other.time
- /**
- * Calculate time difference between this duration and now; the result is negative if the deadline has passed.
- *
- * '''''Note that on some systems this operation is costly because it entails a system call.'''''
- * Check `System.nanoTime` for your platform.
- */
- def timeLeft: FiniteDuration = this - Deadline.now
- /**
- * Determine whether the deadline still lies in the future at the point where this method is called.
- *
- * '''''Note that on some systems this operation is costly because it entails a system call.'''''
- * Check `System.nanoTime` for your platform.
- */
- def hasTimeLeft(): Boolean = !isOverdue()
- /**
- * Determine whether the deadline lies in the past at the point where this method is called.
- *
- * '''''Note that on some systems this operation is costly because it entails a system call.'''''
- * Check `System.nanoTime` for your platform.
- */
- def isOverdue(): Boolean = (time.toNanos - System.nanoTime()) < 0
- /**
- * The natural ordering for deadline is determined by the natural order of the underlying (finite) duration.
- */
- def compare(other: Deadline) = time compare other.time
-}
-
-object Deadline {
- /**
- * Construct a deadline due exactly at the point where this method is called. Useful for then
- * advancing it to obtain a future deadline, or for sampling the current time exactly once and
- * then comparing it to multiple deadlines (using subtraction).
- */
- def now: Deadline = Deadline(Duration(System.nanoTime, NANOSECONDS))
-
- /**
- * The natural ordering for deadline is determined by the natural order of the underlying (finite) duration.
- */
- implicit object DeadlineIsOrdered extends Ordering[Deadline] {
- def compare(a: Deadline, b: Deadline) = a compare b
- }
-}
-
object Duration {
- /**
- * This implicit conversion allows the use of a Deadline in place of a Duration, which will
- * insert the time left until the deadline in its place.
- */
- implicit def timeLeft(implicit d: Deadline): Duration = d.timeLeft
/**
* Construct a Duration from the given length and unit. Observe that nanosecond precision may be lost if
@@ -102,11 +24,13 @@ object Duration {
* @throws IllegalArgumentException if the length was finite but the resulting duration cannot be expressed as a [[FiniteDuration]]
*/
def apply(length: Double, unit: TimeUnit): Duration = fromNanos(unit.toNanos(1) * length)
+
/**
* Construct a finite duration from the given length and time unit. The unit given is retained
* throughout calculations as long as possible, so that it can be retrieved later.
*/
def apply(length: Long, unit: TimeUnit): FiniteDuration = new FiniteDuration(length, unit)
+
/**
* Construct a finite duration from the given length and time unit, where the latter is
* looked up in a list of string representation. Valid choices are:
@@ -117,7 +41,7 @@ object Duration {
def apply(length: Long, unit: String): FiniteDuration = new FiniteDuration(length, Duration.timeUnit(unit))
// Double stores 52 bits mantissa, but there is an implied '1' in front, making the limit 2^53
- final val maxPreciseDouble = 9007199254740992d
+ private[this] final val maxPreciseDouble = 9007199254740992d
/**
* Parse String into Duration. Format is `"<length><unit>"`, where
@@ -161,11 +85,11 @@ object Duration {
)
// TimeUnit => standard label
- protected[util] val timeUnitName: Map[TimeUnit, String] =
+ protected[duration] val timeUnitName: Map[TimeUnit, String] =
timeUnitLabels.toMap mapValues (s => words(s).last) toMap
// Label => TimeUnit
- protected[util] val timeUnit: Map[String, TimeUnit] =
+ protected[duration] val timeUnit: Map[String, TimeUnit] =
timeUnitLabels flatMap { case (unit, names) => expandLabels(names) map (_ -> unit) } toMap
/**
@@ -275,13 +199,13 @@ object Duration {
if (factor == 0d || factor.isNaN) Undefined
else if (factor < 0d) -this
else this
- def /(factor: Double): Duration =
- if (factor.isNaN || factor.isInfinite) Undefined
- else if ((factor compare 0d) < 0) -this
+ def /(divisor: Double): Duration =
+ if (divisor.isNaN || divisor.isInfinite) Undefined
+ else if ((divisor compare 0d) < 0) -this
else this
- def /(other: Duration): Double = other match {
+ def /(divisor: Duration): Double = divisor match {
case _: Infinite => Double.NaN
- case x => Double.PositiveInfinity * (if ((this > Zero) ^ (other >= Zero)) -1 else 1)
+ case x => Double.PositiveInfinity * (if ((this > Zero) ^ (divisor >= Zero)) -1 else 1)
}
final def isFinite() = false
@@ -380,8 +304,7 @@ object Duration {
* <p/>
* Examples:
* {{{
- * import scala.concurrent.util.Duration
- * import java.util.concurrent.TimeUnit
+ * import scala.concurrent.duration._
*
* val duration = Duration(100, MILLISECONDS)
* val duration = Duration(100, "millis")
@@ -396,7 +319,7 @@ object Duration {
* <p/>
* Implicits are also provided for Int, Long and Double. Example usage:
* {{{
- * import scala.concurrent.util.Duration._
+ * import scala.concurrent.duration._
*
* val duration = 100 millis
* }}}
@@ -529,12 +452,12 @@ sealed abstract class Duration extends Serializable with Ordered[Duration] {
*
* $ovf
*/
- def /(factor: Double): Duration
+ def /(divisor: Double): Duration
/**
* Return the quotient of this and that duration as floating-point number. The semantics are
* determined by Double as if calculating the quotient of the nanosecond lengths of both factors.
*/
- def /(other: Duration): Double
+ def /(divisor: Duration): Double
/**
* Negate this duration. The only two values which are mapped to themselves are [[Duration.Zero]] and [[Duration.Undefined]].
*/
@@ -561,7 +484,7 @@ sealed abstract class Duration extends Serializable with Ordered[Duration] {
*
* $ovf
*/
- def div(factor: Double) = this / factor
+ def div(divisor: Double) = this / divisor
/**
* Return the quotient of this and that duration as floating-point number. The semantics are
* determined by Double as if calculating the quotient of the nanosecond lengths of both factors.
@@ -599,6 +522,7 @@ sealed abstract class Duration extends Serializable with Ordered[Duration] {
}
object FiniteDuration {
+
implicit object FiniteDurationIsOrdered extends Ordering[FiniteDuration] {
def compare(a: FiniteDuration, b: FiniteDuration) = a compare b
}
@@ -691,29 +615,77 @@ final class FiniteDuration(val length: Long, val unit: TimeUnit) extends Duratio
else if ((factor > 0) ^ (this < Zero)) Inf
else MinusInf
- def /(factor: Double) =
- if (!factor.isInfinite) fromNanos(toNanos / factor)
- else if (factor.isNaN) Undefined
+ def /(divisor: Double) =
+ if (!divisor.isInfinite) fromNanos(toNanos / divisor)
+ else if (divisor.isNaN) Undefined
else Zero
// if this is made a constant, then scalac will elide the conditional and always return +0.0, SI-6331
private[this] def minusZero = -0d
- def /(other: Duration): Double =
- if (other.isFinite) toNanos.toDouble / other.toNanos
- else if (other eq Undefined) Double.NaN
- else if ((length < 0) ^ (other > Zero)) 0d
+ def /(divisor: Duration): Double =
+ if (divisor.isFinite) toNanos.toDouble / divisor.toNanos
+ else if (divisor eq Undefined) Double.NaN
+ else if ((length < 0) ^ (divisor > Zero)) 0d
else minusZero
- // overridden methods taking FiniteDurations, so that you can calculate while statically staying finite
+ // overloaded methods taking FiniteDurations, so that you can calculate while statically staying finite
def +(other: FiniteDuration) = add(other.length, other.unit)
def -(other: FiniteDuration) = add(-other.length, other.unit)
def plus(other: FiniteDuration) = this + other
def minus(other: FiniteDuration) = this - other
- override def div(factor: Double) = this / factor
- override def mul(factor: Double) = this * factor
def min(other: FiniteDuration) = if (this < other) this else other
def max(other: FiniteDuration) = if (this > other) this else other
+ // overloaded methods taking Long so that you can calculate while statically staying finite
+
+ /**
+ * Return the quotient of this duration and the given integer factor.
+ *
+ * @throws ArithmeticException if the factor is 0
+ */
+ def /(divisor: Long) = fromNanos(toNanos / divisor)
+
+ /**
+ * Return the product of this duration and the given integer factor.
+ *
+ * @throws IllegalArgumentException if the result would overflow the range of FiniteDuration
+ */
+ def *(factor: Long) = new FiniteDuration(safeMul(length, factor), unit)
+
+ /*
+ * This method avoids the use of Long division, which saves 95% of the time spent,
+ * by checking that there are enough leading zeros so that the result has a chance
+ * to fit into a Long again; the remaining edge cases are caught by using the sign
+ * of the product for overflow detection.
+ *
+ * This method is not general purpose because it disallows the (otherwise legal)
+ * case of Long.MinValue * 1, but that is okay for use in FiniteDuration, since
+ * Long.MinValue is not a legal `length` anyway.
+ */
+ private def safeMul(_a: Long, _b: Long): Long = {
+ val a = math.abs(_a)
+ val b = math.abs(_b)
+ import java.lang.Long.{ numberOfLeadingZeros => leading }
+ if (leading(a) + leading(b) < 64) throw new IllegalArgumentException("multiplication overflow")
+ val product = a * b
+ if (product < 0) throw new IllegalArgumentException("multiplication overflow")
+ if (a == _a ^ b == _b) -product else product
+ }
+
+ /**
+ * Return the quotient of this duration and the given integer factor.
+ *
+ * @throws ArithmeticException if the factor is 0
+ */
+ def div(divisor: Long) = this / divisor
+
+ /**
+ * Return the product of this duration and the given integer factor.
+ *
+ * @throws IllegalArgumentException if the result would overflow the range of FiniteDuration
+ */
+ def mul(factor: Long) = this * factor
+
def unary_- = Duration(-length, unit)
final def isFinite() = true
@@ -724,78 +696,3 @@ final class FiniteDuration(val length: Long, val unit: TimeUnit) extends Duratio
}
override def hashCode = toNanos.toInt
}
-
-trait DurationConversions extends Any {
- import duration.Classifier
- protected def durationIn(unit: TimeUnit): FiniteDuration
-
- def nanoseconds = durationIn(NANOSECONDS)
- def nanos = nanoseconds
- def nanosecond = nanoseconds
- def nano = nanoseconds
-
- def microseconds = durationIn(MICROSECONDS)
- def micros = microseconds
- def microsecond = microseconds
- def micro = microseconds
-
- def milliseconds = durationIn(MILLISECONDS)
- def millis = milliseconds
- def millisecond = milliseconds
- def milli = milliseconds
-
- def seconds = durationIn(SECONDS)
- def second = seconds
-
- def minutes = durationIn(MINUTES)
- def minute = minutes
-
- def hours = durationIn(HOURS)
- def hour = hours
-
- def days = durationIn(DAYS)
- def day = days
-
- def nanoseconds[C, CC <: Classifier[C]](c: C)(implicit ev: CC): CC#R = ev.convert(nanoseconds)
- def nanos[C, CC <: Classifier[C]](c: C)(implicit ev: CC): CC#R = nanoseconds(c)
- def nanosecond[C, CC <: Classifier[C]](c: C)(implicit ev: CC): CC#R = nanoseconds(c)
- def nano[C, CC <: Classifier[C]](c: C)(implicit ev: CC): CC#R = nanoseconds(c)
-
- def microseconds[C, CC <: Classifier[C]](c: C)(implicit ev: CC): CC#R = ev.convert(microseconds)
- def micros[C, CC <: Classifier[C]](c: C)(implicit ev: CC): CC#R = microseconds(c)
- def microsecond[C, CC <: Classifier[C]](c: C)(implicit ev: CC): CC#R = microseconds(c)
- def micro[C, CC <: Classifier[C]](c: C)(implicit ev: CC): CC#R = microseconds(c)
-
- def milliseconds[C, CC <: Classifier[C]](c: C)(implicit ev: CC): CC#R = ev.convert(milliseconds)
- def millis[C, CC <: Classifier[C]](c: C)(implicit ev: CC): CC#R = milliseconds(c)
- def millisecond[C, CC <: Classifier[C]](c: C)(implicit ev: CC): CC#R = milliseconds(c)
- def milli[C, CC <: Classifier[C]](c: C)(implicit ev: CC): CC#R = milliseconds(c)
-
- def seconds[C, CC <: Classifier[C]](c: C)(implicit ev: CC): CC#R = ev.convert(seconds)
- def second[C, CC <: Classifier[C]](c: C)(implicit ev: CC): CC#R = seconds(c)
-
- def minutes[C, CC <: Classifier[C]](c: C)(implicit ev: CC): CC#R = ev.convert(minutes)
- def minute[C, CC <: Classifier[C]](c: C)(implicit ev: CC): CC#R = minutes(c)
-
- def hours[C, CC <: Classifier[C]](c: C)(implicit ev: CC): CC#R = ev.convert(hours)
- def hour[C, CC <: Classifier[C]](c: C)(implicit ev: CC): CC#R = hours(c)
-
- def days[C, CC <: Classifier[C]](c: C)(implicit ev: CC): CC#R = ev.convert(days)
- def day[C, CC <: Classifier[C]](c: C)(implicit ev: CC): CC#R = days(c)
-}
-
-final class DurationInt(val n: Int) extends AnyVal with DurationConversions {
- override protected def durationIn(unit: TimeUnit): FiniteDuration = Duration(n, unit)
-}
-
-final class DurationLong(val n: Long) extends AnyVal with DurationConversions {
- override protected def durationIn(unit: TimeUnit): FiniteDuration = Duration(n, unit)
-}
-
-final class DurationDouble(val d: Double) extends AnyVal with DurationConversions {
- override protected def durationIn(unit: TimeUnit): FiniteDuration =
- Duration(d, unit) match {
- case f: FiniteDuration => f
- case _ => throw new IllegalArgumentException("Duration DSL not applicable to " + d)
- }
-}
diff --git a/src/library/scala/concurrent/duration/DurationConversions.scala b/src/library/scala/concurrent/duration/DurationConversions.scala
new file mode 100644
index 0000000000..2c7e192a0e
--- /dev/null
+++ b/src/library/scala/concurrent/duration/DurationConversions.scala
@@ -0,0 +1,92 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2003-2012, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+package scala.concurrent.duration
+
+import DurationConversions._
+
+// Would be nice to limit the visibility of this trait a little bit,
+// but it crashes scalac to do so.
+trait DurationConversions extends Any {
+ protected def durationIn(unit: TimeUnit): FiniteDuration
+
+ def nanoseconds = durationIn(NANOSECONDS)
+ def nanos = nanoseconds
+ def nanosecond = nanoseconds
+ def nano = nanoseconds
+
+ def microseconds = durationIn(MICROSECONDS)
+ def micros = microseconds
+ def microsecond = microseconds
+ def micro = microseconds
+
+ def milliseconds = durationIn(MILLISECONDS)
+ def millis = milliseconds
+ def millisecond = milliseconds
+ def milli = milliseconds
+
+ def seconds = durationIn(SECONDS)
+ def second = seconds
+
+ def minutes = durationIn(MINUTES)
+ def minute = minutes
+
+ def hours = durationIn(HOURS)
+ def hour = hours
+
+ def days = durationIn(DAYS)
+ def day = days
+
+ def nanoseconds[C](c: C)(implicit ev: Classifier[C]): ev.R = ev.convert(nanoseconds)
+ def nanos[C](c: C)(implicit ev: Classifier[C]): ev.R = nanoseconds(c)
+ def nanosecond[C](c: C)(implicit ev: Classifier[C]): ev.R = nanoseconds(c)
+ def nano[C](c: C)(implicit ev: Classifier[C]): ev.R = nanoseconds(c)
+
+ def microseconds[C](c: C)(implicit ev: Classifier[C]): ev.R = ev.convert(microseconds)
+ def micros[C](c: C)(implicit ev: Classifier[C]): ev.R = microseconds(c)
+ def microsecond[C](c: C)(implicit ev: Classifier[C]): ev.R = microseconds(c)
+ def micro[C](c: C)(implicit ev: Classifier[C]): ev.R = microseconds(c)
+
+ def milliseconds[C](c: C)(implicit ev: Classifier[C]): ev.R = ev.convert(milliseconds)
+ def millis[C](c: C)(implicit ev: Classifier[C]): ev.R = milliseconds(c)
+ def millisecond[C](c: C)(implicit ev: Classifier[C]): ev.R = milliseconds(c)
+ def milli[C](c: C)(implicit ev: Classifier[C]): ev.R = milliseconds(c)
+
+ def seconds[C](c: C)(implicit ev: Classifier[C]): ev.R = ev.convert(seconds)
+ def second[C](c: C)(implicit ev: Classifier[C]): ev.R = seconds(c)
+
+ def minutes[C](c: C)(implicit ev: Classifier[C]): ev.R = ev.convert(minutes)
+ def minute[C](c: C)(implicit ev: Classifier[C]): ev.R = minutes(c)
+
+ def hours[C](c: C)(implicit ev: Classifier[C]): ev.R = ev.convert(hours)
+ def hour[C](c: C)(implicit ev: Classifier[C]): ev.R = hours(c)
+
+ def days[C](c: C)(implicit ev: Classifier[C]): ev.R = ev.convert(days)
+ def day[C](c: C)(implicit ev: Classifier[C]): ev.R = days(c)
+}
+
+/**
+ * This object just holds some cogs which make the DSL machine work, not for direct consumption.
+ */
+object DurationConversions {
+ trait Classifier[C] {
+ type R
+ def convert(d: FiniteDuration): R
+ }
+
+ implicit object spanConvert extends Classifier[span.type] {
+ type R = FiniteDuration
+ def convert(d: FiniteDuration) = d
+ }
+
+ implicit object fromNowConvert extends Classifier[fromNow.type] {
+ type R = Deadline
+ def convert(d: FiniteDuration) = Deadline.now + d
+ }
+
+}
diff --git a/src/library/scala/concurrent/duration/package.scala b/src/library/scala/concurrent/duration/package.scala
new file mode 100644
index 0000000000..2fd735f19e
--- /dev/null
+++ b/src/library/scala/concurrent/duration/package.scala
@@ -0,0 +1,75 @@
+package scala.concurrent
+
+import scala.language.implicitConversions
+
+package object duration {
+ /**
+ * This object can be used as closing token if you prefer dot-less style but do not want
+ * to enable language.postfixOps:
+ *
+ * {{{
+ * import scala.concurrent.duration._
+ *
+ * val duration = 2 seconds span
+ * }}}
+ */
+ object span
+
+ /**
+ * This object can be used as closing token for declaring a deadline at some future point
+ * in time:
+ *
+ * {{{
+ * import scala.concurrent.duration._
+ *
+ * val deadline = 3 seconds fromNow
+ * }}}
+ */
+ object fromNow
+
+ type TimeUnit = java.util.concurrent.TimeUnit
+ final val DAYS = java.util.concurrent.TimeUnit.DAYS
+ final val HOURS = java.util.concurrent.TimeUnit.HOURS
+ final val MICROSECONDS = java.util.concurrent.TimeUnit.MICROSECONDS
+ final val MILLISECONDS = java.util.concurrent.TimeUnit.MILLISECONDS
+ final val MINUTES = java.util.concurrent.TimeUnit.MINUTES
+ final val NANOSECONDS = java.util.concurrent.TimeUnit.NANOSECONDS
+ final val SECONDS = java.util.concurrent.TimeUnit.SECONDS
+
+ implicit def pairIntToDuration(p: (Int, TimeUnit)): Duration = Duration(p._1, p._2)
+ implicit def pairLongToDuration(p: (Long, TimeUnit)): FiniteDuration = Duration(p._1, p._2)
+ implicit def durationToPair(d: Duration): (Long, TimeUnit) = (d.length, d.unit)
+
+ implicit final class DurationInt(val n: Int) extends AnyVal with DurationConversions {
+ override protected def durationIn(unit: TimeUnit): FiniteDuration = Duration(n, unit)
+ }
+
+ implicit final class DurationLong(val n: Long) extends AnyVal with DurationConversions {
+ override protected def durationIn(unit: TimeUnit): FiniteDuration = Duration(n, unit)
+ }
+
+ implicit final class DurationDouble(val d: Double) extends AnyVal with DurationConversions {
+ override protected def durationIn(unit: TimeUnit): FiniteDuration =
+ Duration(d, unit) match {
+ case f: FiniteDuration => f
+ case _ => throw new IllegalArgumentException("Duration DSL not applicable to " + d)
+ }
+ }
+
+ /*
+ * Avoid reflection based invocation by using non-duck type
+ */
+ implicit final class IntMult(val i: Int) extends AnyVal {
+ def *(d: Duration) = d * i
+ def *(d: FiniteDuration) = d * i
+ }
+
+ implicit final class LongMult(val i: Long) extends AnyVal {
+ def *(d: Duration) = d * i
+ def *(d: FiniteDuration) = d * i
+ }
+
+ implicit final class DoubleMult(val f: Double) extends AnyVal {
+ def *(d: Duration) = d * f
+ }
+}
diff --git a/src/library/scala/concurrent/impl/Promise.scala b/src/library/scala/concurrent/impl/Promise.scala
index 9228872f2b..a1a3305db0 100644
--- a/src/library/scala/concurrent/impl/Promise.scala
+++ b/src/library/scala/concurrent/impl/Promise.scala
@@ -8,16 +8,12 @@
package scala.concurrent.impl
-
-
-import java.util.concurrent.TimeUnit.NANOSECONDS
import scala.concurrent.{ ExecutionContext, CanAwait, OnCompleteRunnable, TimeoutException, ExecutionException }
-import scala.concurrent.util.{ Duration, Deadline, FiniteDuration }
+import scala.concurrent.duration.{ Duration, Deadline, FiniteDuration, NANOSECONDS }
import scala.annotation.tailrec
import scala.util.control.NonFatal
import scala.util.{ Try, Success, Failure }
-
private[concurrent] trait Promise[T] extends scala.concurrent.Promise[T] with scala.concurrent.Future[T] {
def future: this.type = this
}
@@ -48,7 +44,7 @@ private[concurrent] object Promise {
case Failure(t) => resolver(t)
case _ => source
}
-
+
private def resolver[T](throwable: Throwable): Try[T] = throwable match {
case t: scala.runtime.NonLocalReturnControl[_] => Success(t.value.asInstanceOf[T])
case t: scala.util.control.ControlThrowable => Failure(new ExecutionException("Boxed ControlThrowable", t))
@@ -56,12 +52,12 @@ private[concurrent] object Promise {
case e: Error => Failure(new ExecutionException("Boxed Error", e))
case t => Failure(t)
}
-
+
/** Default promise implementation.
*/
class DefaultPromise[T] extends AbstractPromise with Promise[T] { self =>
updateState(null, Nil) // Start at "No callbacks"
-
+
protected final def tryAwait(atMost: Duration): Boolean = {
@tailrec
def awaitUnsafe(deadline: Deadline, nextWait: FiniteDuration): Boolean = {
diff --git a/src/library/scala/concurrent/package.scala b/src/library/scala/concurrent/package.scala
index 1d06341d4d..e683732e41 100644
--- a/src/library/scala/concurrent/package.scala
+++ b/src/library/scala/concurrent/package.scala
@@ -8,7 +8,7 @@
package scala
-import scala.concurrent.util.Duration
+import scala.concurrent.duration.Duration
import scala.annotation.implicitNotFound
/** This package object contains primitives for concurrent and parallel programming.
diff --git a/src/library/scala/concurrent/util/duration/Classifier.scala b/src/library/scala/concurrent/util/duration/Classifier.scala
deleted file mode 100644
index 10faf0a5ce..0000000000
--- a/src/library/scala/concurrent/util/duration/Classifier.scala
+++ /dev/null
@@ -1,9 +0,0 @@
-package scala.concurrent.util.duration
-
-import scala.concurrent.util.{ FiniteDuration }
-
-trait Classifier[C] {
- type R
- def convert(d: FiniteDuration): R
-}
-
diff --git a/src/library/scala/concurrent/util/duration/IntMult.scala b/src/library/scala/concurrent/util/duration/IntMult.scala
deleted file mode 100644
index 94c58fb8c2..0000000000
--- a/src/library/scala/concurrent/util/duration/IntMult.scala
+++ /dev/null
@@ -1,18 +0,0 @@
-package scala.concurrent.util.duration
-
-import scala.concurrent.util.{ Duration }
-
-/*
- * Avoid reflection based invocation by using non-duck type
- */
-protected[duration] class IntMult(i: Int) {
- def *(d: Duration) = d * i
-}
-
-protected[duration] class LongMult(i: Long) {
- def *(d: Duration) = d * i
-}
-
-protected[duration] class DoubleMult(f: Double) {
- def *(d: Duration) = d * f
-}
diff --git a/src/library/scala/concurrent/util/duration/package.scala b/src/library/scala/concurrent/util/duration/package.scala
deleted file mode 100644
index d5ae3f1544..0000000000
--- a/src/library/scala/concurrent/util/duration/package.scala
+++ /dev/null
@@ -1,31 +0,0 @@
-package scala.concurrent.util
-
-import java.util.concurrent.TimeUnit
-import scala.language.implicitConversions
-
-package object duration {
-
- object span
- implicit object spanConvert extends Classifier[span.type] {
- type R = FiniteDuration
- def convert(d: FiniteDuration) = d
- }
-
- object fromNow
- implicit object fromNowConvert extends Classifier[fromNow.type] {
- type R = Deadline
- def convert(d: FiniteDuration) = Deadline.now + d
- }
-
- implicit def intToDurationInt(n: Int) = new DurationInt(n)
- implicit def longToDurationLong(n: Long) = new DurationLong(n)
- implicit def doubleToDurationDouble(d: Double) = new DurationDouble(d)
-
- implicit def pairIntToDuration(p: (Int, TimeUnit)) = Duration(p._1, p._2)
- implicit def pairLongToDuration(p: (Long, TimeUnit)) = Duration(p._1, p._2)
- implicit def durationToPair(d: Duration) = (d.length, d.unit)
-
- implicit def intMult(i: Int) = new IntMult(i)
- implicit def longMult(l: Long) = new LongMult(l)
- implicit def doubleMult(f: Double) = new DoubleMult(f)
-}
diff --git a/src/partest/scala/tools/partest/nest/DirectRunner.scala b/src/partest/scala/tools/partest/nest/DirectRunner.scala
index a07705322d..a890a57f14 100644
--- a/src/partest/scala/tools/partest/nest/DirectRunner.scala
+++ b/src/partest/scala/tools/partest/nest/DirectRunner.scala
@@ -37,6 +37,8 @@ trait DirectRunner {
})
}
def runTestsForFiles(_kindFiles: List[File], kind: String): immutable.Map[String, TestState] = {
+ System.setProperty("line.separator", "\n")
+
// @partest maintainer: we cannot create a fresh file manager here
// since the FM must respect --buildpath and --classpath from the command line
// for example, see how it's done in ReflectiveRunner
diff --git a/src/partest/scala/tools/partest/nest/RunnerManager.scala b/src/partest/scala/tools/partest/nest/RunnerManager.scala
index 4961424e1b..7a42853749 100644
--- a/src/partest/scala/tools/partest/nest/RunnerManager.scala
+++ b/src/partest/scala/tools/partest/nest/RunnerManager.scala
@@ -138,12 +138,29 @@ class RunnerManager(kind: String, val fileManager: FileManager, params: TestRunP
catch exHandler(output, "javac command failed:\n" + args.map(" " + _ + "\n").mkString + "\n", CompilerCrashed)
}
- /** Runs command redirecting standard out and
- * error out to output file.
+ /** Runs command redirecting standard out and error out to output file.
+ * Overloaded to accept a sequence of arguments.
*/
private def runCommand(args: Seq[String], outFile: File): Boolean = {
NestUI.verbose("running command:\n"+args.map(" " + _ + "\n").mkString)
- (Process(args) #> outFile !) == 0
+ runCommandImpl(Process(args), outFile)
+ }
+
+ /** Runs command redirecting standard out and error out to output file.
+ * Overloaded to accept a single string = concatenated command + arguments.
+ */
+ private def runCommand(command: String, outFile: File): Boolean = {
+ NestUI.verbose("running command:"+command)
+ runCommandImpl(Process(command), outFile)
+ }
+
+ private def runCommandImpl(process: => ProcessBuilder, outFile: File): Boolean = {
+ val exitCode = (process #> outFile !)
+ // normalize line endings
+ // System.getProperty("line.separator") should be "\n" here
+ // so reading a file and writing it back should convert all CRLFs to LFs
+ SFile(outFile).printlnAll(SFile(outFile).lines.toList: _*)
+ exitCode == 0
}
@inline private def isJava(f: File) = SFile(f) hasExtension "java"
@@ -767,7 +784,7 @@ class RunnerManager(kind: String, val fileManager: FileManager, params: TestRunP
}
else file.getAbsolutePath
- val ok = ((cmdString+argString) #> logFile !) == 0
+ val ok = runCommand(cmdString+argString, logFile)
( ok && diffCheck(file, compareOutput(file.getParentFile, logFile)) )
}
catch { case e: Exception => NestUI.verbose("caught "+e) ; false }
diff --git a/src/reflect/scala/reflect/api/Symbols.scala b/src/reflect/scala/reflect/api/Symbols.scala
index 542673ff00..78345e27f2 100644
--- a/src/reflect/scala/reflect/api/Symbols.scala
+++ b/src/reflect/scala/reflect/api/Symbols.scala
@@ -210,7 +210,7 @@ trait Symbols { self: Universe =>
/** Source file if this symbol is created during this compilation run,
* or a class file if this symbol is loaded from a *.class or *.jar.
*/
- def associatedFile: scala.tools.nsc.io.AbstractFile
+ def associatedFile: scala.reflect.io.AbstractFile
/** A list of annotations attached to this Symbol.
*/
diff --git a/src/reflect/scala/reflect/internal/Constants.scala b/src/reflect/scala/reflect/internal/Constants.scala
index 61fa553484..4e232e486b 100644
--- a/src/reflect/scala/reflect/internal/Constants.scala
+++ b/src/reflect/scala/reflect/internal/Constants.scala
@@ -73,13 +73,8 @@ trait Constants extends api.Constants {
case DoubleTag => DoubleClass.tpe
case StringTag => StringClass.tpe
case NullTag => NullClass.tpe
- case ClazzTag => ClassType(value.asInstanceOf[Type])
- case EnumTag =>
- // given (in java): "class A { enum E { VAL1 } }"
- // - symbolValue: the symbol of the actual enumeration value (VAL1)
- // - .owner: the ModuleClasSymbol of the enumeration (object E)
- // - .linkedClassOfClass: the ClassSymbol of the enumeration (class E)
- symbolValue.owner.linkedClassOfClass.tpe
+ case ClazzTag => ClassType(typeValue)
+ case EnumTag => EnumType(symbolValue)
}
/** We need the equals method to take account of tags as well as values.
diff --git a/src/reflect/scala/reflect/internal/Definitions.scala b/src/reflect/scala/reflect/internal/Definitions.scala
index 2db8c29a63..b607f8cad9 100644
--- a/src/reflect/scala/reflect/internal/Definitions.scala
+++ b/src/reflect/scala/reflect/internal/Definitions.scala
@@ -713,6 +713,13 @@ trait Definitions extends api.StandardDefinitions {
if (phase.erasedTypes || forMSIL) ClassClass.tpe
else appliedType(ClassClass, arg)
+ def EnumType(sym: Symbol) =
+ // given (in java): "class A { enum E { VAL1 } }"
+ // - sym: the symbol of the actual enumeration value (VAL1)
+ // - .owner: the ModuleClassSymbol of the enumeration (object E)
+ // - .linkedClassOfClass: the ClassSymbol of the enumeration (class E)
+ sym.owner.linkedClassOfClass.tpe
+
def vmClassType(arg: Type): Type = ClassType(arg)
def vmSignature(sym: Symbol, info: Type): String = signature(info) // !!!
diff --git a/src/reflect/scala/reflect/internal/Symbols.scala b/src/reflect/scala/reflect/internal/Symbols.scala
index 50e5afd21e..a0e28bf735 100644
--- a/src/reflect/scala/reflect/internal/Symbols.scala
+++ b/src/reflect/scala/reflect/internal/Symbols.scala
@@ -11,7 +11,7 @@ import scala.collection.mutable.ListBuffer
import util.Statistics
import Flags._
import scala.annotation.tailrec
-import scala.tools.nsc.io.AbstractFile
+import scala.reflect.io.AbstractFile
trait Symbols extends api.Symbols { self: SymbolTable =>
import definitions._
diff --git a/src/reflect/scala/reflect/internal/Types.scala b/src/reflect/scala/reflect/internal/Types.scala
index ee488c9d18..4311f1dd4f 100644
--- a/src/reflect/scala/reflect/internal/Types.scala
+++ b/src/reflect/scala/reflect/internal/Types.scala
@@ -2018,45 +2018,10 @@ trait Types extends api.Types { self: SymbolTable =>
override def kind = "ConstantType"
}
- final class UniqueConstantType(value: Constant) extends ConstantType(value) {
- /** Save the type of `value`. For Java enums, it depends on finding the linked class,
- * which might not be found after `flatten`. */
- private lazy val _tpe: Type = value.tpe
- override def underlying: Type = _tpe
- }
+ final class UniqueConstantType(value: Constant) extends ConstantType(value)
object ConstantType extends ConstantTypeExtractor {
- def apply(value: Constant): ConstantType = {
- val tpe = new UniqueConstantType(value)
- if (value.tag == ClazzTag) {
- // if we carry a classOf, we might be in trouble
- // http://groups.google.com/group/scala-internals/browse_thread/thread/45185b341aeb6a30
- // I don't have time for a thorough fix, so I put a hacky workaround here
- val alreadyThere = uniques findEntry tpe
- if ((alreadyThere ne null) && (alreadyThere ne tpe) && (alreadyThere.toString != tpe.toString)) {
- // we need to remove a stale type that has the same hashcode as we do
- // HashSet doesn't support removal, and this makes our task non-trivial
- // also we cannot simply recreate it, because that'd skew hashcodes (that change over time, omg!)
- // the only solution I can see is getting into the underlying array and sneakily manipulating it
- val ftable = uniques.getClass.getDeclaredFields().find(f => f.getName endsWith "table").get
- ftable.setAccessible(true)
- val table = ftable.get(uniques).asInstanceOf[Array[AnyRef]]
- def overwrite(hc: Int, x: Type) {
- def index(x: Int): Int = math.abs(x % table.length)
- var h = index(hc)
- var entry = table(h)
- while (entry ne null) {
- if (x == entry)
- table(h) = x
- h = index(h + 1)
- entry = table(h)
- }
- }
- overwrite(tpe.##, tpe)
- }
- }
- unique(tpe).asInstanceOf[ConstantType]
- }
+ def apply(value: Constant) = unique(new UniqueConstantType(value))
}
/* Syncnote: The `volatile` var and `pendingVolatiles` mutable set need not be protected
diff --git a/src/reflect/scala/reflect/internal/transform/Erasure.scala b/src/reflect/scala/reflect/internal/transform/Erasure.scala
index cc5b5bb406..977398909f 100644
--- a/src/reflect/scala/reflect/internal/transform/Erasure.scala
+++ b/src/reflect/scala/reflect/internal/transform/Erasure.scala
@@ -203,28 +203,26 @@ trait Erasure {
def specialErasure(sym: Symbol)(tp: Type): Type =
if (sym != NoSymbol && sym.enclClass.isJavaDefined)
erasure(sym)(tp)
- else if (sym.isTerm && sym.owner.isDerivedValueClass)
- specialErasureAvoiding(sym.owner, tp)
- else if (sym.isValue && sym.owner.isMethodWithExtension)
- specialErasureAvoiding(sym.owner.owner, tp)
+ else if (sym.isClassConstructor)
+ specialConstructorErasure(sym.owner, tp)
else
specialScalaErasure(tp)
- def specialErasureAvoiding(clazz: Symbol, tpe: Type): Type = {
+ def specialConstructorErasure(clazz: Symbol, tpe: Type): Type = {
tpe match {
case PolyType(tparams, restpe) =>
- specialErasureAvoiding(clazz, restpe)
+ specialConstructorErasure(clazz, restpe)
case ExistentialType(tparams, restpe) =>
- specialErasureAvoiding(clazz, restpe)
+ specialConstructorErasure(clazz, restpe)
case mt @ MethodType(params, restpe) =>
MethodType(
- cloneSymbolsAndModify(params, specialErasureAvoiding(clazz, _)),
- if (restpe.typeSymbol == UnitClass) erasedTypeRef(UnitClass)
- else specialErasureAvoiding(clazz, (mt.resultType(mt.paramTypes))))
+ cloneSymbolsAndModify(params, specialScalaErasure),
+ specialConstructorErasure(clazz, restpe))
case TypeRef(pre, `clazz`, args) =>
typeRef(pre, clazz, List())
- case _ =>
- specialScalaErasure(tpe)
+ case tp =>
+ assert(clazz == ArrayClass || tp.isError, s"unexpected constructor erasure $tp for $clazz")
+ specialScalaErasure(tp)
}
}
diff --git a/src/reflect/scala/reflect/internal/util/SourceFile.scala b/src/reflect/scala/reflect/internal/util/SourceFile.scala
index 9a71e02e08..788c7532d1 100644
--- a/src/reflect/scala/reflect/internal/util/SourceFile.scala
+++ b/src/reflect/scala/reflect/internal/util/SourceFile.scala
@@ -6,7 +6,7 @@
package scala.reflect.internal.util
-import scala.tools.nsc.io.{ AbstractFile, VirtualFile }
+import scala.reflect.io.{ AbstractFile, VirtualFile }
import scala.collection.mutable.ArrayBuffer
import scala.annotation.tailrec
import java.util.regex.Pattern
diff --git a/src/reflect/scala/tools/nsc/io/AbstractFile.scala b/src/reflect/scala/reflect/io/AbstractFile.scala
index 018a017c6d..e32207c58c 100644
--- a/src/reflect/scala/tools/nsc/io/AbstractFile.scala
+++ b/src/reflect/scala/reflect/io/AbstractFile.scala
@@ -4,7 +4,7 @@
*/
-package scala.tools.nsc
+package scala.reflect
package io
import java.io.{ FileOutputStream, IOException, InputStream, OutputStream, BufferedOutputStream }
@@ -13,6 +13,10 @@ import java.net.URL
import scala.collection.mutable.ArrayBuffer
/**
+ * An abstraction over files for use in the reflection/compiler libraries.
+ *
+ * ''Note: This library is considered experimental and should not be used unless you know what you are doing.''
+ *
* @author Philippe Altherr
* @version 1.0, 23/03/2004
*/
@@ -81,6 +85,8 @@ object AbstractFile {
* all other cases, the class <code>SourceFile</code> is used, which honors
* <code>global.settings.encoding.value</code>.
* </p>
+ *
+ * ''Note: This library is considered experimental and should not be used unless you know what you are doing.''
*/
abstract class AbstractFile extends Iterable[AbstractFile] {
diff --git a/src/reflect/scala/tools/nsc/io/Directory.scala b/src/reflect/scala/reflect/io/Directory.scala
index ebd6edc8d8..a24534137d 100644
--- a/src/reflect/scala/tools/nsc/io/Directory.scala
+++ b/src/reflect/scala/reflect/io/Directory.scala
@@ -6,11 +6,13 @@
** |/ **
\* */
-package scala.tools.nsc
+package scala.reflect
package io
import java.io.{ File => JFile }
-
+/**
+ * ''Note: This library is considered experimental and should not be used unless you know what you are doing.''
+ */
object Directory {
import scala.util.Properties.{ tmpDir, userHome, userDir }
@@ -34,6 +36,8 @@ import Path._
*
* @author Paul Phillips
* @since 2.8
+ *
+ * ''Note: This is library is considered experimental and should not be used unless you know what you are doing.''
*/
class Directory(jfile: JFile) extends Path(jfile) {
override def toAbsolute: Directory = if (isAbsolute) this else super.toAbsolute.toDirectory
diff --git a/src/reflect/scala/tools/nsc/io/File.scala b/src/reflect/scala/reflect/io/File.scala
index fce0e339e0..9e306371f7 100644
--- a/src/reflect/scala/tools/nsc/io/File.scala
+++ b/src/reflect/scala/reflect/io/File.scala
@@ -7,7 +7,7 @@
\* */
-package scala.tools.nsc
+package scala.reflect
package io
import java.io.{
@@ -17,7 +17,9 @@ import java.io.{ File => JFile }
import java.nio.channels.{ Channel, FileChannel }
import scala.io.Codec
import scala.language.{reflectiveCalls, implicitConversions}
-
+/**
+ * ''Note: This library is considered experimental and should not be used unless you know what you are doing.''
+ */
object File {
def pathSeparator = java.io.File.pathSeparator
def separator = java.io.File.separator
@@ -74,6 +76,8 @@ import Path._
*
* @author Paul Phillips
* @since 2.8
+ *
+ * ''Note: This is library is considered experimental and should not be used unless you know what you are doing.''
*/
class File(jfile: JFile)(implicit constructorCodec: Codec) extends Path(jfile) with Streamable.Chars {
override val creationCodec = constructorCodec
diff --git a/src/reflect/scala/tools/nsc/io/FileOperationException.scala b/src/reflect/scala/reflect/io/FileOperationException.scala
index f23658efbc..6bce799cea 100644
--- a/src/reflect/scala/tools/nsc/io/FileOperationException.scala
+++ b/src/reflect/scala/reflect/io/FileOperationException.scala
@@ -7,7 +7,7 @@
\* */
-package scala.tools.nsc
+package scala.reflect
package io
-
+/** ''Note: This library is considered experimental and should not be used unless you know what you are doing.'' */
case class FileOperationException(msg: String) extends RuntimeException(msg)
diff --git a/src/reflect/scala/tools/nsc/io/NoAbstractFile.scala b/src/reflect/scala/reflect/io/NoAbstractFile.scala
index 2af933c27b..d503328a37 100644
--- a/src/reflect/scala/tools/nsc/io/NoAbstractFile.scala
+++ b/src/reflect/scala/reflect/io/NoAbstractFile.scala
@@ -3,7 +3,7 @@
* @author Paul Phillips
*/
-package scala.tools.nsc
+package scala.reflect
package io
import java.io.InputStream
@@ -11,6 +11,8 @@ import java.io.{ File => JFile }
/** A distinguished object so you can avoid both null
* and Option.
+ *
+ * ''Note: This library is considered experimental and should not be used unless you know what you are doing.''
*/
object NoAbstractFile extends AbstractFile {
def absolute: AbstractFile = this
diff --git a/src/reflect/scala/tools/nsc/io/Path.scala b/src/reflect/scala/reflect/io/Path.scala
index 0a27e49686..9a1ff395a3 100644
--- a/src/reflect/scala/tools/nsc/io/Path.scala
+++ b/src/reflect/scala/reflect/io/Path.scala
@@ -3,7 +3,7 @@
* @author Paul Phillips
*/
-package scala.tools.nsc
+package scala.reflect
package io
import java.io.{
@@ -27,8 +27,9 @@ import scala.language.implicitConversions
*
* @author Paul Phillips
* @since 2.8
+ *
+ * ''Note: This library is considered experimental and should not be used unless you know what you are doing.''
*/
-
object Path {
def isExtensionJarOrZip(jfile: JFile): Boolean = isExtensionJarOrZip(jfile.getName)
def isExtensionJarOrZip(name: String): Boolean = {
@@ -83,6 +84,8 @@ import Path._
/** The Path constructor is private so we can enforce some
* semantics regarding how a Path might relate to the world.
+ *
+ * ''Note: This library is considered experimental and should not be used unless you know what you are doing.''
*/
class Path private[io] (val jfile: JFile) {
val separator = java.io.File.separatorChar
diff --git a/src/reflect/scala/tools/nsc/io/PlainFile.scala b/src/reflect/scala/reflect/io/PlainFile.scala
index a4f378ad5e..14cb09317c 100644
--- a/src/reflect/scala/tools/nsc/io/PlainFile.scala
+++ b/src/reflect/scala/reflect/io/PlainFile.scala
@@ -4,12 +4,12 @@
*/
-package scala.tools.nsc
+package scala.reflect
package io
import java.io.{ FileInputStream, FileOutputStream, IOException }
import PartialFunction._
-
+/** ''Note: This library is considered experimental and should not be used unless you know what you are doing.'' */
object PlainFile {
/**
* If the specified File exists, returns an abstract file backed
@@ -20,7 +20,7 @@ object PlainFile {
else if (file.isFile) new PlainFile(file)
else null
}
-
+/** ''Note: This library is considered experimental and should not be used unless you know what you are doing.'' */
class PlainDirectory(givenPath: Directory) extends PlainFile(givenPath) {
override def isDirectory = true
override def iterator = givenPath.list filter (_.exists) map (x => new PlainFile(x))
@@ -28,6 +28,8 @@ class PlainDirectory(givenPath: Directory) extends PlainFile(givenPath) {
}
/** This class implements an abstract file backed by a File.
+ *
+ * ''Note: This library is considered experimental and should not be used unless you know what you are doing.''
*/
class PlainFile(val givenPath: Path) extends AbstractFile {
assert(path ne null)
diff --git a/src/reflect/scala/tools/nsc/io/Streamable.scala b/src/reflect/scala/reflect/io/Streamable.scala
index 625429bdb3..a083890e09 100644
--- a/src/reflect/scala/tools/nsc/io/Streamable.scala
+++ b/src/reflect/scala/reflect/io/Streamable.scala
@@ -3,7 +3,7 @@
* @author Paul Phillips
*/
-package scala.tools.nsc
+package scala.reflect
package io
import java.net.{ URI, URL }
@@ -17,12 +17,15 @@ import Path.fail
*
* @author Paul Phillips
* @since 2.8
+ *
+ * ''Note: This library is considered experimental and should not be used unless you know what you are doing.''
*/
-
object Streamable {
/** Traits which can be viewed as a sequence of bytes. Source types
* which know their length should override def length: Long for more
* efficient method implementations.
+ *
+ * ''Note: This library is considered experimental and should not be used unless you know what you are doing.''
*/
trait Bytes {
def inputStream(): InputStream
@@ -66,6 +69,8 @@ object Streamable {
}
/** For objects which can be viewed as Chars.
+ *
+ * ''Note: This library is considered experimental and should not be used unless you know what you are doing.''
*/
trait Chars extends Bytes {
/** Calls to methods requiring byte<->char transformations should be offered
diff --git a/src/reflect/scala/tools/nsc/io/VirtualDirectory.scala b/src/reflect/scala/reflect/io/VirtualDirectory.scala
index fa016f86f4..e71c5cbb6b 100644
--- a/src/reflect/scala/tools/nsc/io/VirtualDirectory.scala
+++ b/src/reflect/scala/reflect/io/VirtualDirectory.scala
@@ -2,7 +2,7 @@
* Copyright 2005-2012 LAMP/EPFL
*/
-package scala.tools.nsc
+package scala.reflect
package io
import scala.collection.mutable
@@ -11,6 +11,8 @@ import scala.collection.mutable
* An in-memory directory.
*
* @author Lex Spoon
+ *
+ * ''Note: This library is considered experimental and should not be used unless you know what you are doing.''
*/
class VirtualDirectory(val name: String, maybeContainer: Option[VirtualDirectory])
extends AbstractFile {
diff --git a/src/reflect/scala/tools/nsc/io/VirtualFile.scala b/src/reflect/scala/reflect/io/VirtualFile.scala
index 8a5114bfe7..4884561f4e 100644
--- a/src/reflect/scala/tools/nsc/io/VirtualFile.scala
+++ b/src/reflect/scala/reflect/io/VirtualFile.scala
@@ -4,7 +4,7 @@
*/
-package scala.tools.nsc
+package scala.reflect
package io
import java.io.{ ByteArrayInputStream, ByteArrayOutputStream, InputStream, OutputStream }
@@ -14,6 +14,8 @@ import java.io.{ File => JFile }
*
* @author Philippe Altherr
* @version 1.0, 23/03/2004
+ *
+ * ''Note: This library is considered experimental and should not be used unless you know what you are doing.''
*/
class VirtualFile(val name: String, override val path: String) extends AbstractFile {
/**
diff --git a/src/reflect/scala/tools/nsc/io/ZipArchive.scala b/src/reflect/scala/reflect/io/ZipArchive.scala
index 49d2200895..2512c4d92f 100644
--- a/src/reflect/scala/tools/nsc/io/ZipArchive.scala
+++ b/src/reflect/scala/reflect/io/ZipArchive.scala
@@ -3,7 +3,7 @@
* @author Paul Phillips
*/
-package scala.tools.nsc
+package scala.reflect
package io
import java.net.URL
@@ -20,6 +20,8 @@ import scala.annotation.tailrec
* @author Philippe Altherr (original version)
* @author Paul Phillips (this one)
* @version 2.0,
+ *
+ * ''Note: This library is considered experimental and should not be used unless you know what you are doing.''
*/
object ZipArchive {
def fromPath(path: String): FileZipArchive = fromFile(new JFile(path))
@@ -57,7 +59,7 @@ object ZipArchive {
}
}
import ZipArchive._
-
+/** ''Note: This library is considered experimental and should not be used unless you know what you are doing.'' */
abstract class ZipArchive(override val file: JFile) extends AbstractFile with Equals {
self =>
@@ -78,13 +80,14 @@ abstract class ZipArchive(override val file: JFile) extends AbstractFile with Eq
}
}
def deepIterator = walkIterator(iterator)
-
+ /** ''Note: This library is considered experimental and should not be used unless you know what you are doing.'' */
sealed abstract class Entry(path: String) extends VirtualFile(baseName(path), path) {
// have to keep this name for compat with sbt's compiler-interface
def getArchive: ZipFile = null
override def underlyingSource = Some(self)
override def toString = self.path + "(" + path + ")"
}
+ /** ''Note: This library is considered experimental and should not be used unless you know what you are doing.'' */
class DirEntry(path: String) extends Entry(path) {
val entries = mutable.HashMap[String, Entry]()
@@ -120,7 +123,7 @@ abstract class ZipArchive(override val file: JFile) extends AbstractFile with Eq
else ensureDir(dirs, dirName(entry.getName), null)
}
}
-
+/** ''Note: This library is considered experimental and should not be used unless you know what you are doing.'' */
final class FileZipArchive(file: JFile) extends ZipArchive(file) {
def iterator: Iterator[Entry] = {
val zipFile = new ZipFile(file)
@@ -161,7 +164,7 @@ final class FileZipArchive(file: JFile) extends ZipArchive(file) {
case _ => false
}
}
-
+/** ''Note: This library is considered experimental and should not be used unless you know what you are doing.'' */
final class URLZipArchive(val url: URL) extends ZipArchive(null) {
def iterator: Iterator[Entry] = {
val root = new DirEntry("/")
diff --git a/src/reflect/scala/reflect/runtime/ReflectionUtils.scala b/src/reflect/scala/reflect/runtime/ReflectionUtils.scala
index eaf7d8326f..44d9d94a46 100644
--- a/src/reflect/scala/reflect/runtime/ReflectionUtils.scala
+++ b/src/reflect/scala/reflect/runtime/ReflectionUtils.scala
@@ -49,7 +49,7 @@ object ReflectionUtils {
case cl: java.net.URLClassLoader =>
(cl.getURLs mkString ",")
case cl if cl != null && isAbstractFileClassLoader(cl.getClass) =>
- cl.asInstanceOf[{val root: scala.tools.nsc.io.AbstractFile}].root.canonicalPath
+ cl.asInstanceOf[{val root: scala.reflect.io.AbstractFile}].root.canonicalPath
case null =>
inferBootClasspath
case _ =>
diff --git a/src/reflect/scala/reflect/runtime/SynchronizedSymbols.scala b/src/reflect/scala/reflect/runtime/SynchronizedSymbols.scala
index 7705610efb..3c2885a9f4 100644
--- a/src/reflect/scala/reflect/runtime/SynchronizedSymbols.scala
+++ b/src/reflect/scala/reflect/runtime/SynchronizedSymbols.scala
@@ -1,7 +1,7 @@
package scala.reflect
package runtime
-import scala.tools.nsc.io.AbstractFile
+import scala.reflect.io.AbstractFile
trait SynchronizedSymbols extends internal.Symbols { self: SymbolTable =>
diff --git a/src/scalap/scala/tools/scalap/Main.scala b/src/scalap/scala/tools/scalap/Main.scala
index 49c272cc28..a514f0d5a1 100644
--- a/src/scalap/scala/tools/scalap/Main.scala
+++ b/src/scalap/scala/tools/scalap/Main.scala
@@ -97,9 +97,14 @@ class Main {
*/
def process(args: Arguments, path: ClassPath[AbstractFile])(classname: String): Unit = {
// find the classfile
- val encName = NameTransformer.encode(
- if (classname == "scala.AnyRef") "java.lang.Object"
- else classname)
+ val encName = classname match {
+ case "scala.AnyRef" => "java.lang.Object"
+ case _ =>
+ // we have to encode every fragment of a name separately, otherwise the NameTransformer
+ // will encode using unicode escaping dot separators as well
+ // we can afford allocations because this is not a performance critical code
+ classname.split('.').map(NameTransformer.encode).mkString(".")
+ }
val cls = path.findClass(encName)
if (cls.isDefined && cls.get.binary.isDefined) {
val cfile = cls.get.binary.get
diff --git a/test/disabled-windows/script/utf8.bat b/test/disabled-windows/script/utf8.bat
index 8bc5c886f7..73c72569b3 100755
--- a/test/disabled-windows/script/utf8.bat
+++ b/test/disabled-windows/script/utf8.bat
@@ -1,11 +1,11 @@
-::#!
-:: utf8 - <description>.
-
-@echo off
-call scala -nocompdaemon %0 %*
-goto :eof
-::!#
-
-/*Comment Комментарий*/
-Console.println("QWERTY");
-Console.println("ЙЦУКЕН");
+::#!
+:: utf8 - <description>.
+
+@echo off
+call scala -nocompdaemon %0 %*
+goto :eof
+::!#
+
+/*Comment Комментарий*/
+Console.println("QWERTY");
+Console.println("ЙЦУКЕН");
diff --git a/test/disabled/script/fact.bat b/test/disabled/script/fact.bat
index bee0ba25c6..6f02b62a36 100755
--- a/test/disabled/script/fact.bat
+++ b/test/disabled/script/fact.bat
@@ -1,17 +1,17 @@
-::#!
-:: fact - A simple Scala batch file that prints out the factorial
-:: of the argument specified on the command line.
-
-@echo off
-call scala -nocompdaemon %0 %*
-goto :eof
-::!#
-
-
-val x = argv(0).toInt
-
-def fact(x: Int):Int =
- if(x==0) 1
- else x*fact(x-1)
-
-Console.println("fact(" + x + ") = " + fact(x))
+::#!
+:: fact - A simple Scala batch file that prints out the factorial
+:: of the argument specified on the command line.
+
+@echo off
+call scala -nocompdaemon %0 %*
+goto :eof
+::!#
+
+
+val x = argv(0).toInt
+
+def fact(x: Int):Int =
+ if(x==0) 1
+ else x*fact(x-1)
+
+Console.println("fact(" + x + ") = " + fact(x))
diff --git a/test/disabled/script/second.bat b/test/disabled/script/second.bat
index 0d7085954d..222372d543 100755
--- a/test/disabled/script/second.bat
+++ b/test/disabled/script/second.bat
@@ -1,3 +1,3 @@
-@echo off
-
-scala -nocompdaemon -e "println(\"My second argument is \" + args(1))" arg1 arg2
+@echo off
+
+scala -nocompdaemon -e "println(\"My second argument is \" + args(1))" arg1 arg2
diff --git a/test/disabled/script/t1015.bat b/test/disabled/script/t1015.bat
index 7475313d7e..4eddc800a8 100755
--- a/test/disabled/script/t1015.bat
+++ b/test/disabled/script/t1015.bat
@@ -1,12 +1,12 @@
-::#!
-:: t1015 - <description>.
-
-@echo off
-call scala -nocompdaemon %0 %*
-goto :eof
-::!#
-
-case class Test(one : Int, two : Int)
-object Test{
- def apply(one : Int): Test = Test(one, 2);
-}
+::#!
+:: t1015 - <description>.
+
+@echo off
+call scala -nocompdaemon %0 %*
+goto :eof
+::!#
+
+case class Test(one : Int, two : Int)
+object Test{
+ def apply(one : Int): Test = Test(one, 2);
+}
diff --git a/test/disabled/script/t1017.bat b/test/disabled/script/t1017.bat
index 369dbd2aca..0df49c663c 100755
--- a/test/disabled/script/t1017.bat
+++ b/test/disabled/script/t1017.bat
@@ -1,15 +1,15 @@
-::#!
-::# t1017 - <description>.
-
-@echo off
-call scala -nocompdaemon %0 %*
-goto :eof
-::!#
-
-def foo = {
- bar
-}
-
-var x = 1
-
-def bar = 1
+::#!
+::# t1017 - <description>.
+
+@echo off
+call scala -nocompdaemon %0 %*
+goto :eof
+::!#
+
+def foo = {
+ bar
+}
+
+var x = 1
+
+def bar = 1
diff --git a/test/files/buildmanager/overloaded_1/A.scala b/test/files/disabled/A.scala
index 33b63b8006..c070faf978 100644
--- a/test/files/buildmanager/overloaded_1/A.scala
+++ b/test/files/disabled/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/overloaded_1/overloaded_1.check b/test/files/disabled/overloaded_1.check
index 4d643ce6b4..4d643ce6b4 100644
--- a/test/files/buildmanager/overloaded_1/overloaded_1.check
+++ b/test/files/disabled/overloaded_1.check
diff --git a/test/files/buildmanager/overloaded_1/overloaded_1.test b/test/files/disabled/overloaded_1.test
index 392e0d365f..392e0d365f 100644
--- a/test/files/buildmanager/overloaded_1/overloaded_1.test
+++ b/test/files/disabled/overloaded_1.test
diff --git a/test/files/buildmanager/t4245/A.scala b/test/files/disabled/t4245/A.scala
index 7c4efe1b4b..7c4efe1b4b 100644
--- a/test/files/buildmanager/t4245/A.scala
+++ b/test/files/disabled/t4245/A.scala
diff --git a/test/files/buildmanager/t4245/t4245.check b/test/files/disabled/t4245/t4245.check
index 3d3898c671..3d3898c671 100644
--- a/test/files/buildmanager/t4245/t4245.check
+++ b/test/files/disabled/t4245/t4245.check
diff --git a/test/files/buildmanager/t4245/t4245.test b/test/files/disabled/t4245/t4245.test
index 392e0d365f..392e0d365f 100644
--- a/test/files/buildmanager/t4245/t4245.test
+++ b/test/files/disabled/t4245/t4245.test
diff --git a/test/files/jvm/actmig-PinS.scala b/test/files/jvm/actmig-PinS.scala
index 39f8f04b3b..30307f3737 100644
--- a/test/files/jvm/actmig-PinS.scala
+++ b/test/files/jvm/actmig-PinS.scala
@@ -1,5 +1,5 @@
import scala.actors._
-import scala.concurrent.util.duration._
+import scala.concurrent.duration._
import scala.concurrent.{ Promise, Await }
import scala.actors.Actor._
diff --git a/test/files/jvm/actmig-PinS_1.scala b/test/files/jvm/actmig-PinS_1.scala
index 1fb50567b9..640684f728 100644
--- a/test/files/jvm/actmig-PinS_1.scala
+++ b/test/files/jvm/actmig-PinS_1.scala
@@ -1,5 +1,5 @@
import scala.actors._
-import scala.concurrent.util.duration._
+import scala.concurrent.duration._
import scala.concurrent.{ Promise, Await }
object SillyActor {
diff --git a/test/files/jvm/actmig-PinS_2.scala b/test/files/jvm/actmig-PinS_2.scala
index 46277efd43..761df6b5a7 100644
--- a/test/files/jvm/actmig-PinS_2.scala
+++ b/test/files/jvm/actmig-PinS_2.scala
@@ -1,5 +1,5 @@
import scala.actors.{ MigrationSystem, StashingActor, ActorRef, Props, Exit }
-import scala.concurrent.util.duration._
+import scala.concurrent.duration._
import scala.concurrent.{ Promise, Await }
object SillyActor {
diff --git a/test/files/jvm/actmig-PinS_3.scala b/test/files/jvm/actmig-PinS_3.scala
index 321e99b1c2..de9788724d 100644
--- a/test/files/jvm/actmig-PinS_3.scala
+++ b/test/files/jvm/actmig-PinS_3.scala
@@ -1,5 +1,5 @@
import scala.actors.{ MigrationSystem, StashingActor, ActorRef, Terminated, Props }
-import scala.concurrent.util.duration._
+import scala.concurrent.duration._
import scala.concurrent.{ Promise, Await }
diff --git a/test/files/jvm/actmig-public-methods_1.scala b/test/files/jvm/actmig-public-methods_1.scala
index 7e5bc24210..4bbdc9a71f 100644
--- a/test/files/jvm/actmig-public-methods_1.scala
+++ b/test/files/jvm/actmig-public-methods_1.scala
@@ -3,7 +3,7 @@ import scala.actors.Actor._
import scala.actors._
import scala.util._
import java.util.concurrent.{ TimeUnit, CountDownLatch }
-import scala.concurrent.util.Duration
+import scala.concurrent.duration.Duration
import scala.actors.pattern._
object Test {
diff --git a/test/files/jvm/actmig-react-receive.scala b/test/files/jvm/actmig-react-receive.scala
index 8464a2af79..280582511f 100644
--- a/test/files/jvm/actmig-react-receive.scala
+++ b/test/files/jvm/actmig-react-receive.scala
@@ -3,7 +3,7 @@ import scala.actors.Actor._
import scala.actors.{ Actor, StashingActor, ActorRef, Props, MigrationSystem, PoisonPill }
import java.util.concurrent.{ TimeUnit, CountDownLatch }
import scala.collection.mutable.ArrayBuffer
-import scala.concurrent.util.duration._
+import scala.concurrent.duration._
import scala.concurrent.{ Promise, Await }
object Test {
diff --git a/test/files/jvm/duration-java/Test.java b/test/files/jvm/duration-java/Test.java
index 1c53ccb266..94f3f83db8 100644
--- a/test/files/jvm/duration-java/Test.java
+++ b/test/files/jvm/duration-java/Test.java
@@ -1,4 +1,4 @@
-import scala.concurrent.util.Duration;
+import scala.concurrent.duration.Duration;
import java.util.*;
import java.util.concurrent.TimeUnit;
import static java.util.concurrent.TimeUnit.*;
diff --git a/test/files/jvm/duration-tck.scala b/test/files/jvm/duration-tck.scala
index 0947e84004..df1052fed3 100644
--- a/test/files/jvm/duration-tck.scala
+++ b/test/files/jvm/duration-tck.scala
@@ -1,11 +1,9 @@
/**
* Copyright (C) 2012 Typesafe Inc. <http://www.typesafe.com>
*/
-
-import scala.concurrent.util._
-import duration._
+
+import scala.concurrent.duration._
import scala.reflect._
-import java.util.concurrent.TimeUnit._
import scala.tools.partest.TestUtil.intercept
object Test extends App {
@@ -39,7 +37,7 @@ object Test extends App {
two / one mustBe 2
one + zero mustBe one
one / 1000000 mustBe 1.micro
-
+
// test infinities
@@ -91,7 +89,7 @@ object Test extends App {
minf.toUnit(MINUTES) mustBe Double.NegativeInfinity
Duration.fromNanos(Double.PositiveInfinity) mustBe inf
Duration.fromNanos(Double.NegativeInfinity) mustBe minf
-
+
// test undefined & NaN
@@ -122,7 +120,7 @@ object Test extends App {
undef.toUnit(DAYS) mustBe nan
Duration.fromNanos(nan) mustBe undef
-
+
// test overflow protection
for (unit ← Seq(DAYS, HOURS, MINUTES, SECONDS, MILLISECONDS, MICROSECONDS, NANOSECONDS)) {
@@ -153,21 +151,21 @@ object Test extends App {
}
intercept[IllegalArgumentException] { Duration.fromNanos(1e20) }
intercept[IllegalArgumentException] { Duration.fromNanos(-1e20) }
-
+
// test precision
1.second + 1.millisecond mustBe 1001.milliseconds
100000.days + 1.nanosecond mustBe 8640000000000000001L.nanoseconds
1.5.seconds.toSeconds mustBe 1
(-1.5).seconds.toSeconds mustBe -1
-
+
// test unit stability
1000.millis.unit mustBe MILLISECONDS
(1000.millis + 0.days).unit mustBe MILLISECONDS
1.second.unit mustBe SECONDS
(1.second + 1.millisecond).unit mustBe MILLISECONDS
-
+
// test Deadline
val dead = 2.seconds.fromNow
@@ -177,10 +175,20 @@ object Test extends App {
Thread.sleep(1.second.toMillis)
assert(dead.timeLeft < 1.second)
assert(dead2.timeLeft < 1.second)
-
+
+
+ // test integer mul/div
+ 500.millis * 2 mustBe 1.second
+ (500.millis * 2).unit mustBe MILLISECONDS
+ 1.second / 2 mustBe 500.millis
+ (1.second / 2).unit mustBe MILLISECONDS
+
// check statically retaining finite-ness
- val finiteDuration: FiniteDuration = 1.second plus 3.seconds minus 1.millisecond min 1.second max 1.second
-
+ val finiteDuration: FiniteDuration = 1.second * 2 / 3 mul 5 div 4 plus 3.seconds minus 1.millisecond min 1.second max 1.second
+ val finite2: FiniteDuration = 2 * 1.second + 3L * 2.seconds
+ finite2 mustBe 8.seconds
+ ((2 seconds fromNow).timeLeft: FiniteDuration) < 4.seconds mustBe true
+ val finite3: FiniteDuration = 3.5 seconds span
}
diff --git a/test/files/jvm/future-spec/FutureTests.scala b/test/files/jvm/future-spec/FutureTests.scala
index 31bb8c4e44..8674be168c 100644
--- a/test/files/jvm/future-spec/FutureTests.scala
+++ b/test/files/jvm/future-spec/FutureTests.scala
@@ -2,8 +2,8 @@
import scala.concurrent._
-import scala.concurrent.util.duration._
-import scala.concurrent.util.Duration.Inf
+import scala.concurrent.duration._
+import scala.concurrent.duration.Duration.Inf
import scala.collection._
import scala.runtime.NonLocalReturnControl
import scala.util.{Try,Success,Failure}
diff --git a/test/files/jvm/future-spec/PromiseTests.scala b/test/files/jvm/future-spec/PromiseTests.scala
index d9aaa1d5ed..8e07393900 100644
--- a/test/files/jvm/future-spec/PromiseTests.scala
+++ b/test/files/jvm/future-spec/PromiseTests.scala
@@ -2,8 +2,8 @@
import scala.concurrent._
-import scala.concurrent.util.duration._
-import scala.concurrent.util.Duration.Inf
+import scala.concurrent.duration._
+import scala.concurrent.duration.Duration.Inf
import scala.collection._
import scala.runtime.NonLocalReturnControl
import scala.util.{Try,Success,Failure}
diff --git a/test/files/jvm/future-spec/main.scala b/test/files/jvm/future-spec/main.scala
index 57183d8cea..90048ccda0 100644
--- a/test/files/jvm/future-spec/main.scala
+++ b/test/files/jvm/future-spec/main.scala
@@ -3,7 +3,7 @@
import scala.collection._
import scala.concurrent._
-import scala.concurrent.util.Duration
+import scala.concurrent.duration.Duration
import java.util.concurrent.{ TimeoutException, CountDownLatch, TimeUnit }
diff --git a/test/files/jvm/manifests-new.check b/test/files/jvm/manifests-new.check
index 1c0bf6a568..a1ff9491cf 100644
--- a/test/files/jvm/manifests-new.check
+++ b/test/files/jvm/manifests-new.check
@@ -1,58 +1,58 @@
-x=(), t=TypeTag[Unit], k=TypeRef, s=class Unit
-x=true, t=TypeTag[Boolean], k=TypeRef, s=class Boolean
-x=a, t=TypeTag[Char], k=TypeRef, s=class Char
-x=1, t=TypeTag[Int], k=TypeRef, s=class Int
-x=abc, t=TypeTag[java.lang.String], k=TypeRef, s=class String
-x='abc, t=TypeTag[Symbol], k=TypeRef, s=class Symbol
-
-x=List(()), t=TypeTag[List[Unit]], k=TypeRef, s=class List
-x=List(true), t=TypeTag[List[Boolean]], k=TypeRef, s=class List
-x=List(1), t=TypeTag[List[Int]], k=TypeRef, s=class List
-x=List(abc), t=TypeTag[List[java.lang.String]], k=TypeRef, s=class List
-x=List('abc), t=TypeTag[List[Symbol]], k=TypeRef, s=class List
-
-x=[Z, t=TypeTag[Array[Boolean]], k=TypeRef, s=class Array
-x=[C, t=TypeTag[Array[Char]], k=TypeRef, s=class Array
-x=[I, t=TypeTag[Array[Int]], k=TypeRef, s=class Array
-x=[Ljava.lang.String;, t=TypeTag[Array[java.lang.String]], k=TypeRef, s=class Array
-x=[Lscala.Symbol;, t=TypeTag[Array[Symbol]], k=TypeRef, s=class Array
-
-x=((),()), t=TypeTag[(Unit, Unit)], k=TypeRef, s=class Tuple2
-x=(true,false), t=TypeTag[(Boolean, Boolean)], k=TypeRef, s=class Tuple2
-x=(1,2), t=TypeTag[(Int, Int)], k=TypeRef, s=class Tuple2
-x=(abc,xyz), t=TypeTag[(java.lang.String, java.lang.String)], k=TypeRef, s=class Tuple2
-x=('abc,'xyz), t=TypeTag[(Symbol, Symbol)], k=TypeRef, s=class Tuple2
-
-x=Test$, t=TypeTag[Test.type], k=SingleType, s=object Test
-x=scala.collection.immutable.List$, t=TypeTag[scala.collection.immutable.List.type], k=SingleType, s=object List
-
-x=Foo, t=TypeTag[Foo[Int]], k=TypeRef, s=class Foo
-x=Foo, t=TypeTag[Foo[List[Int]]], k=TypeRef, s=class Foo
-x=Foo, t=TypeTag[Foo[Foo[Int]]], k=TypeRef, s=class Foo
-x=Foo, t=TypeTag[Foo[List[Foo[Int]]]], k=TypeRef, s=class Foo
-
-x=Test1$$anon$1, t=TypeTag[Bar[String]], k=RefinedType, s=<local Test1>
-x=Test1$$anon$2, t=TypeTag[Bar[String]], k=RefinedType, s=<local Test1>
-
-()=()
-true=true
-a=a
-1=1
-'abc='abc
-
-List(())=List(())
-List(true)=List(true)
-List('abc)=List('abc)
-
-Array()=Array()
-Array(true)=Array(true)
-Array(a)=Array(a)
-Array(1)=Array(1)
-
-((),())=((),())
-(true,false)=(true,false)
-
-List(List(1), List(2))=List(List(1), List(2))
-
-Array(Array(1), Array(2))=Array(Array(1), Array(2))
-
+x=(), t=TypeTag[Unit], k=TypeRef, s=class Unit
+x=true, t=TypeTag[Boolean], k=TypeRef, s=class Boolean
+x=a, t=TypeTag[Char], k=TypeRef, s=class Char
+x=1, t=TypeTag[Int], k=TypeRef, s=class Int
+x=abc, t=TypeTag[java.lang.String], k=TypeRef, s=class String
+x='abc, t=TypeTag[Symbol], k=TypeRef, s=class Symbol
+
+x=List(()), t=TypeTag[List[Unit]], k=TypeRef, s=class List
+x=List(true), t=TypeTag[List[Boolean]], k=TypeRef, s=class List
+x=List(1), t=TypeTag[List[Int]], k=TypeRef, s=class List
+x=List(abc), t=TypeTag[List[java.lang.String]], k=TypeRef, s=class List
+x=List('abc), t=TypeTag[List[Symbol]], k=TypeRef, s=class List
+
+x=[Z, t=TypeTag[Array[Boolean]], k=TypeRef, s=class Array
+x=[C, t=TypeTag[Array[Char]], k=TypeRef, s=class Array
+x=[I, t=TypeTag[Array[Int]], k=TypeRef, s=class Array
+x=[Ljava.lang.String;, t=TypeTag[Array[java.lang.String]], k=TypeRef, s=class Array
+x=[Lscala.Symbol;, t=TypeTag[Array[Symbol]], k=TypeRef, s=class Array
+
+x=((),()), t=TypeTag[(Unit, Unit)], k=TypeRef, s=class Tuple2
+x=(true,false), t=TypeTag[(Boolean, Boolean)], k=TypeRef, s=class Tuple2
+x=(1,2), t=TypeTag[(Int, Int)], k=TypeRef, s=class Tuple2
+x=(abc,xyz), t=TypeTag[(java.lang.String, java.lang.String)], k=TypeRef, s=class Tuple2
+x=('abc,'xyz), t=TypeTag[(Symbol, Symbol)], k=TypeRef, s=class Tuple2
+
+x=Test$, t=TypeTag[Test.type], k=SingleType, s=object Test
+x=scala.collection.immutable.List$, t=TypeTag[scala.collection.immutable.List.type], k=SingleType, s=object List
+
+x=Foo, t=TypeTag[Foo[Int]], k=TypeRef, s=class Foo
+x=Foo, t=TypeTag[Foo[List[Int]]], k=TypeRef, s=class Foo
+x=Foo, t=TypeTag[Foo[Foo[Int]]], k=TypeRef, s=class Foo
+x=Foo, t=TypeTag[Foo[List[Foo[Int]]]], k=TypeRef, s=class Foo
+
+x=Test1$$anon$1, t=TypeTag[Bar[String]], k=RefinedType, s=<local Test1>
+x=Test1$$anon$2, t=TypeTag[Bar[String]], k=RefinedType, s=<local Test1>
+
+()=()
+true=true
+a=a
+1=1
+'abc='abc
+
+List(())=List(())
+List(true)=List(true)
+List('abc)=List('abc)
+
+Array()=Array()
+Array(true)=Array(true)
+Array(a)=Array(a)
+Array(1)=Array(1)
+
+((),())=((),())
+(true,false)=(true,false)
+
+List(List(1), List(2))=List(List(1), List(2))
+
+Array(Array(1), Array(2))=Array(Array(1), Array(2))
+
diff --git a/test/files/jvm/mkLibNatives.bat b/test/files/jvm/mkLibNatives.bat
index 2f99f7aab5..623039b867 100755
--- a/test/files/jvm/mkLibNatives.bat
+++ b/test/files/jvm/mkLibNatives.bat
@@ -1,70 +1,70 @@
-@echo off
-
-rem ##########################################################################
-rem # Author : Stephane Micheloud
-rem ##########################################################################
-
-rem # For building the -64.dll, you need: Visual C++ Express, Microsoft SDK (to
-rem # get the 64bit compiler / libraries), adapt this script.
-
-rem ##########################################################################
-rem # variables
-
-if "%OS%"=="Windows_NT" @setlocal
-
-rem debug switches are: off=0, on=1
-set DEBUG=0
-set STDOUT=NUL
-if %DEBUG%==1 set STDOUT=CON
-
-set CLASS_NAME=Test$
-set CLASS_DIR=.
-
-set OBJ_NAME=natives
-set LIB_NAME=natives-32
-
-if "%JAVA_HOME%"=="" goto error1
-if "%VSINSTALLDIR%"=="" goto error2
-
-set JAVAH=%JAVA_HOME%\bin\javah
-set JAVAH_OPTIONS=-jni -force -classpath %CLASS_DIR% -o %OBJ_NAME%.h
-
-set CC=%VSINSTALLDIR%\vc\bin\cl
-set CC_OPTIONS=/nologo /c
-set CC_INCLUDES=-I%VSINSTALLDIR%\vc\include -I%JAVA_HOME%\include -I%JAVA_HOME%\include\win32
-
-set LNK_OPTIONS=/nologo /MT /LD
-
-rem variable LIB is used by the C++ linker to find libcmt.lib, ..
-set LIB=%VSINSTALLDIR%\vc\lib
-
-rem ##########################################################################
-rem # commands
-
-del /s/q *.obj *.exp *.lib *.dll 1>%STDOUT%
-
-if %DEBUG%==1 echo %JAVAH% %JAVAH_OPTIONS% %CLASS_NAME%
-%JAVAH% %JAVAH_OPTIONS% %CLASS_NAME%
-
-if %DEBUG%==1 echo %CC% %CC_OPTIONS% %CC_INCLUDES% /Fo%OBJ_NAME%.obj natives.c
-%CC% %CC_OPTIONS% %CC_INCLUDES% /Fo%OBJ_NAME%.obj natives.c 1>%STDOUT%
-
-if %DEBUG%==1 echo %CC% %LNK_OPTIONS% /Fe%LIB_NAME%.dll %OBJ_NAME%.obj
-%CC% %LNK_OPTIONS% /Fe%LIB_NAME%.dll %OBJ_NAME%.obj 1>%STDOUT%
-
-goto end
-
-rem ##########################################################################
-rem # subroutines
-
-:error1
-echo ERROR: environment variable JAVA_HOME is undefined. It should point to your JDK installation.
-goto end
-
-:error2
-echo ERROR: environment variable VSINSTALLDIR is undefined. It should point to your MS Visual Studio installation.
-goto end
-
-:end
-if "%OS%"=="Windows_NT" @endlocal
-exit /b %errorlevel%
+@echo off
+
+rem ##########################################################################
+rem # Author : Stephane Micheloud
+rem ##########################################################################
+
+rem # For building the -64.dll, you need: Visual C++ Express, Microsoft SDK (to
+rem # get the 64bit compiler / libraries), adapt this script.
+
+rem ##########################################################################
+rem # variables
+
+if "%OS%"=="Windows_NT" @setlocal
+
+rem debug switches are: off=0, on=1
+set DEBUG=0
+set STDOUT=NUL
+if %DEBUG%==1 set STDOUT=CON
+
+set CLASS_NAME=Test$
+set CLASS_DIR=.
+
+set OBJ_NAME=natives
+set LIB_NAME=natives-32
+
+if "%JAVA_HOME%"=="" goto error1
+if "%VSINSTALLDIR%"=="" goto error2
+
+set JAVAH=%JAVA_HOME%\bin\javah
+set JAVAH_OPTIONS=-jni -force -classpath %CLASS_DIR% -o %OBJ_NAME%.h
+
+set CC=%VSINSTALLDIR%\vc\bin\cl
+set CC_OPTIONS=/nologo /c
+set CC_INCLUDES=-I%VSINSTALLDIR%\vc\include -I%JAVA_HOME%\include -I%JAVA_HOME%\include\win32
+
+set LNK_OPTIONS=/nologo /MT /LD
+
+rem variable LIB is used by the C++ linker to find libcmt.lib, ..
+set LIB=%VSINSTALLDIR%\vc\lib
+
+rem ##########################################################################
+rem # commands
+
+del /s/q *.obj *.exp *.lib *.dll 1>%STDOUT%
+
+if %DEBUG%==1 echo %JAVAH% %JAVAH_OPTIONS% %CLASS_NAME%
+%JAVAH% %JAVAH_OPTIONS% %CLASS_NAME%
+
+if %DEBUG%==1 echo %CC% %CC_OPTIONS% %CC_INCLUDES% /Fo%OBJ_NAME%.obj natives.c
+%CC% %CC_OPTIONS% %CC_INCLUDES% /Fo%OBJ_NAME%.obj natives.c 1>%STDOUT%
+
+if %DEBUG%==1 echo %CC% %LNK_OPTIONS% /Fe%LIB_NAME%.dll %OBJ_NAME%.obj
+%CC% %LNK_OPTIONS% /Fe%LIB_NAME%.dll %OBJ_NAME%.obj 1>%STDOUT%
+
+goto end
+
+rem ##########################################################################
+rem # subroutines
+
+:error1
+echo ERROR: environment variable JAVA_HOME is undefined. It should point to your JDK installation.
+goto end
+
+:error2
+echo ERROR: environment variable VSINSTALLDIR is undefined. It should point to your MS Visual Studio installation.
+goto end
+
+:end
+if "%OS%"=="Windows_NT" @endlocal
+exit /b %errorlevel%
diff --git a/test/files/jvm/scala-concurrent-tck.scala b/test/files/jvm/scala-concurrent-tck.scala
index 0e76b711de..b529bca38a 100644
--- a/test/files/jvm/scala-concurrent-tck.scala
+++ b/test/files/jvm/scala-concurrent-tck.scala
@@ -10,7 +10,7 @@ import scala.concurrent.{
}
import scala.concurrent.{ future, promise, blocking }
import scala.util.{ Try, Success, Failure }
-import scala.concurrent.util.Duration
+import scala.concurrent.duration.Duration
import scala.reflect.{ classTag, ClassTag }
import scala.tools.partest.TestUtil.intercept
diff --git a/test/files/neg/checksensible.check b/test/files/neg/checksensible.check
index 23af94180a..d785179a56 100644
--- a/test/files/neg/checksensible.check
+++ b/test/files/neg/checksensible.check
@@ -1,100 +1,100 @@
-checksensible.scala:13: error: comparing a fresh object using `eq' will always yield false
- (new AnyRef) eq (new AnyRef)
- ^
-checksensible.scala:14: error: comparing a fresh object using `ne' will always yield true
- (new AnyRef) ne (new AnyRef)
- ^
-checksensible.scala:15: error: comparing a fresh object using `eq' will always yield false
- Shmoopie eq (new AnyRef)
- ^
-checksensible.scala:16: error: comparing a fresh object using `eq' will always yield false
- (Shmoopie: AnyRef) eq (new AnyRef)
- ^
-checksensible.scala:17: error: comparing a fresh object using `eq' will always yield false
- (new AnyRef) eq Shmoopie
- ^
-checksensible.scala:18: error: comparing a fresh object using `eq' will always yield false
- (new AnyRef) eq null
- ^
-checksensible.scala:19: error: comparing a fresh object using `eq' will always yield false
- null eq new AnyRef
- ^
-checksensible.scala:26: error: comparing values of types Unit and Int using `==' will always yield false
- (c = 1) == 0
- ^
-checksensible.scala:27: error: comparing values of types Int and Unit using `==' will always yield false
- 0 == (c = 1)
- ^
-checksensible.scala:29: error: comparing values of types Int and String using `==' will always yield false
- 1 == "abc"
- ^
-checksensible.scala:33: error: comparing values of types Some[Int] and Int using `==' will always yield false
- Some(1) == 1 // as above
- ^
-checksensible.scala:38: error: comparing a fresh object using `==' will always yield false
- new AnyRef == 1
- ^
-checksensible.scala:41: error: comparing values of types Int and Boolean using `==' will always yield false
- 1 == (new java.lang.Boolean(true))
- ^
-checksensible.scala:43: error: comparing values of types Int and Boolean using `!=' will always yield true
- 1 != true
- ^
-checksensible.scala:44: error: comparing values of types Unit and Boolean using `==' will always yield false
- () == true
- ^
-checksensible.scala:45: error: comparing values of types Unit and Unit using `==' will always yield true
- () == ()
- ^
-checksensible.scala:46: error: comparing values of types Unit and Unit using `==' will always yield true
- () == println
- ^
-checksensible.scala:47: error: comparing values of types Unit and scala.runtime.BoxedUnit using `==' will always yield true
- () == scala.runtime.BoxedUnit.UNIT // these should warn for always being true/false
- ^
-checksensible.scala:48: error: comparing values of types scala.runtime.BoxedUnit and Unit using `!=' will always yield false
- scala.runtime.BoxedUnit.UNIT != ()
- ^
-checksensible.scala:51: error: comparing values of types Int and Unit using `!=' will always yield true
- (1 != println)
- ^
-checksensible.scala:52: error: comparing values of types Int and Symbol using `!=' will always yield true
- (1 != 'sym)
- ^
-checksensible.scala:58: error: comparing a fresh object using `==' will always yield false
- ((x: Int) => x + 1) == null
- ^
-checksensible.scala:59: error: comparing a fresh object using `==' will always yield false
- Bep == ((_: Int) + 1)
- ^
-checksensible.scala:61: error: comparing a fresh object using `==' will always yield false
- new Object == new Object
- ^
-checksensible.scala:62: error: comparing a fresh object using `==' will always yield false
- new Object == "abc"
- ^
-checksensible.scala:63: error: comparing a fresh object using `!=' will always yield true
- new Exception() != new Exception()
- ^
-checksensible.scala:66: error: comparing values of types Int and Null using `==' will always yield false
- if (foo.length == null) "plante" else "plante pas"
- ^
-checksensible.scala:71: error: comparing values of types Bip and Bop using `==' will always yield false
- (x1 == x2)
- ^
-checksensible.scala:81: error: comparing values of types EqEqRefTest.this.C3 and EqEqRefTest.this.Z1 using `==' will always yield false
- c3 == z1
- ^
-checksensible.scala:82: error: comparing values of types EqEqRefTest.this.Z1 and EqEqRefTest.this.C3 using `==' will always yield false
- z1 == c3
- ^
-checksensible.scala:83: error: comparing values of types EqEqRefTest.this.Z1 and EqEqRefTest.this.C3 using `!=' will always yield true
- z1 != c3
- ^
-checksensible.scala:84: error: comparing values of types EqEqRefTest.this.C3 and String using `!=' will always yield true
- c3 != "abc"
- ^
-checksensible.scala:95: error: comparing values of types Unit and Int using `!=' will always yield true
- while ((c = in.read) != -1)
- ^
-33 errors found
+checksensible.scala:13: error: comparing a fresh object using `eq' will always yield false
+ (new AnyRef) eq (new AnyRef)
+ ^
+checksensible.scala:14: error: comparing a fresh object using `ne' will always yield true
+ (new AnyRef) ne (new AnyRef)
+ ^
+checksensible.scala:15: error: comparing a fresh object using `eq' will always yield false
+ Shmoopie eq (new AnyRef)
+ ^
+checksensible.scala:16: error: comparing a fresh object using `eq' will always yield false
+ (Shmoopie: AnyRef) eq (new AnyRef)
+ ^
+checksensible.scala:17: error: comparing a fresh object using `eq' will always yield false
+ (new AnyRef) eq Shmoopie
+ ^
+checksensible.scala:18: error: comparing a fresh object using `eq' will always yield false
+ (new AnyRef) eq null
+ ^
+checksensible.scala:19: error: comparing a fresh object using `eq' will always yield false
+ null eq new AnyRef
+ ^
+checksensible.scala:26: error: comparing values of types Unit and Int using `==' will always yield false
+ (c = 1) == 0
+ ^
+checksensible.scala:27: error: comparing values of types Int and Unit using `==' will always yield false
+ 0 == (c = 1)
+ ^
+checksensible.scala:29: error: comparing values of types Int and String using `==' will always yield false
+ 1 == "abc"
+ ^
+checksensible.scala:33: error: comparing values of types Some[Int] and Int using `==' will always yield false
+ Some(1) == 1 // as above
+ ^
+checksensible.scala:38: error: comparing a fresh object using `==' will always yield false
+ new AnyRef == 1
+ ^
+checksensible.scala:41: error: comparing values of types Int and Boolean using `==' will always yield false
+ 1 == (new java.lang.Boolean(true))
+ ^
+checksensible.scala:43: error: comparing values of types Int and Boolean using `!=' will always yield true
+ 1 != true
+ ^
+checksensible.scala:44: error: comparing values of types Unit and Boolean using `==' will always yield false
+ () == true
+ ^
+checksensible.scala:45: error: comparing values of types Unit and Unit using `==' will always yield true
+ () == ()
+ ^
+checksensible.scala:46: error: comparing values of types Unit and Unit using `==' will always yield true
+ () == println
+ ^
+checksensible.scala:47: error: comparing values of types Unit and scala.runtime.BoxedUnit using `==' will always yield true
+ () == scala.runtime.BoxedUnit.UNIT // these should warn for always being true/false
+ ^
+checksensible.scala:48: error: comparing values of types scala.runtime.BoxedUnit and Unit using `!=' will always yield false
+ scala.runtime.BoxedUnit.UNIT != ()
+ ^
+checksensible.scala:51: error: comparing values of types Int and Unit using `!=' will always yield true
+ (1 != println)
+ ^
+checksensible.scala:52: error: comparing values of types Int and Symbol using `!=' will always yield true
+ (1 != 'sym)
+ ^
+checksensible.scala:58: error: comparing a fresh object using `==' will always yield false
+ ((x: Int) => x + 1) == null
+ ^
+checksensible.scala:59: error: comparing a fresh object using `==' will always yield false
+ Bep == ((_: Int) + 1)
+ ^
+checksensible.scala:61: error: comparing a fresh object using `==' will always yield false
+ new Object == new Object
+ ^
+checksensible.scala:62: error: comparing a fresh object using `==' will always yield false
+ new Object == "abc"
+ ^
+checksensible.scala:63: error: comparing a fresh object using `!=' will always yield true
+ new Exception() != new Exception()
+ ^
+checksensible.scala:66: error: comparing values of types Int and Null using `==' will always yield false
+ if (foo.length == null) "plante" else "plante pas"
+ ^
+checksensible.scala:71: error: comparing values of types Bip and Bop using `==' will always yield false
+ (x1 == x2)
+ ^
+checksensible.scala:81: error: comparing values of types EqEqRefTest.this.C3 and EqEqRefTest.this.Z1 using `==' will always yield false
+ c3 == z1
+ ^
+checksensible.scala:82: error: comparing values of types EqEqRefTest.this.Z1 and EqEqRefTest.this.C3 using `==' will always yield false
+ z1 == c3
+ ^
+checksensible.scala:83: error: comparing values of types EqEqRefTest.this.Z1 and EqEqRefTest.this.C3 using `!=' will always yield true
+ z1 != c3
+ ^
+checksensible.scala:84: error: comparing values of types EqEqRefTest.this.C3 and String using `!=' will always yield true
+ c3 != "abc"
+ ^
+checksensible.scala:95: error: comparing values of types Unit and Int using `!=' will always yield true
+ while ((c = in.read) != -1)
+ ^
+33 errors found
diff --git a/test/files/neg/classmanifests_new_deprecations.check b/test/files/neg/classmanifests_new_deprecations.check
index 841e893249..e10308a66f 100644
--- a/test/files/neg/classmanifests_new_deprecations.check
+++ b/test/files/neg/classmanifests_new_deprecations.check
@@ -1,61 +1,61 @@
-classmanifests_new_deprecations.scala:2: error: type ClassManifest in object Predef is deprecated: Use scala.reflect.ClassTag instead
- def cm1[T: ClassManifest] = ???
- ^
-classmanifests_new_deprecations.scala:3: error: type ClassManifest in object Predef is deprecated: Use scala.reflect.ClassTag instead
- def cm2[T](implicit evidence$1: ClassManifest[T]) = ???
- ^
-classmanifests_new_deprecations.scala:4: error: type ClassManifest in object Predef is deprecated: Use scala.reflect.ClassTag instead
- val cm3: ClassManifest[Int] = null
- ^
-classmanifests_new_deprecations.scala:4: error: type ClassManifest in object Predef is deprecated: Use scala.reflect.ClassTag instead
- val cm3: ClassManifest[Int] = null
- ^
-classmanifests_new_deprecations.scala:6: error: type ClassManifest in package reflect is deprecated: Use scala.reflect.ClassTag instead
- def rcm1[T: scala.reflect.ClassManifest] = ???
- ^
-classmanifests_new_deprecations.scala:7: error: type ClassManifest in package reflect is deprecated: Use scala.reflect.ClassTag instead
- def rcm2[T](implicit evidence$1: scala.reflect.ClassManifest[T]) = ???
- ^
-classmanifests_new_deprecations.scala:8: error: type ClassManifest in package reflect is deprecated: Use scala.reflect.ClassTag instead
- val rcm3: scala.reflect.ClassManifest[Int] = null
- ^
-classmanifests_new_deprecations.scala:8: error: type ClassManifest in package reflect is deprecated: Use scala.reflect.ClassTag instead
- val rcm3: scala.reflect.ClassManifest[Int] = null
- ^
-classmanifests_new_deprecations.scala:10: error: type ClassManifest in object Predef is deprecated: Use scala.reflect.ClassTag instead
- type CM[T] = ClassManifest[T]
- ^
-classmanifests_new_deprecations.scala:15: error: type ClassManifest in package reflect is deprecated: Use scala.reflect.ClassTag instead
- type RCM[T] = scala.reflect.ClassManifest[T]
- ^
-classmanifests_new_deprecations.scala:20: error: type Manifest in object Predef is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
- def m1[T: Manifest] = ???
- ^
-classmanifests_new_deprecations.scala:21: error: type Manifest in object Predef is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
- def m2[T](implicit evidence$1: Manifest[T]) = ???
- ^
-classmanifests_new_deprecations.scala:22: error: type Manifest in object Predef is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
- val m3: Manifest[Int] = null
- ^
-classmanifests_new_deprecations.scala:22: error: type Manifest in object Predef is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
- val m3: Manifest[Int] = null
- ^
-classmanifests_new_deprecations.scala:24: error: trait Manifest in package reflect is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
- def rm1[T: scala.reflect.Manifest] = ???
- ^
-classmanifests_new_deprecations.scala:25: error: trait Manifest in package reflect is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
- def rm2[T](implicit evidence$1: scala.reflect.Manifest[T]) = ???
- ^
-classmanifests_new_deprecations.scala:26: error: trait Manifest in package reflect is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
- val rm3: scala.reflect.Manifest[Int] = null
- ^
-classmanifests_new_deprecations.scala:26: error: trait Manifest in package reflect is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
- val rm3: scala.reflect.Manifest[Int] = null
- ^
-classmanifests_new_deprecations.scala:28: error: type Manifest in object Predef is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
- type M[T] = Manifest[T]
- ^
-classmanifests_new_deprecations.scala:33: error: trait Manifest in package reflect is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
- type RM[T] = scala.reflect.Manifest[T]
- ^
-20 errors found
+classmanifests_new_deprecations.scala:2: error: type ClassManifest in object Predef is deprecated: Use scala.reflect.ClassTag instead
+ def cm1[T: ClassManifest] = ???
+ ^
+classmanifests_new_deprecations.scala:3: error: type ClassManifest in object Predef is deprecated: Use scala.reflect.ClassTag instead
+ def cm2[T](implicit evidence$1: ClassManifest[T]) = ???
+ ^
+classmanifests_new_deprecations.scala:4: error: type ClassManifest in object Predef is deprecated: Use scala.reflect.ClassTag instead
+ val cm3: ClassManifest[Int] = null
+ ^
+classmanifests_new_deprecations.scala:4: error: type ClassManifest in object Predef is deprecated: Use scala.reflect.ClassTag instead
+ val cm3: ClassManifest[Int] = null
+ ^
+classmanifests_new_deprecations.scala:6: error: type ClassManifest in package reflect is deprecated: Use scala.reflect.ClassTag instead
+ def rcm1[T: scala.reflect.ClassManifest] = ???
+ ^
+classmanifests_new_deprecations.scala:7: error: type ClassManifest in package reflect is deprecated: Use scala.reflect.ClassTag instead
+ def rcm2[T](implicit evidence$1: scala.reflect.ClassManifest[T]) = ???
+ ^
+classmanifests_new_deprecations.scala:8: error: type ClassManifest in package reflect is deprecated: Use scala.reflect.ClassTag instead
+ val rcm3: scala.reflect.ClassManifest[Int] = null
+ ^
+classmanifests_new_deprecations.scala:8: error: type ClassManifest in package reflect is deprecated: Use scala.reflect.ClassTag instead
+ val rcm3: scala.reflect.ClassManifest[Int] = null
+ ^
+classmanifests_new_deprecations.scala:10: error: type ClassManifest in object Predef is deprecated: Use scala.reflect.ClassTag instead
+ type CM[T] = ClassManifest[T]
+ ^
+classmanifests_new_deprecations.scala:15: error: type ClassManifest in package reflect is deprecated: Use scala.reflect.ClassTag instead
+ type RCM[T] = scala.reflect.ClassManifest[T]
+ ^
+classmanifests_new_deprecations.scala:20: error: type Manifest in object Predef is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
+ def m1[T: Manifest] = ???
+ ^
+classmanifests_new_deprecations.scala:21: error: type Manifest in object Predef is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
+ def m2[T](implicit evidence$1: Manifest[T]) = ???
+ ^
+classmanifests_new_deprecations.scala:22: error: type Manifest in object Predef is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
+ val m3: Manifest[Int] = null
+ ^
+classmanifests_new_deprecations.scala:22: error: type Manifest in object Predef is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
+ val m3: Manifest[Int] = null
+ ^
+classmanifests_new_deprecations.scala:24: error: trait Manifest in package reflect is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
+ def rm1[T: scala.reflect.Manifest] = ???
+ ^
+classmanifests_new_deprecations.scala:25: error: trait Manifest in package reflect is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
+ def rm2[T](implicit evidence$1: scala.reflect.Manifest[T]) = ???
+ ^
+classmanifests_new_deprecations.scala:26: error: trait Manifest in package reflect is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
+ val rm3: scala.reflect.Manifest[Int] = null
+ ^
+classmanifests_new_deprecations.scala:26: error: trait Manifest in package reflect is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
+ val rm3: scala.reflect.Manifest[Int] = null
+ ^
+classmanifests_new_deprecations.scala:28: error: type Manifest in object Predef is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
+ type M[T] = Manifest[T]
+ ^
+classmanifests_new_deprecations.scala:33: error: trait Manifest in package reflect is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
+ type RM[T] = scala.reflect.Manifest[T]
+ ^
+20 errors found
diff --git a/test/files/neg/classtags_contextbound_a.check b/test/files/neg/classtags_contextbound_a.check
index f4b6ff5af1..5edb7f9a5a 100644
--- a/test/files/neg/classtags_contextbound_a.check
+++ b/test/files/neg/classtags_contextbound_a.check
@@ -1,4 +1,4 @@
-classtags_contextbound_a.scala:2: error: No ClassTag available for T
- def foo[T] = Array[T]()
- ^
-one error found
+classtags_contextbound_a.scala:2: error: No ClassTag available for T
+ def foo[T] = Array[T]()
+ ^
+one error found
diff --git a/test/files/neg/classtags_contextbound_b.check b/test/files/neg/classtags_contextbound_b.check
index e08ab504bc..e17ab8b0d1 100644
--- a/test/files/neg/classtags_contextbound_b.check
+++ b/test/files/neg/classtags_contextbound_b.check
@@ -1,4 +1,4 @@
-classtags_contextbound_b.scala:5: error: No ClassTag available for T
- def foo[T] = mkArray[T]
- ^
-one error found
+classtags_contextbound_b.scala:5: error: No ClassTag available for T
+ def foo[T] = mkArray[T]
+ ^
+one error found
diff --git a/test/files/neg/classtags_contextbound_c.check b/test/files/neg/classtags_contextbound_c.check
index f8768eea2b..e8666f7a10 100644
--- a/test/files/neg/classtags_contextbound_c.check
+++ b/test/files/neg/classtags_contextbound_c.check
@@ -1,4 +1,4 @@
-classtags_contextbound_c.scala:4: error: No ClassTag available for T
- def mkArray[T] = Array[T]()
- ^
-one error found
+classtags_contextbound_c.scala:4: error: No ClassTag available for T
+ def mkArray[T] = Array[T]()
+ ^
+one error found
diff --git a/test/files/neg/classtags_dont_use_typetags.check b/test/files/neg/classtags_dont_use_typetags.check
index 24585e7c3f..4f728d267d 100644
--- a/test/files/neg/classtags_dont_use_typetags.check
+++ b/test/files/neg/classtags_dont_use_typetags.check
@@ -1,4 +1,4 @@
-classtags_dont_use_typetags.scala:4: error: No ClassTag available for T
- def foo[T: TypeTag] = Array[T]()
- ^
-one error found
+classtags_dont_use_typetags.scala:4: error: No ClassTag available for T
+ def foo[T: TypeTag] = Array[T]()
+ ^
+one error found
diff --git a/test/files/neg/deadline-inf-illegal.check b/test/files/neg/deadline-inf-illegal.check
index 2b9b25e48e..530d2b2443 100644
--- a/test/files/neg/deadline-inf-illegal.check
+++ b/test/files/neg/deadline-inf-illegal.check
@@ -1,15 +1,15 @@
-deadline-inf-illegal.scala:5: error: value fromNow is not a member of scala.concurrent.util.Duration
+deadline-inf-illegal.scala:5: error: value fromNow is not a member of scala.concurrent.duration.Duration
d.fromNow
^
deadline-inf-illegal.scala:6: error: type mismatch;
- found : scala.concurrent.util.Duration
- required: scala.concurrent.util.FiniteDuration
+ found : scala.concurrent.duration.Duration
+ required: scala.concurrent.duration.FiniteDuration
Deadline.now + d
^
deadline-inf-illegal.scala:7: error: overloaded method value - with alternatives:
- (other: scala.concurrent.util.Deadline)scala.concurrent.util.FiniteDuration <and>
- (other: scala.concurrent.util.FiniteDuration)scala.concurrent.util.Deadline
- cannot be applied to (scala.concurrent.util.Duration)
+ (other: scala.concurrent.duration.Deadline)scala.concurrent.duration.FiniteDuration <and>
+ (other: scala.concurrent.duration.FiniteDuration)scala.concurrent.duration.Deadline
+ cannot be applied to (scala.concurrent.duration.Duration)
Deadline.now - d
^
three errors found
diff --git a/test/files/neg/deadline-inf-illegal.scala b/test/files/neg/deadline-inf-illegal.scala
index 161089bfee..942cea7014 100644
--- a/test/files/neg/deadline-inf-illegal.scala
+++ b/test/files/neg/deadline-inf-illegal.scala
@@ -1,4 +1,4 @@
-import concurrent.util.{ Deadline, Duration }
+import concurrent.duration.{ Deadline, Duration }
class T {
val d: Duration = Duration.Zero
diff --git a/test/files/neg/interop_abstypetags_arenot_classmanifests.check b/test/files/neg/interop_abstypetags_arenot_classmanifests.check
index 15bdcfc5b1..d15e33346c 100644
--- a/test/files/neg/interop_abstypetags_arenot_classmanifests.check
+++ b/test/files/neg/interop_abstypetags_arenot_classmanifests.check
@@ -1,4 +1,4 @@
-interop_abstypetags_arenot_classmanifests.scala:5: error: No ClassManifest available for T.
- println(classManifest[T])
- ^
-one error found
+interop_abstypetags_arenot_classmanifests.scala:5: error: No ClassManifest available for T.
+ println(classManifest[T])
+ ^
+one error found
diff --git a/test/files/neg/interop_abstypetags_arenot_classtags.check b/test/files/neg/interop_abstypetags_arenot_classtags.check
index 637db83e57..3aa7a50b50 100644
--- a/test/files/neg/interop_abstypetags_arenot_classtags.check
+++ b/test/files/neg/interop_abstypetags_arenot_classtags.check
@@ -1,4 +1,4 @@
-interop_abstypetags_arenot_classtags.scala:6: error: No ClassTag available for T
- println(classTag[T])
- ^
-one error found
+interop_abstypetags_arenot_classtags.scala:6: error: No ClassTag available for T
+ println(classTag[T])
+ ^
+one error found
diff --git a/test/files/neg/interop_abstypetags_arenot_manifests.check b/test/files/neg/interop_abstypetags_arenot_manifests.check
index c80635543f..5916b68742 100644
--- a/test/files/neg/interop_abstypetags_arenot_manifests.check
+++ b/test/files/neg/interop_abstypetags_arenot_manifests.check
@@ -1,4 +1,4 @@
-interop_abstypetags_arenot_manifests.scala:5: error: No Manifest available for T.
- println(manifest[T])
- ^
-one error found
+interop_abstypetags_arenot_manifests.scala:5: error: No Manifest available for T.
+ println(manifest[T])
+ ^
+one error found
diff --git a/test/files/neg/interop_classmanifests_arenot_typetags.check b/test/files/neg/interop_classmanifests_arenot_typetags.check
index 6675fd9eae..db8e57981a 100644
--- a/test/files/neg/interop_classmanifests_arenot_typetags.check
+++ b/test/files/neg/interop_classmanifests_arenot_typetags.check
@@ -1,4 +1,4 @@
-interop_classmanifests_arenot_typetags.scala:5: error: No TypeTag available for T
- println(implicitly[TypeTag[T]])
- ^
-one error found
+interop_classmanifests_arenot_typetags.scala:5: error: No TypeTag available for T
+ println(implicitly[TypeTag[T]])
+ ^
+one error found
diff --git a/test/files/neg/interop_classtags_arenot_manifests.check b/test/files/neg/interop_classtags_arenot_manifests.check
index 6982f0b805..fa805b5918 100644
--- a/test/files/neg/interop_classtags_arenot_manifests.check
+++ b/test/files/neg/interop_classtags_arenot_manifests.check
@@ -1,4 +1,4 @@
-interop_classtags_arenot_manifests.scala:5: error: No Manifest available for T.
- println(manifest[T])
- ^
-one error found
+interop_classtags_arenot_manifests.scala:5: error: No Manifest available for T.
+ println(manifest[T])
+ ^
+one error found
diff --git a/test/files/neg/interop_typetags_arenot_classmanifests.check b/test/files/neg/interop_typetags_arenot_classmanifests.check
index b404f94d69..88fb1647e5 100644
--- a/test/files/neg/interop_typetags_arenot_classmanifests.check
+++ b/test/files/neg/interop_typetags_arenot_classmanifests.check
@@ -1,4 +1,4 @@
-interop_typetags_arenot_classmanifests.scala:5: error: No ClassManifest available for T.
- println(classManifest[T])
- ^
-one error found
+interop_typetags_arenot_classmanifests.scala:5: error: No ClassManifest available for T.
+ println(classManifest[T])
+ ^
+one error found
diff --git a/test/files/neg/interop_typetags_arenot_classtags.check b/test/files/neg/interop_typetags_arenot_classtags.check
index 673ad2f941..1d1fb15f9e 100644
--- a/test/files/neg/interop_typetags_arenot_classtags.check
+++ b/test/files/neg/interop_typetags_arenot_classtags.check
@@ -1,4 +1,4 @@
-interop_typetags_arenot_classtags.scala:6: error: No ClassTag available for T
- println(classTag[T])
- ^
-one error found
+interop_typetags_arenot_classtags.scala:6: error: No ClassTag available for T
+ println(classTag[T])
+ ^
+one error found
diff --git a/test/files/neg/interop_typetags_without_classtags_arenot_manifests.check b/test/files/neg/interop_typetags_without_classtags_arenot_manifests.check
index a95f1ad308..ba744a8837 100644
--- a/test/files/neg/interop_typetags_without_classtags_arenot_manifests.check
+++ b/test/files/neg/interop_typetags_without_classtags_arenot_manifests.check
@@ -1,6 +1,6 @@
-interop_typetags_without_classtags_arenot_manifests.scala:6: error: to create a manifest here, it is necessary to interoperate with the type tag `evidence$1` in scope.
-however typetag -> manifest conversion requires a class tag for the corresponding type to be present.
-to proceed add a class tag to the type `T` (e.g. by introducing a context bound) and recompile.
- println(manifest[T])
- ^
-one error found
+interop_typetags_without_classtags_arenot_manifests.scala:6: error: to create a manifest here, it is necessary to interoperate with the type tag `evidence$1` in scope.
+however typetag -> manifest conversion requires a class tag for the corresponding type to be present.
+to proceed add a class tag to the type `T` (e.g. by introducing a context bound) and recompile.
+ println(manifest[T])
+ ^
+one error found
diff --git a/test/files/neg/macro-basic-mamdmi.check b/test/files/neg/macro-basic-mamdmi.check
index 67b00c0ec5..c7b58d70d2 100644
--- a/test/files/neg/macro-basic-mamdmi.check
+++ b/test/files/neg/macro-basic-mamdmi.check
@@ -1,4 +1,4 @@
-Impls_Macros_Test_1.scala:36: error: macro implementation not found: foo (the most common reason for that is that you cannot use macro implementations in the same compilation run that defines them)
- println(foo(2) + Macros.bar(2) * new Macros().quux(4))
- ^
-one error found
+Impls_Macros_Test_1.scala:36: error: macro implementation not found: foo (the most common reason for that is that you cannot use macro implementations in the same compilation run that defines them)
+ println(foo(2) + Macros.bar(2) * new Macros().quux(4))
+ ^
+one error found
diff --git a/test/files/neg/macro-deprecate-idents.check b/test/files/neg/macro-deprecate-idents.check
index f8a7e519df..22b667c390 100644
--- a/test/files/neg/macro-deprecate-idents.check
+++ b/test/files/neg/macro-deprecate-idents.check
@@ -1,52 +1,52 @@
-macro-deprecate-idents.scala:2: error: macro is now a reserved word; usage as an identifier is deprecated
- val macro = ???
- ^
-macro-deprecate-idents.scala:6: error: macro is now a reserved word; usage as an identifier is deprecated
- var macro = ???
- ^
-macro-deprecate-idents.scala:10: error: macro is now a reserved word; usage as an identifier is deprecated
- type macro = Int
- ^
-macro-deprecate-idents.scala:14: error: macro is now a reserved word; usage as an identifier is deprecated
- class macro
- ^
-macro-deprecate-idents.scala:18: error: macro is now a reserved word; usage as an identifier is deprecated
- class macro
- ^
-macro-deprecate-idents.scala:22: error: macro is now a reserved word; usage as an identifier is deprecated
- object macro
- ^
-macro-deprecate-idents.scala:26: error: macro is now a reserved word; usage as an identifier is deprecated
- object macro
- ^
-macro-deprecate-idents.scala:30: error: macro is now a reserved word; usage as an identifier is deprecated
- trait macro
- ^
-macro-deprecate-idents.scala:34: error: macro is now a reserved word; usage as an identifier is deprecated
- trait macro
- ^
-macro-deprecate-idents.scala:37: error: macro is now a reserved word; usage as an identifier is deprecated
-package macro {
- ^
-macro-deprecate-idents.scala:38: error: macro is now a reserved word; usage as an identifier is deprecated
- package macro.bar {
- ^
-macro-deprecate-idents.scala:43: error: macro is now a reserved word; usage as an identifier is deprecated
- package macro.foo {
- ^
-macro-deprecate-idents.scala:48: error: macro is now a reserved word; usage as an identifier is deprecated
- val Some(macro) = Some(42)
- ^
-macro-deprecate-idents.scala:49: error: macro is now a reserved word; usage as an identifier is deprecated
- macro match {
- ^
-macro-deprecate-idents.scala:50: error: macro is now a reserved word; usage as an identifier is deprecated
- case macro => println(macro)
- ^
-macro-deprecate-idents.scala:50: error: macro is now a reserved word; usage as an identifier is deprecated
- case macro => println(macro)
- ^
-macro-deprecate-idents.scala:55: error: macro is now a reserved word; usage as an identifier is deprecated
- def macro = 2
- ^
-17 errors found
+macro-deprecate-idents.scala:2: error: macro is now a reserved word; usage as an identifier is deprecated
+ val macro = ???
+ ^
+macro-deprecate-idents.scala:6: error: macro is now a reserved word; usage as an identifier is deprecated
+ var macro = ???
+ ^
+macro-deprecate-idents.scala:10: error: macro is now a reserved word; usage as an identifier is deprecated
+ type macro = Int
+ ^
+macro-deprecate-idents.scala:14: error: macro is now a reserved word; usage as an identifier is deprecated
+ class macro
+ ^
+macro-deprecate-idents.scala:18: error: macro is now a reserved word; usage as an identifier is deprecated
+ class macro
+ ^
+macro-deprecate-idents.scala:22: error: macro is now a reserved word; usage as an identifier is deprecated
+ object macro
+ ^
+macro-deprecate-idents.scala:26: error: macro is now a reserved word; usage as an identifier is deprecated
+ object macro
+ ^
+macro-deprecate-idents.scala:30: error: macro is now a reserved word; usage as an identifier is deprecated
+ trait macro
+ ^
+macro-deprecate-idents.scala:34: error: macro is now a reserved word; usage as an identifier is deprecated
+ trait macro
+ ^
+macro-deprecate-idents.scala:37: error: macro is now a reserved word; usage as an identifier is deprecated
+package macro {
+ ^
+macro-deprecate-idents.scala:38: error: macro is now a reserved word; usage as an identifier is deprecated
+ package macro.bar {
+ ^
+macro-deprecate-idents.scala:43: error: macro is now a reserved word; usage as an identifier is deprecated
+ package macro.foo {
+ ^
+macro-deprecate-idents.scala:48: error: macro is now a reserved word; usage as an identifier is deprecated
+ val Some(macro) = Some(42)
+ ^
+macro-deprecate-idents.scala:49: error: macro is now a reserved word; usage as an identifier is deprecated
+ macro match {
+ ^
+macro-deprecate-idents.scala:50: error: macro is now a reserved word; usage as an identifier is deprecated
+ case macro => println(macro)
+ ^
+macro-deprecate-idents.scala:50: error: macro is now a reserved word; usage as an identifier is deprecated
+ case macro => println(macro)
+ ^
+macro-deprecate-idents.scala:55: error: macro is now a reserved word; usage as an identifier is deprecated
+ def macro = 2
+ ^
+17 errors found
diff --git a/test/files/neg/macro-invalidimpl-a.check b/test/files/neg/macro-invalidimpl-a.check
index 855fe2d169..7f11f3b865 100644
--- a/test/files/neg/macro-invalidimpl-a.check
+++ b/test/files/neg/macro-invalidimpl-a.check
@@ -1,4 +1,4 @@
-Macros_Test_2.scala:3: error: macro implementation must be in statically accessible object
- def foo(x: Any) = macro impls.foo
- ^
-one error found
+Macros_Test_2.scala:3: error: macro implementation must be in statically accessible object
+ def foo(x: Any) = macro impls.foo
+ ^
+one error found
diff --git a/test/files/neg/macro-invalidimpl-b.check b/test/files/neg/macro-invalidimpl-b.check
index 855fe2d169..7f11f3b865 100644
--- a/test/files/neg/macro-invalidimpl-b.check
+++ b/test/files/neg/macro-invalidimpl-b.check
@@ -1,4 +1,4 @@
-Macros_Test_2.scala:3: error: macro implementation must be in statically accessible object
- def foo(x: Any) = macro impls.foo
- ^
-one error found
+Macros_Test_2.scala:3: error: macro implementation must be in statically accessible object
+ def foo(x: Any) = macro impls.foo
+ ^
+one error found
diff --git a/test/files/neg/macro-invalidimpl-c.check b/test/files/neg/macro-invalidimpl-c.check
index 722ec3c7bd..9e0181c0a3 100644
--- a/test/files/neg/macro-invalidimpl-c.check
+++ b/test/files/neg/macro-invalidimpl-c.check
@@ -1,4 +1,4 @@
-Impls_Macros_1.scala:8: error: macro implementation must be in statically accessible object
- def foo(x: Any) = macro Impls.foo
- ^
-one error found
+Impls_Macros_1.scala:8: error: macro implementation must be in statically accessible object
+ def foo(x: Any) = macro Impls.foo
+ ^
+one error found
diff --git a/test/files/neg/macro-invalidimpl-d.check b/test/files/neg/macro-invalidimpl-d.check
index 6fedfa74fc..76a5ba9c8c 100644
--- a/test/files/neg/macro-invalidimpl-d.check
+++ b/test/files/neg/macro-invalidimpl-d.check
@@ -1,4 +1,4 @@
-Macros_Test_2.scala:2: error: macro implementation must be in statically accessible object
- def foo(x: Any) = macro Impls.foo
- ^
-one error found
+Macros_Test_2.scala:2: error: macro implementation must be in statically accessible object
+ def foo(x: Any) = macro Impls.foo
+ ^
+one error found
diff --git a/test/files/neg/macro-invalidimpl-e.check b/test/files/neg/macro-invalidimpl-e.check
index 5cfcf85625..e0910b2899 100644
--- a/test/files/neg/macro-invalidimpl-e.check
+++ b/test/files/neg/macro-invalidimpl-e.check
@@ -1,13 +1,13 @@
-Macros_Test_2.scala:2: error: ambiguous reference to overloaded definition,
-both method foo in object Impls of type (c: scala.reflect.macros.Context)(x: c.Expr[Any], y: c.Expr[Any])Nothing
-and method foo in object Impls of type (c: scala.reflect.macros.Context)(x: c.Expr[Any])Nothing
-match expected type ?
- def foo(x: Any) = macro Impls.foo
- ^
-Macros_Test_2.scala:3: error: ambiguous reference to overloaded definition,
-both method foo in object Impls of type (c: scala.reflect.macros.Context)(x: c.Expr[Any], y: c.Expr[Any])Nothing
-and method foo in object Impls of type (c: scala.reflect.macros.Context)(x: c.Expr[Any])Nothing
-match expected type ?
- def foo(x: Any, y: Any) = macro Impls.foo
- ^
-two errors found
+Macros_Test_2.scala:2: error: ambiguous reference to overloaded definition,
+both method foo in object Impls of type (c: scala.reflect.macros.Context)(x: c.Expr[Any], y: c.Expr[Any])Nothing
+and method foo in object Impls of type (c: scala.reflect.macros.Context)(x: c.Expr[Any])Nothing
+match expected type ?
+ def foo(x: Any) = macro Impls.foo
+ ^
+Macros_Test_2.scala:3: error: ambiguous reference to overloaded definition,
+both method foo in object Impls of type (c: scala.reflect.macros.Context)(x: c.Expr[Any], y: c.Expr[Any])Nothing
+and method foo in object Impls of type (c: scala.reflect.macros.Context)(x: c.Expr[Any])Nothing
+match expected type ?
+ def foo(x: Any, y: Any) = macro Impls.foo
+ ^
+two errors found
diff --git a/test/files/neg/macro-invalidimpl-f.check b/test/files/neg/macro-invalidimpl-f.check
index 14f1e25287..4e5851f566 100644
--- a/test/files/neg/macro-invalidimpl-f.check
+++ b/test/files/neg/macro-invalidimpl-f.check
@@ -1,7 +1,7 @@
-Macros_Test_2.scala:2: error: macro implementation has wrong shape:
- required: (c: scala.reflect.macros.Context)(): c.Expr[Unit]
- found : (c: scala.reflect.macros.Context): c.Expr[Unit]
-number of parameter sections differ
- def bar1() = macro Impls.fooNullary
- ^
-one error found
+Macros_Test_2.scala:2: error: macro implementation has wrong shape:
+ required: (c: scala.reflect.macros.Context)(): c.Expr[Unit]
+ found : (c: scala.reflect.macros.Context): c.Expr[Unit]
+number of parameter sections differ
+ def bar1() = macro Impls.fooNullary
+ ^
+one error found
diff --git a/test/files/neg/macro-invalidimpl-g.check b/test/files/neg/macro-invalidimpl-g.check
index a886436d35..7342f7336f 100644
--- a/test/files/neg/macro-invalidimpl-g.check
+++ b/test/files/neg/macro-invalidimpl-g.check
@@ -1,7 +1,7 @@
-Macros_Test_2.scala:2: error: macro implementation has wrong shape:
- required: (c: scala.reflect.macros.Context): c.Expr[Unit]
- found : (c: scala.reflect.macros.Context)(): c.Expr[Unit]
-number of parameter sections differ
- def foo1 = macro Impls.fooEmpty
- ^
-one error found
+Macros_Test_2.scala:2: error: macro implementation has wrong shape:
+ required: (c: scala.reflect.macros.Context): c.Expr[Unit]
+ found : (c: scala.reflect.macros.Context)(): c.Expr[Unit]
+number of parameter sections differ
+ def foo1 = macro Impls.fooEmpty
+ ^
+one error found
diff --git a/test/files/neg/macro-invalidimpl-h.check b/test/files/neg/macro-invalidimpl-h.check
index cc7fc794d3..ea76e1aeac 100644
--- a/test/files/neg/macro-invalidimpl-h.check
+++ b/test/files/neg/macro-invalidimpl-h.check
@@ -1,4 +1,4 @@
-Macros_Test_2.scala:2: error: type arguments [String] do not conform to method foo's type parameter bounds [U <: Int]
- def foo = macro Impls.foo[String]
- ^
-one error found
+Macros_Test_2.scala:2: error: type arguments [String] do not conform to method foo's type parameter bounds [U <: Int]
+ def foo = macro Impls.foo[String]
+ ^
+one error found
diff --git a/test/files/neg/macro-invalidimpl-i.check b/test/files/neg/macro-invalidimpl-i.check
index b6277809a3..846ed8d134 100644
--- a/test/files/neg/macro-invalidimpl-i.check
+++ b/test/files/neg/macro-invalidimpl-i.check
@@ -1,4 +1,4 @@
-Macros_Test_2.scala:4: error: macro implementation must be public
- def foo = macro Impls.impl
- ^
-one error found
+Macros_Test_2.scala:4: error: macro implementation must be public
+ def foo = macro Impls.impl
+ ^
+one error found
diff --git a/test/files/neg/macro-invalidret-nontree.check b/test/files/neg/macro-invalidret-nontree.check
index 78ab08df3e..6d8336d06d 100644
--- a/test/files/neg/macro-invalidret-nontree.check
+++ b/test/files/neg/macro-invalidret-nontree.check
@@ -1,7 +1,7 @@
-Macros_Test_2.scala:2: error: macro implementation has wrong shape:
- required: (c: scala.reflect.macros.Context): c.Expr[Any]
- found : (c: scala.reflect.macros.Context): Int
-type mismatch for return type: Int does not conform to c.Expr[Any]
- def foo = macro Impls.foo
- ^
-one error found
+Macros_Test_2.scala:2: error: macro implementation has wrong shape:
+ required: (c: scala.reflect.macros.Context): c.Expr[Any]
+ found : (c: scala.reflect.macros.Context): Int
+type mismatch for return type: Int does not conform to c.Expr[Any]
+ def foo = macro Impls.foo
+ ^
+one error found
diff --git a/test/files/neg/macro-invalidret-nonuniversetree.check b/test/files/neg/macro-invalidret-nonuniversetree.check
index b3a4d0da80..089bfd0dc9 100644
--- a/test/files/neg/macro-invalidret-nonuniversetree.check
+++ b/test/files/neg/macro-invalidret-nonuniversetree.check
@@ -1,7 +1,7 @@
-Macros_Test_2.scala:2: error: macro implementation has wrong shape:
- required: (c: scala.reflect.macros.Context): c.Expr[Any]
- found : (c: scala.reflect.macros.Context): reflect.runtime.universe.Literal
-type mismatch for return type: reflect.runtime.universe.Literal does not conform to c.Expr[Any]
- def foo = macro Impls.foo
- ^
-one error found
+Macros_Test_2.scala:2: error: macro implementation has wrong shape:
+ required: (c: scala.reflect.macros.Context): c.Expr[Any]
+ found : (c: scala.reflect.macros.Context): reflect.runtime.universe.Literal
+type mismatch for return type: reflect.runtime.universe.Literal does not conform to c.Expr[Any]
+ def foo = macro Impls.foo
+ ^
+one error found
diff --git a/test/files/neg/macro-invalidshape-a.check b/test/files/neg/macro-invalidshape-a.check
index 098ec35a00..f38a90819e 100644
--- a/test/files/neg/macro-invalidshape-a.check
+++ b/test/files/neg/macro-invalidshape-a.check
@@ -1,5 +1,5 @@
-Macros_Test_2.scala:2: error: macro body has wrong shape:
- required: macro [<implementation object>].<method name>[[<type args>]]
- def foo(x: Any) = macro 2
- ^
-one error found
+Macros_Test_2.scala:2: error: macro body has wrong shape:
+ required: macro [<implementation object>].<method name>[[<type args>]]
+ def foo(x: Any) = macro 2
+ ^
+one error found
diff --git a/test/files/neg/macro-invalidshape-b.check b/test/files/neg/macro-invalidshape-b.check
index 297ff69199..976685c6bd 100644
--- a/test/files/neg/macro-invalidshape-b.check
+++ b/test/files/neg/macro-invalidshape-b.check
@@ -1,5 +1,5 @@
-Macros_Test_2.scala:2: error: macro body has wrong shape:
- required: macro [<implementation object>].<method name>[[<type args>]]
- def foo(x: Any) = macro Impls.foo(null)(null)
- ^
-one error found
+Macros_Test_2.scala:2: error: macro body has wrong shape:
+ required: macro [<implementation object>].<method name>[[<type args>]]
+ def foo(x: Any) = macro Impls.foo(null)(null)
+ ^
+one error found
diff --git a/test/files/neg/macro-invalidshape-c.check b/test/files/neg/macro-invalidshape-c.check
index 6513df166e..0b2e9cfe4f 100644
--- a/test/files/neg/macro-invalidshape-c.check
+++ b/test/files/neg/macro-invalidshape-c.check
@@ -1,9 +1,9 @@
-Macros_Test_2.scala:2: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
- def foo(x: Any) = macro {2; Impls.foo}
- ^
-Macros_Test_2.scala:2: error: missing arguments for method foo in object Impls;
-follow this method with `_' if you want to treat it as a partially applied function
- def foo(x: Any) = macro {2; Impls.foo}
- ^
-one warning found
-one error found
+Macros_Test_2.scala:2: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
+ def foo(x: Any) = macro {2; Impls.foo}
+ ^
+Macros_Test_2.scala:2: error: missing arguments for method foo in object Impls;
+follow this method with `_' if you want to treat it as a partially applied function
+ def foo(x: Any) = macro {2; Impls.foo}
+ ^
+one warning found
+one error found
diff --git a/test/files/neg/macro-invalidshape-d.check b/test/files/neg/macro-invalidshape-d.check
index f0d77e2f2d..e43a2ca0ab 100644
--- a/test/files/neg/macro-invalidshape-d.check
+++ b/test/files/neg/macro-invalidshape-d.check
@@ -1,8 +1,8 @@
-Macros_Test_2.scala:2: warning: macro is now a reserved word; usage as an identifier is deprecated
- def foo(x: Any) = {2; macro Impls.foo}
- ^
-Macros_Test_2.scala:2: error: ';' expected but '.' found.
- def foo(x: Any) = {2; macro Impls.foo}
- ^
-one warning found
-one error found
+Macros_Test_2.scala:2: warning: macro is now a reserved word; usage as an identifier is deprecated
+ def foo(x: Any) = {2; macro Impls.foo}
+ ^
+Macros_Test_2.scala:2: error: ';' expected but '.' found.
+ def foo(x: Any) = {2; macro Impls.foo}
+ ^
+one warning found
+one error found
diff --git a/test/files/neg/macro-invalidsig-context-bounds.check b/test/files/neg/macro-invalidsig-context-bounds.check
index eb5d833bc0..43b8c23b35 100644
--- a/test/files/neg/macro-invalidsig-context-bounds.check
+++ b/test/files/neg/macro-invalidsig-context-bounds.check
@@ -1,7 +1,7 @@
-Macros_Test_1.scala:2: error: macro implementation has wrong shape:
- required: (c: scala.reflect.macros.Context): c.Expr[Any]
- found : (c: scala.reflect.macros.Context)(implicit evidence$2: Numeric[U]): c.universe.Literal
-macro implementations cannot have implicit parameters other than WeakTypeTag evidences
- def foo[U] = macro Impls.foo[U]
- ^
-one error found
+Macros_Test_1.scala:2: error: macro implementation has wrong shape:
+ required: (c: scala.reflect.macros.Context): c.Expr[Any]
+ found : (c: scala.reflect.macros.Context)(implicit evidence$2: Numeric[U]): c.universe.Literal
+macro implementations cannot have implicit parameters other than WeakTypeTag evidences
+ def foo[U] = macro Impls.foo[U]
+ ^
+one error found
diff --git a/test/files/neg/macro-invalidsig-ctx-badargc.check b/test/files/neg/macro-invalidsig-ctx-badargc.check
index 8a1ca6a8b1..1c14072a94 100644
--- a/test/files/neg/macro-invalidsig-ctx-badargc.check
+++ b/test/files/neg/macro-invalidsig-ctx-badargc.check
@@ -1,7 +1,7 @@
-Macros_Test_2.scala:2: error: macro implementation has wrong shape:
- required: (c: scala.reflect.macros.Context): c.Expr[Any]
- found : : Nothing
-number of parameter sections differ
- def foo = macro Impls.foo
- ^
-one error found
+Macros_Test_2.scala:2: error: macro implementation has wrong shape:
+ required: (c: scala.reflect.macros.Context): c.Expr[Any]
+ found : : Nothing
+number of parameter sections differ
+ def foo = macro Impls.foo
+ ^
+one error found
diff --git a/test/files/neg/macro-invalidsig-ctx-badtype.check b/test/files/neg/macro-invalidsig-ctx-badtype.check
index 9e57ab8631..340ace6a38 100644
--- a/test/files/neg/macro-invalidsig-ctx-badtype.check
+++ b/test/files/neg/macro-invalidsig-ctx-badtype.check
@@ -1,7 +1,7 @@
-Macros_Test_2.scala:2: error: macro implementation has wrong shape:
- required: (c: scala.reflect.macros.Context): c.Expr[Any]
- found : (c: scala.reflect.api.Universe): Nothing
-type mismatch for parameter c: scala.reflect.macros.Context does not conform to scala.reflect.api.Universe
- def foo = macro Impls.foo
- ^
-one error found
+Macros_Test_2.scala:2: error: macro implementation has wrong shape:
+ required: (c: scala.reflect.macros.Context): c.Expr[Any]
+ found : (c: scala.reflect.api.Universe): Nothing
+type mismatch for parameter c: scala.reflect.macros.Context does not conform to scala.reflect.api.Universe
+ def foo = macro Impls.foo
+ ^
+one error found
diff --git a/test/files/neg/macro-invalidsig-ctx-badvarargs.check b/test/files/neg/macro-invalidsig-ctx-badvarargs.check
index 37941a7dc9..a6478f03e3 100644
--- a/test/files/neg/macro-invalidsig-ctx-badvarargs.check
+++ b/test/files/neg/macro-invalidsig-ctx-badvarargs.check
@@ -1,7 +1,7 @@
-Macros_Test_2.scala:2: error: macro implementation has wrong shape:
- required: (c: scala.reflect.macros.Context): c.Expr[Any]
- found : (cs: scala.reflect.macros.Context*): Nothing
-types incompatible for parameter cs: corresponding is not a vararg parameter
- def foo = macro Impls.foo
- ^
-one error found
+Macros_Test_2.scala:2: error: macro implementation has wrong shape:
+ required: (c: scala.reflect.macros.Context): c.Expr[Any]
+ found : (cs: scala.reflect.macros.Context*): Nothing
+types incompatible for parameter cs: corresponding is not a vararg parameter
+ def foo = macro Impls.foo
+ ^
+one error found
diff --git a/test/files/neg/macro-invalidsig-ctx-noctx.check b/test/files/neg/macro-invalidsig-ctx-noctx.check
index 722fe9dfb6..b7dc9a449b 100644
--- a/test/files/neg/macro-invalidsig-ctx-noctx.check
+++ b/test/files/neg/macro-invalidsig-ctx-noctx.check
@@ -1,7 +1,7 @@
-Macros_Test_2.scala:2: error: macro implementation has wrong shape:
- required: (c: scala.reflect.macros.Context)(x: c.Expr[Any]): c.Expr[Any]
- found : (c: scala.reflect.macros.Context): Nothing
-number of parameter sections differ
- def foo(x: Any) = macro Impls.foo
- ^
-one error found
+Macros_Test_2.scala:2: error: macro implementation has wrong shape:
+ required: (c: scala.reflect.macros.Context)(x: c.Expr[Any]): c.Expr[Any]
+ found : (c: scala.reflect.macros.Context): Nothing
+number of parameter sections differ
+ def foo(x: Any) = macro Impls.foo
+ ^
+one error found
diff --git a/test/files/neg/macro-invalidsig-implicit-params.check b/test/files/neg/macro-invalidsig-implicit-params.check
index ca35e62cd7..f210eb8a32 100644
--- a/test/files/neg/macro-invalidsig-implicit-params.check
+++ b/test/files/neg/macro-invalidsig-implicit-params.check
@@ -1,7 +1,7 @@
-Impls_Macros_1.scala:18: error: macro implementation has wrong shape:
- required: (c: scala.reflect.macros.Context)(x: c.Expr[Int]): c.Expr[Unit]
- found : (c: scala.reflect.macros.Context)(implicit x: c.Expr[Int]): c.Expr[Unit]
-macro implementations cannot have implicit parameters other than WeakTypeTag evidences
- def foo_targs[U](x: Int) = macro Impls.foo_targs[T, U]
- ^
-one error found
+Impls_Macros_1.scala:18: error: macro implementation has wrong shape:
+ required: (c: scala.reflect.macros.Context)(x: c.Expr[Int]): c.Expr[Unit]
+ found : (c: scala.reflect.macros.Context)(implicit x: c.Expr[Int]): c.Expr[Unit]
+macro implementations cannot have implicit parameters other than WeakTypeTag evidences
+ def foo_targs[U](x: Int) = macro Impls.foo_targs[T, U]
+ ^
+one error found
diff --git a/test/files/neg/macro-invalidsig-params-badargc.check b/test/files/neg/macro-invalidsig-params-badargc.check
index ab4fb535c5..3f6d815b8e 100644
--- a/test/files/neg/macro-invalidsig-params-badargc.check
+++ b/test/files/neg/macro-invalidsig-params-badargc.check
@@ -1,7 +1,7 @@
-Impls_Macros_1.scala:8: error: macro implementation has wrong shape:
- required: (c: scala.reflect.macros.Context)(x: c.Expr[Int]): c.Expr[Any]
- found : (c: scala.reflect.macros.Context)(x: c.Expr[Int], y: c.Expr[Int]): Nothing
-parameter lists have different length, found extra parameter y: c.Expr[Int]
- def foo(x: Int) = macro Impls.foo
- ^
-one error found
+Impls_Macros_1.scala:8: error: macro implementation has wrong shape:
+ required: (c: scala.reflect.macros.Context)(x: c.Expr[Int]): c.Expr[Any]
+ found : (c: scala.reflect.macros.Context)(x: c.Expr[Int], y: c.Expr[Int]): Nothing
+parameter lists have different length, found extra parameter y: c.Expr[Int]
+ def foo(x: Int) = macro Impls.foo
+ ^
+one error found
diff --git a/test/files/neg/macro-invalidsig-params-badtype.check b/test/files/neg/macro-invalidsig-params-badtype.check
index 007620a366..3ec40d7e5b 100644
--- a/test/files/neg/macro-invalidsig-params-badtype.check
+++ b/test/files/neg/macro-invalidsig-params-badtype.check
@@ -1,7 +1,7 @@
-Impls_Macros_1.scala:8: error: macro implementation has wrong shape:
- required: (c: scala.reflect.macros.Context)(x: c.Expr[Int]): c.Expr[Any]
- found : (c: scala.reflect.macros.Context)(x: c.universe.Tree): Nothing
-type mismatch for parameter x: c.Expr[Int] does not conform to c.universe.Tree
- def foo(x: Int) = macro Impls.foo
- ^
-one error found
+Impls_Macros_1.scala:8: error: macro implementation has wrong shape:
+ required: (c: scala.reflect.macros.Context)(x: c.Expr[Int]): c.Expr[Any]
+ found : (c: scala.reflect.macros.Context)(x: c.universe.Tree): Nothing
+type mismatch for parameter x: c.Expr[Int] does not conform to c.universe.Tree
+ def foo(x: Int) = macro Impls.foo
+ ^
+one error found
diff --git a/test/files/neg/macro-invalidsig-params-badvarargs.check b/test/files/neg/macro-invalidsig-params-badvarargs.check
index f0dcc24d03..50607ff52d 100644
--- a/test/files/neg/macro-invalidsig-params-badvarargs.check
+++ b/test/files/neg/macro-invalidsig-params-badvarargs.check
@@ -1,7 +1,7 @@
-Impls_Macros_1.scala:8: error: macro implementation has wrong shape:
- required: (c: scala.reflect.macros.Context)(x: c.Expr[Int], y: c.Expr[Int]): c.Expr[Any]
- found : (c: scala.reflect.macros.Context)(xs: c.Expr[Int]*): Nothing
-parameter lists have different length, required extra parameter y: c.Expr[Int]
- def foo(x: Int, y: Int) = macro Impls.foo
- ^
-one error found
+Impls_Macros_1.scala:8: error: macro implementation has wrong shape:
+ required: (c: scala.reflect.macros.Context)(x: c.Expr[Int], y: c.Expr[Int]): c.Expr[Any]
+ found : (c: scala.reflect.macros.Context)(xs: c.Expr[Int]*): Nothing
+parameter lists have different length, required extra parameter y: c.Expr[Int]
+ def foo(x: Int, y: Int) = macro Impls.foo
+ ^
+one error found
diff --git a/test/files/neg/macro-invalidsig-params-namemismatch.check b/test/files/neg/macro-invalidsig-params-namemismatch.check
index 00d781a2ac..4029bc8129 100644
--- a/test/files/neg/macro-invalidsig-params-namemismatch.check
+++ b/test/files/neg/macro-invalidsig-params-namemismatch.check
@@ -1,7 +1,7 @@
-Impls_Macros_1.scala:8: error: macro implementation has wrong shape:
- required: (c: scala.reflect.macros.Context)(x: c.Expr[Int], y: c.Expr[Int]): c.Expr[Any]
- found : (c: scala.reflect.macros.Context)(y: c.Expr[Int], x: c.Expr[Int]): Nothing
-parameter names differ: x != y
- def foo(x: Int, y: Int) = macro Impls.foo
- ^
-one error found
+Impls_Macros_1.scala:8: error: macro implementation has wrong shape:
+ required: (c: scala.reflect.macros.Context)(x: c.Expr[Int], y: c.Expr[Int]): c.Expr[Any]
+ found : (c: scala.reflect.macros.Context)(y: c.Expr[Int], x: c.Expr[Int]): Nothing
+parameter names differ: x != y
+ def foo(x: Int, y: Int) = macro Impls.foo
+ ^
+one error found
diff --git a/test/files/neg/macro-invalidsig-tparams-badtype.check b/test/files/neg/macro-invalidsig-tparams-badtype.check
index 20c58ff2bb..e9f3547133 100644
--- a/test/files/neg/macro-invalidsig-tparams-badtype.check
+++ b/test/files/neg/macro-invalidsig-tparams-badtype.check
@@ -1,7 +1,7 @@
-Macros_Test_2.scala:2: error: macro implementation has wrong shape:
- required: (c: scala.reflect.macros.Context): c.Expr[Any]
- found : (c: scala.reflect.macros.Context)(U: c.universe.Type): Nothing
-number of parameter sections differ
- def foo[U] = macro Impls.foo[U]
- ^
-one error found
+Macros_Test_2.scala:2: error: macro implementation has wrong shape:
+ required: (c: scala.reflect.macros.Context): c.Expr[Any]
+ found : (c: scala.reflect.macros.Context)(U: c.universe.Type): Nothing
+number of parameter sections differ
+ def foo[U] = macro Impls.foo[U]
+ ^
+one error found
diff --git a/test/files/neg/macro-invalidsig-tparams-bounds-a.check b/test/files/neg/macro-invalidsig-tparams-bounds-a.check
index 6ba80b45c0..b6248a1c47 100644
--- a/test/files/neg/macro-invalidsig-tparams-bounds-a.check
+++ b/test/files/neg/macro-invalidsig-tparams-bounds-a.check
@@ -1,4 +1,4 @@
-Macros_Test_2.scala:2: error: type arguments [U] do not conform to method foo's type parameter bounds [U <: String]
- def foo[U] = macro Impls.foo[U]
- ^
-one error found
+Macros_Test_2.scala:2: error: type arguments [U] do not conform to method foo's type parameter bounds [U <: String]
+ def foo[U] = macro Impls.foo[U]
+ ^
+one error found
diff --git a/test/files/neg/macro-invalidsig-tparams-bounds-b.check b/test/files/neg/macro-invalidsig-tparams-bounds-b.check
index 50f0944acc..74eb522cdd 100644
--- a/test/files/neg/macro-invalidsig-tparams-bounds-b.check
+++ b/test/files/neg/macro-invalidsig-tparams-bounds-b.check
@@ -1,4 +1,4 @@
-Macros_Test_2.scala:2: error: type arguments [U] do not conform to method foo's type parameter bounds [U <: String]
- def foo[U <: Int] = macro Impls.foo[U]
- ^
-one error found
+Macros_Test_2.scala:2: error: type arguments [U] do not conform to method foo's type parameter bounds [U <: String]
+ def foo[U <: Int] = macro Impls.foo[U]
+ ^
+one error found
diff --git a/test/files/neg/macro-invalidsig-tparams-notparams-a.check b/test/files/neg/macro-invalidsig-tparams-notparams-a.check
index 5404c185f3..61a5628b7e 100644
--- a/test/files/neg/macro-invalidsig-tparams-notparams-a.check
+++ b/test/files/neg/macro-invalidsig-tparams-notparams-a.check
@@ -1,4 +1,4 @@
-Macros_Test_2.scala:2: error: wrong number of type parameters for method foo: [U](c: scala.reflect.macros.Context)(implicit evidence$1: c.WeakTypeTag[U])Nothing
- def foo = macro Impls.foo
- ^
-one error found
+Macros_Test_2.scala:2: error: wrong number of type parameters for method foo: [U](c: scala.reflect.macros.Context)(implicit evidence$1: c.WeakTypeTag[U])Nothing
+ def foo = macro Impls.foo
+ ^
+one error found
diff --git a/test/files/neg/macro-invalidsig-tparams-notparams-b.check b/test/files/neg/macro-invalidsig-tparams-notparams-b.check
index 485d4de96e..a605af6beb 100644
--- a/test/files/neg/macro-invalidsig-tparams-notparams-b.check
+++ b/test/files/neg/macro-invalidsig-tparams-notparams-b.check
@@ -1,4 +1,4 @@
-Macros_Test_2.scala:3: error: wrong number of type parameters for method foo: [T, U, V](c: scala.reflect.macros.Context)(implicit evidence$1: c.WeakTypeTag[T], implicit evidence$2: c.WeakTypeTag[U], implicit V: c.WeakTypeTag[V])c.Expr[Unit]
- def foo[V] = macro Impls.foo
- ^
-one error found
+Macros_Test_2.scala:3: error: wrong number of type parameters for method foo: [T, U, V](c: scala.reflect.macros.Context)(implicit evidence$1: c.WeakTypeTag[T], implicit evidence$2: c.WeakTypeTag[U], implicit V: c.WeakTypeTag[V])c.Expr[Unit]
+ def foo[V] = macro Impls.foo
+ ^
+one error found
diff --git a/test/files/neg/macro-invalidsig-tparams-notparams-c.check b/test/files/neg/macro-invalidsig-tparams-notparams-c.check
index 1530c35097..0be0b6fad1 100644
--- a/test/files/neg/macro-invalidsig-tparams-notparams-c.check
+++ b/test/files/neg/macro-invalidsig-tparams-notparams-c.check
@@ -1,4 +1,4 @@
-Macros_Test_2.scala:3: error: wrong number of type parameters for method foo: [T, U, V](c: scala.reflect.macros.Context)(implicit evidence$1: c.WeakTypeTag[T], implicit evidence$2: c.WeakTypeTag[U], implicit V: c.WeakTypeTag[V])c.Expr[Unit]
- def foo[V] = macro Impls.foo[V]
- ^
-one error found
+Macros_Test_2.scala:3: error: wrong number of type parameters for method foo: [T, U, V](c: scala.reflect.macros.Context)(implicit evidence$1: c.WeakTypeTag[T], implicit evidence$2: c.WeakTypeTag[U], implicit V: c.WeakTypeTag[V])c.Expr[Unit]
+ def foo[V] = macro Impls.foo[V]
+ ^
+one error found
diff --git a/test/files/neg/macro-invalidusage-badargs.check b/test/files/neg/macro-invalidusage-badargs.check
index 52beda5b61..294cfd0cf5 100644
--- a/test/files/neg/macro-invalidusage-badargs.check
+++ b/test/files/neg/macro-invalidusage-badargs.check
@@ -1,6 +1,6 @@
-Macros_Test_2.scala:7: error: type mismatch;
- found : String("42")
- required: Int
- val s: String = foo("42")
- ^
-one error found
+Macros_Test_2.scala:7: error: type mismatch;
+ found : String("42")
+ required: Int
+ val s: String = foo("42")
+ ^
+one error found
diff --git a/test/files/neg/macro-invalidusage-badbounds-a.check b/test/files/neg/macro-invalidusage-badbounds-a.check
index fd0b64533e..277f407d38 100644
--- a/test/files/neg/macro-invalidusage-badbounds-a.check
+++ b/test/files/neg/macro-invalidusage-badbounds-a.check
@@ -1,4 +1,4 @@
-Macros_Test_2.scala:7: error: type arguments [Int] do not conform to macro method foo's type parameter bounds [U <: String]
- foo[Int]
- ^
-one error found
+Macros_Test_2.scala:7: error: type arguments [Int] do not conform to macro method foo's type parameter bounds [U <: String]
+ foo[Int]
+ ^
+one error found
diff --git a/test/files/neg/macro-invalidusage-badtargs.check b/test/files/neg/macro-invalidusage-badtargs.check
index 61ef6f5af7..73801ab43e 100644
--- a/test/files/neg/macro-invalidusage-badtargs.check
+++ b/test/files/neg/macro-invalidusage-badtargs.check
@@ -1,4 +1,4 @@
-Macros_Test_2.scala:7: error: macro method foo: (x: Int)Int does not take type parameters.
- val s: String = foo[String](42)
- ^
-one error found
+Macros_Test_2.scala:7: error: macro method foo: (x: Int)Int does not take type parameters.
+ val s: String = foo[String](42)
+ ^
+one error found
diff --git a/test/files/neg/macro-invalidusage-methodvaluesyntax.check b/test/files/neg/macro-invalidusage-methodvaluesyntax.check
index 27b2023202..10046b2305 100644
--- a/test/files/neg/macro-invalidusage-methodvaluesyntax.check
+++ b/test/files/neg/macro-invalidusage-methodvaluesyntax.check
@@ -1,4 +1,4 @@
-Macros_Test_2.scala:6: error: macros cannot be eta-expanded
- val firstClassFoo = Macros.foo _
- ^
-one error found
+Macros_Test_2.scala:6: error: macros cannot be eta-expanded
+ val firstClassFoo = Macros.foo _
+ ^
+one error found
diff --git a/test/files/neg/macro-noexpand.check b/test/files/neg/macro-noexpand.check
index c829bbab71..2c176a99be 100644
--- a/test/files/neg/macro-noexpand.check
+++ b/test/files/neg/macro-noexpand.check
@@ -1,4 +1,4 @@
-Macros_Test_2.scala:7: error: not found: value x
- foo(x)
- ^
-one error found
+Macros_Test_2.scala:7: error: not found: value x
+ foo(x)
+ ^
+one error found
diff --git a/test/files/neg/macro-nontypeablebody.check b/test/files/neg/macro-nontypeablebody.check
index 0cfc864df8..9f5831ab30 100644
--- a/test/files/neg/macro-nontypeablebody.check
+++ b/test/files/neg/macro-nontypeablebody.check
@@ -1,4 +1,4 @@
-Macros_Test_2.scala:2: error: value foo2 is not a member of object Impls
- def foo(x: Any) = macro Impls.foo2
- ^
-one error found
+Macros_Test_2.scala:2: error: value foo2 is not a member of object Impls
+ def foo(x: Any) = macro Impls.foo2
+ ^
+one error found
diff --git a/test/files/neg/macro-override-macro-overrides-abstract-method-a.check b/test/files/neg/macro-override-macro-overrides-abstract-method-a.check
index 4d95dfc45c..895e0dca50 100644
--- a/test/files/neg/macro-override-macro-overrides-abstract-method-a.check
+++ b/test/files/neg/macro-override-macro-overrides-abstract-method-a.check
@@ -1,5 +1,5 @@
-Impls_Macros_1.scala:12: error: overriding method foo in trait Foo of type (x: Int)Int;
- macro method foo cannot override an abstract method
- def foo(x: Int) = macro Impls.impl
- ^
-one error found
+Impls_Macros_1.scala:12: error: overriding method foo in trait Foo of type (x: Int)Int;
+ macro method foo cannot override an abstract method
+ def foo(x: Int) = macro Impls.impl
+ ^
+one error found
diff --git a/test/files/neg/macro-override-macro-overrides-abstract-method-b.check b/test/files/neg/macro-override-macro-overrides-abstract-method-b.check
index 4d95dfc45c..895e0dca50 100644
--- a/test/files/neg/macro-override-macro-overrides-abstract-method-b.check
+++ b/test/files/neg/macro-override-macro-overrides-abstract-method-b.check
@@ -1,5 +1,5 @@
-Impls_Macros_1.scala:12: error: overriding method foo in trait Foo of type (x: Int)Int;
- macro method foo cannot override an abstract method
- def foo(x: Int) = macro Impls.impl
- ^
-one error found
+Impls_Macros_1.scala:12: error: overriding method foo in trait Foo of type (x: Int)Int;
+ macro method foo cannot override an abstract method
+ def foo(x: Int) = macro Impls.impl
+ ^
+one error found
diff --git a/test/files/neg/macro-override-method-overrides-macro.check b/test/files/neg/macro-override-method-overrides-macro.check
index 42edb0ff23..66dc11be96 100644
--- a/test/files/neg/macro-override-method-overrides-macro.check
+++ b/test/files/neg/macro-override-method-overrides-macro.check
@@ -1,5 +1,5 @@
-Macros_Test_2.scala:8: error: overriding macro method foo in class B of type (x: String)Unit;
- method foo cannot override a macro
- override def foo(x: String) = println("fooDString")
- ^
-one error found
+Macros_Test_2.scala:8: error: overriding macro method foo in class B of type (x: String)Unit;
+ method foo cannot override a macro
+ override def foo(x: String) = println("fooDString")
+ ^
+one error found
diff --git a/test/files/neg/macro-reify-typetag-hktypeparams-notags.check b/test/files/neg/macro-reify-typetag-hktypeparams-notags.check
index 742d87b0a4..44efaae775 100644
--- a/test/files/neg/macro-reify-typetag-hktypeparams-notags.check
+++ b/test/files/neg/macro-reify-typetag-hktypeparams-notags.check
@@ -1,7 +1,7 @@
-Test.scala:5: error: No TypeTag available for C[T]
- println(implicitly[TypeTag[C[T]]])
- ^
-Test.scala:6: error: No TypeTag available for List[C[T]]
- println(implicitly[TypeTag[List[C[T]]]])
- ^
-two errors found
+Test.scala:5: error: No TypeTag available for C[T]
+ println(implicitly[TypeTag[C[T]]])
+ ^
+Test.scala:6: error: No TypeTag available for List[C[T]]
+ println(implicitly[TypeTag[List[C[T]]]])
+ ^
+two errors found
diff --git a/test/files/neg/macro-reify-typetag-typeparams-notags.check b/test/files/neg/macro-reify-typetag-typeparams-notags.check
index db88260047..7c67b02aa6 100644
--- a/test/files/neg/macro-reify-typetag-typeparams-notags.check
+++ b/test/files/neg/macro-reify-typetag-typeparams-notags.check
@@ -1,7 +1,7 @@
-Test.scala:5: error: No TypeTag available for T
- println(implicitly[TypeTag[T]])
- ^
-Test.scala:6: error: No TypeTag available for List[T]
- println(implicitly[TypeTag[List[T]]])
- ^
-two errors found
+Test.scala:5: error: No TypeTag available for T
+ println(implicitly[TypeTag[T]])
+ ^
+Test.scala:6: error: No TypeTag available for List[T]
+ println(implicitly[TypeTag[List[T]]])
+ ^
+two errors found
diff --git a/test/files/neg/macro-reify-typetag-useabstypetag.check b/test/files/neg/macro-reify-typetag-useabstypetag.check
index db88260047..7c67b02aa6 100644
--- a/test/files/neg/macro-reify-typetag-useabstypetag.check
+++ b/test/files/neg/macro-reify-typetag-useabstypetag.check
@@ -1,7 +1,7 @@
-Test.scala:5: error: No TypeTag available for T
- println(implicitly[TypeTag[T]])
- ^
-Test.scala:6: error: No TypeTag available for List[T]
- println(implicitly[TypeTag[List[T]]])
- ^
-two errors found
+Test.scala:5: error: No TypeTag available for T
+ println(implicitly[TypeTag[T]])
+ ^
+Test.scala:6: error: No TypeTag available for List[T]
+ println(implicitly[TypeTag[List[T]]])
+ ^
+two errors found
diff --git a/test/files/neg/reify_ann2b.check b/test/files/neg/reify_ann2b.check
index 1cef405bef..d32bedaf8f 100644
--- a/test/files/neg/reify_ann2b.check
+++ b/test/files/neg/reify_ann2b.check
@@ -1,4 +1,4 @@
-reify_ann2b.scala:9: error: inner classes cannot be classfile annotations
- class ann(bar: String) extends annotation.ClassfileAnnotation
- ^
-one error found
+reify_ann2b.scala:9: error: inner classes cannot be classfile annotations
+ class ann(bar: String) extends annotation.ClassfileAnnotation
+ ^
+one error found
diff --git a/test/files/neg/reify_metalevel_breach_+0_refers_to_1.check b/test/files/neg/reify_metalevel_breach_+0_refers_to_1.check
index efdbd7e282..75b7555b01 100644
--- a/test/files/neg/reify_metalevel_breach_+0_refers_to_1.check
+++ b/test/files/neg/reify_metalevel_breach_+0_refers_to_1.check
@@ -1,7 +1,7 @@
-reify_metalevel_breach_+0_refers_to_1.scala:10: error: the splice cannot be resolved statically, which means there is a cross-stage evaluation involved.
-cross-stage evaluations need to be invoked explicitly, so we're showing you this error.
-if you're sure this is not an oversight, add scala-compiler.jar to the classpath,
-import `scala.tools.reflect.Eval` and call `<your expr>.eval` instead.
- inner.splice
- ^
-one error found
+reify_metalevel_breach_+0_refers_to_1.scala:10: error: the splice cannot be resolved statically, which means there is a cross-stage evaluation involved.
+cross-stage evaluations need to be invoked explicitly, so we're showing you this error.
+if you're sure this is not an oversight, add scala-compiler.jar to the classpath,
+import `scala.tools.reflect.Eval` and call `<your expr>.eval` instead.
+ inner.splice
+ ^
+one error found
diff --git a/test/files/neg/reify_metalevel_breach_-1_refers_to_0_a.check b/test/files/neg/reify_metalevel_breach_-1_refers_to_0_a.check
index 91755c789a..ca5556db02 100644
--- a/test/files/neg/reify_metalevel_breach_-1_refers_to_0_a.check
+++ b/test/files/neg/reify_metalevel_breach_-1_refers_to_0_a.check
@@ -1,7 +1,7 @@
-reify_metalevel_breach_-1_refers_to_0_a.scala:9: error: the splice cannot be resolved statically, which means there is a cross-stage evaluation involved.
-cross-stage evaluations need to be invoked explicitly, so we're showing you this error.
-if you're sure this is not an oversight, add scala-compiler.jar to the classpath,
-import `scala.tools.reflect.Eval` and call `<your expr>.eval` instead.
- val code = reify{outer.splice.splice}
- ^
-one error found
+reify_metalevel_breach_-1_refers_to_0_a.scala:9: error: the splice cannot be resolved statically, which means there is a cross-stage evaluation involved.
+cross-stage evaluations need to be invoked explicitly, so we're showing you this error.
+if you're sure this is not an oversight, add scala-compiler.jar to the classpath,
+import `scala.tools.reflect.Eval` and call `<your expr>.eval` instead.
+ val code = reify{outer.splice.splice}
+ ^
+one error found
diff --git a/test/files/neg/reify_metalevel_breach_-1_refers_to_0_b.check b/test/files/neg/reify_metalevel_breach_-1_refers_to_0_b.check
index f703bfb05f..e34cb1ac1e 100644
--- a/test/files/neg/reify_metalevel_breach_-1_refers_to_0_b.check
+++ b/test/files/neg/reify_metalevel_breach_-1_refers_to_0_b.check
@@ -1,7 +1,7 @@
-reify_metalevel_breach_-1_refers_to_0_b.scala:12: error: the splice cannot be resolved statically, which means there is a cross-stage evaluation involved.
-cross-stage evaluations need to be invoked explicitly, so we're showing you this error.
-if you're sure this is not an oversight, add scala-compiler.jar to the classpath,
-import `scala.tools.reflect.Eval` and call `<your expr>.eval` instead.
- }.splice
- ^
-one error found
+reify_metalevel_breach_-1_refers_to_0_b.scala:12: error: the splice cannot be resolved statically, which means there is a cross-stage evaluation involved.
+cross-stage evaluations need to be invoked explicitly, so we're showing you this error.
+if you're sure this is not an oversight, add scala-compiler.jar to the classpath,
+import `scala.tools.reflect.Eval` and call `<your expr>.eval` instead.
+ }.splice
+ ^
+one error found
diff --git a/test/files/neg/reify_metalevel_breach_-1_refers_to_1.check b/test/files/neg/reify_metalevel_breach_-1_refers_to_1.check
index 068e4accd2..90b0e8dac6 100644
--- a/test/files/neg/reify_metalevel_breach_-1_refers_to_1.check
+++ b/test/files/neg/reify_metalevel_breach_-1_refers_to_1.check
@@ -1,7 +1,7 @@
-reify_metalevel_breach_-1_refers_to_1.scala:10: error: the splice cannot be resolved statically, which means there is a cross-stage evaluation involved.
-cross-stage evaluations need to be invoked explicitly, so we're showing you this error.
-if you're sure this is not an oversight, add scala-compiler.jar to the classpath,
-import `scala.tools.reflect.Eval` and call `<your expr>.eval` instead.
- inner.splice.splice
- ^
-one error found
+reify_metalevel_breach_-1_refers_to_1.scala:10: error: the splice cannot be resolved statically, which means there is a cross-stage evaluation involved.
+cross-stage evaluations need to be invoked explicitly, so we're showing you this error.
+if you're sure this is not an oversight, add scala-compiler.jar to the classpath,
+import `scala.tools.reflect.Eval` and call `<your expr>.eval` instead.
+ inner.splice.splice
+ ^
+one error found
diff --git a/test/files/neg/reify_nested_inner_refers_to_local.check b/test/files/neg/reify_nested_inner_refers_to_local.check
index 3f897bded9..68689b18d0 100644
--- a/test/files/neg/reify_nested_inner_refers_to_local.check
+++ b/test/files/neg/reify_nested_inner_refers_to_local.check
@@ -1,7 +1,7 @@
-reify_nested_inner_refers_to_local.scala:9: error: the splice cannot be resolved statically, which means there is a cross-stage evaluation involved.
-cross-stage evaluations need to be invoked explicitly, so we're showing you this error.
-if you're sure this is not an oversight, add scala-compiler.jar to the classpath,
-import `scala.tools.reflect.Eval` and call `<your expr>.eval` instead.
- reify{x}.splice
- ^
-one error found
+reify_nested_inner_refers_to_local.scala:9: error: the splice cannot be resolved statically, which means there is a cross-stage evaluation involved.
+cross-stage evaluations need to be invoked explicitly, so we're showing you this error.
+if you're sure this is not an oversight, add scala-compiler.jar to the classpath,
+import `scala.tools.reflect.Eval` and call `<your expr>.eval` instead.
+ reify{x}.splice
+ ^
+one error found
diff --git a/test/files/neg/structural.check b/test/files/neg/structural.check
index 6ef57db1b4..5b2f352a76 100644
--- a/test/files/neg/structural.check
+++ b/test/files/neg/structural.check
@@ -1,28 +1,28 @@
structural.scala:47: error: Parameter type in structural refinement may not refer to the type of that refinement (self type)
val s1 = new { def f(p: this.type): Unit = () }
- ^
+ ^
structural.scala:10: error: Parameter type in structural refinement may not refer to an abstract type defined outside that refinement
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
- ^
+ ^
structural.scala:11: error: Parameter type in structural refinement may not refer to an abstract type defined outside that refinement
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
- ^
+ ^
structural.scala:12: error: Parameter type in structural refinement may not refer to an abstract type defined outside that refinement
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
- ^
+ ^
structural.scala:13: error: Parameter type in structural refinement may not refer to a type member of that refinement
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
- ^
+ ^
structural.scala:42: error: Parameter type in structural refinement may not refer to an abstract type defined outside that refinement
type Summable[T] = { def +(v : T) : T }
- ^
+ ^
structural.scala:46: error: Parameter type in structural refinement may not refer to the type of that refinement (self type)
type S1 = { def f(p: this.type): Unit }
- ^
+ ^
structural.scala:49: error: Parameter type in structural refinement may not refer to a type member of that refinement
type S2 = { type T; def f(p: T): Unit }
- ^
+ ^
structural.scala:52: error: Parameter type in structural refinement may not refer to an abstract type defined outside that refinement
def s3[U >: Null <: Object](p: { def f(p: U): Unit; def u: U }) = ()
- ^
+ ^
9 errors found
diff --git a/test/files/neg/t0565.check b/test/files/neg/t0565.check
index c5a64d0e53..98e61a2503 100644
--- a/test/files/neg/t0565.check
+++ b/test/files/neg/t0565.check
@@ -1,4 +1,4 @@
t0565.scala:8: error: Parameter type in structural refinement may not refer to a type member of that refinement
def z (w : T) : T } =
- ^
+ ^
one error found
diff --git a/test/files/neg/t2144.check b/test/files/neg/t2144.check
index 7239f4406e..670e188c2a 100644
--- a/test/files/neg/t2144.check
+++ b/test/files/neg/t2144.check
@@ -1,4 +1,4 @@
t2144.scala:2: error: Parameter type in structural refinement may not refer to an abstract type defined outside that refinement
def foo[A](a: A) = new { def bar(x: A): A = x }
- ^
+ ^
one error found
diff --git a/test/files/neg/t2775.check b/test/files/neg/t2775.check
index f357221cd9..934a970f2e 100644
--- a/test/files/neg/t2775.check
+++ b/test/files/neg/t2775.check
@@ -1,4 +1,4 @@
-t2775.scala:1: error: cannot find class tag for element type B.this.T
-trait B[S] { type T = S; val c = new Array[T](1) }
- ^
-one error found
+t2775.scala:1: error: cannot find class tag for element type B.this.T
+trait B[S] { type T = S; val c = new Array[T](1) }
+ ^
+one error found
diff --git a/test/files/neg/t3507-old.check b/test/files/neg/t3507-old.check
index 5c58444cb3..b3ac40473e 100644
--- a/test/files/neg/t3507-old.check
+++ b/test/files/neg/t3507-old.check
@@ -1,4 +1,4 @@
-t3507-old.scala:13: error: No Manifest available for _1.b.c.type.
- mani/*[object _1.b.c]*/(c) // kaboom in manifestOfType / TreeGen.mkAttributedQualifier
- ^
-one error found
+t3507-old.scala:13: error: No Manifest available for _1.b.c.type.
+ mani/*[object _1.b.c]*/(c) // kaboom in manifestOfType / TreeGen.mkAttributedQualifier
+ ^
+one error found
diff --git a/test/files/neg/t5452-new.check b/test/files/neg/t5452-new.check
index 4bbeff3644..1850a7004a 100644
--- a/test/files/neg/t5452-new.check
+++ b/test/files/neg/t5452-new.check
@@ -1,8 +1,8 @@
-t5452-new.scala:30: error: overloaded method value apply with alternatives:
- ()Queryable[CoffeesTable] <and>
- (t: Tree)(implicit evidence$2: scala.reflect.ClassTag[CoffeesTable])Nothing <and>
- (implicit evidence$1: scala.reflect.ClassTag[CoffeesTable])Nothing
- cannot be applied to (Queryable[CoffeesTable])
- Queryable[CoffeesTable]( q.treeFilter(null) )
- ^
-one error found
+t5452-new.scala:30: error: overloaded method value apply with alternatives:
+ ()Queryable[CoffeesTable] <and>
+ (t: Tree)(implicit evidence$2: scala.reflect.ClassTag[CoffeesTable])Nothing <and>
+ (implicit evidence$1: scala.reflect.ClassTag[CoffeesTable])Nothing
+ cannot be applied to (Queryable[CoffeesTable])
+ Queryable[CoffeesTable]( q.treeFilter(null) )
+ ^
+one error found
diff --git a/test/files/neg/t5452-old.check b/test/files/neg/t5452-old.check
index e5872a5759..1860c98c53 100644
--- a/test/files/neg/t5452-old.check
+++ b/test/files/neg/t5452-old.check
@@ -1,8 +1,8 @@
-t5452-old.scala:28: error: overloaded method value apply with alternatives:
- ()Queryable[CoffeesTable] <and>
- (t: Tree)(implicit evidence$2: Manifest[CoffeesTable])Nothing <and>
- (implicit evidence$1: Manifest[CoffeesTable])Nothing
- cannot be applied to (Queryable[CoffeesTable])
- Queryable[CoffeesTable]( q.treeFilter(null) )
- ^
-one error found
+t5452-old.scala:28: error: overloaded method value apply with alternatives:
+ ()Queryable[CoffeesTable] <and>
+ (t: Tree)(implicit evidence$2: Manifest[CoffeesTable])Nothing <and>
+ (implicit evidence$1: Manifest[CoffeesTable])Nothing
+ cannot be applied to (Queryable[CoffeesTable])
+ Queryable[CoffeesTable]( q.treeFilter(null) )
+ ^
+one error found
diff --git a/test/files/neg/t5689.check b/test/files/neg/t5689.check
index 3b25dd612e..50aaa7dbfe 100644
--- a/test/files/neg/t5689.check
+++ b/test/files/neg/t5689.check
@@ -1,7 +1,7 @@
-t5689.scala:4: error: macro implementation has wrong shape:
- required: (c: scala.reflect.macros.Context)(i: c.Expr[Double]): c.Expr[String]
- found : (c: scala.reflect.macros.Context)(i: c.Expr[Double]): c.Expr[Int]
-type mismatch for return type: c.Expr[Int] does not conform to c.Expr[String]
- def returnsString(i: Double): String = macro returnsIntImpl
- ^
-one error found
+t5689.scala:4: error: macro implementation has wrong shape:
+ required: (c: scala.reflect.macros.Context)(i: c.Expr[Double]): c.Expr[String]
+ found : (c: scala.reflect.macros.Context)(i: c.Expr[Double]): c.Expr[Int]
+type mismatch for return type: c.Expr[Int] does not conform to c.Expr[String]
+ def returnsString(i: Double): String = macro returnsIntImpl
+ ^
+one error found
diff --git a/test/files/neg/t5692a.check b/test/files/neg/t5692a.check
index 527cb35fba..ded95a8820 100644
--- a/test/files/neg/t5692a.check
+++ b/test/files/neg/t5692a.check
@@ -1,4 +1,4 @@
-Test_2.scala:2: error: type parameter not specified
- def x = Macros.foo
- ^
-one error found
+Test_2.scala:2: error: type parameter not specified
+ def x = Macros.foo
+ ^
+one error found
diff --git a/test/files/neg/t5692b.check b/test/files/neg/t5692b.check
index 8f6b2624cf..e453870ec8 100644
--- a/test/files/neg/t5692b.check
+++ b/test/files/neg/t5692b.check
@@ -1,4 +1,4 @@
-Test_2.scala:2: error: type parameters not specified
- def x = Macros.foo
- ^
-one error found
+Test_2.scala:2: error: type parameters not specified
+ def x = Macros.foo
+ ^
+one error found
diff --git a/test/files/neg/t5878.check b/test/files/neg/t5878.check
index 50dba0d272..c60c4653a2 100644
--- a/test/files/neg/t5878.check
+++ b/test/files/neg/t5878.check
@@ -1,13 +1,13 @@
-t5878.scala:1: error: value class may not unbox to itself
+t5878.scala:1: error: value class may not wrap another user-defined value class
case class Foo(x: Bar) extends AnyVal
- ^
-t5878.scala:2: error: value class may not unbox to itself
+ ^
+t5878.scala:2: error: value class may not wrap another user-defined value class
case class Bar(x: Foo) extends AnyVal
- ^
-t5878.scala:4: error: value class may not unbox to itself
+ ^
+t5878.scala:4: error: value class may not wrap another user-defined value class
class Foo1(val x: Bar1) extends AnyVal
- ^
-t5878.scala:5: error: value class may not unbox to itself
+ ^
+t5878.scala:5: error: value class may not wrap another user-defined value class
class Bar1(val x: Foo1) extends AnyVal
- ^
+ ^
four errors found
diff --git a/test/files/neg/t6260.check b/test/files/neg/t6260.check
new file mode 100644
index 0000000000..2b7f1a8bfb
--- /dev/null
+++ b/test/files/neg/t6260.check
@@ -0,0 +1,13 @@
+t6260.scala:3: error: bridge generated for member method apply: (x$1: Box[X])Box[Y] in anonymous class $anonfun
+which overrides method apply: (v1: T1)R in trait Function1
+clashes with definition of the member itself;
+both have erased type (v1: Object)Object
+ ((bx: Box[X]) => new Box(f(bx.x)))(this)
+ ^
+t6260.scala:8: error: bridge generated for member method apply: (x$1: Box[X])Box[Y] in anonymous class $anonfun
+which overrides method apply: (v1: T1)R in trait Function1
+clashes with definition of the member itself;
+both have erased type (v1: Object)Object
+ ((bx: Box[X]) => new Box(f(bx.x)))(self)
+ ^
+two errors found
diff --git a/test/files/neg/t6260.scala b/test/files/neg/t6260.scala
new file mode 100644
index 0000000000..93b5448227
--- /dev/null
+++ b/test/files/neg/t6260.scala
@@ -0,0 +1,17 @@
+class Box[X](val x: X) extends AnyVal {
+ def map[Y](f: X => Y): Box[Y] =
+ ((bx: Box[X]) => new Box(f(bx.x)))(this)
+}
+
+object Test {
+ def map2[X, Y](self: Box[X], f: X => Y): Box[Y] =
+ ((bx: Box[X]) => new Box(f(bx.x)))(self)
+
+ def main(args: Array[String]) {
+ val f = (x: Int) => x + 1
+ val g = (x: String) => x + x
+
+ map2(new Box(42), f)
+ new Box("abc") map g
+ }
+}
diff --git a/test/files/neg/t6323a.check b/test/files/neg/t6323a.check
index 694c79ca5f..670247887c 100644
--- a/test/files/neg/t6323a.check
+++ b/test/files/neg/t6323a.check
@@ -1,9 +1,9 @@
-t6323a.scala:11: `package`.this.materializeTypeTag[Test](scala.reflect.runtime.`package`.universe) is not a valid implicit value for reflect.runtime.universe.TypeTag[Test] because:
-failed to typecheck the materialized tag:
-cannot create a TypeTag referring to local class Test.Test
- val value = u.typeOf[Test]
- ^
-t6323a.scala:11: error: No TypeTag available for Test
- val value = u.typeOf[Test]
- ^
-one error found
+t6323a.scala:11: `package`.this.materializeTypeTag[Test](scala.reflect.runtime.`package`.universe) is not a valid implicit value for reflect.runtime.universe.TypeTag[Test] because:
+failed to typecheck the materialized tag:
+cannot create a TypeTag referring to local class Test.Test
+ val value = u.typeOf[Test]
+ ^
+t6323a.scala:11: error: No TypeTag available for Test
+ val value = u.typeOf[Test]
+ ^
+one error found
diff --git a/test/files/neg/t6336.check b/test/files/neg/t6336.check
index f6b35ad232..f70a5f70ab 100644
--- a/test/files/neg/t6336.check
+++ b/test/files/neg/t6336.check
@@ -1,4 +1,7 @@
t6336.scala:3: error: Parameter type in structural refinement may not refer to a user-defined value class
val a = new { def y[T](x: X[T]) = x.i }
- ^
-one error found
+ ^
+t6336.scala:4: error: Result type in structural refinement may not refer to a user-defined value class
+ val b = new { def y[T](x: T): X[T] = new X(2) }
+ ^
+two errors found
diff --git a/test/files/neg/t6336.scala b/test/files/neg/t6336.scala
index a9844ff94f..b1d61f4dd2 100644
--- a/test/files/neg/t6336.scala
+++ b/test/files/neg/t6336.scala
@@ -1,6 +1,7 @@
object D {
def main(args: Array[String]) {
val a = new { def y[T](x: X[T]) = x.i }
+ val b = new { def y[T](x: T): X[T] = new X(2) }
val x = new X(3)
val t = a.y(x)
println(t)
diff --git a/test/files/neg/t6337.check b/test/files/neg/t6337.check
new file mode 100644
index 0000000000..8448f71320
--- /dev/null
+++ b/test/files/neg/t6337.check
@@ -0,0 +1,7 @@
+t6337.scala:10: error: value class may not wrap another user-defined value class
+class X[T](val i: XX[T]) extends AnyVal
+ ^
+t6337.scala:20: error: value class may not wrap another user-defined value class
+class X1[T](val i: XX1[T]) extends AnyVal
+ ^
+two errors found
diff --git a/test/files/neg/t6337.scala b/test/files/neg/t6337.scala
new file mode 100644
index 0000000000..c3858f8c04
--- /dev/null
+++ b/test/files/neg/t6337.scala
@@ -0,0 +1,21 @@
+object C {
+
+ def main(args: Array[String]) = {
+ val x = new X(new XX(3))
+ println(x.i.x + 9)
+ }
+
+}
+
+class X[T](val i: XX[T]) extends AnyVal
+class XX[T](val x: T) extends AnyVal
+
+object C1 {
+ def main(args: Array[String]) {
+ val x = new X1(new XX1(Some(3)))
+ println(x.i.x.get + 9)
+ }
+}
+
+class X1[T](val i: XX1[T]) extends AnyVal
+class XX1[T](val x: Option[T]) extends AnyVal
diff --git a/test/files/neg/t6385.check b/test/files/neg/t6385.check
new file mode 100644
index 0000000000..93e51e8927
--- /dev/null
+++ b/test/files/neg/t6385.check
@@ -0,0 +1,7 @@
+t6385.scala:12: error: bridge generated for member method x: ()C[T] in class C
+which overrides method x: ()C[T] in trait AA
+clashes with definition of the member itself;
+both have erased type ()Object
+ def x = this
+ ^
+one error found
diff --git a/test/files/neg/t6385.scala b/test/files/neg/t6385.scala
new file mode 100644
index 0000000000..cec58eec9e
--- /dev/null
+++ b/test/files/neg/t6385.scala
@@ -0,0 +1,13 @@
+object N {
+ def main(args: Array[String]) {
+ val y: AA[Int] = C(2)
+ val c: Int = y.x.y
+ println(c)
+ }
+}
+trait AA[T] extends Any {
+ def x: C[T]
+}
+case class C[T](val y: T) extends AnyVal with AA[T] {
+ def x = this
+}
diff --git a/test/files/neg/valueclasses-pavlov.check b/test/files/neg/valueclasses-pavlov.check
new file mode 100644
index 0000000000..031589edad
--- /dev/null
+++ b/test/files/neg/valueclasses-pavlov.check
@@ -0,0 +1,7 @@
+valueclasses-pavlov.scala:8: error: double definition:
+method foo:(x: Box2)String and
+method foo:(x: String)String at line 7
+have same type after erasure: (x: String)String
+ def foo(x: Box2) = "foo(Box2): ok"
+ ^
+one error found
diff --git a/test/files/neg/valueclasses-pavlov.scala b/test/files/neg/valueclasses-pavlov.scala
new file mode 100644
index 0000000000..a5858b2cf0
--- /dev/null
+++ b/test/files/neg/valueclasses-pavlov.scala
@@ -0,0 +1,23 @@
+trait Foo[T <: AnyVal] extends Any {
+ def foo(x: String): String
+ def foo(x: T): String
+}
+
+class Box1(val value: String) extends AnyVal with Foo[Box2] {
+ def foo(x: String) = "foo(String): ok"
+ def foo(x: Box2) = "foo(Box2): ok"
+}
+
+class Box2(val value: String) extends AnyVal
+
+
+object test2a {
+
+ def main(args: Array[String]) {
+ val b1 = new Box1(null)
+ val b2 = new Box2(null)
+ val f: Foo[Box2] = b1
+ println(f.foo(""))
+ println(f.foo(b2))
+ }
+}
diff --git a/test/files/pos/t5245.scala b/test/files/pos/t5245.scala
index 3a4b4d286e..763be9ec26 100644
--- a/test/files/pos/t5245.scala
+++ b/test/files/pos/t5245.scala
@@ -1,3 +1,3 @@
-object Foo {
+object Foo {
def bar = { var x = (); def foo() = x }
} \ No newline at end of file
diff --git a/test/files/run/Meter.scala b/test/files/run/Meter.scala
index d94f338ca9..a10ad31b4a 100644
--- a/test/files/run/Meter.scala
+++ b/test/files/run/Meter.scala
@@ -1,8 +1,13 @@
package a {
+ abstract class BoxingConversions[Boxed, Unboxed] {
+ def box(x: Unboxed): Boxed
+ def unbox(x: Boxed): Unboxed
+ }
+
class Meter(val underlying: Double) extends AnyVal with _root_.b.Printable {
def + (other: Meter): Meter =
new Meter(this.underlying + other.underlying)
- def / (other: Meter): Double = this.underlying / other.underlying
+ def / (other: Meter)(implicit dummy: Meter.MeterArg = null): Double = this.underlying / other.underlying
def / (factor: Double): Meter = new Meter(this.underlying / factor)
def < (other: Meter): Boolean = this.underlying < other.underlying
def toFoot: Foot = new Foot(this.underlying * 0.3048)
@@ -12,6 +17,8 @@ package a {
object Meter extends (Double => Meter) {
+ private[a] trait MeterArg
+
def apply(x: Double): Meter = new Meter(x)
implicit val boxings = new BoxingConversions[Meter, Double] {
@@ -80,7 +87,7 @@ object Test extends App {
println(m)
foo(arr)
}
- //
+ //
// { println("testing wrapped arrays")
// import collection.mutable.FlatArray
// val arr = FlatArray(x, y + x)
diff --git a/test/files/run/MeterCaseClass.scala b/test/files/run/MeterCaseClass.scala
index e5979cf761..39d95c2af5 100644
--- a/test/files/run/MeterCaseClass.scala
+++ b/test/files/run/MeterCaseClass.scala
@@ -1,8 +1,13 @@
package a {
+ abstract class BoxingConversions[Boxed, Unboxed] {
+ def box(x: Unboxed): Boxed
+ def unbox(x: Boxed): Unboxed
+ }
+
case class Meter(underlying: Double) extends AnyVal with _root_.b.Printable {
def + (other: Meter): Meter =
new Meter(this.underlying + other.underlying)
- def / (other: Meter): Double = this.underlying / other.underlying
+ def / (other: Meter)(implicit dummy: Meter.MeterArg = null): Double = this.underlying / other.underlying
def / (factor: Double): Meter = new Meter(this.underlying / factor)
def < (other: Meter): Boolean = this.underlying < other.underlying
def toFoot: Foot = new Foot(this.underlying * 0.3048)
@@ -11,6 +16,8 @@ package a {
object Meter extends (Double => Meter) {
+ private[a] trait MeterArg
+
implicit val boxings = new BoxingConversions[Meter, Double] {
def box(x: Double) = new Meter(x)
def unbox(m: Meter) = m.underlying
@@ -77,7 +84,7 @@ object Test extends App {
println(m)
foo(arr)
}
- //
+ //
// { println("testing wrapped arrays")
// import collection.mutable.FlatArray
// val arr = FlatArray(x, y + x)
diff --git a/test/files/run/abstypetags_core.check b/test/files/run/abstypetags_core.check
index 8d20e099c4..980b4719bf 100644
--- a/test/files/run/abstypetags_core.check
+++ b/test/files/run/abstypetags_core.check
@@ -1,30 +1,30 @@
-true
-TypeTag[Byte]
-true
-TypeTag[Short]
-true
-TypeTag[Char]
-true
-TypeTag[Int]
-true
-TypeTag[Long]
-true
-TypeTag[Float]
-true
-TypeTag[Double]
-true
-TypeTag[Boolean]
-true
-TypeTag[Unit]
-true
-TypeTag[Any]
-true
-TypeTag[AnyVal]
-true
-TypeTag[AnyRef]
-true
-TypeTag[java.lang.Object]
-true
-TypeTag[Null]
-true
-TypeTag[Nothing]
+true
+TypeTag[Byte]
+true
+TypeTag[Short]
+true
+TypeTag[Char]
+true
+TypeTag[Int]
+true
+TypeTag[Long]
+true
+TypeTag[Float]
+true
+TypeTag[Double]
+true
+TypeTag[Boolean]
+true
+TypeTag[Unit]
+true
+TypeTag[Any]
+true
+TypeTag[AnyVal]
+true
+TypeTag[AnyRef]
+true
+TypeTag[java.lang.Object]
+true
+TypeTag[Null]
+true
+TypeTag[Nothing]
diff --git a/test/files/run/abstypetags_serialize.check b/test/files/run/abstypetags_serialize.check
index aafb4761ad..bddc4523e6 100644
--- a/test/files/run/abstypetags_serialize.check
+++ b/test/files/run/abstypetags_serialize.check
@@ -1,2 +1,2 @@
-java.io.NotSerializableException: Test$$typecreator1$1
-java.io.NotSerializableException: Test$$typecreator2$1
+java.io.NotSerializableException: Test$$typecreator1$1
+java.io.NotSerializableException: Test$$typecreator2$1
diff --git a/test/files/run/classmanifests_new_alias.check b/test/files/run/classmanifests_new_alias.check
index ffb8482f91..032521a929 100644
--- a/test/files/run/classmanifests_new_alias.check
+++ b/test/files/run/classmanifests_new_alias.check
@@ -1,2 +1,2 @@
-Int
-true
+Int
+true
diff --git a/test/files/run/classmanifests_new_core.check b/test/files/run/classmanifests_new_core.check
index ffb8482f91..032521a929 100644
--- a/test/files/run/classmanifests_new_core.check
+++ b/test/files/run/classmanifests_new_core.check
@@ -1,2 +1,2 @@
-Int
-true
+Int
+true
diff --git a/test/files/run/classtags_contextbound.check b/test/files/run/classtags_contextbound.check
index 4104d544ba..604122846e 100644
--- a/test/files/run/classtags_contextbound.check
+++ b/test/files/run/classtags_contextbound.check
@@ -1 +1 @@
-class [I
+class [I
diff --git a/test/files/run/classtags_core.check b/test/files/run/classtags_core.check
index 5a9b41fd6d..d5c4386482 100644
--- a/test/files/run/classtags_core.check
+++ b/test/files/run/classtags_core.check
@@ -1,30 +1,30 @@
-true
-Byte
-true
-Short
-true
-Char
-true
-Int
-true
-Long
-true
-Float
-true
-Double
-true
-Boolean
-true
-Unit
-true
-Any
-true
-AnyVal
-true
-Object
-true
-Object
-true
-Null
-true
-Nothing
+true
+Byte
+true
+Short
+true
+Char
+true
+Int
+true
+Long
+true
+Float
+true
+Double
+true
+Boolean
+true
+Unit
+true
+Any
+true
+AnyVal
+true
+Object
+true
+Object
+true
+Null
+true
+Nothing
diff --git a/test/files/run/classtags_multi.check b/test/files/run/classtags_multi.check
index 68cee4841d..56da87eeb1 100644
--- a/test/files/run/classtags_multi.check
+++ b/test/files/run/classtags_multi.check
@@ -1,5 +1,5 @@
-Int
-Array[int]
-Array[Array[int]]
-Array[Array[Array[int]]]
-Array[Array[Array[Array[int]]]]
+Int
+Array[int]
+Array[Array[int]]
+Array[Array[Array[int]]]
+Array[Array[Array[Array[int]]]]
diff --git a/test/files/run/constant-type.check b/test/files/run/constant-type.check
new file mode 100644
index 0000000000..dfd8be5297
--- /dev/null
+++ b/test/files/run/constant-type.check
@@ -0,0 +1,30 @@
+Type in expressions to have them evaluated.
+Type :help for more information.
+
+scala>
+
+scala> :power
+** Power User mode enabled - BEEP WHIR GYVE **
+** :phase has been set to 'typer'. **
+** scala.tools.nsc._ has been imported **
+** global._, definitions._ also imported **
+** Try :help, :vals, power.<tab> **
+
+scala> val s = transformedType(StringClass.toType).asInstanceOf[Type]
+s: $r.intp.global.Type = String
+
+scala> { println(afterPhase(currentRun.erasurePhase)(ConstantType(Constant(s)))) }
+Class[String](classOf[java.lang.String])
+
+scala> { afterPhase(currentRun.erasurePhase)(println(ConstantType(Constant(s)))) }
+Class(classOf[java.lang.String])
+
+scala> { ConstantType(Constant(s)); println(afterPhase(currentRun.erasurePhase)(ConstantType(Constant(s)))); }
+Class[String](classOf[java.lang.String])
+
+scala> { ConstantType(Constant(s)); afterPhase(currentRun.erasurePhase)(println(ConstantType(Constant(s)))); }
+Class(classOf[java.lang.String])
+
+scala>
+
+scala>
diff --git a/test/files/run/constant-type.scala b/test/files/run/constant-type.scala
new file mode 100644
index 0000000000..84539e2895
--- /dev/null
+++ b/test/files/run/constant-type.scala
@@ -0,0 +1,17 @@
+import scala.tools.partest.ReplTest
+
+// see the commit message to understand what this stuff is about
+// just a quick note:
+// transformedType returns an erased version of the type
+// as explained in the commit message, Type.erasure won't do for this test
+// because it does some postprocessing to the result of transformedType
+object Test extends ReplTest {
+ def code = """
+:power
+val s = transformedType(StringClass.toType).asInstanceOf[Type]
+{ println(afterPhase(currentRun.erasurePhase)(ConstantType(Constant(s)))) }
+{ afterPhase(currentRun.erasurePhase)(println(ConstantType(Constant(s)))) }
+{ ConstantType(Constant(s)); println(afterPhase(currentRun.erasurePhase)(ConstantType(Constant(s)))); }
+{ ConstantType(Constant(s)); afterPhase(currentRun.erasurePhase)(println(ConstantType(Constant(s)))); }
+ """
+}
diff --git a/test/files/run/existentials3-new.check b/test/files/run/existentials3-new.check
index 2550f4dae0..bb6fe1a5e3 100644
--- a/test/files/run/existentials3-new.check
+++ b/test/files/run/existentials3-new.check
@@ -1,24 +1,24 @@
-Bar.type, t=TypeRef, s=type Bar.type
-Bar, t=TypeRef, s=type Bar
-Test.ToS, t=RefinedType, s=f3
-Test.ToS, t=RefinedType, s=f4
-Test.ToS, t=RefinedType, s=f5
-() => Test.ToS, t=TypeRef, s=class Function0
-() => Test.ToS, t=TypeRef, s=class Function0
-$anon, t=TypeRef, s=type $anon
-$anon, t=TypeRef, s=type $anon
-List[java.lang.Object{type T1}#T1], t=TypeRef, s=class List
-List[Seq[Int]], t=TypeRef, s=class List
-List[Seq[U forSome { type U <: Int }]], t=TypeRef, s=class List
-Bar.type, t=TypeRef, s=type Bar.type
-Bar, t=TypeRef, s=type Bar
-Test.ToS, t=RefinedType, s=g3
-Test.ToS, t=RefinedType, s=g4
-Test.ToS, t=RefinedType, s=g5
-() => Test.ToS, t=TypeRef, s=class Function0
-() => Test.ToS, t=TypeRef, s=class Function0
-$anon, t=TypeRef, s=type $anon
-$anon, t=TypeRef, s=type $anon
-List[java.lang.Object{type T1}#T1], t=TypeRef, s=class List
-List[Seq[Int]], t=TypeRef, s=class List
-List[Seq[U forSome { type U <: Int }]], t=TypeRef, s=class List
+Bar.type, t=TypeRef, s=type Bar.type
+Bar, t=TypeRef, s=type Bar
+Test.ToS, t=RefinedType, s=f3
+Test.ToS, t=RefinedType, s=f4
+Test.ToS, t=RefinedType, s=f5
+() => Test.ToS, t=TypeRef, s=class Function0
+() => Test.ToS, t=TypeRef, s=class Function0
+$anon, t=TypeRef, s=type $anon
+$anon, t=TypeRef, s=type $anon
+List[java.lang.Object{type T1}#T1], t=TypeRef, s=class List
+List[Seq[Int]], t=TypeRef, s=class List
+List[Seq[U forSome { type U <: Int }]], t=TypeRef, s=class List
+Bar.type, t=TypeRef, s=type Bar.type
+Bar, t=TypeRef, s=type Bar
+Test.ToS, t=RefinedType, s=g3
+Test.ToS, t=RefinedType, s=g4
+Test.ToS, t=RefinedType, s=g5
+() => Test.ToS, t=TypeRef, s=class Function0
+() => Test.ToS, t=TypeRef, s=class Function0
+$anon, t=TypeRef, s=type $anon
+$anon, t=TypeRef, s=type $anon
+List[java.lang.Object{type T1}#T1], t=TypeRef, s=class List
+List[Seq[Int]], t=TypeRef, s=class List
+List[Seq[U forSome { type U <: Int }]], t=TypeRef, s=class List
diff --git a/test/files/run/exprs_serialize.check b/test/files/run/exprs_serialize.check
index a3bf9ccdc4..20ad6c110c 100644
--- a/test/files/run/exprs_serialize.check
+++ b/test/files/run/exprs_serialize.check
@@ -1,2 +1,2 @@
-java.io.NotSerializableException: Test$$treecreator1$1
-java.io.NotSerializableException: Test$$treecreator2$1
+java.io.NotSerializableException: Test$$treecreator1$1
+java.io.NotSerializableException: Test$$treecreator2$1
diff --git a/test/files/run/freetypes_false_alarm1.check b/test/files/run/freetypes_false_alarm1.check
index 92efacc2b7..a9df3544ac 100644
--- a/test/files/run/freetypes_false_alarm1.check
+++ b/test/files/run/freetypes_false_alarm1.check
@@ -1 +1 @@
-List[Int]
+List[Int]
diff --git a/test/files/run/interop_classtags_are_classmanifests.check b/test/files/run/interop_classtags_are_classmanifests.check
index c07ed0e657..5a8fc2b782 100644
--- a/test/files/run/interop_classtags_are_classmanifests.check
+++ b/test/files/run/interop_classtags_are_classmanifests.check
@@ -1,3 +1,3 @@
-Int
-java.lang.String
-Array[int]
+Int
+java.lang.String
+Array[int]
diff --git a/test/files/run/interop_manifests_are_abstypetags.check b/test/files/run/interop_manifests_are_abstypetags.check
index c59e92d4eb..19a35ad3db 100644
--- a/test/files/run/interop_manifests_are_abstypetags.check
+++ b/test/files/run/interop_manifests_are_abstypetags.check
@@ -1,3 +1,3 @@
-Int
-java.lang.String
-Array[Int]
+Int
+java.lang.String
+Array[Int]
diff --git a/test/files/run/interop_manifests_are_classtags.check b/test/files/run/interop_manifests_are_classtags.check
index aaf4aba012..f3f704121b 100644
--- a/test/files/run/interop_manifests_are_classtags.check
+++ b/test/files/run/interop_manifests_are_classtags.check
@@ -1,18 +1,18 @@
-Int
-List()
-List(0, 0, 0, 0, 0)
-java.lang.String
-List()
-List(null, null, null, null, null)
-Array[Int]
-List()
-List(null, null, null, null, null)
-Int
-List()
-List(0, 0, 0, 0, 0)
-java.lang.String
-List()
-List(null, null, null, null, null)
-Array[Int]
-List()
-List(null, null, null, null, null)
+Int
+List()
+List(0, 0, 0, 0, 0)
+java.lang.String
+List()
+List(null, null, null, null, null)
+Array[Int]
+List()
+List(null, null, null, null, null)
+Int
+List()
+List(0, 0, 0, 0, 0)
+java.lang.String
+List()
+List(null, null, null, null, null)
+Array[Int]
+List()
+List(null, null, null, null, null)
diff --git a/test/files/run/interop_manifests_are_typetags.check b/test/files/run/interop_manifests_are_typetags.check
index c59e92d4eb..19a35ad3db 100644
--- a/test/files/run/interop_manifests_are_typetags.check
+++ b/test/files/run/interop_manifests_are_typetags.check
@@ -1,3 +1,3 @@
-Int
-java.lang.String
-Array[Int]
+Int
+java.lang.String
+Array[Int]
diff --git a/test/files/run/interop_typetags_are_manifests.check b/test/files/run/interop_typetags_are_manifests.check
index 871167e3ab..e02de1fdc2 100644
--- a/test/files/run/interop_typetags_are_manifests.check
+++ b/test/files/run/interop_typetags_are_manifests.check
@@ -1,3 +1,3 @@
-int
-java.lang.String
-Array[Int]
+int
+java.lang.String
+Array[Int]
diff --git a/test/files/run/macro-abort-fresh.check b/test/files/run/macro-abort-fresh.check
index 28057c2883..75ad5e79f8 100644
--- a/test/files/run/macro-abort-fresh.check
+++ b/test/files/run/macro-abort-fresh.check
@@ -1,6 +1,6 @@
-$1$
-qwe1
-qwe2
-reflective compilation has failed:
-
-blargh
+$1$
+qwe1
+qwe2
+reflective compilation has failed:
+
+blargh
diff --git a/test/files/run/macro-declared-in-annotation.check b/test/files/run/macro-declared-in-annotation.check
index 1ea14b4e20..7658ad2c24 100644
--- a/test/files/run/macro-declared-in-annotation.check
+++ b/test/files/run/macro-declared-in-annotation.check
@@ -1 +1 @@
-it works
+it works
diff --git a/test/files/run/macro-declared-in-block.check b/test/files/run/macro-declared-in-block.check
index a61fd13087..5e687db8bf 100644
--- a/test/files/run/macro-declared-in-block.check
+++ b/test/files/run/macro-declared-in-block.check
@@ -1,2 +1,2 @@
-prefix = Expr[Nothing](<empty>)
-it works
+prefix = Expr[Nothing](<empty>)
+it works
diff --git a/test/files/run/macro-declared-in-class-class.check b/test/files/run/macro-declared-in-class-class.check
index 480c2f906f..47248d7af7 100644
--- a/test/files/run/macro-declared-in-class-class.check
+++ b/test/files/run/macro-declared-in-class-class.check
@@ -1,2 +1,2 @@
-prefix = Expr[Nothing](new Test.this.outer.Macros())
-it works
+prefix = Expr[Nothing](new Test.this.outer.Macros())
+it works
diff --git a/test/files/run/macro-declared-in-class-object.check b/test/files/run/macro-declared-in-class-object.check
index f7ba5a53cb..35af59e40f 100644
--- a/test/files/run/macro-declared-in-class-object.check
+++ b/test/files/run/macro-declared-in-class-object.check
@@ -1,2 +1,2 @@
-prefix = Expr[Nothing](Test.this.outer.Macros)
-it works
+prefix = Expr[Nothing](Test.this.outer.Macros)
+it works
diff --git a/test/files/run/macro-declared-in-class.check b/test/files/run/macro-declared-in-class.check
index 946851e4bb..a1c1d7af8b 100644
--- a/test/files/run/macro-declared-in-class.check
+++ b/test/files/run/macro-declared-in-class.check
@@ -1,2 +1,2 @@
-prefix = Expr[Nothing](new Macros())
-it works
+prefix = Expr[Nothing](new Macros())
+it works
diff --git a/test/files/run/macro-declared-in-default-param.check b/test/files/run/macro-declared-in-default-param.check
index 00052ad018..6decd7aa4d 100644
--- a/test/files/run/macro-declared-in-default-param.check
+++ b/test/files/run/macro-declared-in-default-param.check
@@ -1,5 +1,5 @@
-prefix = Expr[Nothing](<empty>)
-it works
-it works
-prefix = Expr[Nothing](<empty>)
-it works
+prefix = Expr[Nothing](<empty>)
+it works
+it works
+prefix = Expr[Nothing](<empty>)
+it works
diff --git a/test/files/run/macro-declared-in-implicit-class.check b/test/files/run/macro-declared-in-implicit-class.check
index b3640ceaa7..5dc968c08c 100644
--- a/test/files/run/macro-declared-in-implicit-class.check
+++ b/test/files/run/macro-declared-in-implicit-class.check
@@ -1,2 +1,2 @@
-prefix = Expr[Nothing](Macros.foo("2"))
-Some(2)
+prefix = Expr[Nothing](Macros.foo("2"))
+Some(2)
diff --git a/test/files/run/macro-declared-in-method.check b/test/files/run/macro-declared-in-method.check
index a61fd13087..5e687db8bf 100644
--- a/test/files/run/macro-declared-in-method.check
+++ b/test/files/run/macro-declared-in-method.check
@@ -1,2 +1,2 @@
-prefix = Expr[Nothing](<empty>)
-it works
+prefix = Expr[Nothing](<empty>)
+it works
diff --git a/test/files/run/macro-declared-in-object-class.check b/test/files/run/macro-declared-in-object-class.check
index 480c2f906f..47248d7af7 100644
--- a/test/files/run/macro-declared-in-object-class.check
+++ b/test/files/run/macro-declared-in-object-class.check
@@ -1,2 +1,2 @@
-prefix = Expr[Nothing](new Test.this.outer.Macros())
-it works
+prefix = Expr[Nothing](new Test.this.outer.Macros())
+it works
diff --git a/test/files/run/macro-declared-in-object-object.check b/test/files/run/macro-declared-in-object-object.check
index f7ba5a53cb..35af59e40f 100644
--- a/test/files/run/macro-declared-in-object-object.check
+++ b/test/files/run/macro-declared-in-object-object.check
@@ -1,2 +1,2 @@
-prefix = Expr[Nothing](Test.this.outer.Macros)
-it works
+prefix = Expr[Nothing](Test.this.outer.Macros)
+it works
diff --git a/test/files/run/macro-declared-in-object.check b/test/files/run/macro-declared-in-object.check
index 05a8cc48ea..4d955a96b1 100644
--- a/test/files/run/macro-declared-in-object.check
+++ b/test/files/run/macro-declared-in-object.check
@@ -1,2 +1,2 @@
-prefix = Expr[Nothing](Macros)
-it works
+prefix = Expr[Nothing](Macros)
+it works
diff --git a/test/files/run/macro-declared-in-package-object.check b/test/files/run/macro-declared-in-package-object.check
index 6f797f3c68..bc0069178d 100644
--- a/test/files/run/macro-declared-in-package-object.check
+++ b/test/files/run/macro-declared-in-package-object.check
@@ -1,2 +1,2 @@
-prefix = Expr[Nothing](Macros.`package`)
-it works
+prefix = Expr[Nothing](Macros.`package`)
+it works
diff --git a/test/files/run/macro-declared-in-refinement.check b/test/files/run/macro-declared-in-refinement.check
index 861cd43b01..09b8d015a6 100644
--- a/test/files/run/macro-declared-in-refinement.check
+++ b/test/files/run/macro-declared-in-refinement.check
@@ -1,2 +1,2 @@
-prefix = Expr[Nothing](Test.this.macros)
-it works
+prefix = Expr[Nothing](Test.this.macros)
+it works
diff --git a/test/files/run/macro-declared-in-trait.check b/test/files/run/macro-declared-in-trait.check
index d5d9e4e457..104ff1e99b 100644
--- a/test/files/run/macro-declared-in-trait.check
+++ b/test/files/run/macro-declared-in-trait.check
@@ -1,15 +1,15 @@
-prefix = Expr[Nothing]({
- final class $anon extends Object with Base {
- def <init>(): anonymous class $anon = {
- $anon.super.<init>();
- ()
- };
- <empty>
- };
- new $anon()
-})
-it works
-prefix = Expr[Nothing](Macros)
-it works
-prefix = Expr[Nothing](new Macros())
-it works
+prefix = Expr[Nothing]({
+ final class $anon extends Object with Base {
+ def <init>(): anonymous class $anon = {
+ $anon.super.<init>();
+ ()
+ };
+ <empty>
+ };
+ new $anon()
+})
+it works
+prefix = Expr[Nothing](Macros)
+it works
+prefix = Expr[Nothing](new Macros())
+it works
diff --git a/test/files/run/macro-def-infer-return-type-b.check b/test/files/run/macro-def-infer-return-type-b.check
index f34d257c82..ae2dc7a06f 100644
--- a/test/files/run/macro-def-infer-return-type-b.check
+++ b/test/files/run/macro-def-infer-return-type-b.check
@@ -1,6 +1,6 @@
-reflective compilation has failed:
-
-exception during macro expansion:
-java.lang.Error: an implementation is missing
- at Impls$.foo(Impls_Macros_1.scala:5)
-
+reflective compilation has failed:
+
+exception during macro expansion:
+java.lang.Error: an implementation is missing
+ at Impls$.foo(Impls_Macros_1.scala:5)
+
diff --git a/test/files/run/macro-def-path-dependent-a.check b/test/files/run/macro-def-path-dependent-a.check
index 1ea14b4e20..7658ad2c24 100644
--- a/test/files/run/macro-def-path-dependent-a.check
+++ b/test/files/run/macro-def-path-dependent-a.check
@@ -1 +1 @@
-it works
+it works
diff --git a/test/files/run/macro-def-path-dependent-b.check b/test/files/run/macro-def-path-dependent-b.check
index 1ea14b4e20..7658ad2c24 100644
--- a/test/files/run/macro-def-path-dependent-b.check
+++ b/test/files/run/macro-def-path-dependent-b.check
@@ -1 +1 @@
-it works
+it works
diff --git a/test/files/run/macro-def-path-dependent-c.check b/test/files/run/macro-def-path-dependent-c.check
index 1ea14b4e20..7658ad2c24 100644
--- a/test/files/run/macro-def-path-dependent-c.check
+++ b/test/files/run/macro-def-path-dependent-c.check
@@ -1 +1 @@
-it works
+it works
diff --git a/test/files/run/macro-def-path-dependent-d1.check b/test/files/run/macro-def-path-dependent-d1.check
index 1ea14b4e20..7658ad2c24 100644
--- a/test/files/run/macro-def-path-dependent-d1.check
+++ b/test/files/run/macro-def-path-dependent-d1.check
@@ -1 +1 @@
-it works
+it works
diff --git a/test/files/run/macro-def-path-dependent-d2.check b/test/files/run/macro-def-path-dependent-d2.check
index 1ea14b4e20..7658ad2c24 100644
--- a/test/files/run/macro-def-path-dependent-d2.check
+++ b/test/files/run/macro-def-path-dependent-d2.check
@@ -1 +1 @@
-it works
+it works
diff --git a/test/files/run/macro-expand-implicit-argument.check b/test/files/run/macro-expand-implicit-argument.check
index fb42345748..15a62794a9 100644
--- a/test/files/run/macro-expand-implicit-argument.check
+++ b/test/files/run/macro-expand-implicit-argument.check
@@ -1 +1 @@
-List(1, 2, 3)
+List(1, 2, 3)
diff --git a/test/files/run/macro-expand-implicit-macro-has-implicit.check b/test/files/run/macro-expand-implicit-macro-has-implicit.check
index 2f562a182f..d81cc0710e 100644
--- a/test/files/run/macro-expand-implicit-macro-has-implicit.check
+++ b/test/files/run/macro-expand-implicit-macro-has-implicit.check
@@ -1 +1 @@
-42
+42
diff --git a/test/files/run/macro-expand-implicit-macro-is-implicit.check b/test/files/run/macro-expand-implicit-macro-is-implicit.check
index 42abf4579b..c205945d05 100644
--- a/test/files/run/macro-expand-implicit-macro-is-implicit.check
+++ b/test/files/run/macro-expand-implicit-macro-is-implicit.check
@@ -1,2 +1,2 @@
-Some(2)
-2
+Some(2)
+2
diff --git a/test/files/run/macro-expand-implicit-macro-is-val.check b/test/files/run/macro-expand-implicit-macro-is-val.check
index 78c6baefdd..0cfbf08886 100644
--- a/test/files/run/macro-expand-implicit-macro-is-val.check
+++ b/test/files/run/macro-expand-implicit-macro-is-val.check
@@ -1 +1 @@
-2
+2
diff --git a/test/files/run/macro-expand-implicit-macro-is-view.check b/test/files/run/macro-expand-implicit-macro-is-view.check
index 78c6baefdd..0cfbf08886 100644
--- a/test/files/run/macro-expand-implicit-macro-is-view.check
+++ b/test/files/run/macro-expand-implicit-macro-is-view.check
@@ -1 +1 @@
-2
+2
diff --git a/test/files/run/macro-expand-nullary-generic.check b/test/files/run/macro-expand-nullary-generic.check
index 0895c30c3f..133840c469 100644
--- a/test/files/run/macro-expand-nullary-generic.check
+++ b/test/files/run/macro-expand-nullary-generic.check
@@ -1,6 +1,6 @@
-it works TypeTag[Int]
-it works TypeTag[Int]
-it works TypeTag[Int]
-it works TypeTag[Int]
-it works TypeTag[Int]
-kkthxbai
+it works TypeTag[Int]
+it works TypeTag[Int]
+it works TypeTag[Int]
+it works TypeTag[Int]
+it works TypeTag[Int]
+kkthxbai
diff --git a/test/files/run/macro-expand-overload.check b/test/files/run/macro-expand-overload.check
index 9d9989d85f..a2b7b0e781 100644
--- a/test/files/run/macro-expand-overload.check
+++ b/test/files/run/macro-expand-overload.check
@@ -1,6 +1,6 @@
-(fooObjectString,Expr[Nothing](Macros),42)
-(fooObjectInt,Expr[Nothing](Macros),42)
-fooObjectBoolean
-(fooClassString,Expr[Nothing](new Macros()),42)
-(fooClassInt,Expr[Nothing](new Macros()),42)
-fooClassBoolean
+(fooObjectString,Expr[Nothing](Macros),42)
+(fooObjectInt,Expr[Nothing](Macros),42)
+fooObjectBoolean
+(fooClassString,Expr[Nothing](new Macros()),42)
+(fooClassInt,Expr[Nothing](new Macros()),42)
+fooClassBoolean
diff --git a/test/files/run/macro-expand-override.check b/test/files/run/macro-expand-override.check
index 486bec7098..b41dc156c4 100644
--- a/test/files/run/macro-expand-override.check
+++ b/test/files/run/macro-expand-override.check
@@ -1,15 +1,15 @@
-(fooBString,Expr[Nothing](Test.this.dd),42)
-(fooDInt,Expr[Nothing](Test.this.dd),42)
-fooBBoolean
-(fooBString,Expr[Nothing](Test.this.db),42)
-(fooBInt,Expr[Nothing](Test.this.db),42)
-fooBBoolean
-(fooZString,Expr[Nothing](Test.this.zz),42)
-(fooDInt,Expr[Nothing](Test.this.zz),42)
-fooZBoolean
-(fooBString,Expr[Nothing](Test.this.zd),42)
-(fooDInt,Expr[Nothing](Test.this.zd),42)
-fooZBoolean
-(fooBString,Expr[Nothing](Test.this.zb),42)
-(fooBInt,Expr[Nothing](Test.this.zb),42)
-fooZBoolean
+(fooBString,Expr[Nothing](Test.this.dd),42)
+(fooDInt,Expr[Nothing](Test.this.dd),42)
+fooBBoolean
+(fooBString,Expr[Nothing](Test.this.db),42)
+(fooBInt,Expr[Nothing](Test.this.db),42)
+fooBBoolean
+(fooZString,Expr[Nothing](Test.this.zz),42)
+(fooDInt,Expr[Nothing](Test.this.zz),42)
+fooZBoolean
+(fooBString,Expr[Nothing](Test.this.zd),42)
+(fooDInt,Expr[Nothing](Test.this.zd),42)
+fooZBoolean
+(fooBString,Expr[Nothing](Test.this.zb),42)
+(fooBInt,Expr[Nothing](Test.this.zb),42)
+fooZBoolean
diff --git a/test/files/run/macro-expand-recursive.check b/test/files/run/macro-expand-recursive.check
index 1ea14b4e20..7658ad2c24 100644
--- a/test/files/run/macro-expand-recursive.check
+++ b/test/files/run/macro-expand-recursive.check
@@ -1 +1 @@
-it works
+it works
diff --git a/test/files/run/macro-expand-tparams-explicit.check b/test/files/run/macro-expand-tparams-explicit.check
index 19e6d39bc8..e7e6718406 100644
--- a/test/files/run/macro-expand-tparams-explicit.check
+++ b/test/files/run/macro-expand-tparams-explicit.check
@@ -1 +1 @@
-TypeTag[Int]
+TypeTag[Int]
diff --git a/test/files/run/macro-expand-tparams-implicit.check b/test/files/run/macro-expand-tparams-implicit.check
index 37226ec68d..fa6b335afb 100644
--- a/test/files/run/macro-expand-tparams-implicit.check
+++ b/test/files/run/macro-expand-tparams-implicit.check
@@ -1,2 +1,2 @@
-TypeTag[Int]
-WeakTypeTag[String]
+TypeTag[Int]
+WeakTypeTag[String]
diff --git a/test/files/run/macro-expand-tparams-optional.check b/test/files/run/macro-expand-tparams-optional.check
index 3bacd7a4e0..b4a0f394c1 100644
--- a/test/files/run/macro-expand-tparams-optional.check
+++ b/test/files/run/macro-expand-tparams-optional.check
@@ -1 +1 @@
-don't know U
+don't know U
diff --git a/test/files/run/macro-expand-tparams-prefix-a.check b/test/files/run/macro-expand-tparams-prefix-a.check
index 7ef9fa7330..0bf3c55bbe 100644
--- a/test/files/run/macro-expand-tparams-prefix-a.check
+++ b/test/files/run/macro-expand-tparams-prefix-a.check
@@ -1,4 +1,4 @@
-TypeTag[Int]
-TypeTag[Int]
-WeakTypeTag[String]
-TypeTag[Boolean]
+TypeTag[Int]
+TypeTag[Int]
+WeakTypeTag[String]
+TypeTag[Boolean]
diff --git a/test/files/run/macro-expand-tparams-prefix-b.check b/test/files/run/macro-expand-tparams-prefix-b.check
index f4a2a8e80d..77c2ee9051 100644
--- a/test/files/run/macro-expand-tparams-prefix-b.check
+++ b/test/files/run/macro-expand-tparams-prefix-b.check
@@ -1,2 +1,2 @@
-TypeTag[Boolean] TypeTag[Int]
-TypeTag[Boolean] WeakTypeTag[String]
+TypeTag[Boolean] TypeTag[Int]
+TypeTag[Boolean] WeakTypeTag[String]
diff --git a/test/files/run/macro-expand-tparams-prefix-c1.check b/test/files/run/macro-expand-tparams-prefix-c1.check
index 473668ac58..f0dd5b9cd8 100644
--- a/test/files/run/macro-expand-tparams-prefix-c1.check
+++ b/test/files/run/macro-expand-tparams-prefix-c1.check
@@ -1,3 +1,3 @@
-TypeTag[Int]
-WeakTypeTag[String]
-TypeTag[Boolean]
+TypeTag[Int]
+WeakTypeTag[String]
+TypeTag[Boolean]
diff --git a/test/files/run/macro-expand-tparams-prefix-c2.check b/test/files/run/macro-expand-tparams-prefix-c2.check
index 473668ac58..f0dd5b9cd8 100644
--- a/test/files/run/macro-expand-tparams-prefix-c2.check
+++ b/test/files/run/macro-expand-tparams-prefix-c2.check
@@ -1,3 +1,3 @@
-TypeTag[Int]
-WeakTypeTag[String]
-TypeTag[Boolean]
+TypeTag[Int]
+WeakTypeTag[String]
+TypeTag[Boolean]
diff --git a/test/files/run/macro-expand-tparams-prefix-d1.check b/test/files/run/macro-expand-tparams-prefix-d1.check
index 2331e2549e..c5aaaf5a09 100644
--- a/test/files/run/macro-expand-tparams-prefix-d1.check
+++ b/test/files/run/macro-expand-tparams-prefix-d1.check
@@ -1,3 +1,3 @@
-WeakTypeTag[T]
-WeakTypeTag[U]
-TypeTag[Boolean]
+WeakTypeTag[T]
+WeakTypeTag[U]
+TypeTag[Boolean]
diff --git a/test/files/run/macro-expand-varargs-explicit-over-nonvarargs-bad.check b/test/files/run/macro-expand-varargs-explicit-over-nonvarargs-bad.check
index fd1d654cf8..1c3ecfdefb 100644
--- a/test/files/run/macro-expand-varargs-explicit-over-nonvarargs-bad.check
+++ b/test/files/run/macro-expand-varargs-explicit-over-nonvarargs-bad.check
@@ -1,4 +1,4 @@
-reflective compilation has failed:
-
+reflective compilation has failed:
+
no `: _*' annotation allowed here
-(such annotations are only allowed in arguments to *-parameters)
+(such annotations are only allowed in arguments to *-parameters)
diff --git a/test/files/run/macro-expand-varargs-explicit-over-nonvarargs-good.check b/test/files/run/macro-expand-varargs-explicit-over-nonvarargs-good.check
index 835137b4a2..fe90caed3c 100644
--- a/test/files/run/macro-expand-varargs-explicit-over-nonvarargs-good.check
+++ b/test/files/run/macro-expand-varargs-explicit-over-nonvarargs-good.check
@@ -1 +1 @@
-List(1, 2, 3, 4, 5)
+List(1, 2, 3, 4, 5)
diff --git a/test/files/run/macro-expand-varargs-explicit-over-varargs.check b/test/files/run/macro-expand-varargs-explicit-over-varargs.check
index 835137b4a2..fe90caed3c 100644
--- a/test/files/run/macro-expand-varargs-explicit-over-varargs.check
+++ b/test/files/run/macro-expand-varargs-explicit-over-varargs.check
@@ -1 +1 @@
-List(1, 2, 3, 4, 5)
+List(1, 2, 3, 4, 5)
diff --git a/test/files/run/macro-expand-varargs-implicit-over-nonvarargs.check b/test/files/run/macro-expand-varargs-implicit-over-nonvarargs.check
index 0a6596858c..bcfab19847 100644
--- a/test/files/run/macro-expand-varargs-implicit-over-nonvarargs.check
+++ b/test/files/run/macro-expand-varargs-implicit-over-nonvarargs.check
@@ -1 +1 @@
-(1,2,3,4,5)
+(1,2,3,4,5)
diff --git a/test/files/run/macro-expand-varargs-implicit-over-varargs.check b/test/files/run/macro-expand-varargs-implicit-over-varargs.check
index f25fa141d3..2c174a8a99 100644
--- a/test/files/run/macro-expand-varargs-implicit-over-varargs.check
+++ b/test/files/run/macro-expand-varargs-implicit-over-varargs.check
@@ -1 +1 @@
-WrappedArray(1, 2, 3, 4, 5)
+WrappedArray(1, 2, 3, 4, 5)
diff --git a/test/files/run/macro-impl-default-params.check b/test/files/run/macro-impl-default-params.check
index eaf94458e6..b32e345706 100644
--- a/test/files/run/macro-impl-default-params.check
+++ b/test/files/run/macro-impl-default-params.check
@@ -1,5 +1,5 @@
-foo_targs:
-invoking foo_targs...
-type of prefix is: Nothing
-type of prefix tree is: Macros[Int]
-U is: String
+foo_targs:
+invoking foo_targs...
+type of prefix is: Nothing
+type of prefix tree is: Macros[Int]
+U is: String
diff --git a/test/files/run/macro-impl-rename-context.check b/test/files/run/macro-impl-rename-context.check
index 753edcd970..6a34e5fd87 100644
--- a/test/files/run/macro-impl-rename-context.check
+++ b/test/files/run/macro-impl-rename-context.check
@@ -1,2 +1,2 @@
-foo
-invoking foo...
+foo
+invoking foo...
diff --git a/test/files/run/macro-invalidret-doesnt-conform-to-def-rettype.check b/test/files/run/macro-invalidret-doesnt-conform-to-def-rettype.check
index e21e05157a..916195145e 100644
--- a/test/files/run/macro-invalidret-doesnt-conform-to-def-rettype.check
+++ b/test/files/run/macro-invalidret-doesnt-conform-to-def-rettype.check
@@ -1,5 +1,5 @@
-reflective compilation has failed:
-
+reflective compilation has failed:
+
type mismatch;
found : String("42")
- required: Int
+ required: Int
diff --git a/test/files/run/macro-invalidret-nontypeable.check b/test/files/run/macro-invalidret-nontypeable.check
index eee08528e2..cf7acb0d60 100644
--- a/test/files/run/macro-invalidret-nontypeable.check
+++ b/test/files/run/macro-invalidret-nontypeable.check
@@ -1,3 +1,3 @@
-reflective compilation has failed:
-
-not found: value IDoNotExist
+reflective compilation has failed:
+
+not found: value IDoNotExist
diff --git a/test/files/run/macro-invalidusage-badret.check b/test/files/run/macro-invalidusage-badret.check
index 5bdc484644..221732eefc 100644
--- a/test/files/run/macro-invalidusage-badret.check
+++ b/test/files/run/macro-invalidusage-badret.check
@@ -1,5 +1,5 @@
-reflective compilation has failed:
-
+reflective compilation has failed:
+
type mismatch;
found : Int(42)
- required: String
+ required: String
diff --git a/test/files/run/macro-invalidusage-partialapplication-with-tparams.check b/test/files/run/macro-invalidusage-partialapplication-with-tparams.check
index 73f57b0b81..f1d5e925fa 100644
--- a/test/files/run/macro-invalidusage-partialapplication-with-tparams.check
+++ b/test/files/run/macro-invalidusage-partialapplication-with-tparams.check
@@ -1,3 +1,3 @@
-reflective compilation has failed:
-
-macros cannot be partially applied
+reflective compilation has failed:
+
+macros cannot be partially applied
diff --git a/test/files/run/macro-invalidusage-partialapplication.check b/test/files/run/macro-invalidusage-partialapplication.check
index 73f57b0b81..f1d5e925fa 100644
--- a/test/files/run/macro-invalidusage-partialapplication.check
+++ b/test/files/run/macro-invalidusage-partialapplication.check
@@ -1,3 +1,3 @@
-reflective compilation has failed:
-
-macros cannot be partially applied
+reflective compilation has failed:
+
+macros cannot be partially applied
diff --git a/test/files/run/macro-openmacros.check b/test/files/run/macro-openmacros.check
index a4b06a1e1a..ba0ae3ff42 100644
--- a/test/files/run/macro-openmacros.check
+++ b/test/files/run/macro-openmacros.check
@@ -1,3 +1,3 @@
-List(MacroContext(foo@source-Test_2.scala,line-2,offset=35 +0))
-List(MacroContext(foo@source-Test_2.scala,line-2,offset=35 +1), MacroContext(foo@source-Test_2.scala,line-2,offset=35 +0))
-List(MacroContext(foo@source-Test_2.scala,line-2,offset=35 +2), MacroContext(foo@source-Test_2.scala,line-2,offset=35 +1), MacroContext(foo@source-Test_2.scala,line-2,offset=35 +0))
+List(MacroContext(foo@source-Test_2.scala,line-2,offset=35 +0))
+List(MacroContext(foo@source-Test_2.scala,line-2,offset=35 +1), MacroContext(foo@source-Test_2.scala,line-2,offset=35 +0))
+List(MacroContext(foo@source-Test_2.scala,line-2,offset=35 +2), MacroContext(foo@source-Test_2.scala,line-2,offset=35 +1), MacroContext(foo@source-Test_2.scala,line-2,offset=35 +0))
diff --git a/test/files/run/macro-reify-abstypetag-notypeparams.check b/test/files/run/macro-reify-abstypetag-notypeparams.check
index aadd713bef..7732c10d75 100644
--- a/test/files/run/macro-reify-abstypetag-notypeparams.check
+++ b/test/files/run/macro-reify-abstypetag-notypeparams.check
@@ -1,2 +1,2 @@
-TypeTag[Int]
-TypeTag[List[Int]]
+TypeTag[Int]
+TypeTag[List[Int]]
diff --git a/test/files/run/macro-reify-abstypetag-typeparams-notags.check b/test/files/run/macro-reify-abstypetag-typeparams-notags.check
index 6aeec96079..a741d11ebd 100644
--- a/test/files/run/macro-reify-abstypetag-typeparams-notags.check
+++ b/test/files/run/macro-reify-abstypetag-typeparams-notags.check
@@ -1,2 +1,2 @@
-WeakTypeTag[T]
-WeakTypeTag[List[T]]
+WeakTypeTag[T]
+WeakTypeTag[List[T]]
diff --git a/test/files/run/macro-reify-abstypetag-typeparams-tags.check b/test/files/run/macro-reify-abstypetag-typeparams-tags.check
index 6e2646c5e0..e225e57757 100644
--- a/test/files/run/macro-reify-abstypetag-typeparams-tags.check
+++ b/test/files/run/macro-reify-abstypetag-typeparams-tags.check
@@ -1,2 +1,2 @@
-TypeTag[Int]
-WeakTypeTag[List[Int]]
+TypeTag[Int]
+WeakTypeTag[List[Int]]
diff --git a/test/files/run/macro-reify-abstypetag-usetypetag.check b/test/files/run/macro-reify-abstypetag-usetypetag.check
index 6e2646c5e0..e225e57757 100644
--- a/test/files/run/macro-reify-abstypetag-usetypetag.check
+++ b/test/files/run/macro-reify-abstypetag-usetypetag.check
@@ -1,2 +1,2 @@
-TypeTag[Int]
-WeakTypeTag[List[Int]]
+TypeTag[Int]
+WeakTypeTag[List[Int]]
diff --git a/test/files/run/macro-reify-basic.check b/test/files/run/macro-reify-basic.check
index f35d3e67b4..3b18e512db 100644
--- a/test/files/run/macro-reify-basic.check
+++ b/test/files/run/macro-reify-basic.check
@@ -1 +1 @@
-hello world
+hello world
diff --git a/test/files/run/macro-reify-freevars.check b/test/files/run/macro-reify-freevars.check
index 2e925f9fa8..f13806889e 100644
--- a/test/files/run/macro-reify-freevars.check
+++ b/test/files/run/macro-reify-freevars.check
@@ -1,3 +1,3 @@
-reflective compilation has failed:
-
-Macro expansion contains free term variable code defined by map in Macros_1.scala:9:9. Have you forgotten to use splice when splicing this variable into a reifee? If you have troubles tracking free term variables, consider using -Xlog-free-terms
+reflective compilation has failed:
+
+Macro expansion contains free term variable code defined by map in Macros_1.scala:9:9. Have you forgotten to use splice when splicing this variable into a reifee? If you have troubles tracking free term variables, consider using -Xlog-free-terms
diff --git a/test/files/run/macro-reify-ref-to-packageless.check b/test/files/run/macro-reify-ref-to-packageless.check
index 2f562a182f..d81cc0710e 100644
--- a/test/files/run/macro-reify-ref-to-packageless.check
+++ b/test/files/run/macro-reify-ref-to-packageless.check
@@ -1 +1 @@
-42
+42
diff --git a/test/files/run/macro-reify-splice-outside-reify.check b/test/files/run/macro-reify-splice-outside-reify.check
index 2f562a182f..d81cc0710e 100644
--- a/test/files/run/macro-reify-splice-outside-reify.check
+++ b/test/files/run/macro-reify-splice-outside-reify.check
@@ -1 +1 @@
-42
+42
diff --git a/test/files/run/macro-reify-splice-splice.check b/test/files/run/macro-reify-splice-splice.check
index f35d3e67b4..3b18e512db 100644
--- a/test/files/run/macro-reify-splice-splice.check
+++ b/test/files/run/macro-reify-splice-splice.check
@@ -1 +1 @@
-hello world
+hello world
diff --git a/test/files/run/macro-reify-tagful-a.check b/test/files/run/macro-reify-tagful-a.check
index 8a701df6a5..3f4c719990 100644
--- a/test/files/run/macro-reify-tagful-a.check
+++ b/test/files/run/macro-reify-tagful-a.check
@@ -1 +1 @@
-List(hello world)
+List(hello world)
diff --git a/test/files/run/macro-reify-tagless-a.check b/test/files/run/macro-reify-tagless-a.check
index c2385ba008..231741edc5 100644
--- a/test/files/run/macro-reify-tagless-a.check
+++ b/test/files/run/macro-reify-tagless-a.check
@@ -1,3 +1,3 @@
-reflective compilation has failed:
-
-Macro expansion contains free type variable T defined by foo in Impls_Macros_1.scala:7:13. Have you forgotten to use c.WeakTypeTag annotation for this type parameter? If you have troubles tracking free type variables, consider using -Xlog-free-types
+reflective compilation has failed:
+
+Macro expansion contains free type variable T defined by foo in Impls_Macros_1.scala:7:13. Have you forgotten to use c.WeakTypeTag annotation for this type parameter? If you have troubles tracking free type variables, consider using -Xlog-free-types
diff --git a/test/files/run/macro-reify-typetag-notypeparams.check b/test/files/run/macro-reify-typetag-notypeparams.check
index aadd713bef..7732c10d75 100644
--- a/test/files/run/macro-reify-typetag-notypeparams.check
+++ b/test/files/run/macro-reify-typetag-notypeparams.check
@@ -1,2 +1,2 @@
-TypeTag[Int]
-TypeTag[List[Int]]
+TypeTag[Int]
+TypeTag[List[Int]]
diff --git a/test/files/run/macro-reify-typetag-typeparams-tags.check b/test/files/run/macro-reify-typetag-typeparams-tags.check
index aadd713bef..7732c10d75 100644
--- a/test/files/run/macro-reify-typetag-typeparams-tags.check
+++ b/test/files/run/macro-reify-typetag-typeparams-tags.check
@@ -1,2 +1,2 @@
-TypeTag[Int]
-TypeTag[List[Int]]
+TypeTag[Int]
+TypeTag[List[Int]]
diff --git a/test/files/run/macro-reify-unreify.check b/test/files/run/macro-reify-unreify.check
index 8f8d9d944d..7a6d53c47e 100644
--- a/test/files/run/macro-reify-unreify.check
+++ b/test/files/run/macro-reify-unreify.check
@@ -1 +1 @@
-hello world = Expr[java.lang.String("hello world")]("hello world")
+hello world = Expr[java.lang.String("hello world")]("hello world")
diff --git a/test/files/run/macro-repl-basic.check b/test/files/run/macro-repl-basic.check
index 4a50c60469..7deed4a878 100644
--- a/test/files/run/macro-repl-basic.check
+++ b/test/files/run/macro-repl-basic.check
@@ -1,54 +1,54 @@
-Type in expressions to have them evaluated.
-Type :help for more information.
-
-scala>
-
-scala> import language.experimental.macros
-import language.experimental.macros
-
-scala> import scala.reflect.macros.{Context => Ctx}
-import scala.reflect.macros.{Context=>Ctx}
-
-scala>
-
-scala> object Impls {
- def foo(c: Ctx)(x: c.Expr[Int]) = {
- import c.universe._
- val body = Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(1))))
- c.Expr[Int](body)
- }
-
- def bar(c: Ctx)(x: c.Expr[Int]) = {
- import c.universe._
- val body = Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(2))))
- c.Expr[Int](body)
- }
-
- def quux(c: Ctx)(x: c.Expr[Int]) = {
- import c.universe._
- val body = Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(3))))
- c.Expr[Int](body)
- }
-}
-defined module Impls
-
-scala> object Macros {
- object Shmacros {
- def foo(x: Int): Int = macro Impls.foo
- }
- def bar(x: Int): Int = macro Impls.bar
-}; class Macros {
- def quux(x: Int): Int = macro Impls.quux
-}
-defined module Macros
-defined class Macros
-
-scala>
-
-scala> import Macros.Shmacros._
-import Macros.Shmacros._
-
-scala> println(foo(2) + Macros.bar(2) * new Macros().quux(4))
-31
-
-scala>
+Type in expressions to have them evaluated.
+Type :help for more information.
+
+scala>
+
+scala> import language.experimental.macros
+import language.experimental.macros
+
+scala> import scala.reflect.macros.{Context => Ctx}
+import scala.reflect.macros.{Context=>Ctx}
+
+scala>
+
+scala> object Impls {
+ def foo(c: Ctx)(x: c.Expr[Int]) = {
+ import c.universe._
+ val body = Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(1))))
+ c.Expr[Int](body)
+ }
+
+ def bar(c: Ctx)(x: c.Expr[Int]) = {
+ import c.universe._
+ val body = Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(2))))
+ c.Expr[Int](body)
+ }
+
+ def quux(c: Ctx)(x: c.Expr[Int]) = {
+ import c.universe._
+ val body = Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(3))))
+ c.Expr[Int](body)
+ }
+}
+defined module Impls
+
+scala> object Macros {
+ object Shmacros {
+ def foo(x: Int): Int = macro Impls.foo
+ }
+ def bar(x: Int): Int = macro Impls.bar
+}; class Macros {
+ def quux(x: Int): Int = macro Impls.quux
+}
+defined module Macros
+defined class Macros
+
+scala>
+
+scala> import Macros.Shmacros._
+import Macros.Shmacros._
+
+scala> println(foo(2) + Macros.bar(2) * new Macros().quux(4))
+31
+
+scala>
diff --git a/test/files/run/macro-repl-dontexpand.check b/test/files/run/macro-repl-dontexpand.check
index 3c378cdf09..628a9146c4 100644
--- a/test/files/run/macro-repl-dontexpand.check
+++ b/test/files/run/macro-repl-dontexpand.check
@@ -1,12 +1,12 @@
-Type in expressions to have them evaluated.
-Type :help for more information.
-
-scala>
-
-scala> def bar(c: scala.reflect.macros.Context) = ???
-bar: (c: scala.reflect.macros.Context)Nothing
-
-scala> def foo = macro bar
-foo: Any
-
-scala>
+Type in expressions to have them evaluated.
+Type :help for more information.
+
+scala>
+
+scala> def bar(c: scala.reflect.macros.Context) = ???
+bar: (c: scala.reflect.macros.Context)Nothing
+
+scala> def foo = macro bar
+foo: Any
+
+scala>
diff --git a/test/files/run/macro-settings.check b/test/files/run/macro-settings.check
index 33784d1c15..050d53cdbb 100644
--- a/test/files/run/macro-settings.check
+++ b/test/files/run/macro-settings.check
@@ -1 +1 @@
-List(hello=1)
+List(hello=1)
diff --git a/test/files/run/macro-sip19-revised.check b/test/files/run/macro-sip19-revised.check
index aa2fbd11d3..86c3d819b0 100644
--- a/test/files/run/macro-sip19-revised.check
+++ b/test/files/run/macro-sip19-revised.check
@@ -1,5 +1,5 @@
-hey, i've been called from SourceLocation1(null,Test_2.scala,11,251)
-hey, i've been called from SourceLocation1(SourceLocation1(null,Test_2.scala,11,251),Test_2.scala,8,222)
-hey, i've been called from SourceLocation1(SourceLocation1(SourceLocation1(null,Test_2.scala,11,251),Test_2.scala,8,222),Test_2.scala,8,222)
-hey, i've been called from SourceLocation1(SourceLocation1(SourceLocation1(SourceLocation1(null,Test_2.scala,11,251),Test_2.scala,8,222),Test_2.scala,8,222),Test_2.scala,6,180)
-2
+hey, i've been called from SourceLocation1(null,Test_2.scala,11,251)
+hey, i've been called from SourceLocation1(SourceLocation1(null,Test_2.scala,11,251),Test_2.scala,8,222)
+hey, i've been called from SourceLocation1(SourceLocation1(SourceLocation1(null,Test_2.scala,11,251),Test_2.scala,8,222),Test_2.scala,8,222)
+hey, i've been called from SourceLocation1(SourceLocation1(SourceLocation1(SourceLocation1(null,Test_2.scala,11,251),Test_2.scala,8,222),Test_2.scala,8,222),Test_2.scala,6,180)
+2
diff --git a/test/files/run/macro-sip19.check b/test/files/run/macro-sip19.check
index 6b317ccb47..07cfd8c1e1 100644
--- a/test/files/run/macro-sip19.check
+++ b/test/files/run/macro-sip19.check
@@ -1,5 +1,5 @@
-hey, i've been called from SourceLocation(Test_2.scala,15,366)
-hey, i've been called from SourceLocation(Test_2.scala,11,331)
-hey, i've been called from SourceLocation(Test_2.scala,11,331)
-hey, i've been called from SourceLocation(Test_2.scala,9,285)
-2
+hey, i've been called from SourceLocation(Test_2.scala,15,366)
+hey, i've been called from SourceLocation(Test_2.scala,11,331)
+hey, i've been called from SourceLocation(Test_2.scala,11,331)
+hey, i've been called from SourceLocation(Test_2.scala,9,285)
+2
diff --git a/test/files/run/macro-typecheck-implicitsdisabled.check b/test/files/run/macro-typecheck-implicitsdisabled.check
index aa6c8e1f07..6cf25076a7 100644
--- a/test/files/run/macro-typecheck-implicitsdisabled.check
+++ b/test/files/run/macro-typecheck-implicitsdisabled.check
@@ -1,2 +1,2 @@
-scala.this.Predef.any2ArrowAssoc[Int](1).->[Int](2)
-scala.reflect.internal.Types$TypeError: value -> is not a member of Int
+scala.this.Predef.any2ArrowAssoc[Int](1).->[Int](2)
+scala.reflect.internal.Types$TypeError: value -> is not a member of Int
diff --git a/test/files/run/macro-typecheck-macrosdisabled.check b/test/files/run/macro-typecheck-macrosdisabled.check
index c88d33b48e..719c6a2ef2 100644
--- a/test/files/run/macro-typecheck-macrosdisabled.check
+++ b/test/files/run/macro-typecheck-macrosdisabled.check
@@ -1,32 +1,32 @@
-{
- val $u: reflect.runtime.universe.type = scala.reflect.runtime.`package`.universe;
- val $m: $u.Mirror = scala.reflect.runtime.`package`.universe.runtimeMirror(this.getClass().getClassLoader());
- $u.Expr.apply[Int(2)]($m, {
- final class $treecreator1 extends TreeCreator {
- def <init>(): $treecreator1 = {
- $treecreator1.super.<init>();
- ()
- };
- def apply[U >: Nothing <: scala.reflect.api.Universe with Singleton]($m$untyped: scala.reflect.api.MirrorOf[U]): U#Tree = {
- val $u: U = $m$untyped.universe;
- val $m: $u.Mirror = $m$untyped.asInstanceOf[$u.Mirror];
- $u.Literal.apply($u.Constant.apply(2))
- }
- };
- new $treecreator1()
- })($u.TypeTag.apply[Int(2)]($m, {
- final class $typecreator2 extends TypeCreator {
- def <init>(): $typecreator2 = {
- $typecreator2.super.<init>();
- ()
- };
- def apply[U >: Nothing <: scala.reflect.api.Universe with Singleton]($m$untyped: scala.reflect.api.MirrorOf[U]): U#Type = {
- val $u: U = $m$untyped.universe;
- val $m: $u.Mirror = $m$untyped.asInstanceOf[$u.Mirror];
- $u.ConstantType.apply($u.Constant.apply(2))
- }
- };
- new $typecreator2()
- }))
-}
-ru.reify[Int](2)
+{
+ val $u: reflect.runtime.universe.type = scala.reflect.runtime.`package`.universe;
+ val $m: $u.Mirror = scala.reflect.runtime.`package`.universe.runtimeMirror(this.getClass().getClassLoader());
+ $u.Expr.apply[Int(2)]($m, {
+ final class $treecreator1 extends TreeCreator {
+ def <init>(): $treecreator1 = {
+ $treecreator1.super.<init>();
+ ()
+ };
+ def apply[U >: Nothing <: scala.reflect.api.Universe with Singleton]($m$untyped: scala.reflect.api.MirrorOf[U]): U#Tree = {
+ val $u: U = $m$untyped.universe;
+ val $m: $u.Mirror = $m$untyped.asInstanceOf[$u.Mirror];
+ $u.Literal.apply($u.Constant.apply(2))
+ }
+ };
+ new $treecreator1()
+ })($u.TypeTag.apply[Int(2)]($m, {
+ final class $typecreator2 extends TypeCreator {
+ def <init>(): $typecreator2 = {
+ $typecreator2.super.<init>();
+ ()
+ };
+ def apply[U >: Nothing <: scala.reflect.api.Universe with Singleton]($m$untyped: scala.reflect.api.MirrorOf[U]): U#Type = {
+ val $u: U = $m$untyped.universe;
+ val $m: $u.Mirror = $m$untyped.asInstanceOf[$u.Mirror];
+ $u.ConstantType.apply($u.Constant.apply(2))
+ }
+ };
+ new $typecreator2()
+ }))
+}
+ru.reify[Int](2)
diff --git a/test/files/run/macro-typecheck-macrosdisabled2.check b/test/files/run/macro-typecheck-macrosdisabled2.check
index 469f41aa94..1fd422083c 100644
--- a/test/files/run/macro-typecheck-macrosdisabled2.check
+++ b/test/files/run/macro-typecheck-macrosdisabled2.check
@@ -1,32 +1,32 @@
-{
- val $u: reflect.runtime.universe.type = scala.reflect.runtime.`package`.universe;
- val $m: $u.Mirror = scala.reflect.runtime.`package`.universe.runtimeMirror(this.getClass().getClassLoader());
- $u.Expr.apply[Array[Int]]($m, {
- final class $treecreator1 extends TreeCreator {
- def <init>(): $treecreator1 = {
- $treecreator1.super.<init>();
- ()
- };
- def apply[U >: Nothing <: scala.reflect.api.Universe with Singleton]($m$untyped: scala.reflect.api.MirrorOf[U]): U#Tree = {
- val $u: U = $m$untyped.universe;
- val $m: $u.Mirror = $m$untyped.asInstanceOf[$u.Mirror];
- $u.Apply.apply($u.Select.apply($u.Select.apply($u.build.Ident($m.staticPackage("scala")), $u.newTermName("Array")), $u.newTermName("apply")), scala.collection.immutable.List.apply[$u.Literal]($u.Literal.apply($u.Constant.apply(2))))
- }
- };
- new $treecreator1()
- })($u.TypeTag.apply[Array[Int]]($m, {
- final class $typecreator2 extends TypeCreator {
- def <init>(): $typecreator2 = {
- $typecreator2.super.<init>();
- ()
- };
- def apply[U >: Nothing <: scala.reflect.api.Universe with Singleton]($m$untyped: scala.reflect.api.MirrorOf[U]): U#Type = {
- val $u: U = $m$untyped.universe;
- val $m: $u.Mirror = $m$untyped.asInstanceOf[$u.Mirror];
- $u.TypeRef.apply($u.ThisType.apply($m.staticPackage("scala").asModule.moduleClass), $m.staticClass("scala.Array"), scala.collection.immutable.List.apply[$u.Type]($m.staticClass("scala.Int").asType.toTypeConstructor))
- }
- };
- new $typecreator2()
- }))
-}
-ru.reify[Array[Int]](scala.Array.apply(2))
+{
+ val $u: reflect.runtime.universe.type = scala.reflect.runtime.`package`.universe;
+ val $m: $u.Mirror = scala.reflect.runtime.`package`.universe.runtimeMirror(this.getClass().getClassLoader());
+ $u.Expr.apply[Array[Int]]($m, {
+ final class $treecreator1 extends TreeCreator {
+ def <init>(): $treecreator1 = {
+ $treecreator1.super.<init>();
+ ()
+ };
+ def apply[U >: Nothing <: scala.reflect.api.Universe with Singleton]($m$untyped: scala.reflect.api.MirrorOf[U]): U#Tree = {
+ val $u: U = $m$untyped.universe;
+ val $m: $u.Mirror = $m$untyped.asInstanceOf[$u.Mirror];
+ $u.Apply.apply($u.Select.apply($u.Select.apply($u.build.Ident($m.staticPackage("scala")), $u.newTermName("Array")), $u.newTermName("apply")), scala.collection.immutable.List.apply[$u.Literal]($u.Literal.apply($u.Constant.apply(2))))
+ }
+ };
+ new $treecreator1()
+ })($u.TypeTag.apply[Array[Int]]($m, {
+ final class $typecreator2 extends TypeCreator {
+ def <init>(): $typecreator2 = {
+ $typecreator2.super.<init>();
+ ()
+ };
+ def apply[U >: Nothing <: scala.reflect.api.Universe with Singleton]($m$untyped: scala.reflect.api.MirrorOf[U]): U#Type = {
+ val $u: U = $m$untyped.universe;
+ val $m: $u.Mirror = $m$untyped.asInstanceOf[$u.Mirror];
+ $u.TypeRef.apply($u.ThisType.apply($m.staticPackage("scala").asModule.moduleClass), $m.staticClass("scala.Array"), scala.collection.immutable.List.apply[$u.Type]($m.staticClass("scala.Int").asType.toTypeConstructor))
+ }
+ };
+ new $typecreator2()
+ }))
+}
+ru.reify[Array[Int]](scala.Array.apply(2))
diff --git a/test/files/run/macro-undetparams-consfromsls.check b/test/files/run/macro-undetparams-consfromsls.check
index 4b83c55437..b10a90043e 100644
--- a/test/files/run/macro-undetparams-consfromsls.check
+++ b/test/files/run/macro-undetparams-consfromsls.check
@@ -1,5 +1,5 @@
-A = TypeTag[Int]
-B = TypeTag[Nothing]
-List(1)
-A = TypeTag[Any]
-List(abc, 1)
+A = TypeTag[Int]
+B = TypeTag[Nothing]
+List(1)
+A = TypeTag[Any]
+List(abc, 1)
diff --git a/test/files/run/macro-undetparams-implicitval.check b/test/files/run/macro-undetparams-implicitval.check
index 30681fa40d..541b922b21 100644
--- a/test/files/run/macro-undetparams-implicitval.check
+++ b/test/files/run/macro-undetparams-implicitval.check
@@ -1 +1 @@
-TypeTag[Nothing]
+TypeTag[Nothing]
diff --git a/test/files/run/macro-undetparams-macroitself.check b/test/files/run/macro-undetparams-macroitself.check
index 37226ec68d..fa6b335afb 100644
--- a/test/files/run/macro-undetparams-macroitself.check
+++ b/test/files/run/macro-undetparams-macroitself.check
@@ -1,2 +1,2 @@
-TypeTag[Int]
-WeakTypeTag[String]
+TypeTag[Int]
+WeakTypeTag[String]
diff --git a/test/files/run/newTags.check b/test/files/run/newTags.check
index 0c1bd95eb2..16be9b124e 100644
--- a/test/files/run/newTags.check
+++ b/test/files/run/newTags.check
@@ -1,3 +1,3 @@
-List[Int]
-Map[String,String]
-TypeTag[Map[String,String]]
+List[Int]
+Map[String,String]
+TypeTag[Map[String,String]]
diff --git a/test/files/run/partialfun.check b/test/files/run/partialfun.check
index a317f7b150..d4e9f494cd 100644
--- a/test/files/run/partialfun.check
+++ b/test/files/run/partialfun.check
@@ -1,6 +1,6 @@
-47
-147
-100
-0:isDefinedAt
-1:isDefinedAt
-2:apply
+47
+147
+100
+0:isDefinedAt
+1:isDefinedAt
+2:apply
diff --git a/test/files/run/partialfun.scala b/test/files/run/partialfun.scala
index 4b360750c9..f3c53b94ae 100644
--- a/test/files/run/partialfun.scala
+++ b/test/files/run/partialfun.scala
@@ -1,86 +1,86 @@
-import collection._
-import collection.generic._
-
-object Test {
- def collectIDA[A, B, Repr, That](_this: TraversableLike[A, Repr])(pf: PartialFunction[A, B])(implicit bf: CanBuildFrom[Repr, B, That]): That = {
- val repr: Repr = _this.asInstanceOf[Repr]
- val b = bf(repr)
- _this foreach { x => if (pf isDefinedAt x) b += pf(x) }
- b.result
- }
-
- def collectRW[A, B, Repr, That](_this: TraversableLike[A, Repr])(pf: PartialFunction[A, B])(implicit bf: CanBuildFrom[Repr, B, That]): That = {
- val repr: Repr = _this.asInstanceOf[Repr]
- val b = bf(repr)
- val f = pf runWith { b += _ }
- _this foreach f
- b.result
- }
-
- var cnt = 0
-
- object Ex1 {
- def unapply(x: Int) : Option[Int] = {
- cnt += 1
- if ((x % 3) == 0) Some(-x) else None
- }
- }
-
- object Ex2 {
- def unapply(x: Int) : Option[Int] = {
- //cnt += 1
- if ((x % 5) == 0) Some(x) else None
- }
- }
-
- def resetCnt() = { val r = cnt; cnt = 0; r }
-
- val pf: PartialFunction[Int,Int] = {
- case Ex1(result) => result
- case Ex2(result) => result
- }
-
- def collectTest() {
- val xs = 1 to 100
- resetCnt()
-
- val ysIDA = collectIDA(xs)(pf)
- val cntIDA = resetCnt()
-
- val ysRW = collectRW(xs)(pf)
- val cntRW = resetCnt()
-
- val ys = xs collect pf
-
- assert(ys == ysIDA)
- assert(ys == ysRW)
- assert(cntIDA == xs.length + ys.length)
- assert(cntRW == xs.length)
- println(ys.length)
- println(cntIDA)
- println(cntRW)
- }
-
- def orElseTest() {
- val pf0 = new PartialFunction[Unit, Unit] {
- def apply(u: Unit) { println("0:apply") }
- def isDefinedAt(u: Unit) = { println("0:isDefinedAt"); false }
- }
- val pf1 = new PartialFunction[Unit, Unit] {
- def apply(u: Unit) { println("1:apply") }
- def isDefinedAt(u: Unit) = { println("1:isDefinedAt"); false }
- }
- val pf2 = new PartialFunction[Unit, Unit] {
- def apply(u: Unit) { println("2:apply") }
- def isDefinedAt(u: Unit) = { println("2:isDefinedAt"); true }
- }
-
- val chained = pf0 orElse pf1 orElse pf2
- chained()
- }
-
- def main(args: Array[String]): Unit = {
- collectTest()
- orElseTest()
- }
-}
+import collection._
+import collection.generic._
+
+object Test {
+ def collectIDA[A, B, Repr, That](_this: TraversableLike[A, Repr])(pf: PartialFunction[A, B])(implicit bf: CanBuildFrom[Repr, B, That]): That = {
+ val repr: Repr = _this.asInstanceOf[Repr]
+ val b = bf(repr)
+ _this foreach { x => if (pf isDefinedAt x) b += pf(x) }
+ b.result
+ }
+
+ def collectRW[A, B, Repr, That](_this: TraversableLike[A, Repr])(pf: PartialFunction[A, B])(implicit bf: CanBuildFrom[Repr, B, That]): That = {
+ val repr: Repr = _this.asInstanceOf[Repr]
+ val b = bf(repr)
+ val f = pf runWith { b += _ }
+ _this foreach f
+ b.result
+ }
+
+ var cnt = 0
+
+ object Ex1 {
+ def unapply(x: Int) : Option[Int] = {
+ cnt += 1
+ if ((x % 3) == 0) Some(-x) else None
+ }
+ }
+
+ object Ex2 {
+ def unapply(x: Int) : Option[Int] = {
+ //cnt += 1
+ if ((x % 5) == 0) Some(x) else None
+ }
+ }
+
+ def resetCnt() = { val r = cnt; cnt = 0; r }
+
+ val pf: PartialFunction[Int,Int] = {
+ case Ex1(result) => result
+ case Ex2(result) => result
+ }
+
+ def collectTest() {
+ val xs = 1 to 100
+ resetCnt()
+
+ val ysIDA = collectIDA(xs)(pf)
+ val cntIDA = resetCnt()
+
+ val ysRW = collectRW(xs)(pf)
+ val cntRW = resetCnt()
+
+ val ys = xs collect pf
+
+ assert(ys == ysIDA)
+ assert(ys == ysRW)
+ assert(cntIDA == xs.length + ys.length)
+ assert(cntRW == xs.length)
+ println(ys.length)
+ println(cntIDA)
+ println(cntRW)
+ }
+
+ def orElseTest() {
+ val pf0 = new PartialFunction[Unit, Unit] {
+ def apply(u: Unit) { println("0:apply") }
+ def isDefinedAt(u: Unit) = { println("0:isDefinedAt"); false }
+ }
+ val pf1 = new PartialFunction[Unit, Unit] {
+ def apply(u: Unit) { println("1:apply") }
+ def isDefinedAt(u: Unit) = { println("1:isDefinedAt"); false }
+ }
+ val pf2 = new PartialFunction[Unit, Unit] {
+ def apply(u: Unit) { println("2:apply") }
+ def isDefinedAt(u: Unit) = { println("2:isDefinedAt"); true }
+ }
+
+ val chained = pf0 orElse pf1 orElse pf2
+ chained()
+ }
+
+ def main(args: Array[String]): Unit = {
+ collectTest()
+ orElseTest()
+ }
+}
diff --git a/test/files/run/primitive-sigs-2-new.check b/test/files/run/primitive-sigs-2-new.check
index 6f79d73d38..59d864947c 100644
--- a/test/files/run/primitive-sigs-2-new.check
+++ b/test/files/run/primitive-sigs-2-new.check
@@ -1,7 +1,7 @@
-T<java.lang.Object>
-List(A, char, class java.lang.Object)
-a
-public <T> java.lang.Object Arr.arr4(java.lang.Object[],scala.reflect.ClassTag<T>)
-public float[] Arr.arr3(float[][])
-public scala.collection.immutable.List<java.lang.Character> Arr.arr2(java.lang.Character[])
-public scala.collection.immutable.List<java.lang.Object> Arr.arr1(int[])
+T<java.lang.Object>
+List(A, char, class java.lang.Object)
+a
+public <T> java.lang.Object Arr.arr4(java.lang.Object[],scala.reflect.ClassTag<T>)
+public float[] Arr.arr3(float[][])
+public scala.collection.immutable.List<java.lang.Character> Arr.arr2(java.lang.Character[])
+public scala.collection.immutable.List<java.lang.Object> Arr.arr1(int[])
diff --git a/test/files/run/primitive-sigs-2-old.check b/test/files/run/primitive-sigs-2-old.check
index 9132b4d8ae..feb0619525 100644
--- a/test/files/run/primitive-sigs-2-old.check
+++ b/test/files/run/primitive-sigs-2-old.check
@@ -1,7 +1,7 @@
-T<java.lang.Object>
-List(A, char, class java.lang.Object)
-a
-public <T> java.lang.Object Arr.arr4(java.lang.Object[],scala.reflect.Manifest<T>)
-public float[] Arr.arr3(float[][])
-public scala.collection.immutable.List<java.lang.Character> Arr.arr2(java.lang.Character[])
-public scala.collection.immutable.List<java.lang.Object> Arr.arr1(int[])
+T<java.lang.Object>
+List(A, char, class java.lang.Object)
+a
+public <T> java.lang.Object Arr.arr4(java.lang.Object[],scala.reflect.Manifest<T>)
+public float[] Arr.arr3(float[][])
+public scala.collection.immutable.List<java.lang.Character> Arr.arr2(java.lang.Character[])
+public scala.collection.immutable.List<java.lang.Object> Arr.arr1(int[])
diff --git a/test/files/run/reflection-allmirrors-tostring.check b/test/files/run/reflection-allmirrors-tostring.check
index b5fe6c33bb..2a3be29402 100644
--- a/test/files/run/reflection-allmirrors-tostring.check
+++ b/test/files/run/reflection-allmirrors-tostring.check
@@ -1,14 +1,14 @@
-class mirror for C (bound to null)
-module mirror for M (bound to null)
-instance mirror for an instance of C
-field mirror for C.f1 (bound to an instance of C)
-field mirror for C.f2 (bound to an instance of C)
-method mirror for C.m1: Int (bound to an instance of C)
-method mirror for C.m2(): Int (bound to an instance of C)
-method mirror for C.m3[T >: String <: Int]: T (bound to an instance of C)
-method mirror for C.m4[A, B <: A[Int]](x: A[B])(implicit y: Int): Nothing (bound to an instance of C)
-method mirror for C.m5(x: => Int, y: Int*): String (bound to an instance of C)
-class mirror for C.C (bound to an instance of C)
-module mirror for C.M (bound to an instance of C)
-constructor mirror for C.<init>(): C (bound to null)
-constructor mirror for C.C.<init>(): C.this.C (bound to an instance of C)
+class mirror for C (bound to null)
+module mirror for M (bound to null)
+instance mirror for an instance of C
+field mirror for C.f1 (bound to an instance of C)
+field mirror for C.f2 (bound to an instance of C)
+method mirror for C.m1: Int (bound to an instance of C)
+method mirror for C.m2(): Int (bound to an instance of C)
+method mirror for C.m3[T >: String <: Int]: T (bound to an instance of C)
+method mirror for C.m4[A, B <: A[Int]](x: A[B])(implicit y: Int): Nothing (bound to an instance of C)
+method mirror for C.m5(x: => Int, y: Int*): String (bound to an instance of C)
+class mirror for C.C (bound to an instance of C)
+module mirror for C.M (bound to an instance of C)
+constructor mirror for C.<init>(): C (bound to null)
+constructor mirror for C.C.<init>(): C.this.C (bound to an instance of C)
diff --git a/test/files/run/reflection-constructormirror-inner-badpath.check b/test/files/run/reflection-constructormirror-inner-badpath.check
index 2fb0610ad6..83852aa80b 100644
--- a/test/files/run/reflection-constructormirror-inner-badpath.check
+++ b/test/files/run/reflection-constructormirror-inner-badpath.check
@@ -1,2 +1,2 @@
-class R is an inner class, use reflectClass on an InstanceMirror to obtain its ClassMirror
-()
+class R is an inner class, use reflectClass on an InstanceMirror to obtain its ClassMirror
+()
diff --git a/test/files/run/reflection-constructormirror-inner-good.check b/test/files/run/reflection-constructormirror-inner-good.check
index 811ecb2e3f..d38fb33f97 100644
--- a/test/files/run/reflection-constructormirror-inner-good.check
+++ b/test/files/run/reflection-constructormirror-inner-good.check
@@ -1 +1 @@
-R(5,test)
+R(5,test)
diff --git a/test/files/run/reflection-constructormirror-nested-badpath.check b/test/files/run/reflection-constructormirror-nested-badpath.check
index acd21df9c0..4c65b8a58b 100644
--- a/test/files/run/reflection-constructormirror-nested-badpath.check
+++ b/test/files/run/reflection-constructormirror-nested-badpath.check
@@ -1,2 +1,2 @@
-class R is a static class, use reflectClass on a RuntimeMirror to obtain its ClassMirror
-()
+class R is a static class, use reflectClass on a RuntimeMirror to obtain its ClassMirror
+()
diff --git a/test/files/run/reflection-constructormirror-nested-good.check b/test/files/run/reflection-constructormirror-nested-good.check
index 811ecb2e3f..d38fb33f97 100644
--- a/test/files/run/reflection-constructormirror-nested-good.check
+++ b/test/files/run/reflection-constructormirror-nested-good.check
@@ -1 +1 @@
-R(5,test)
+R(5,test)
diff --git a/test/files/run/reflection-constructormirror-toplevel-badpath.check b/test/files/run/reflection-constructormirror-toplevel-badpath.check
index acd21df9c0..4c65b8a58b 100644
--- a/test/files/run/reflection-constructormirror-toplevel-badpath.check
+++ b/test/files/run/reflection-constructormirror-toplevel-badpath.check
@@ -1,2 +1,2 @@
-class R is a static class, use reflectClass on a RuntimeMirror to obtain its ClassMirror
-()
+class R is a static class, use reflectClass on a RuntimeMirror to obtain its ClassMirror
+()
diff --git a/test/files/run/reflection-constructormirror-toplevel-good.check b/test/files/run/reflection-constructormirror-toplevel-good.check
index 811ecb2e3f..d38fb33f97 100644
--- a/test/files/run/reflection-constructormirror-toplevel-good.check
+++ b/test/files/run/reflection-constructormirror-toplevel-good.check
@@ -1 +1 @@
-R(5,test)
+R(5,test)
diff --git a/test/files/run/reflection-enclosed-basic.check b/test/files/run/reflection-enclosed-basic.check
index 41f6a72f1c..6210b42ea5 100644
--- a/test/files/run/reflection-enclosed-basic.check
+++ b/test/files/run/reflection-enclosed-basic.check
@@ -1,18 +1,18 @@
-class B1
-B1
-1
-class B2
-B2
-2
-object B3
-B3
-3
-object B4
-B4
-4
-object B5
-B5
-5
-object B6
-B6
-6
+class B1
+B1
+1
+class B2
+B2
+2
+object B3
+B3
+3
+object B4
+B4
+4
+object B5
+B5
+5
+object B6
+B6
+6
diff --git a/test/files/run/reflection-enclosed-inner-basic.check b/test/files/run/reflection-enclosed-inner-basic.check
index 984fb1ff12..2496ee407b 100644
--- a/test/files/run/reflection-enclosed-inner-basic.check
+++ b/test/files/run/reflection-enclosed-inner-basic.check
@@ -1,20 +1,20 @@
-class B
-List(constructor B, class B1, class B2, object B3, object B4, object B5, object B6)
-class B1
-B1
-1
-class B2
-B2
-2
-object B3
-B3
-3
-object B4
-B4
-4
-object B5
-B5
-5
-object B6
-B6
-6
+class B
+List(constructor B, class B1, class B2, object B3, object B4, object B5, object B6)
+class B1
+B1
+1
+class B2
+B2
+2
+object B3
+B3
+3
+object B4
+B4
+4
+object B5
+B5
+5
+object B6
+B6
+6
diff --git a/test/files/run/reflection-enclosed-inner-inner-basic.check b/test/files/run/reflection-enclosed-inner-inner-basic.check
index 8987f31b18..add7a81c0a 100644
--- a/test/files/run/reflection-enclosed-inner-inner-basic.check
+++ b/test/files/run/reflection-enclosed-inner-inner-basic.check
@@ -1,20 +1,20 @@
-class BB
-List(constructor BB, class B1, class B2, object B3, object B4, object B5, object B6)
-class B1
-B1
-1
-class B2
-B2
-2
-object B3
-B3
-3
-object B4
-B4
-4
-object B5
-B5
-5
-object B6
-B6
-6
+class BB
+List(constructor BB, class B1, class B2, object B3, object B4, object B5, object B6)
+class B1
+B1
+1
+class B2
+B2
+2
+object B3
+B3
+3
+object B4
+B4
+4
+object B5
+B5
+5
+object B6
+B6
+6
diff --git a/test/files/run/reflection-fieldmirror-accessorsareokay.check b/test/files/run/reflection-fieldmirror-accessorsareokay.check
index 635dcd04ce..e6936c8acc 100644
--- a/test/files/run/reflection-fieldmirror-accessorsareokay.check
+++ b/test/files/run/reflection-fieldmirror-accessorsareokay.check
@@ -1,6 +1,6 @@
-true
-42
-2
-true
-2
-2
+true
+42
+2
+true
+2
+2
diff --git a/test/files/run/reflection-fieldmirror-ctorparam.check b/test/files/run/reflection-fieldmirror-ctorparam.check
index 31f6491b14..e391e7ccfe 100644
--- a/test/files/run/reflection-fieldmirror-ctorparam.check
+++ b/test/files/run/reflection-fieldmirror-ctorparam.check
@@ -1,3 +1,3 @@
class scala.ScalaReflectionException: Scala field x isn't represented as a Java field, neither it has a Java accessor method
note that private parameters of class constructors don't get mapped onto fields and/or accessors,
-unless they are used outside of their declaring constructors.
+unless they are used outside of their declaring constructors.
diff --git a/test/files/run/reflection-fieldmirror-getsetval.check b/test/files/run/reflection-fieldmirror-getsetval.check
index e1927f68d0..82fef37c25 100644
--- a/test/files/run/reflection-fieldmirror-getsetval.check
+++ b/test/files/run/reflection-fieldmirror-getsetval.check
@@ -1,2 +1,2 @@
-42
-cannot set an immutable field x
+42
+cannot set an immutable field x
diff --git a/test/files/run/reflection-fieldmirror-getsetvar.check b/test/files/run/reflection-fieldmirror-getsetvar.check
index a9b0ccc6a0..1e959a9900 100644
--- a/test/files/run/reflection-fieldmirror-getsetvar.check
+++ b/test/files/run/reflection-fieldmirror-getsetvar.check
@@ -1,2 +1,2 @@
-42
-2
+42
+2
diff --git a/test/files/run/reflection-fieldmirror-nmelocalsuffixstring.check b/test/files/run/reflection-fieldmirror-nmelocalsuffixstring.check
index fe75c80bca..27ba77ddaf 100644
--- a/test/files/run/reflection-fieldmirror-nmelocalsuffixstring.check
+++ b/test/files/run/reflection-fieldmirror-nmelocalsuffixstring.check
@@ -1 +1 @@
-true
+true
diff --git a/test/files/run/reflection-fieldmirror-privatethis.check b/test/files/run/reflection-fieldmirror-privatethis.check
index 889b7c2c34..16010115e1 100644
--- a/test/files/run/reflection-fieldmirror-privatethis.check
+++ b/test/files/run/reflection-fieldmirror-privatethis.check
@@ -1,3 +1,3 @@
-true
-42
-2
+true
+42
+2
diff --git a/test/files/run/reflection-fieldsymbol-navigation.check b/test/files/run/reflection-fieldsymbol-navigation.check
index 79f0928ea5..ae0597a045 100644
--- a/test/files/run/reflection-fieldsymbol-navigation.check
+++ b/test/files/run/reflection-fieldsymbol-navigation.check
@@ -1,6 +1,6 @@
-method x
-false
-variable x
-true
-method x
-method x_=
+method x
+false
+variable x
+true
+method x
+method x_=
diff --git a/test/files/run/reflection-implicit.check b/test/files/run/reflection-implicit.check
index bab1518c45..5a88a46f0b 100644
--- a/test/files/run/reflection-implicit.check
+++ b/test/files/run/reflection-implicit.check
@@ -1,2 +1,2 @@
-List(true, true, true, true)
-true
+List(true, true, true, true)
+true
diff --git a/test/files/run/reflection-magicsymbols-invoke.check b/test/files/run/reflection-magicsymbols-invoke.check
index bef492eb54..520dc2bfbe 100644
--- a/test/files/run/reflection-magicsymbols-invoke.check
+++ b/test/files/run/reflection-magicsymbols-invoke.check
@@ -1,124 +1,124 @@
============
-Any
-it's important to print the list of Any's members
-if some of them change (possibly, adding and/or removing magic symbols), we must update this test
-method !=: (x$1: Any)Boolean
-method ##: ()Int
-method ==: (x$1: Any)Boolean
-method asInstanceOf: [T0]=> T0
-method equals: (x$1: Any)Boolean
-method getClass: ()java.lang.Class[_]
-method hashCode: ()Int
-method isInstanceOf: [T0]=> Boolean
-method toString: ()java.lang.String
-testing Any.!=: false
-testing Any.##: 50
-testing Any.==: true
-testing Any.asInstanceOf: class scala.ScalaReflectionException: Any.asInstanceOf requires a type argument, it cannot be invoked with mirrors
-testing Any.asInstanceOf: class scala.ScalaReflectionException: scala.Any.asInstanceOf[T0]: T0 takes 0 arguments
-testing Any.equals: true
-testing Any.getClass: class java.lang.String
-testing Any.hashCode: 50
-testing Any.isInstanceOf: class scala.ScalaReflectionException: Any.isInstanceOf requires a type argument, it cannot be invoked with mirrors
-testing Any.isInstanceOf: class scala.ScalaReflectionException: scala.Any.isInstanceOf[T0]: Boolean takes 0 arguments
-testing Any.toString: 2
+Any
+it's important to print the list of Any's members
+if some of them change (possibly, adding and/or removing magic symbols), we must update this test
+method !=: (x$1: Any)Boolean
+method ##: ()Int
+method ==: (x$1: Any)Boolean
+method asInstanceOf: [T0]=> T0
+method equals: (x$1: Any)Boolean
+method getClass: ()java.lang.Class[_]
+method hashCode: ()Int
+method isInstanceOf: [T0]=> Boolean
+method toString: ()java.lang.String
+testing Any.!=: false
+testing Any.##: 50
+testing Any.==: true
+testing Any.asInstanceOf: class scala.ScalaReflectionException: Any.asInstanceOf requires a type argument, it cannot be invoked with mirrors
+testing Any.asInstanceOf: class scala.ScalaReflectionException: scala.Any.asInstanceOf[T0]: T0 takes 0 arguments
+testing Any.equals: true
+testing Any.getClass: class java.lang.String
+testing Any.hashCode: 50
+testing Any.isInstanceOf: class scala.ScalaReflectionException: Any.isInstanceOf requires a type argument, it cannot be invoked with mirrors
+testing Any.isInstanceOf: class scala.ScalaReflectionException: scala.Any.isInstanceOf[T0]: Boolean takes 0 arguments
+testing Any.toString: 2
============
-AnyVal
-it's important to print the list of AnyVal's members
-if some of them change (possibly, adding and/or removing magic symbols), we must update this test
-constructor AnyVal: ()AnyVal
-method getClass: ()Class[_ <: AnyVal]
-testing AnyVal.<init>: class java.lang.InstantiationException: null
-testing AnyVal.getClass: class scala.ScalaReflectionException: expected a member of class Integer, you provided method scala.AnyVal.getClass
+AnyVal
+it's important to print the list of AnyVal's members
+if some of them change (possibly, adding and/or removing magic symbols), we must update this test
+constructor AnyVal: ()AnyVal
+method getClass: ()Class[_ <: AnyVal]
+testing AnyVal.<init>: class java.lang.InstantiationException: null
+testing AnyVal.getClass: class scala.ScalaReflectionException: expected a member of class Integer, you provided method scala.AnyVal.getClass
============
-AnyRef
-it's important to print the list of AnyRef's members
-if some of them change (possibly, adding and/or removing magic symbols), we must update this test
-constructor Object: ()java.lang.Object
-method !=: (x$1: Any)Boolean
-method !=: (x$1: AnyRef)Boolean
-method ##: ()Int
-method $asInstanceOf: [T0]()T0
-method $isInstanceOf: [T0]()Boolean
-method ==: (x$1: Any)Boolean
-method ==: (x$1: AnyRef)Boolean
-method asInstanceOf: [T0]=> T0
-method clone: ()java.lang.Object
-method eq: (x$1: AnyRef)Boolean
-method equals: (x$1: Any)Boolean
-method finalize: ()Unit
-method getClass: ()java.lang.Class[_]
-method hashCode: ()Int
-method isInstanceOf: [T0]=> Boolean
-method ne: (x$1: AnyRef)Boolean
-method notify: ()Unit
-method notifyAll: ()Unit
-method synchronized: [T0](x$1: T0)T0
-method toString: ()java.lang.String
-method wait: ()Unit
-method wait: (x$1: Long)Unit
-method wait: (x$1: Long, x$2: Int)Unit
-testing Object.!=: false
-testing Object.##: 50
-testing Object.$asInstanceOf: class scala.ScalaReflectionException: AnyRef.$asInstanceOf is an internal method, it cannot be invoked with mirrors
-testing Object.$asInstanceOf: class scala.ScalaReflectionException: java.lang.Object.$asInstanceOf[T0](): T0 takes 0 arguments
-testing Object.$isInstanceOf: class scala.ScalaReflectionException: AnyRef.$isInstanceOf is an internal method, it cannot be invoked with mirrors
-testing Object.$isInstanceOf: class scala.ScalaReflectionException: java.lang.Object.$isInstanceOf[T0](): Boolean takes 0 arguments
-testing Object.==: true
-testing Object.clone: class java.lang.CloneNotSupportedException: java.lang.String
-testing Object.eq: true
-testing Object.equals: true
-testing Object.finalize: ()
-testing Object.getClass: class java.lang.String
-testing Object.hashCode: 50
-testing Object.ne: false
-testing Object.notify: class java.lang.IllegalMonitorStateException: null
-testing Object.notifyAll: class java.lang.IllegalMonitorStateException: null
-testing Object.synchronized: 2
-testing Object.toString: 2
-TODO: also test AnyRef.wait overloads
+AnyRef
+it's important to print the list of AnyRef's members
+if some of them change (possibly, adding and/or removing magic symbols), we must update this test
+constructor Object: ()java.lang.Object
+method !=: (x$1: Any)Boolean
+method !=: (x$1: AnyRef)Boolean
+method ##: ()Int
+method $asInstanceOf: [T0]()T0
+method $isInstanceOf: [T0]()Boolean
+method ==: (x$1: Any)Boolean
+method ==: (x$1: AnyRef)Boolean
+method asInstanceOf: [T0]=> T0
+method clone: ()java.lang.Object
+method eq: (x$1: AnyRef)Boolean
+method equals: (x$1: Any)Boolean
+method finalize: ()Unit
+method getClass: ()java.lang.Class[_]
+method hashCode: ()Int
+method isInstanceOf: [T0]=> Boolean
+method ne: (x$1: AnyRef)Boolean
+method notify: ()Unit
+method notifyAll: ()Unit
+method synchronized: [T0](x$1: T0)T0
+method toString: ()java.lang.String
+method wait: ()Unit
+method wait: (x$1: Long)Unit
+method wait: (x$1: Long, x$2: Int)Unit
+testing Object.!=: false
+testing Object.##: 50
+testing Object.$asInstanceOf: class scala.ScalaReflectionException: AnyRef.$asInstanceOf is an internal method, it cannot be invoked with mirrors
+testing Object.$asInstanceOf: class scala.ScalaReflectionException: java.lang.Object.$asInstanceOf[T0](): T0 takes 0 arguments
+testing Object.$isInstanceOf: class scala.ScalaReflectionException: AnyRef.$isInstanceOf is an internal method, it cannot be invoked with mirrors
+testing Object.$isInstanceOf: class scala.ScalaReflectionException: java.lang.Object.$isInstanceOf[T0](): Boolean takes 0 arguments
+testing Object.==: true
+testing Object.clone: class java.lang.CloneNotSupportedException: java.lang.String
+testing Object.eq: true
+testing Object.equals: true
+testing Object.finalize: ()
+testing Object.getClass: class java.lang.String
+testing Object.hashCode: 50
+testing Object.ne: false
+testing Object.notify: class java.lang.IllegalMonitorStateException: null
+testing Object.notifyAll: class java.lang.IllegalMonitorStateException: null
+testing Object.synchronized: 2
+testing Object.toString: 2
+TODO: also test AnyRef.wait overloads
============
-Array
-it's important to print the list of Array's members
-if some of them change (possibly, adding and/or removing magic symbols), we must update this test
-constructor Array: (_length: Int)Array[T]
-constructor Object: ()java.lang.Object
-method !=: (x$1: Any)Boolean
-method !=: (x$1: AnyRef)Boolean
-method ##: ()Int
-method $asInstanceOf: [T0]()T0
-method $isInstanceOf: [T0]()Boolean
-method ==: (x$1: Any)Boolean
-method ==: (x$1: AnyRef)Boolean
-method apply: (i: <?>)T
-method asInstanceOf: [T0]=> T0
-method clone: ()Array[T]
-method eq: (x$1: AnyRef)Boolean
-method equals: (x$1: Any)Boolean
-method finalize: ()Unit
-method getClass: ()java.lang.Class[_]
-method hashCode: ()Int
-method isInstanceOf: [T0]=> Boolean
-method length: => Int
-method ne: (x$1: AnyRef)Boolean
-method notify: ()Unit
-method notifyAll: ()Unit
-method synchronized: [T0](x$1: T0)T0
-method toString: ()java.lang.String
-method update: (i: <?>, x: <?>)Unit
-method wait: ()Unit
-method wait: (x$1: Long)Unit
-method wait: (x$1: Long, x$2: Int)Unit
-value _length: Int
-testing Array.length: 2
-testing Array.apply: 1
-testing Array.update: ()
-testing Array.clone: List(1, 2)
+Array
+it's important to print the list of Array's members
+if some of them change (possibly, adding and/or removing magic symbols), we must update this test
+constructor Array: (_length: Int)Array[T]
+constructor Object: ()java.lang.Object
+method !=: (x$1: Any)Boolean
+method !=: (x$1: AnyRef)Boolean
+method ##: ()Int
+method $asInstanceOf: [T0]()T0
+method $isInstanceOf: [T0]()Boolean
+method ==: (x$1: Any)Boolean
+method ==: (x$1: AnyRef)Boolean
+method apply: (i: <?>)T
+method asInstanceOf: [T0]=> T0
+method clone: ()Array[T]
+method eq: (x$1: AnyRef)Boolean
+method equals: (x$1: Any)Boolean
+method finalize: ()Unit
+method getClass: ()java.lang.Class[_]
+method hashCode: ()Int
+method isInstanceOf: [T0]=> Boolean
+method length: => Int
+method ne: (x$1: AnyRef)Boolean
+method notify: ()Unit
+method notifyAll: ()Unit
+method synchronized: [T0](x$1: T0)T0
+method toString: ()java.lang.String
+method update: (i: <?>, x: <?>)Unit
+method wait: ()Unit
+method wait: (x$1: Long)Unit
+method wait: (x$1: Long, x$2: Int)Unit
+value _length: Int
+testing Array.length: 2
+testing Array.apply: 1
+testing Array.update: ()
+testing Array.clone: List(1, 2)
============
-Other
-testing String.+: 23
+Other
+testing String.+: 23
============
-CTM
-testing Predef.classOf: class scala.ScalaReflectionException: Predef.classOf is a compile-time function, it cannot be invoked with mirrors
-testing Predef.classOf: class scala.ScalaReflectionException: scala.Predef.classOf[T]: Class[T] takes 0 arguments
-testing Universe.reify: class scala.ScalaReflectionException: scala.reflect.api.Universe.reify is a macro, i.e. a compile-time function, it cannot be invoked with mirrors
+CTM
+testing Predef.classOf: class scala.ScalaReflectionException: Predef.classOf is a compile-time function, it cannot be invoked with mirrors
+testing Predef.classOf: class scala.ScalaReflectionException: scala.Predef.classOf[T]: Class[T] takes 0 arguments
+testing Universe.reify: class scala.ScalaReflectionException: scala.reflect.api.Universe.reify is a macro, i.e. a compile-time function, it cannot be invoked with mirrors
diff --git a/test/files/run/reflection-magicsymbols-repl.check b/test/files/run/reflection-magicsymbols-repl.check
index d2ef4ad3cd..d3cd26f25f 100644
--- a/test/files/run/reflection-magicsymbols-repl.check
+++ b/test/files/run/reflection-magicsymbols-repl.check
@@ -1,39 +1,39 @@
-Type in expressions to have them evaluated.
-Type :help for more information.
-
-scala>
-
-scala> import scala.reflect.runtime.universe._
-import scala.reflect.runtime.universe._
-
-scala> class A {
- def foo1(x: Int*) = ???
- def foo2(x: => Int) = ???
- def foo3(x: Any) = ???
- def foo4(x: AnyRef) = ???
- def foo5(x: AnyVal) = ???
- def foo6(x: Null) = ???
- def foo7(x: Nothing) = ???
- def foo8(x: Singleton) = ???
-}
-defined class A
-
-scala> def test(n: Int): Unit = {
- val sig = typeOf[A] member newTermName("foo" + n) typeSignature
- val x = sig.asInstanceOf[MethodType].params.head
- println(x.typeSignature)
-}
-warning: there were 1 feature warnings; re-run with -feature for details
-test: (n: Int)Unit
-
-scala> for (i <- 1 to 8) test(i)
-scala.Int*
-=> scala.Int
-scala.Any
-scala.AnyRef
-scala.AnyVal
-scala.Null
-scala.Nothing
-scala.Singleton
-
-scala>
+Type in expressions to have them evaluated.
+Type :help for more information.
+
+scala>
+
+scala> import scala.reflect.runtime.universe._
+import scala.reflect.runtime.universe._
+
+scala> class A {
+ def foo1(x: Int*) = ???
+ def foo2(x: => Int) = ???
+ def foo3(x: Any) = ???
+ def foo4(x: AnyRef) = ???
+ def foo5(x: AnyVal) = ???
+ def foo6(x: Null) = ???
+ def foo7(x: Nothing) = ???
+ def foo8(x: Singleton) = ???
+}
+defined class A
+
+scala> def test(n: Int): Unit = {
+ val sig = typeOf[A] member newTermName("foo" + n) typeSignature
+ val x = sig.asInstanceOf[MethodType].params.head
+ println(x.typeSignature)
+}
+warning: there were 1 feature warnings; re-run with -feature for details
+test: (n: Int)Unit
+
+scala> for (i <- 1 to 8) test(i)
+scala.Int*
+=> scala.Int
+scala.Any
+scala.AnyRef
+scala.AnyVal
+scala.Null
+scala.Nothing
+scala.Singleton
+
+scala>
diff --git a/test/files/run/reflection-magicsymbols-vanilla.check b/test/files/run/reflection-magicsymbols-vanilla.check
index 4f4e8d94a9..d3ff152896 100644
--- a/test/files/run/reflection-magicsymbols-vanilla.check
+++ b/test/files/run/reflection-magicsymbols-vanilla.check
@@ -1,8 +1,8 @@
-Int*
-=> Int
-Any
-AnyRef
-AnyVal
-Null
-Nothing
-Singleton
+Int*
+=> Int
+Any
+AnyRef
+AnyVal
+Null
+Nothing
+Singleton
diff --git a/test/files/run/reflection-methodsymbol-params.check b/test/files/run/reflection-methodsymbol-params.check
index 11f349d52b..554e72d553 100644
--- a/test/files/run/reflection-methodsymbol-params.check
+++ b/test/files/run/reflection-methodsymbol-params.check
@@ -1,8 +1,8 @@
-List()
-List(List())
-List(List(value x))
-List(List(value x), List(value y))
-List()
-List(List())
-List(List(value x))
-List(List(value x), List(value y))
+List()
+List(List())
+List(List(value x))
+List(List(value x), List(value y))
+List()
+List(List())
+List(List(value x))
+List(List(value x), List(value y))
diff --git a/test/files/run/reflection-methodsymbol-returntype.check b/test/files/run/reflection-methodsymbol-returntype.check
index 0f30d1beaf..97ea02956d 100644
--- a/test/files/run/reflection-methodsymbol-returntype.check
+++ b/test/files/run/reflection-methodsymbol-returntype.check
@@ -1,8 +1,8 @@
-Int
-Int
-Int
-Int
-Int
-Int
-Int
-Int
+Int
+Int
+Int
+Int
+Int
+Int
+Int
+Int
diff --git a/test/files/run/reflection-methodsymbol-typeparams.check b/test/files/run/reflection-methodsymbol-typeparams.check
index c888e09a17..f04188775c 100644
--- a/test/files/run/reflection-methodsymbol-typeparams.check
+++ b/test/files/run/reflection-methodsymbol-typeparams.check
@@ -1,8 +1,8 @@
-List()
-List()
-List()
-List()
-List(type T)
-List(type T)
-List(type T)
-List(type T)
+List()
+List()
+List()
+List()
+List(type T)
+List(type T)
+List(type T)
+List(type T)
diff --git a/test/files/run/reflection-modulemirror-inner-badpath.check b/test/files/run/reflection-modulemirror-inner-badpath.check
index 1e990ec900..a8e7397c8f 100644
--- a/test/files/run/reflection-modulemirror-inner-badpath.check
+++ b/test/files/run/reflection-modulemirror-inner-badpath.check
@@ -1,2 +1,2 @@
-object R is an inner module, use reflectModule on an InstanceMirror to obtain its ModuleMirror
-()
+object R is an inner module, use reflectModule on an InstanceMirror to obtain its ModuleMirror
+()
diff --git a/test/files/run/reflection-modulemirror-inner-good.check b/test/files/run/reflection-modulemirror-inner-good.check
index fe658e7087..331bae08fb 100644
--- a/test/files/run/reflection-modulemirror-inner-good.check
+++ b/test/files/run/reflection-modulemirror-inner-good.check
@@ -1 +1 @@
-R
+R
diff --git a/test/files/run/reflection-modulemirror-nested-badpath.check b/test/files/run/reflection-modulemirror-nested-badpath.check
index f7980b9986..3ef94e1ec6 100644
--- a/test/files/run/reflection-modulemirror-nested-badpath.check
+++ b/test/files/run/reflection-modulemirror-nested-badpath.check
@@ -1,2 +1,2 @@
-object R is a static module, use reflectModule on a RuntimeMirror to obtain its ModuleMirror
-()
+object R is a static module, use reflectModule on a RuntimeMirror to obtain its ModuleMirror
+()
diff --git a/test/files/run/reflection-modulemirror-nested-good.check b/test/files/run/reflection-modulemirror-nested-good.check
index fe658e7087..331bae08fb 100644
--- a/test/files/run/reflection-modulemirror-nested-good.check
+++ b/test/files/run/reflection-modulemirror-nested-good.check
@@ -1 +1 @@
-R
+R
diff --git a/test/files/run/reflection-modulemirror-toplevel-badpath.check b/test/files/run/reflection-modulemirror-toplevel-badpath.check
index f7980b9986..3ef94e1ec6 100644
--- a/test/files/run/reflection-modulemirror-toplevel-badpath.check
+++ b/test/files/run/reflection-modulemirror-toplevel-badpath.check
@@ -1,2 +1,2 @@
-object R is a static module, use reflectModule on a RuntimeMirror to obtain its ModuleMirror
-()
+object R is a static module, use reflectModule on a RuntimeMirror to obtain its ModuleMirror
+()
diff --git a/test/files/run/reflection-repl-classes.check b/test/files/run/reflection-repl-classes.check
index 1c7f86c90c..2dd96a93bf 100644
--- a/test/files/run/reflection-repl-classes.check
+++ b/test/files/run/reflection-repl-classes.check
@@ -1,35 +1,35 @@
-Type in expressions to have them evaluated.
-Type :help for more information.
-
-scala>
-
-scala> class A
-defined class A
-
-scala>
-
-scala> class B {
- def foo(x: A) = 1
-}
-defined class B
-
-scala>
-
-scala> object defs {
- val cm = reflect.runtime.currentMirror
- val u = cm.universe
- val im = cm.reflect(new B)
- val method = im.symbol.typeSignature.member(u.newTermName("foo")).asMethod
- val mm = im.reflectMethod(method)
-}
-defined module defs
-
-scala> import defs._
-import defs._
-
-scala>
-
-scala> mm(new A)
-res0: Any = 1
-
-scala>
+Type in expressions to have them evaluated.
+Type :help for more information.
+
+scala>
+
+scala> class A
+defined class A
+
+scala>
+
+scala> class B {
+ def foo(x: A) = 1
+}
+defined class B
+
+scala>
+
+scala> object defs {
+ val cm = reflect.runtime.currentMirror
+ val u = cm.universe
+ val im = cm.reflect(new B)
+ val method = im.symbol.typeSignature.member(u.newTermName("foo")).asMethod
+ val mm = im.reflectMethod(method)
+}
+defined module defs
+
+scala> import defs._
+import defs._
+
+scala>
+
+scala> mm(new A)
+res0: Any = 1
+
+scala>
diff --git a/test/files/run/reflection-repl-elementary.check b/test/files/run/reflection-repl-elementary.check
index 341dd10ab0..d9133f7e3e 100644
--- a/test/files/run/reflection-repl-elementary.check
+++ b/test/files/run/reflection-repl-elementary.check
@@ -1,9 +1,9 @@
-Type in expressions to have them evaluated.
-Type :help for more information.
-
-scala>
-
-scala> scala.reflect.runtime.universe.typeOf[List[Nothing]]
-res0: reflect.runtime.universe.Type = scala.List[Nothing]
-
-scala>
+Type in expressions to have them evaluated.
+Type :help for more information.
+
+scala>
+
+scala> scala.reflect.runtime.universe.typeOf[List[Nothing]]
+res0: reflect.runtime.universe.Type = scala.List[Nothing]
+
+scala>
diff --git a/test/files/run/reflection-sorted-decls.check b/test/files/run/reflection-sorted-decls.check
index 02168c4e5f..415e073149 100644
--- a/test/files/run/reflection-sorted-decls.check
+++ b/test/files/run/reflection-sorted-decls.check
@@ -1,3 +1,3 @@
-value a
-value b
-value c
+value a
+value b
+value c
diff --git a/test/files/run/reflection-sorted-members.check b/test/files/run/reflection-sorted-members.check
index bb85b5a13c..c148e19e69 100644
--- a/test/files/run/reflection-sorted-members.check
+++ b/test/files/run/reflection-sorted-members.check
@@ -1,4 +1,4 @@
-value a
-value b
-value c
-value x
+value a
+value b
+value c
+value x
diff --git a/test/files/run/reflection-valueclasses-derived.check b/test/files/run/reflection-valueclasses-derived.check
index bfcfcade5e..3382d41556 100644
--- a/test/files/run/reflection-valueclasses-derived.check
+++ b/test/files/run/reflection-valueclasses-derived.check
@@ -1,3 +1,3 @@
-4
-class C
-C@2
+4
+class C
+C@2
diff --git a/test/files/run/reflection-valueclasses-standard.check b/test/files/run/reflection-valueclasses-standard.check
index 060ab55406..643c3d048c 100644
--- a/test/files/run/reflection-valueclasses-standard.check
+++ b/test/files/run/reflection-valueclasses-standard.check
@@ -1,27 +1,27 @@
-========byte========
-byte
-2
-========short========
-short
-2
-========int========
-int
-2
-========long========
-long
-2
-========float========
-float
-2.0
-========double========
-double
-2.0
-========char========
-char
-2
-========boolean========
-boolean
-true
-========void========
-void
-()
+========byte========
+byte
+2
+========short========
+short
+2
+========int========
+int
+2
+========long========
+long
+2
+========float========
+float
+2.0
+========double========
+double
+2.0
+========char========
+char
+2
+========boolean========
+boolean
+true
+========void========
+void
+()
diff --git a/test/files/run/reify-aliases.check b/test/files/run/reify-aliases.check
index 392dd59a1d..aa846b9bc6 100644
--- a/test/files/run/reify-aliases.check
+++ b/test/files/run/reify-aliases.check
@@ -1 +1 @@
-TypeRef(SingleType(ThisType(scala), scala.Predef), newTypeName("String"), List())
+TypeRef(SingleType(ThisType(scala), scala.Predef), newTypeName("String"), List())
diff --git a/test/files/run/reify-repl-fail-gracefully.check b/test/files/run/reify-repl-fail-gracefully.check
index 5a97983e54..1b0f3f2162 100644
--- a/test/files/run/reify-repl-fail-gracefully.check
+++ b/test/files/run/reify-repl-fail-gracefully.check
@@ -1,21 +1,21 @@
-Type in expressions to have them evaluated.
-Type :help for more information.
-
-scala>
-
-scala> import language.experimental.macros
-import language.experimental.macros
-
-scala> import scala.reflect.runtime.universe._
-import scala.reflect.runtime.universe._
-
-scala>
-
-scala> reify
-<console>:12: error: macros cannot be partially applied
- reify
- ^
-
-scala>
-
-scala>
+Type in expressions to have them evaluated.
+Type :help for more information.
+
+scala>
+
+scala> import language.experimental.macros
+import language.experimental.macros
+
+scala> import scala.reflect.runtime.universe._
+import scala.reflect.runtime.universe._
+
+scala>
+
+scala> reify
+<console>:12: error: macros cannot be partially applied
+ reify
+ ^
+
+scala>
+
+scala>
diff --git a/test/files/run/reify-staticXXX.check b/test/files/run/reify-staticXXX.check
index 5762ec47d6..37102b29e1 100644
--- a/test/files/run/reify-staticXXX.check
+++ b/test/files/run/reify-staticXXX.check
@@ -1,24 +1,24 @@
-object
-object
-class
-class
-object > object
-object > object
-object > class
-object > class
-package > object
-package > object
-package > class
-package > class
-object
-object
-class
-class
-object > object
-object > object
-object > class
-object > class
-package > object
-package > object
-package > class
-package > class
+object
+object
+class
+class
+object > object
+object > object
+object > class
+object > class
+package > object
+package > object
+package > class
+package > class
+object
+object
+class
+class
+object > object
+object > object
+object > class
+object > class
+package > object
+package > object
+package > class
+package > class
diff --git a/test/files/run/reify_ann1a.check b/test/files/run/reify_ann1a.check
index 9bbb0ab87a..244be27aa7 100644
--- a/test/files/run/reify_ann1a.check
+++ b/test/files/run/reify_ann1a.check
@@ -1,30 +1,30 @@
-{
- @new ann(immutable.this.List.apply("1a")) @new ann(immutable.this.List.apply("1b")) class C[@new ann(immutable.this.List.apply("2a")) @new ann(immutable.this.List.apply("2b")) T >: Nothing <: Any] extends AnyRef {
- @new ann(immutable.this.List.apply("3a")) @new ann(immutable.this.List.apply("3b")) <paramaccessor> private[this] val x: T @ann(immutable.this.List.apply("4a")) @ann(immutable.this.List.apply("4b")) = _;
- def <init>(@new ann(immutable.this.List.apply("3a")) @new ann(immutable.this.List.apply("3b")) x: T @ann(immutable.this.List.apply("4a")) @ann(immutable.this.List.apply("4b"))) = {
- super.<init>();
- ()
- };
- @new ann(immutable.this.List.apply("5a")) @new ann(immutable.this.List.apply("5b")) def f(x: Int @ann(immutable.this.List.apply("6a")) @ann(immutable.this.List.apply("6b"))) = {
- @new ann(immutable.this.List.apply("7a")) @new ann(immutable.this.List.apply("7b")) val r = x.$plus(3): @ann(immutable.this.List.apply("8a")): @ann(immutable.this.List.apply("8b"));
- val s = (4: Int @ann(immutable.this.List.apply("9a")) @ann(immutable.this.List.apply("9b")));
- r.$plus(s)
- }
- };
- ()
-}
-{
- @ann(immutable.this.List.apply[String]("1a")) @ann(immutable.this.List.apply[String]("1b")) class C[@ann(immutable.this.List.apply[String]("2a")) @ann(immutable.this.List.apply[String]("2b")) T] extends AnyRef {
- @ann(immutable.this.List.apply[String]("3a")) @ann(immutable.this.List.apply[String]("3b")) <paramaccessor> private[this] val x: T @ann(immutable.this.List.apply[String]("4b")) @ann(immutable.this.List.apply[String]("4a")) = _;
- def <init>(@ann(immutable.this.List.apply[String]("3a")) @ann(immutable.this.List.apply[String]("3b")) x: T @ann(immutable.this.List.apply[String]("4b")) @ann(immutable.this.List.apply[String]("4a"))): C[T] = {
- C.super.<init>();
- ()
- };
- @ann(immutable.this.List.apply[String]("5a")) @ann(immutable.this.List.apply[String]("5b")) def f(x: Int @ann(immutable.this.List.apply[String]("6b")) @ann(immutable.this.List.apply[String]("6a"))): Int = {
- @ann(immutable.this.List.apply[String]("7a")) @ann(immutable.this.List.apply[String]("7b")) val r: Int @ann(immutable.this.List.apply[String]("8b")) @ann(immutable.this.List.apply[String]("8a")) = ((x.+(3): Int @ann(immutable.this.List.apply[String]("8a"))): Int @ann(immutable.this.List.apply[String]("8b")) @ann(immutable.this.List.apply[String]("8a")));
- val s: Int @ann(immutable.this.List.apply[String]("9b")) @ann(immutable.this.List.apply[String]("9a")) = (4: Int @ann(immutable.this.List.apply[String]("9b")) @ann(immutable.this.List.apply[String]("9a")));
- r.+(s)
- }
- };
- ()
-}
+{
+ @new ann(immutable.this.List.apply("1a")) @new ann(immutable.this.List.apply("1b")) class C[@new ann(immutable.this.List.apply("2a")) @new ann(immutable.this.List.apply("2b")) T >: Nothing <: Any] extends AnyRef {
+ @new ann(immutable.this.List.apply("3a")) @new ann(immutable.this.List.apply("3b")) <paramaccessor> private[this] val x: T @ann(immutable.this.List.apply("4a")) @ann(immutable.this.List.apply("4b")) = _;
+ def <init>(@new ann(immutable.this.List.apply("3a")) @new ann(immutable.this.List.apply("3b")) x: T @ann(immutable.this.List.apply("4a")) @ann(immutable.this.List.apply("4b"))) = {
+ super.<init>();
+ ()
+ };
+ @new ann(immutable.this.List.apply("5a")) @new ann(immutable.this.List.apply("5b")) def f(x: Int @ann(immutable.this.List.apply("6a")) @ann(immutable.this.List.apply("6b"))) = {
+ @new ann(immutable.this.List.apply("7a")) @new ann(immutable.this.List.apply("7b")) val r = x.$plus(3): @ann(immutable.this.List.apply("8a")): @ann(immutable.this.List.apply("8b"));
+ val s = (4: Int @ann(immutable.this.List.apply("9a")) @ann(immutable.this.List.apply("9b")));
+ r.$plus(s)
+ }
+ };
+ ()
+}
+{
+ @ann(immutable.this.List.apply[String]("1a")) @ann(immutable.this.List.apply[String]("1b")) class C[@ann(immutable.this.List.apply[String]("2a")) @ann(immutable.this.List.apply[String]("2b")) T] extends AnyRef {
+ @ann(immutable.this.List.apply[String]("3a")) @ann(immutable.this.List.apply[String]("3b")) <paramaccessor> private[this] val x: T @ann(immutable.this.List.apply[String]("4b")) @ann(immutable.this.List.apply[String]("4a")) = _;
+ def <init>(@ann(immutable.this.List.apply[String]("3a")) @ann(immutable.this.List.apply[String]("3b")) x: T @ann(immutable.this.List.apply[String]("4b")) @ann(immutable.this.List.apply[String]("4a"))): C[T] = {
+ C.super.<init>();
+ ()
+ };
+ @ann(immutable.this.List.apply[String]("5a")) @ann(immutable.this.List.apply[String]("5b")) def f(x: Int @ann(immutable.this.List.apply[String]("6b")) @ann(immutable.this.List.apply[String]("6a"))): Int = {
+ @ann(immutable.this.List.apply[String]("7a")) @ann(immutable.this.List.apply[String]("7b")) val r: Int @ann(immutable.this.List.apply[String]("8b")) @ann(immutable.this.List.apply[String]("8a")) = ((x.+(3): Int @ann(immutable.this.List.apply[String]("8a"))): Int @ann(immutable.this.List.apply[String]("8b")) @ann(immutable.this.List.apply[String]("8a")));
+ val s: Int @ann(immutable.this.List.apply[String]("9b")) @ann(immutable.this.List.apply[String]("9a")) = (4: Int @ann(immutable.this.List.apply[String]("9b")) @ann(immutable.this.List.apply[String]("9a")));
+ r.+(s)
+ }
+ };
+ ()
+}
diff --git a/test/files/run/reify_ann1b.check b/test/files/run/reify_ann1b.check
index 4a51c02701..6a5f32a492 100644
--- a/test/files/run/reify_ann1b.check
+++ b/test/files/run/reify_ann1b.check
@@ -1,30 +1,30 @@
-{
- @new ann(bar = "1a") @new ann(bar = "1b") class C[@new ann(bar = "2a") @new ann(bar = "2b") T >: Nothing <: Any] extends AnyRef {
- @new ann(bar = "3a") @new ann(bar = "3b") <paramaccessor> private[this] val x: T @ann(bar = "4a") @ann(bar = "4b") = _;
- def <init>(@new ann(bar = "3a") @new ann(bar = "3b") x: T @ann(bar = "4a") @ann(bar = "4b")) = {
- super.<init>();
- ()
- };
- @new ann(bar = "5a") @new ann(bar = "5b") def f(x: Int @ann(bar = "6a") @ann(bar = "6b")) = {
- @new ann(bar = "7a") @new ann(bar = "7b") val r = x.$plus(3): @ann(bar = "8a"): @ann(bar = "8b");
- val s = (4: Int @ann(bar = "9a") @ann(bar = "9b"));
- r.$plus(s)
- }
- };
- ()
-}
-{
- @ann(bar = "1a") @ann(bar = "1b") class C[@ann(bar = "2a") @ann(bar = "2b") T] extends AnyRef {
- @ann(bar = "3a") @ann(bar = "3b") <paramaccessor> private[this] val x: T @ann(bar = "4b") @ann(bar = "4a") = _;
- def <init>(@ann(bar = "3a") @ann(bar = "3b") x: T @ann(bar = "4b") @ann(bar = "4a")): C[T] = {
- C.super.<init>();
- ()
- };
- @ann(bar = "5a") @ann(bar = "5b") def f(x: Int @ann(bar = "6b") @ann(bar = "6a")): Int = {
- @ann(bar = "7a") @ann(bar = "7b") val r: Int @ann(bar = "8b") @ann(bar = "8a") = ((x.+(3): Int @ann(bar = "8a")): Int @ann(bar = "8b") @ann(bar = "8a"));
- val s: Int @ann(bar = "9b") @ann(bar = "9a") = (4: Int @ann(bar = "9b") @ann(bar = "9a"));
- r.+(s)
- }
- };
- ()
-}
+{
+ @new ann(bar = "1a") @new ann(bar = "1b") class C[@new ann(bar = "2a") @new ann(bar = "2b") T >: Nothing <: Any] extends AnyRef {
+ @new ann(bar = "3a") @new ann(bar = "3b") <paramaccessor> private[this] val x: T @ann(bar = "4a") @ann(bar = "4b") = _;
+ def <init>(@new ann(bar = "3a") @new ann(bar = "3b") x: T @ann(bar = "4a") @ann(bar = "4b")) = {
+ super.<init>();
+ ()
+ };
+ @new ann(bar = "5a") @new ann(bar = "5b") def f(x: Int @ann(bar = "6a") @ann(bar = "6b")) = {
+ @new ann(bar = "7a") @new ann(bar = "7b") val r = x.$plus(3): @ann(bar = "8a"): @ann(bar = "8b");
+ val s = (4: Int @ann(bar = "9a") @ann(bar = "9b"));
+ r.$plus(s)
+ }
+ };
+ ()
+}
+{
+ @ann(bar = "1a") @ann(bar = "1b") class C[@ann(bar = "2a") @ann(bar = "2b") T] extends AnyRef {
+ @ann(bar = "3a") @ann(bar = "3b") <paramaccessor> private[this] val x: T @ann(bar = "4b") @ann(bar = "4a") = _;
+ def <init>(@ann(bar = "3a") @ann(bar = "3b") x: T @ann(bar = "4b") @ann(bar = "4a")): C[T] = {
+ C.super.<init>();
+ ()
+ };
+ @ann(bar = "5a") @ann(bar = "5b") def f(x: Int @ann(bar = "6b") @ann(bar = "6a")): Int = {
+ @ann(bar = "7a") @ann(bar = "7b") val r: Int @ann(bar = "8b") @ann(bar = "8a") = ((x.+(3): Int @ann(bar = "8a")): Int @ann(bar = "8b") @ann(bar = "8a"));
+ val s: Int @ann(bar = "9b") @ann(bar = "9a") = (4: Int @ann(bar = "9b") @ann(bar = "9a"));
+ r.+(s)
+ }
+ };
+ ()
+}
diff --git a/test/files/run/reify_ann2a.check b/test/files/run/reify_ann2a.check
index 4d67bbf786..934af54802 100644
--- a/test/files/run/reify_ann2a.check
+++ b/test/files/run/reify_ann2a.check
@@ -1,44 +1,44 @@
-{
- class ann extends StaticAnnotation {
- <paramaccessor> private[this] val bar: List[String] = _;
- def <init>(bar: List[String]) = {
- super.<init>();
- ()
- }
- };
- @new ann(immutable.this.List.apply("1a")) @new ann(immutable.this.List.apply("1b")) class C[@new ann(immutable.this.List.apply("2a")) @new ann(immutable.this.List.apply("2b")) T >: Nothing <: Any] extends AnyRef {
- @new ann(immutable.this.List.apply("3a")) @new ann(immutable.this.List.apply("3b")) <paramaccessor> private[this] val x: T @ann(immutable.this.List.apply("4a")) @ann(immutable.this.List.apply("4b")) = _;
- def <init>(@new ann(immutable.this.List.apply("3a")) @new ann(immutable.this.List.apply("3b")) x: T @ann(immutable.this.List.apply("4a")) @ann(immutable.this.List.apply("4b"))) = {
- super.<init>();
- ()
- };
- @new ann(immutable.this.List.apply("5a")) @new ann(immutable.this.List.apply("5b")) def f(x: Int @ann(immutable.this.List.apply("6a")) @ann(immutable.this.List.apply("6b"))) = {
- @new ann(immutable.this.List.apply("7a")) @new ann(immutable.this.List.apply("7b")) val r = x.$plus(3): @ann(immutable.this.List.apply("8a")): @ann(immutable.this.List.apply("8b"));
- val s = (4: Int @ann(immutable.this.List.apply("9a")) @ann(immutable.this.List.apply("9b")));
- r.$plus(s)
- }
- };
- ()
-}
-{
- class ann extends scala.annotation.Annotation with scala.annotation.StaticAnnotation {
- <paramaccessor> private[this] val bar: List[String] = _;
- def <init>(bar: List[String]): ann = {
- ann.super.<init>();
- ()
- }
- };
- @ann(immutable.this.List.apply[String]("1a")) @ann(immutable.this.List.apply[String]("1b")) class C[@ann(immutable.this.List.apply[String]("2a")) @ann(immutable.this.List.apply[String]("2b")) T] extends AnyRef {
- @ann(immutable.this.List.apply[String]("3a")) @ann(immutable.this.List.apply[String]("3b")) <paramaccessor> private[this] val x: T @ann(immutable.this.List.apply[String]("4b")) @ann(immutable.this.List.apply[String]("4a")) = _;
- def <init>(@ann(immutable.this.List.apply[String]("3a")) @ann(immutable.this.List.apply[String]("3b")) x: T @ann(immutable.this.List.apply[String]("4b")) @ann(immutable.this.List.apply[String]("4a"))): C[T] = {
- C.super.<init>();
- ()
- };
- @ann(immutable.this.List.apply[String]("5a")) @ann(immutable.this.List.apply[String]("5b")) def f(x: Int @ann(immutable.this.List.apply[String]("6b")) @ann(immutable.this.List.apply[String]("6a"))): Int = {
- @ann(immutable.this.List.apply[String]("7a")) @ann(immutable.this.List.apply[String]("7b")) val r: Int @ann(immutable.this.List.apply[String]("8b")) @ann(immutable.this.List.apply[String]("8a")) = ((x.+(3): Int @ann(immutable.this.List.apply[String]("8a"))): Int @ann(immutable.this.List.apply[String]("8b")) @ann(immutable.this.List.apply[String]("8a")));
- val s: Int @ann(immutable.this.List.apply[String]("9b")) @ann(immutable.this.List.apply[String]("9a")) = (4: Int @ann(immutable.this.List.apply[String]("9b")) @ann(immutable.this.List.apply[String]("9a")));
- r.+(s)
- }
- };
- ()
-}
+{
+ class ann extends StaticAnnotation {
+ <paramaccessor> private[this] val bar: List[String] = _;
+ def <init>(bar: List[String]) = {
+ super.<init>();
+ ()
+ }
+ };
+ @new ann(immutable.this.List.apply("1a")) @new ann(immutable.this.List.apply("1b")) class C[@new ann(immutable.this.List.apply("2a")) @new ann(immutable.this.List.apply("2b")) T >: Nothing <: Any] extends AnyRef {
+ @new ann(immutable.this.List.apply("3a")) @new ann(immutable.this.List.apply("3b")) <paramaccessor> private[this] val x: T @ann(immutable.this.List.apply("4a")) @ann(immutable.this.List.apply("4b")) = _;
+ def <init>(@new ann(immutable.this.List.apply("3a")) @new ann(immutable.this.List.apply("3b")) x: T @ann(immutable.this.List.apply("4a")) @ann(immutable.this.List.apply("4b"))) = {
+ super.<init>();
+ ()
+ };
+ @new ann(immutable.this.List.apply("5a")) @new ann(immutable.this.List.apply("5b")) def f(x: Int @ann(immutable.this.List.apply("6a")) @ann(immutable.this.List.apply("6b"))) = {
+ @new ann(immutable.this.List.apply("7a")) @new ann(immutable.this.List.apply("7b")) val r = x.$plus(3): @ann(immutable.this.List.apply("8a")): @ann(immutable.this.List.apply("8b"));
+ val s = (4: Int @ann(immutable.this.List.apply("9a")) @ann(immutable.this.List.apply("9b")));
+ r.$plus(s)
+ }
+ };
+ ()
+}
+{
+ class ann extends scala.annotation.Annotation with scala.annotation.StaticAnnotation {
+ <paramaccessor> private[this] val bar: List[String] = _;
+ def <init>(bar: List[String]): ann = {
+ ann.super.<init>();
+ ()
+ }
+ };
+ @ann(immutable.this.List.apply[String]("1a")) @ann(immutable.this.List.apply[String]("1b")) class C[@ann(immutable.this.List.apply[String]("2a")) @ann(immutable.this.List.apply[String]("2b")) T] extends AnyRef {
+ @ann(immutable.this.List.apply[String]("3a")) @ann(immutable.this.List.apply[String]("3b")) <paramaccessor> private[this] val x: T @ann(immutable.this.List.apply[String]("4b")) @ann(immutable.this.List.apply[String]("4a")) = _;
+ def <init>(@ann(immutable.this.List.apply[String]("3a")) @ann(immutable.this.List.apply[String]("3b")) x: T @ann(immutable.this.List.apply[String]("4b")) @ann(immutable.this.List.apply[String]("4a"))): C[T] = {
+ C.super.<init>();
+ ()
+ };
+ @ann(immutable.this.List.apply[String]("5a")) @ann(immutable.this.List.apply[String]("5b")) def f(x: Int @ann(immutable.this.List.apply[String]("6b")) @ann(immutable.this.List.apply[String]("6a"))): Int = {
+ @ann(immutable.this.List.apply[String]("7a")) @ann(immutable.this.List.apply[String]("7b")) val r: Int @ann(immutable.this.List.apply[String]("8b")) @ann(immutable.this.List.apply[String]("8a")) = ((x.+(3): Int @ann(immutable.this.List.apply[String]("8a"))): Int @ann(immutable.this.List.apply[String]("8b")) @ann(immutable.this.List.apply[String]("8a")));
+ val s: Int @ann(immutable.this.List.apply[String]("9b")) @ann(immutable.this.List.apply[String]("9a")) = (4: Int @ann(immutable.this.List.apply[String]("9b")) @ann(immutable.this.List.apply[String]("9a")));
+ r.+(s)
+ }
+ };
+ ()
+}
diff --git a/test/files/run/reify_ann3.check b/test/files/run/reify_ann3.check
index 96b4cf9c4e..8caceb2696 100644
--- a/test/files/run/reify_ann3.check
+++ b/test/files/run/reify_ann3.check
@@ -1,21 +1,21 @@
-{
- class Tree[A >: Nothing <: Any, B >: Nothing <: Any] extends AnyRef {
- @new inline @getter() final <paramaccessor> val key: A = _;
- def <init>(key: A) = {
- super.<init>();
- ()
- }
- };
- ()
-}
-{
- class Tree[A, B] extends AnyRef {
- final <paramaccessor> private[this] val key: A = _;
- @inline @scala.annotation.meta.getter final <stable> <accessor> <paramaccessor> def key: A = Tree.this.key;
- def <init>(key: A): Tree[A,B] = {
- Tree.super.<init>();
- ()
- }
- };
- ()
-}
+{
+ class Tree[A >: Nothing <: Any, B >: Nothing <: Any] extends AnyRef {
+ @new inline @getter() final <paramaccessor> val key: A = _;
+ def <init>(key: A) = {
+ super.<init>();
+ ()
+ }
+ };
+ ()
+}
+{
+ class Tree[A, B] extends AnyRef {
+ final <paramaccessor> private[this] val key: A = _;
+ @inline @scala.annotation.meta.getter final <stable> <accessor> <paramaccessor> def key: A = Tree.this.key;
+ def <init>(key: A): Tree[A,B] = {
+ Tree.super.<init>();
+ ()
+ }
+ };
+ ()
+}
diff --git a/test/files/run/reify_ann4.check b/test/files/run/reify_ann4.check
index 6f853053d2..8bf5fe3242 100644
--- a/test/files/run/reify_ann4.check
+++ b/test/files/run/reify_ann4.check
@@ -1,32 +1,32 @@
-{
- class D extends StaticAnnotation {
- def <init>() = {
- super.<init>();
- ()
- }
- };
- class C extends AnyRef {
- def <init>() = {
- super.<init>();
- ()
- }
- };
- val c1 = new C @D();
- ()
-}
-{
- class D extends scala.annotation.Annotation with scala.annotation.StaticAnnotation {
- def <init>(): D = {
- D.super.<init>();
- ()
- }
- };
- class C extends AnyRef {
- def <init>(): C = {
- C.super.<init>();
- ()
- }
- };
- val c1: C = new C @D();
- ()
-}
+{
+ class D extends StaticAnnotation {
+ def <init>() = {
+ super.<init>();
+ ()
+ }
+ };
+ class C extends AnyRef {
+ def <init>() = {
+ super.<init>();
+ ()
+ }
+ };
+ val c1 = new C @D();
+ ()
+}
+{
+ class D extends scala.annotation.Annotation with scala.annotation.StaticAnnotation {
+ def <init>(): D = {
+ D.super.<init>();
+ ()
+ }
+ };
+ class C extends AnyRef {
+ def <init>(): C = {
+ C.super.<init>();
+ ()
+ }
+ };
+ val c1: C = new C @D();
+ ()
+}
diff --git a/test/files/run/reify_ann5.check b/test/files/run/reify_ann5.check
index d443c601a0..1ec0457e54 100644
--- a/test/files/run/reify_ann5.check
+++ b/test/files/run/reify_ann5.check
@@ -1,22 +1,22 @@
-{
- class C extends AnyRef {
- @new inline @beanGetter() @new BeanProperty() <paramaccessor> val x: Int = _;
- def <init>(x: Int) = {
- super.<init>();
- ()
- }
- };
- ()
-}
-{
- class C extends AnyRef {
- @scala.beans.BeanProperty <paramaccessor> private[this] val x: Int = _;
- <stable> <accessor> <paramaccessor> def x: Int = C.this.x;
- def <init>(x: Int): C = {
- C.super.<init>();
- ()
- };
- @inline @scala.annotation.meta.beanGetter def getX(): Int = C.this.x
- };
- ()
-}
+{
+ class C extends AnyRef {
+ @new inline @beanGetter() @new BeanProperty() <paramaccessor> val x: Int = _;
+ def <init>(x: Int) = {
+ super.<init>();
+ ()
+ }
+ };
+ ()
+}
+{
+ class C extends AnyRef {
+ @scala.beans.BeanProperty <paramaccessor> private[this] val x: Int = _;
+ <stable> <accessor> <paramaccessor> def x: Int = C.this.x;
+ def <init>(x: Int): C = {
+ C.super.<init>();
+ ()
+ };
+ @inline @scala.annotation.meta.beanGetter def getX(): Int = C.this.x
+ };
+ ()
+}
diff --git a/test/files/run/reify_classfileann_a.check b/test/files/run/reify_classfileann_a.check
index 6f17b26158..0c919020a8 100644
--- a/test/files/run/reify_classfileann_a.check
+++ b/test/files/run/reify_classfileann_a.check
@@ -1,18 +1,18 @@
-{
- @new ann(bar = "1", quux = Array("2", "3"), baz = new ann(bar = "4")) class C extends AnyRef {
- def <init>() = {
- super.<init>();
- ()
- }
- };
- ()
-}
-{
- @ann(bar = "1", quux = ["2", "3"], baz = ann(bar = "4")) class C extends AnyRef {
- def <init>(): C = {
- C.super.<init>();
- ()
- }
- };
- ()
-}
+{
+ @new ann(bar = "1", quux = Array("2", "3"), baz = new ann(bar = "4")) class C extends AnyRef {
+ def <init>() = {
+ super.<init>();
+ ()
+ }
+ };
+ ()
+}
+{
+ @ann(bar = "1", quux = ["2", "3"], baz = ann(bar = "4")) class C extends AnyRef {
+ def <init>(): C = {
+ C.super.<init>();
+ ()
+ }
+ };
+ ()
+}
diff --git a/test/files/run/reify_classfileann_b.check b/test/files/run/reify_classfileann_b.check
index 33270e0035..c204fa8dc0 100644
--- a/test/files/run/reify_classfileann_b.check
+++ b/test/files/run/reify_classfileann_b.check
@@ -1,20 +1,20 @@
-{
- class C extends AnyRef {
- def <init>() = {
- super.<init>();
- ()
- };
- def x: Int = 2: @ann(bar = "1",quux = Array("2", "3"),baz = new ann(bar = "4"))
- };
- ()
-}
-{
- class C extends AnyRef {
- def <init>(): C = {
- C.super.<init>();
- ()
- };
- def x: Int = (2: Int(2) @ann(bar = "1", quux = ["2", "3"], baz = ann(bar = "4")))
- };
- ()
-}
+{
+ class C extends AnyRef {
+ def <init>() = {
+ super.<init>();
+ ()
+ };
+ def x: Int = 2: @ann(bar = "1",quux = Array("2", "3"),baz = new ann(bar = "4"))
+ };
+ ()
+}
+{
+ class C extends AnyRef {
+ def <init>(): C = {
+ C.super.<init>();
+ ()
+ };
+ def x: Int = (2: Int(2) @ann(bar = "1", quux = ["2", "3"], baz = ann(bar = "4")))
+ };
+ ()
+}
diff --git a/test/files/run/reify_closure8b.check b/test/files/run/reify_closure8b.check
index 585e6d5740..5a7863ff15 100644
--- a/test/files/run/reify_closure8b.check
+++ b/test/files/run/reify_closure8b.check
@@ -1,3 +1,3 @@
-scala.tools.reflect.ToolBoxError: reflective compilation has failed:
-
-value y is not a member of Test.Foo
+scala.tools.reflect.ToolBoxError: reflective compilation has failed:
+
+value y is not a member of Test.Foo
diff --git a/test/files/run/reify_copypaste1.check b/test/files/run/reify_copypaste1.check
index 49a25ea881..b204f9c454 100644
--- a/test/files/run/reify_copypaste1.check
+++ b/test/files/run/reify_copypaste1.check
@@ -1,2 +1,2 @@
-List(1, 2)
-
+List(1, 2)
+
diff --git a/test/files/run/reify_nested_inner_refers_to_global.check b/test/files/run/reify_nested_inner_refers_to_global.check
index 7ff4c83d37..5ef4ff4d04 100644
--- a/test/files/run/reify_nested_inner_refers_to_global.check
+++ b/test/files/run/reify_nested_inner_refers_to_global.check
@@ -1 +1 @@
-evaluated = 2
+evaluated = 2
diff --git a/test/files/run/reify_nested_outer_refers_to_global.check b/test/files/run/reify_nested_outer_refers_to_global.check
index 7ff4c83d37..5ef4ff4d04 100644
--- a/test/files/run/reify_nested_outer_refers_to_global.check
+++ b/test/files/run/reify_nested_outer_refers_to_global.check
@@ -1 +1 @@
-evaluated = 2
+evaluated = 2
diff --git a/test/files/run/reify_nested_outer_refers_to_local.check b/test/files/run/reify_nested_outer_refers_to_local.check
index 7ff4c83d37..5ef4ff4d04 100644
--- a/test/files/run/reify_nested_outer_refers_to_local.check
+++ b/test/files/run/reify_nested_outer_refers_to_local.check
@@ -1 +1 @@
-evaluated = 2
+evaluated = 2
diff --git a/test/files/run/reify_newimpl_11.check b/test/files/run/reify_newimpl_11.check
index 21bd28667e..2f5cb581e6 100644
--- a/test/files/run/reify_newimpl_11.check
+++ b/test/files/run/reify_newimpl_11.check
@@ -1,2 +1,2 @@
-scala.tools.reflect.ToolBoxError: reflective toolbox has failed:
-unresolved free type variables (namely: T defined by C in reify_newimpl_11.scala:6:11). have you forgot to use TypeTag annotations for type parameters external to a reifee? if you have troubles tracking free type variables, consider using -Xlog-free-types
+scala.tools.reflect.ToolBoxError: reflective toolbox has failed:
+unresolved free type variables (namely: T defined by C in reify_newimpl_11.scala:6:11). have you forgot to use TypeTag annotations for type parameters external to a reifee? if you have troubles tracking free type variables, consider using -Xlog-free-types
diff --git a/test/files/run/reify_newimpl_13.check b/test/files/run/reify_newimpl_13.check
index e28732bd6a..d518cd7b84 100644
--- a/test/files/run/reify_newimpl_13.check
+++ b/test/files/run/reify_newimpl_13.check
@@ -1,2 +1,2 @@
-scala.tools.reflect.ToolBoxError: reflective toolbox has failed:
-unresolved free type variables (namely: T defined by C in reify_newimpl_13.scala:7:13). have you forgot to use TypeTag annotations for type parameters external to a reifee? if you have troubles tracking free type variables, consider using -Xlog-free-types
+scala.tools.reflect.ToolBoxError: reflective toolbox has failed:
+unresolved free type variables (namely: T defined by C in reify_newimpl_13.scala:7:13). have you forgot to use TypeTag annotations for type parameters external to a reifee? if you have troubles tracking free type variables, consider using -Xlog-free-types
diff --git a/test/files/run/reify_newimpl_18.check b/test/files/run/reify_newimpl_18.check
index a7029974a4..c23af69b08 100644
--- a/test/files/run/reify_newimpl_18.check
+++ b/test/files/run/reify_newimpl_18.check
@@ -1 +1 @@
-List(2)
+List(2)
diff --git a/test/files/run/reify_newimpl_19.check b/test/files/run/reify_newimpl_19.check
index 1d96992869..8b8652f92c 100644
--- a/test/files/run/reify_newimpl_19.check
+++ b/test/files/run/reify_newimpl_19.check
@@ -1,2 +1,2 @@
-scala.tools.reflect.ToolBoxError: reflective toolbox has failed:
-unresolved free type variables (namely: T defined by C in reify_newimpl_19.scala:7:10). have you forgot to use TypeTag annotations for type parameters external to a reifee? if you have troubles tracking free type variables, consider using -Xlog-free-types
+scala.tools.reflect.ToolBoxError: reflective toolbox has failed:
+unresolved free type variables (namely: T defined by C in reify_newimpl_19.scala:7:10). have you forgot to use TypeTag annotations for type parameters external to a reifee? if you have troubles tracking free type variables, consider using -Xlog-free-types
diff --git a/test/files/run/reify_newimpl_20.check b/test/files/run/reify_newimpl_20.check
index a7029974a4..c23af69b08 100644
--- a/test/files/run/reify_newimpl_20.check
+++ b/test/files/run/reify_newimpl_20.check
@@ -1 +1 @@
-List(2)
+List(2)
diff --git a/test/files/run/reify_newimpl_21.check b/test/files/run/reify_newimpl_21.check
index a7029974a4..c23af69b08 100644
--- a/test/files/run/reify_newimpl_21.check
+++ b/test/files/run/reify_newimpl_21.check
@@ -1 +1 @@
-List(2)
+List(2)
diff --git a/test/files/run/reify_newimpl_22.check b/test/files/run/reify_newimpl_22.check
index ebcf42f52f..dcb3e2889b 100644
--- a/test/files/run/reify_newimpl_22.check
+++ b/test/files/run/reify_newimpl_22.check
@@ -1,29 +1,29 @@
-Type in expressions to have them evaluated.
-Type :help for more information.
-
-scala>
-
-scala> import scala.reflect.runtime.universe._
-import scala.reflect.runtime.universe._
-
-scala> import scala.tools.reflect.ToolBox
-import scala.tools.reflect.ToolBox
-
-scala> import scala.tools.reflect.Eval
-import scala.tools.reflect.Eval
-
-scala> {
- val x = 2
- val code = reify {
- x
- }
- println(code.eval)
-}
-<console>:15: free term: Ident(newTermName("x")) defined by res0 in <console>:14:21
- val code = reify {
- ^
-2
-
-scala>
-
-scala>
+Type in expressions to have them evaluated.
+Type :help for more information.
+
+scala>
+
+scala> import scala.reflect.runtime.universe._
+import scala.reflect.runtime.universe._
+
+scala> import scala.tools.reflect.ToolBox
+import scala.tools.reflect.ToolBox
+
+scala> import scala.tools.reflect.Eval
+import scala.tools.reflect.Eval
+
+scala> {
+ val x = 2
+ val code = reify {
+ x
+ }
+ println(code.eval)
+}
+<console>:15: free term: Ident(newTermName("x")) defined by res0 in <console>:14:21
+ val code = reify {
+ ^
+2
+
+scala>
+
+scala>
diff --git a/test/files/run/reify_newimpl_23.check b/test/files/run/reify_newimpl_23.check
index c8ed424c86..882124657e 100644
--- a/test/files/run/reify_newimpl_23.check
+++ b/test/files/run/reify_newimpl_23.check
@@ -1,28 +1,28 @@
-Type in expressions to have them evaluated.
-Type :help for more information.
-
-scala>
-
-scala> import scala.reflect.runtime.universe._
-import scala.reflect.runtime.universe._
-
-scala> import scala.tools.reflect.ToolBox
-import scala.tools.reflect.ToolBox
-
-scala> import scala.tools.reflect.Eval
-import scala.tools.reflect.Eval
-
-scala> def foo[T]{
- val code = reify {
- List[T]()
- }
- println(code.eval)
-}
-<console>:13: free type: Ident(newTypeName("T")) defined by foo in <console>:12:16
- val code = reify {
- ^
-foo: [T]=> Unit
-
-scala>
-
-scala>
+Type in expressions to have them evaluated.
+Type :help for more information.
+
+scala>
+
+scala> import scala.reflect.runtime.universe._
+import scala.reflect.runtime.universe._
+
+scala> import scala.tools.reflect.ToolBox
+import scala.tools.reflect.ToolBox
+
+scala> import scala.tools.reflect.Eval
+import scala.tools.reflect.Eval
+
+scala> def foo[T]{
+ val code = reify {
+ List[T]()
+ }
+ println(code.eval)
+}
+<console>:13: free type: Ident(newTypeName("T")) defined by foo in <console>:12:16
+ val code = reify {
+ ^
+foo: [T]=> Unit
+
+scala>
+
+scala>
diff --git a/test/files/run/reify_newimpl_25.check b/test/files/run/reify_newimpl_25.check
index a688a98fbc..d1028b94c7 100644
--- a/test/files/run/reify_newimpl_25.check
+++ b/test/files/run/reify_newimpl_25.check
@@ -1,19 +1,19 @@
-Type in expressions to have them evaluated.
-Type :help for more information.
-
-scala>
-
-scala> {
- import scala.reflect.runtime.universe._
- val x = "2"
- val tt = implicitly[TypeTag[x.type]]
- println(tt)
-}
-<console>:11: free term: Ident(newTermName("x")) defined by res0 in <console>:10:21
- val tt = implicitly[TypeTag[x.type]]
- ^
-TypeTag[x.type]
-
-scala>
-
-scala>
+Type in expressions to have them evaluated.
+Type :help for more information.
+
+scala>
+
+scala> {
+ import scala.reflect.runtime.universe._
+ val x = "2"
+ val tt = implicitly[TypeTag[x.type]]
+ println(tt)
+}
+<console>:11: free term: Ident(newTermName("x")) defined by res0 in <console>:10:21
+ val tt = implicitly[TypeTag[x.type]]
+ ^
+TypeTag[x.type]
+
+scala>
+
+scala>
diff --git a/test/files/run/reify_newimpl_26.check b/test/files/run/reify_newimpl_26.check
index 5996f3b322..347f6365aa 100644
--- a/test/files/run/reify_newimpl_26.check
+++ b/test/files/run/reify_newimpl_26.check
@@ -1,21 +1,21 @@
-Type in expressions to have them evaluated.
-Type :help for more information.
-
-scala>
-
-scala> def foo[T]{
- import scala.reflect.runtime.universe._
- val tt = implicitly[WeakTypeTag[List[T]]]
- println(tt)
-}
-<console>:9: free type: Ident(newTypeName("T")) defined by foo in <console>:7:16
- val tt = implicitly[WeakTypeTag[List[T]]]
- ^
-foo: [T]=> Unit
-
-scala> foo[Int]
-WeakTypeTag[scala.List[T]]
-
-scala>
-
-scala>
+Type in expressions to have them evaluated.
+Type :help for more information.
+
+scala>
+
+scala> def foo[T]{
+ import scala.reflect.runtime.universe._
+ val tt = implicitly[WeakTypeTag[List[T]]]
+ println(tt)
+}
+<console>:9: free type: Ident(newTypeName("T")) defined by foo in <console>:7:16
+ val tt = implicitly[WeakTypeTag[List[T]]]
+ ^
+foo: [T]=> Unit
+
+scala> foo[Int]
+WeakTypeTag[scala.List[T]]
+
+scala>
+
+scala>
diff --git a/test/files/run/reify_newimpl_27.check b/test/files/run/reify_newimpl_27.check
index a7029974a4..c23af69b08 100644
--- a/test/files/run/reify_newimpl_27.check
+++ b/test/files/run/reify_newimpl_27.check
@@ -1 +1 @@
-List(2)
+List(2)
diff --git a/test/files/run/reify_newimpl_29.check b/test/files/run/reify_newimpl_29.check
index a7029974a4..c23af69b08 100644
--- a/test/files/run/reify_newimpl_29.check
+++ b/test/files/run/reify_newimpl_29.check
@@ -1 +1 @@
-List(2)
+List(2)
diff --git a/test/files/run/reify_newimpl_30.check b/test/files/run/reify_newimpl_30.check
index a7029974a4..c23af69b08 100644
--- a/test/files/run/reify_newimpl_30.check
+++ b/test/files/run/reify_newimpl_30.check
@@ -1 +1 @@
-List(2)
+List(2)
diff --git a/test/files/run/reify_newimpl_31.check b/test/files/run/reify_newimpl_31.check
index a7029974a4..c23af69b08 100644
--- a/test/files/run/reify_newimpl_31.check
+++ b/test/files/run/reify_newimpl_31.check
@@ -1 +1 @@
-List(2)
+List(2)
diff --git a/test/files/run/reify_newimpl_33.check b/test/files/run/reify_newimpl_33.check
index a7029974a4..c23af69b08 100644
--- a/test/files/run/reify_newimpl_33.check
+++ b/test/files/run/reify_newimpl_33.check
@@ -1 +1 @@
-List(2)
+List(2)
diff --git a/test/files/run/reify_newimpl_35.check b/test/files/run/reify_newimpl_35.check
index f8306003b5..5545e6e005 100644
--- a/test/files/run/reify_newimpl_35.check
+++ b/test/files/run/reify_newimpl_35.check
@@ -1,17 +1,17 @@
-Type in expressions to have them evaluated.
-Type :help for more information.
-
-scala>
-
-scala> import scala.reflect.runtime.universe._
-import scala.reflect.runtime.universe._
-
-scala> def foo[T: TypeTag] = reify{List[T]()}
-foo: [T](implicit evidence$1: reflect.runtime.universe.TypeTag[T])reflect.runtime.universe.Expr[List[T]]
-
-scala> println(foo)
-Expr[List[Nothing]](immutable.this.Nil)
-
-scala>
-
-scala>
+Type in expressions to have them evaluated.
+Type :help for more information.
+
+scala>
+
+scala> import scala.reflect.runtime.universe._
+import scala.reflect.runtime.universe._
+
+scala> def foo[T: TypeTag] = reify{List[T]()}
+foo: [T](implicit evidence$1: reflect.runtime.universe.TypeTag[T])reflect.runtime.universe.Expr[List[T]]
+
+scala> println(foo)
+Expr[List[Nothing]](immutable.this.Nil)
+
+scala>
+
+scala>
diff --git a/test/files/run/reify_newimpl_36.check b/test/files/run/reify_newimpl_36.check
index 2f562a182f..d81cc0710e 100644
--- a/test/files/run/reify_newimpl_36.check
+++ b/test/files/run/reify_newimpl_36.check
@@ -1 +1 @@
-42
+42
diff --git a/test/files/run/reify_newimpl_37.check b/test/files/run/reify_newimpl_37.check
index 2f562a182f..d81cc0710e 100644
--- a/test/files/run/reify_newimpl_37.check
+++ b/test/files/run/reify_newimpl_37.check
@@ -1 +1 @@
-42
+42
diff --git a/test/files/run/reify_newimpl_38.check b/test/files/run/reify_newimpl_38.check
index 2f562a182f..d81cc0710e 100644
--- a/test/files/run/reify_newimpl_38.check
+++ b/test/files/run/reify_newimpl_38.check
@@ -1 +1 @@
-42
+42
diff --git a/test/files/run/reify_newimpl_39.check b/test/files/run/reify_newimpl_39.check
index 2f562a182f..d81cc0710e 100644
--- a/test/files/run/reify_newimpl_39.check
+++ b/test/files/run/reify_newimpl_39.check
@@ -1 +1 @@
-42
+42
diff --git a/test/files/run/reify_newimpl_40.check b/test/files/run/reify_newimpl_40.check
index 94c5a65fe0..cc0001ab3b 100644
--- a/test/files/run/reify_newimpl_40.check
+++ b/test/files/run/reify_newimpl_40.check
@@ -1 +1 @@
-74088
+74088
diff --git a/test/files/run/repl-power.check b/test/files/run/repl-power.check
index c509434116..9d63ecde94 100644
--- a/test/files/run/repl-power.check
+++ b/test/files/run/repl-power.check
@@ -1,32 +1,32 @@
-Type in expressions to have them evaluated.
-Type :help for more information.
-
-scala> :power
-** Power User mode enabled - BEEP WHIR GYVE **
-** :phase has been set to 'typer'. **
-** scala.tools.nsc._ has been imported **
-** global._, definitions._ also imported **
-** Try :help, :vals, power.<tab> **
-
-scala> // guarding against "error: reference to global is ambiguous"
-
-scala> global.emptyValDef // "it is imported twice in the same scope by ..."
-res0: $r.global.emptyValDef.type = private val _ = _
-
-scala> val tp = ArrayClass[scala.util.Random] // magic with tags
-tp: $r.global.Type = Array[scala.util.Random]
-
-scala> tp.memberType(Array_apply) // evidence
-res1: $r.global.Type = (i: Int)scala.util.Random
-
-scala> val m = LIT(10) MATCH (CASE(LIT(5)) ==> FALSE, DEFAULT ==> TRUE) // treedsl
-m: $r.treedsl.global.Match =
-10 match {
- case 5 => false
- case _ => true
-}
-
-scala> typed(m).tpe // typed is in scope
-res2: $r.treedsl.global.Type = Boolean
-
-scala>
+Type in expressions to have them evaluated.
+Type :help for more information.
+
+scala> :power
+** Power User mode enabled - BEEP WHIR GYVE **
+** :phase has been set to 'typer'. **
+** scala.tools.nsc._ has been imported **
+** global._, definitions._ also imported **
+** Try :help, :vals, power.<tab> **
+
+scala> // guarding against "error: reference to global is ambiguous"
+
+scala> global.emptyValDef // "it is imported twice in the same scope by ..."
+res0: $r.global.emptyValDef.type = private val _ = _
+
+scala> val tp = ArrayClass[scala.util.Random] // magic with tags
+tp: $r.global.Type = Array[scala.util.Random]
+
+scala> tp.memberType(Array_apply) // evidence
+res1: $r.global.Type = (i: Int)scala.util.Random
+
+scala> val m = LIT(10) MATCH (CASE(LIT(5)) ==> FALSE, DEFAULT ==> TRUE) // treedsl
+m: $r.treedsl.global.Match =
+10 match {
+ case 5 => false
+ case _ => true
+}
+
+scala> typed(m).tpe // typed is in scope
+res2: $r.treedsl.global.Type = Boolean
+
+scala>
diff --git a/test/files/run/runtimeEval2.check b/test/files/run/runtimeEval2.check
index 78c6baefdd..0cfbf08886 100644
--- a/test/files/run/runtimeEval2.check
+++ b/test/files/run/runtimeEval2.check
@@ -1 +1 @@
-2
+2
diff --git a/test/files/run/showraw_mods.check b/test/files/run/showraw_mods.check
index 6fc3ffe051..7fca027614 100644
--- a/test/files/run/showraw_mods.check
+++ b/test/files/run/showraw_mods.check
@@ -1 +1 @@
-Block(List(ClassDef(Modifiers(ABSTRACT | DEFAULTPARAM/TRAIT), newTypeName("C"), List(), Template(List(Ident(newTypeName("AnyRef"))), emptyValDef, List(DefDef(Modifiers(), newTermName("$init$"), List(), List(List()), TypeTree(), Block(List(), Literal(Constant(())))), ValDef(Modifiers(PRIVATE | LOCAL), newTermName("x"), TypeTree(), Literal(Constant(2))), ValDef(Modifiers(MUTABLE), newTermName("y"), TypeTree(), Select(This(newTypeName("C")), newTermName("x"))), ValDef(Modifiers(LAZY), newTermName("z"), TypeTree(), Select(This(newTypeName("C")), newTermName("y"))))))), Literal(Constant(())))
+Block(List(ClassDef(Modifiers(ABSTRACT | DEFAULTPARAM/TRAIT), newTypeName("C"), List(), Template(List(Ident(newTypeName("AnyRef"))), emptyValDef, List(DefDef(Modifiers(), newTermName("$init$"), List(), List(List()), TypeTree(), Block(List(), Literal(Constant(())))), ValDef(Modifiers(PRIVATE | LOCAL), newTermName("x"), TypeTree(), Literal(Constant(2))), ValDef(Modifiers(MUTABLE), newTermName("y"), TypeTree(), Select(This(newTypeName("C")), newTermName("x"))), ValDef(Modifiers(LAZY), newTermName("z"), TypeTree(), Select(This(newTypeName("C")), newTermName("y"))))))), Literal(Constant(())))
diff --git a/test/files/run/showraw_tree.check b/test/files/run/showraw_tree.check
index d3a1fddf48..dca272684e 100644
--- a/test/files/run/showraw_tree.check
+++ b/test/files/run/showraw_tree.check
@@ -1,2 +1,2 @@
-Apply(Select(New(AppliedTypeTree(Ident(scala.collection.immutable.HashMap), List(Ident(newTypeName("String")), Ident(newTypeName("String"))))), nme.CONSTRUCTOR), List())
-Apply(Select(New(AppliedTypeTree(Ident(scala.collection.mutable.HashMap), List(Ident(newTypeName("String")), Ident(newTypeName("String"))))), nme.CONSTRUCTOR), List())
+Apply(Select(New(AppliedTypeTree(Ident(scala.collection.immutable.HashMap), List(Ident(newTypeName("String")), Ident(newTypeName("String"))))), nme.CONSTRUCTOR), List())
+Apply(Select(New(AppliedTypeTree(Ident(scala.collection.mutable.HashMap), List(Ident(newTypeName("String")), Ident(newTypeName("String"))))), nme.CONSTRUCTOR), List())
diff --git a/test/files/run/showraw_tree_ids.check b/test/files/run/showraw_tree_ids.check
index 0c189130cf..d25599c7fc 100644
--- a/test/files/run/showraw_tree_ids.check
+++ b/test/files/run/showraw_tree_ids.check
@@ -1,2 +1,2 @@
-Apply(Select(New(AppliedTypeTree(Ident(scala.collection.immutable.HashMap#<id>), List(Ident(newTypeName("String")#<id>), Ident(newTypeName("String")#<id>)))), nme.CONSTRUCTOR), List())
-Apply(Select(New(AppliedTypeTree(Ident(scala.collection.mutable.HashMap#<id>), List(Ident(newTypeName("String")#<id>), Ident(newTypeName("String")#<id>)))), nme.CONSTRUCTOR), List())
+Apply(Select(New(AppliedTypeTree(Ident(scala.collection.immutable.HashMap#<id>), List(Ident(newTypeName("String")#<id>), Ident(newTypeName("String")#<id>)))), nme.CONSTRUCTOR), List())
+Apply(Select(New(AppliedTypeTree(Ident(scala.collection.mutable.HashMap#<id>), List(Ident(newTypeName("String")#<id>), Ident(newTypeName("String")#<id>)))), nme.CONSTRUCTOR), List())
diff --git a/test/files/run/showraw_tree_kinds.check b/test/files/run/showraw_tree_kinds.check
index 7b4ab456b0..d0d4cd0058 100644
--- a/test/files/run/showraw_tree_kinds.check
+++ b/test/files/run/showraw_tree_kinds.check
@@ -1,2 +1,2 @@
-Apply(Select(New(AppliedTypeTree(Ident(scala.collection.immutable.HashMap#CLS), List(Ident(newTypeName("String")#TPE), Ident(newTypeName("String")#TPE)))), nme.CONSTRUCTOR), List())
-Apply(Select(New(AppliedTypeTree(Ident(scala.collection.mutable.HashMap#CLS), List(Ident(newTypeName("String")#TPE), Ident(newTypeName("String")#TPE)))), nme.CONSTRUCTOR), List())
+Apply(Select(New(AppliedTypeTree(Ident(scala.collection.immutable.HashMap#CLS), List(Ident(newTypeName("String")#TPE), Ident(newTypeName("String")#TPE)))), nme.CONSTRUCTOR), List())
+Apply(Select(New(AppliedTypeTree(Ident(scala.collection.mutable.HashMap#CLS), List(Ident(newTypeName("String")#TPE), Ident(newTypeName("String")#TPE)))), nme.CONSTRUCTOR), List())
diff --git a/test/files/run/showraw_tree_types_ids.check b/test/files/run/showraw_tree_types_ids.check
index 39e68dc881..92ee45a1e6 100644
--- a/test/files/run/showraw_tree_types_ids.check
+++ b/test/files/run/showraw_tree_types_ids.check
@@ -1,10 +1,10 @@
-Apply[1](Select[2](New[1](TypeTree[1]().setOriginal(AppliedTypeTree(Ident[3](scala.collection.immutable.HashMap#<id>), List(TypeTree[4]().setOriginal(Ident[4](newTypeName("String")#<id>)), TypeTree[4]().setOriginal(Ident[4](newTypeName("String")#<id>)))))), nme.CONSTRUCTOR#<id>), List())
-[1] TypeRef(ThisType(scala.collection.immutable#<id>), scala.collection.immutable.HashMap#<id>, List(TypeRef(ThisType(scala.Predef#<id>), newTypeName("String")#<id>, List()), TypeRef(ThisType(scala.Predef#<id>), newTypeName("String")#<id>, List())))
-[2] MethodType(List(), TypeRef(ThisType(scala.collection.immutable#<id>), scala.collection.immutable.HashMap#<id>, List(TypeRef(ThisType(scala.Predef#<id>), newTypeName("String")#<id>, List()), TypeRef(ThisType(scala.Predef#<id>), newTypeName("String")#<id>, List()))))
-[3] TypeRef(ThisType(scala.collection.immutable#<id>), scala.collection.immutable.HashMap#<id>, List())
-[4] TypeRef(ThisType(scala.Predef#<id>), newTypeName("String")#<id>, List())
-Apply[5](Select[6](New[5](TypeTree[5]().setOriginal(AppliedTypeTree(Ident[7](scala.collection.mutable.HashMap#<id>), List(TypeTree[4]().setOriginal(Ident[4](newTypeName("String")#<id>)), TypeTree[4]().setOriginal(Ident[4](newTypeName("String")#<id>)))))), nme.CONSTRUCTOR#<id>), List())
-[4] TypeRef(ThisType(scala.Predef#<id>), newTypeName("String")#<id>, List())
-[5] TypeRef(ThisType(scala.collection.mutable#<id>), scala.collection.mutable.HashMap#<id>, List(TypeRef(ThisType(scala.Predef#<id>), newTypeName("String")#<id>, List()), TypeRef(ThisType(scala.Predef#<id>), newTypeName("String")#<id>, List())))
-[6] MethodType(List(), TypeRef(ThisType(scala.collection.mutable#<id>), scala.collection.mutable.HashMap#<id>, List(TypeRef(ThisType(scala.Predef#<id>), newTypeName("String")#<id>, List()), TypeRef(ThisType(scala.Predef#<id>), newTypeName("String")#<id>, List()))))
-[7] TypeRef(ThisType(scala.collection.mutable#<id>), scala.collection.mutable.HashMap#<id>, List())
+Apply[1](Select[2](New[1](TypeTree[1]().setOriginal(AppliedTypeTree(Ident[3](scala.collection.immutable.HashMap#<id>), List(TypeTree[4]().setOriginal(Ident[4](newTypeName("String")#<id>)), TypeTree[4]().setOriginal(Ident[4](newTypeName("String")#<id>)))))), nme.CONSTRUCTOR#<id>), List())
+[1] TypeRef(ThisType(scala.collection.immutable#<id>), scala.collection.immutable.HashMap#<id>, List(TypeRef(ThisType(scala.Predef#<id>), newTypeName("String")#<id>, List()), TypeRef(ThisType(scala.Predef#<id>), newTypeName("String")#<id>, List())))
+[2] MethodType(List(), TypeRef(ThisType(scala.collection.immutable#<id>), scala.collection.immutable.HashMap#<id>, List(TypeRef(ThisType(scala.Predef#<id>), newTypeName("String")#<id>, List()), TypeRef(ThisType(scala.Predef#<id>), newTypeName("String")#<id>, List()))))
+[3] TypeRef(ThisType(scala.collection.immutable#<id>), scala.collection.immutable.HashMap#<id>, List())
+[4] TypeRef(ThisType(scala.Predef#<id>), newTypeName("String")#<id>, List())
+Apply[5](Select[6](New[5](TypeTree[5]().setOriginal(AppliedTypeTree(Ident[7](scala.collection.mutable.HashMap#<id>), List(TypeTree[4]().setOriginal(Ident[4](newTypeName("String")#<id>)), TypeTree[4]().setOriginal(Ident[4](newTypeName("String")#<id>)))))), nme.CONSTRUCTOR#<id>), List())
+[4] TypeRef(ThisType(scala.Predef#<id>), newTypeName("String")#<id>, List())
+[5] TypeRef(ThisType(scala.collection.mutable#<id>), scala.collection.mutable.HashMap#<id>, List(TypeRef(ThisType(scala.Predef#<id>), newTypeName("String")#<id>, List()), TypeRef(ThisType(scala.Predef#<id>), newTypeName("String")#<id>, List())))
+[6] MethodType(List(), TypeRef(ThisType(scala.collection.mutable#<id>), scala.collection.mutable.HashMap#<id>, List(TypeRef(ThisType(scala.Predef#<id>), newTypeName("String")#<id>, List()), TypeRef(ThisType(scala.Predef#<id>), newTypeName("String")#<id>, List()))))
+[7] TypeRef(ThisType(scala.collection.mutable#<id>), scala.collection.mutable.HashMap#<id>, List())
diff --git a/test/files/run/showraw_tree_types_typed.check b/test/files/run/showraw_tree_types_typed.check
index 0a41f5185c..c6c20409dc 100644
--- a/test/files/run/showraw_tree_types_typed.check
+++ b/test/files/run/showraw_tree_types_typed.check
@@ -1,10 +1,10 @@
-Apply[1](Select[2](New[1](TypeTree[1]().setOriginal(AppliedTypeTree(Ident[3](scala.collection.immutable.HashMap), List(TypeTree[4]().setOriginal(Ident[4](newTypeName("String"))), TypeTree[4]().setOriginal(Ident[4](newTypeName("String"))))))), nme.CONSTRUCTOR), List())
-[1] TypeRef(ThisType(scala.collection.immutable), scala.collection.immutable.HashMap, List(TypeRef(ThisType(scala.Predef), newTypeName("String"), List()), TypeRef(ThisType(scala.Predef), newTypeName("String"), List())))
-[2] MethodType(List(), TypeRef(ThisType(scala.collection.immutable), scala.collection.immutable.HashMap, List(TypeRef(ThisType(scala.Predef), newTypeName("String"), List()), TypeRef(ThisType(scala.Predef), newTypeName("String"), List()))))
-[3] TypeRef(ThisType(scala.collection.immutable), scala.collection.immutable.HashMap, List())
-[4] TypeRef(ThisType(scala.Predef), newTypeName("String"), List())
-Apply[5](Select[6](New[5](TypeTree[5]().setOriginal(AppliedTypeTree(Ident[7](scala.collection.mutable.HashMap), List(TypeTree[4]().setOriginal(Ident[4](newTypeName("String"))), TypeTree[4]().setOriginal(Ident[4](newTypeName("String"))))))), nme.CONSTRUCTOR), List())
-[4] TypeRef(ThisType(scala.Predef), newTypeName("String"), List())
-[5] TypeRef(ThisType(scala.collection.mutable), scala.collection.mutable.HashMap, List(TypeRef(ThisType(scala.Predef), newTypeName("String"), List()), TypeRef(ThisType(scala.Predef), newTypeName("String"), List())))
-[6] MethodType(List(), TypeRef(ThisType(scala.collection.mutable), scala.collection.mutable.HashMap, List(TypeRef(ThisType(scala.Predef), newTypeName("String"), List()), TypeRef(ThisType(scala.Predef), newTypeName("String"), List()))))
-[7] TypeRef(ThisType(scala.collection.mutable), scala.collection.mutable.HashMap, List())
+Apply[1](Select[2](New[1](TypeTree[1]().setOriginal(AppliedTypeTree(Ident[3](scala.collection.immutable.HashMap), List(TypeTree[4]().setOriginal(Ident[4](newTypeName("String"))), TypeTree[4]().setOriginal(Ident[4](newTypeName("String"))))))), nme.CONSTRUCTOR), List())
+[1] TypeRef(ThisType(scala.collection.immutable), scala.collection.immutable.HashMap, List(TypeRef(ThisType(scala.Predef), newTypeName("String"), List()), TypeRef(ThisType(scala.Predef), newTypeName("String"), List())))
+[2] MethodType(List(), TypeRef(ThisType(scala.collection.immutable), scala.collection.immutable.HashMap, List(TypeRef(ThisType(scala.Predef), newTypeName("String"), List()), TypeRef(ThisType(scala.Predef), newTypeName("String"), List()))))
+[3] TypeRef(ThisType(scala.collection.immutable), scala.collection.immutable.HashMap, List())
+[4] TypeRef(ThisType(scala.Predef), newTypeName("String"), List())
+Apply[5](Select[6](New[5](TypeTree[5]().setOriginal(AppliedTypeTree(Ident[7](scala.collection.mutable.HashMap), List(TypeTree[4]().setOriginal(Ident[4](newTypeName("String"))), TypeTree[4]().setOriginal(Ident[4](newTypeName("String"))))))), nme.CONSTRUCTOR), List())
+[4] TypeRef(ThisType(scala.Predef), newTypeName("String"), List())
+[5] TypeRef(ThisType(scala.collection.mutable), scala.collection.mutable.HashMap, List(TypeRef(ThisType(scala.Predef), newTypeName("String"), List()), TypeRef(ThisType(scala.Predef), newTypeName("String"), List())))
+[6] MethodType(List(), TypeRef(ThisType(scala.collection.mutable), scala.collection.mutable.HashMap, List(TypeRef(ThisType(scala.Predef), newTypeName("String"), List()), TypeRef(ThisType(scala.Predef), newTypeName("String"), List()))))
+[7] TypeRef(ThisType(scala.collection.mutable), scala.collection.mutable.HashMap, List())
diff --git a/test/files/run/showraw_tree_types_untyped.check b/test/files/run/showraw_tree_types_untyped.check
index d3a1fddf48..dca272684e 100644
--- a/test/files/run/showraw_tree_types_untyped.check
+++ b/test/files/run/showraw_tree_types_untyped.check
@@ -1,2 +1,2 @@
-Apply(Select(New(AppliedTypeTree(Ident(scala.collection.immutable.HashMap), List(Ident(newTypeName("String")), Ident(newTypeName("String"))))), nme.CONSTRUCTOR), List())
-Apply(Select(New(AppliedTypeTree(Ident(scala.collection.mutable.HashMap), List(Ident(newTypeName("String")), Ident(newTypeName("String"))))), nme.CONSTRUCTOR), List())
+Apply(Select(New(AppliedTypeTree(Ident(scala.collection.immutable.HashMap), List(Ident(newTypeName("String")), Ident(newTypeName("String"))))), nme.CONSTRUCTOR), List())
+Apply(Select(New(AppliedTypeTree(Ident(scala.collection.mutable.HashMap), List(Ident(newTypeName("String")), Ident(newTypeName("String"))))), nme.CONSTRUCTOR), List())
diff --git a/test/files/run/showraw_tree_ultimate.check b/test/files/run/showraw_tree_ultimate.check
index 400b736704..46ccd4df8f 100644
--- a/test/files/run/showraw_tree_ultimate.check
+++ b/test/files/run/showraw_tree_ultimate.check
@@ -1,10 +1,10 @@
-Apply[1](Select[2](New[1](TypeTree[1]().setOriginal(AppliedTypeTree(Ident[3](scala.collection.immutable.HashMap#<id>#CLS), List(TypeTree[4]().setOriginal(Ident[4](newTypeName("String")#<id>#TPE)), TypeTree[4]().setOriginal(Ident[4](newTypeName("String")#<id>#TPE)))))), nme.CONSTRUCTOR#<id>#PCTOR), List())
-[1] TypeRef(ThisType(scala.collection.immutable#<id>#PK), scala.collection.immutable.HashMap#<id>#CLS, List(TypeRef(ThisType(scala.Predef#<id>#MODC), newTypeName("String")#<id>#TPE, List()), TypeRef(ThisType(scala.Predef#<id>#MODC), newTypeName("String")#<id>#TPE, List())))
-[2] MethodType(List(), TypeRef(ThisType(scala.collection.immutable#<id>#PK), scala.collection.immutable.HashMap#<id>#CLS, List(TypeRef(ThisType(scala.Predef#<id>#MODC), newTypeName("String")#<id>#TPE, List()), TypeRef(ThisType(scala.Predef#<id>#MODC), newTypeName("String")#<id>#TPE, List()))))
-[3] TypeRef(ThisType(scala.collection.immutable#<id>#PK), scala.collection.immutable.HashMap#<id>#CLS, List())
-[4] TypeRef(ThisType(scala.Predef#<id>#MODC), newTypeName("String")#<id>#TPE, List())
-Apply[5](Select[6](New[5](TypeTree[5]().setOriginal(AppliedTypeTree(Ident[7](scala.collection.mutable.HashMap#<id>#CLS), List(TypeTree[4]().setOriginal(Ident[4](newTypeName("String")#<id>#TPE)), TypeTree[4]().setOriginal(Ident[4](newTypeName("String")#<id>#TPE)))))), nme.CONSTRUCTOR#<id>#CTOR), List())
-[4] TypeRef(ThisType(scala.Predef#<id>#MODC), newTypeName("String")#<id>#TPE, List())
-[5] TypeRef(ThisType(scala.collection.mutable#<id>#PK), scala.collection.mutable.HashMap#<id>#CLS, List(TypeRef(ThisType(scala.Predef#<id>#MODC), newTypeName("String")#<id>#TPE, List()), TypeRef(ThisType(scala.Predef#<id>#MODC), newTypeName("String")#<id>#TPE, List())))
-[6] MethodType(List(), TypeRef(ThisType(scala.collection.mutable#<id>#PK), scala.collection.mutable.HashMap#<id>#CLS, List(TypeRef(ThisType(scala.Predef#<id>#MODC), newTypeName("String")#<id>#TPE, List()), TypeRef(ThisType(scala.Predef#<id>#MODC), newTypeName("String")#<id>#TPE, List()))))
-[7] TypeRef(ThisType(scala.collection.mutable#<id>#PK), scala.collection.mutable.HashMap#<id>#CLS, List())
+Apply[1](Select[2](New[1](TypeTree[1]().setOriginal(AppliedTypeTree(Ident[3](scala.collection.immutable.HashMap#<id>#CLS), List(TypeTree[4]().setOriginal(Ident[4](newTypeName("String")#<id>#TPE)), TypeTree[4]().setOriginal(Ident[4](newTypeName("String")#<id>#TPE)))))), nme.CONSTRUCTOR#<id>#PCTOR), List())
+[1] TypeRef(ThisType(scala.collection.immutable#<id>#PK), scala.collection.immutable.HashMap#<id>#CLS, List(TypeRef(ThisType(scala.Predef#<id>#MODC), newTypeName("String")#<id>#TPE, List()), TypeRef(ThisType(scala.Predef#<id>#MODC), newTypeName("String")#<id>#TPE, List())))
+[2] MethodType(List(), TypeRef(ThisType(scala.collection.immutable#<id>#PK), scala.collection.immutable.HashMap#<id>#CLS, List(TypeRef(ThisType(scala.Predef#<id>#MODC), newTypeName("String")#<id>#TPE, List()), TypeRef(ThisType(scala.Predef#<id>#MODC), newTypeName("String")#<id>#TPE, List()))))
+[3] TypeRef(ThisType(scala.collection.immutable#<id>#PK), scala.collection.immutable.HashMap#<id>#CLS, List())
+[4] TypeRef(ThisType(scala.Predef#<id>#MODC), newTypeName("String")#<id>#TPE, List())
+Apply[5](Select[6](New[5](TypeTree[5]().setOriginal(AppliedTypeTree(Ident[7](scala.collection.mutable.HashMap#<id>#CLS), List(TypeTree[4]().setOriginal(Ident[4](newTypeName("String")#<id>#TPE)), TypeTree[4]().setOriginal(Ident[4](newTypeName("String")#<id>#TPE)))))), nme.CONSTRUCTOR#<id>#CTOR), List())
+[4] TypeRef(ThisType(scala.Predef#<id>#MODC), newTypeName("String")#<id>#TPE, List())
+[5] TypeRef(ThisType(scala.collection.mutable#<id>#PK), scala.collection.mutable.HashMap#<id>#CLS, List(TypeRef(ThisType(scala.Predef#<id>#MODC), newTypeName("String")#<id>#TPE, List()), TypeRef(ThisType(scala.Predef#<id>#MODC), newTypeName("String")#<id>#TPE, List())))
+[6] MethodType(List(), TypeRef(ThisType(scala.collection.mutable#<id>#PK), scala.collection.mutable.HashMap#<id>#CLS, List(TypeRef(ThisType(scala.Predef#<id>#MODC), newTypeName("String")#<id>#TPE, List()), TypeRef(ThisType(scala.Predef#<id>#MODC), newTypeName("String")#<id>#TPE, List()))))
+[7] TypeRef(ThisType(scala.collection.mutable#<id>#PK), scala.collection.mutable.HashMap#<id>#CLS, List())
diff --git a/test/files/run/t1195-new.check b/test/files/run/t1195-new.check
index 4dd1661d1b..e0c9ac07ff 100644
--- a/test/files/run/t1195-new.check
+++ b/test/files/run/t1195-new.check
@@ -1,6 +1,6 @@
-Bar.type, underlying = <: scala.runtime.AbstractFunction1[Int,Bar] with Serializable{case def unapply(x$0: Bar): Option[Int]} with Singleton
-Bar, underlying = <: Product with Serializable{val x: Int; def copy(x: Int): Bar; def copy$default$1: Int; def _1: Int}
-Product with Serializable, underlying = Product with Serializable
-Bar.type, underlying = <: scala.runtime.AbstractFunction1[Int,Bar] with Serializable{case def unapply(x$0: Bar): Option[Int]} with Singleton
-Bar, underlying = <: Product with Serializable{val x: Int; def copy(x: Int): Bar; def copy$default$1: Int; def _1: Int}
-Product with Serializable, underlying = Product with Serializable
+Bar.type, underlying = <: scala.runtime.AbstractFunction1[Int,Bar] with Serializable{case def unapply(x$0: Bar): Option[Int]} with Singleton
+Bar, underlying = <: Product with Serializable{val x: Int; def copy(x: Int): Bar; def copy$default$1: Int; def _1: Int}
+Product with Serializable, underlying = Product with Serializable
+Bar.type, underlying = <: scala.runtime.AbstractFunction1[Int,Bar] with Serializable{case def unapply(x$0: Bar): Option[Int]} with Singleton
+Bar, underlying = <: Product with Serializable{val x: Int; def copy(x: Int): Bar; def copy$default$1: Int; def _1: Int}
+Product with Serializable, underlying = Product with Serializable
diff --git a/test/files/run/t1195-old.check b/test/files/run/t1195-old.check
index eb60eceb17..d023bc91f7 100644
--- a/test/files/run/t1195-old.check
+++ b/test/files/run/t1195-old.check
@@ -1,6 +1,6 @@
-_ <: scala.runtime.AbstractFunction1[Int, _ <: Object with scala.Product with scala.Serializable] with scala.Serializable with java.lang.Object
-_ <: Object with scala.Product with scala.Serializable
-Object with scala.Product with scala.Serializable
-_ <: scala.runtime.AbstractFunction1[Int, _ <: Object with scala.Product with scala.Serializable] with scala.Serializable with java.lang.Object
-_ <: Object with scala.Product with scala.Serializable
-Object with scala.Product with scala.Serializable
+_ <: scala.runtime.AbstractFunction1[Int, _ <: Object with scala.Product with scala.Serializable] with scala.Serializable with java.lang.Object
+_ <: Object with scala.Product with scala.Serializable
+Object with scala.Product with scala.Serializable
+_ <: scala.runtime.AbstractFunction1[Int, _ <: Object with scala.Product with scala.Serializable] with scala.Serializable with java.lang.Object
+_ <: Object with scala.Product with scala.Serializable
+Object with scala.Product with scala.Serializable
diff --git a/test/files/run/t2386-new.check b/test/files/run/t2386-new.check
index 98e226f946..8ed0ffd7d8 100644
--- a/test/files/run/t2386-new.check
+++ b/test/files/run/t2386-new.check
@@ -1,2 +1,2 @@
-a(0) = Array(1, 2)
-a(1) = Array("a", "b")
+a(0) = Array(1, 2)
+a(1) = Array("a", "b")
diff --git a/test/files/run/t2886.check b/test/files/run/t2886.check
index 8d97a82799..ce31bc7408 100644
--- a/test/files/run/t2886.check
+++ b/test/files/run/t2886.check
@@ -1,5 +1,5 @@
-((x: String) => {
- val x$1 = x;
- val x$2 = x;
- Test.this.test(x$2, x$1)
-})
+((x: String) => {
+ val x$1 = x;
+ val x$2 = x;
+ Test.this.test(x$2, x$1)
+})
diff --git a/test/files/run/t3507-new.check b/test/files/run/t3507-new.check
index b02c40fc26..208e093004 100644
--- a/test/files/run/t3507-new.check
+++ b/test/files/run/t3507-new.check
@@ -1 +1 @@
-_1.b.c.type
+_1.b.c.type
diff --git a/test/files/run/t4110-new.check b/test/files/run/t4110-new.check
index 5cbfb27f3e..c0f646c5f6 100644
--- a/test/files/run/t4110-new.check
+++ b/test/files/run/t4110-new.check
@@ -1,2 +1,2 @@
-Test.A with Test.B
-Test.A with Test.B
+Test.A with Test.B
+Test.A with Test.B
diff --git a/test/files/run/t4216.check b/test/files/run/t4216.check
index 6f2684f42d..091e55a0c7 100644
--- a/test/files/run/t4216.check
+++ b/test/files/run/t4216.check
@@ -1,37 +1,37 @@
-Type in expressions to have them evaluated.
-Type :help for more information.
-
-scala> import scala.reflect.ClassTag
-import scala.reflect.ClassTag
-
-scala> def f[A: ClassTag](a: A) = java.util.Arrays.asList(Array(a): _*)
-f: [A](a: A)(implicit evidence$1: scala.reflect.ClassTag[A])java.util.List[A]
-
-scala> f(".")
-res0: java.util.List[String] = [.]
-
-scala> f(0)
-res1: java.util.List[Int] = [0]
-
-scala> def i(a: Int) = java.util.Arrays.asList(Array(a): _*)
-i: (a: Int)java.util.List[Int]
-
-scala> i(0)
-res2: java.util.List[Int] = [0]
-
-scala> def o(a: Any) = java.util.Arrays.asList(Array(a): _*)
-o: (a: Any)java.util.List[Any]
-
-scala> o(".")
-res3: java.util.List[Any] = [.]
-
-scala> class V(val a: Int) extends AnyVal
-defined class V
-
-scala> f(new V(0))
-res4: java.util.List[V] = [V@0]
-
-scala> o(new V(0))
-res5: java.util.List[Any] = [V@0]
-
-scala>
+Type in expressions to have them evaluated.
+Type :help for more information.
+
+scala> import scala.reflect.ClassTag
+import scala.reflect.ClassTag
+
+scala> def f[A: ClassTag](a: A) = java.util.Arrays.asList(Array(a): _*)
+f: [A](a: A)(implicit evidence$1: scala.reflect.ClassTag[A])java.util.List[A]
+
+scala> f(".")
+res0: java.util.List[String] = [.]
+
+scala> f(0)
+res1: java.util.List[Int] = [0]
+
+scala> def i(a: Int) = java.util.Arrays.asList(Array(a): _*)
+i: (a: Int)java.util.List[Int]
+
+scala> i(0)
+res2: java.util.List[Int] = [0]
+
+scala> def o(a: Any) = java.util.Arrays.asList(Array(a): _*)
+o: (a: Any)java.util.List[Any]
+
+scala> o(".")
+res3: java.util.List[Any] = [.]
+
+scala> class V(val a: Int) extends AnyVal
+defined class V
+
+scala> f(new V(0))
+res4: java.util.List[V] = [V@0]
+
+scala> o(new V(0))
+res5: java.util.List[Any] = [V@0]
+
+scala>
diff --git a/test/files/run/t4835.check b/test/files/run/t4835.check
index 531c3d7bb6..0987722d5f 100644
--- a/test/files/run/t4835.check
+++ b/test/files/run/t4835.check
@@ -1,7 +1,7 @@
--1 0 1 2 3 4 5 6 7 8 9
--1 1 3 5 7 9 11 13 15 17 19
-1 1
-2 1 2
-2 1 A 2
-3 1 2 3
-3 1 A 2 B 3
+-1 0 1 2 3 4 5 6 7 8 9
+-1 1 3 5 7 9 11 13 15 17 19
+1 1
+2 1 2
+2 1 A 2
+3 1 2 3
+3 1 A 2 B 3
diff --git a/test/files/run/t4835.scala b/test/files/run/t4835.scala
index 50d161be40..c964e42e7c 100644
--- a/test/files/run/t4835.scala
+++ b/test/files/run/t4835.scala
@@ -1,38 +1,38 @@
-/*
- * Test case for SI-4835. This tests confirm that the fix
- * doesn't break laziness. To test memory consumption,
- * I need to confirm that OutOfMemoryError doesn't occur.
- * I could create such tests. However, such tests consume
- * too much time and memory.
- */
-object Test {
- private final val INFINITE = -1
- def testStreamIterator(num: Int, stream: Stream[Int]): Unit = {
- val iter = stream.iterator
- print(num)
- // if num == -1, then steram is infinite sequence
- if (num == INFINITE) {
- for(i <- 0 until 10) {
- print(" " + iter.next())
- }
- } else {
- while(iter.hasNext) {
- print(" " + iter.next())
- }
- }
- println()
- }
-
- def main(args: Array[String]): Unit = {
- import Stream.{from, cons, empty}
- testStreamIterator(INFINITE, from(0))
- testStreamIterator(INFINITE, from(0).filter(_ % 2 == 1))
- testStreamIterator(1, Stream(1))
- testStreamIterator(2, Stream(1, 2))
- //Stream with side effect
- testStreamIterator(2, cons(1, cons({ print(" A"); 2}, empty)))
- testStreamIterator(3, Stream(1, 2, 3))
- //Stream with side effect
- testStreamIterator(3, cons(1, cons({ print(" A"); 2}, cons({ print(" B"); 3}, Stream.empty))))
- }
-}
+/*
+ * Test case for SI-4835. This tests confirm that the fix
+ * doesn't break laziness. To test memory consumption,
+ * I need to confirm that OutOfMemoryError doesn't occur.
+ * I could create such tests. However, such tests consume
+ * too much time and memory.
+ */
+object Test {
+ private final val INFINITE = -1
+ def testStreamIterator(num: Int, stream: Stream[Int]): Unit = {
+ val iter = stream.iterator
+ print(num)
+ // if num == -1, then steram is infinite sequence
+ if (num == INFINITE) {
+ for(i <- 0 until 10) {
+ print(" " + iter.next())
+ }
+ } else {
+ while(iter.hasNext) {
+ print(" " + iter.next())
+ }
+ }
+ println()
+ }
+
+ def main(args: Array[String]): Unit = {
+ import Stream.{from, cons, empty}
+ testStreamIterator(INFINITE, from(0))
+ testStreamIterator(INFINITE, from(0).filter(_ % 2 == 1))
+ testStreamIterator(1, Stream(1))
+ testStreamIterator(2, Stream(1, 2))
+ //Stream with side effect
+ testStreamIterator(2, cons(1, cons({ print(" A"); 2}, empty)))
+ testStreamIterator(3, Stream(1, 2, 3))
+ //Stream with side effect
+ testStreamIterator(3, cons(1, cons({ print(" A"); 2}, cons({ print(" B"); 3}, Stream.empty))))
+ }
+}
diff --git a/test/files/run/t4935.check b/test/files/run/t4935.check
index ef0493b275..ce01362503 100644
--- a/test/files/run/t4935.check
+++ b/test/files/run/t4935.check
@@ -1 +1 @@
-hello
+hello
diff --git a/test/files/run/t4935.scala b/test/files/run/t4935.scala
index 18631e2041..5940355b9b 100644
--- a/test/files/run/t4935.scala
+++ b/test/files/run/t4935.scala
@@ -1,9 +1,9 @@
-object Test extends App {
- for (i <- 0 to 1) {
- val a = Foo
- }
-}
-
-object Foo {
- println("hello")
-}
+object Test extends App {
+ for (i <- 0 to 1) {
+ val a = Foo
+ }
+}
+
+object Foo {
+ println("hello")
+}
diff --git a/test/files/run/t5224.check b/test/files/run/t5224.check
index ffeb7b43ce..e15c1c90eb 100644
--- a/test/files/run/t5224.check
+++ b/test/files/run/t5224.check
@@ -1,9 +1,9 @@
-{
- @new Foo(bar = "qwe") class C extends AnyRef {
- def <init>() = {
- super.<init>();
- ()
- }
- };
- ()
-}
+{
+ @new Foo(bar = "qwe") class C extends AnyRef {
+ def <init>() = {
+ super.<init>();
+ ()
+ }
+ };
+ ()
+}
diff --git a/test/files/run/t5225_1.check b/test/files/run/t5225_1.check
index 40db2468b1..1a47aacfd0 100644
--- a/test/files/run/t5225_1.check
+++ b/test/files/run/t5225_1.check
@@ -1,4 +1,4 @@
-{
- @new transient() @new volatile() var x = 2;
- ()
-}
+{
+ @new transient() @new volatile() var x = 2;
+ ()
+}
diff --git a/test/files/run/t5225_2.check b/test/files/run/t5225_2.check
index 8cd2ddc1a4..8ed54a14bb 100644
--- a/test/files/run/t5225_2.check
+++ b/test/files/run/t5225_2.check
@@ -1,4 +1,4 @@
-{
- def foo(@new cloneable() x: Int) = "";
- ()
-}
+{
+ def foo(@new cloneable() x: Int) = "";
+ ()
+}
diff --git a/test/files/run/t5256c.check b/test/files/run/t5256c.check
index 16bfc6c9d0..7fcd0eb722 100644
--- a/test/files/run/t5256c.check
+++ b/test/files/run/t5256c.check
@@ -1,6 +1,6 @@
-class A$1
-Test.A$1
+class A$1
+Test.A$1
java.lang.Object {
def foo(): Nothing
def <init>(): A$1
-}
+}
diff --git a/test/files/run/t5256g.check b/test/files/run/t5256g.check
index 5aac899694..c9c8d6e63d 100644
--- a/test/files/run/t5256g.check
+++ b/test/files/run/t5256g.check
@@ -1,3 +1,3 @@
-anonymous class $anon$1
-Test.$anon$1
-A with B{def <init>(): A with B}
+anonymous class $anon$1
+Test.$anon$1
+A with B{def <init>(): A with B}
diff --git a/test/files/run/t5256h.check b/test/files/run/t5256h.check
index 2a6b292486..1b23a71a4c 100644
--- a/test/files/run/t5256h.check
+++ b/test/files/run/t5256h.check
@@ -1,7 +1,7 @@
-anonymous class $anon$1
-Test.$anon$1
+anonymous class $anon$1
+Test.$anon$1
java.lang.Object {
final private val x: Int
def x(): Int
def <init>(): java.lang.Object{def x(): Int}
-}
+}
diff --git a/test/files/run/t5271_1.check b/test/files/run/t5271_1.check
index 5245173228..544b4d2762 100644
--- a/test/files/run/t5271_1.check
+++ b/test/files/run/t5271_1.check
@@ -1,12 +1,12 @@
-{
- case class C extends Product with Serializable {
- <caseaccessor> <paramaccessor> val foo: Int = _;
- <caseaccessor> <paramaccessor> val bar: Int = _;
- def <init>(foo: Int, bar: Int) = {
- super.<init>();
- ()
- }
- };
- ()
-}
-()
+{
+ case class C extends Product with Serializable {
+ <caseaccessor> <paramaccessor> val foo: Int = _;
+ <caseaccessor> <paramaccessor> val bar: Int = _;
+ def <init>(foo: Int, bar: Int) = {
+ super.<init>();
+ ()
+ }
+ };
+ ()
+}
+()
diff --git a/test/files/run/t5271_2.check b/test/files/run/t5271_2.check
index 0765b3a6a4..585331be65 100644
--- a/test/files/run/t5271_2.check
+++ b/test/files/run/t5271_2.check
@@ -1,14 +1,14 @@
-{
- case class C extends Product with Serializable {
- <caseaccessor> <paramaccessor> val foo: Int = _;
- <caseaccessor> <paramaccessor> val bar: Int = _;
- def <init>(foo: Int, bar: Int) = {
- super.<init>();
- ()
- }
- };
- val c = C.apply(2, 2);
- scala.this.Predef.println(c.foo.$times(c.bar))
-}
-4
-()
+{
+ case class C extends Product with Serializable {
+ <caseaccessor> <paramaccessor> val foo: Int = _;
+ <caseaccessor> <paramaccessor> val bar: Int = _;
+ def <init>(foo: Int, bar: Int) = {
+ super.<init>();
+ ()
+ }
+ };
+ val c = C.apply(2, 2);
+ scala.this.Predef.println(c.foo.$times(c.bar))
+}
+4
+()
diff --git a/test/files/run/t5271_3.check b/test/files/run/t5271_3.check
index 3cfedbacd7..b02acd21f9 100644
--- a/test/files/run/t5271_3.check
+++ b/test/files/run/t5271_3.check
@@ -1,21 +1,21 @@
-{
- object C extends AnyRef {
- def <init>() = {
- super.<init>();
- ()
- };
- def qwe = 4
- };
- case class C extends Product with Serializable {
- <caseaccessor> <paramaccessor> val foo: Int = _;
- <caseaccessor> <paramaccessor> val bar: Int = _;
- def <init>(foo: Int, bar: Int) = {
- super.<init>();
- ()
- }
- };
- val c = C.apply(2, 2);
- scala.this.Predef.println(c.foo.$times(c.bar).$eq$eq(C.qwe))
-}
-true
-()
+{
+ object C extends AnyRef {
+ def <init>() = {
+ super.<init>();
+ ()
+ };
+ def qwe = 4
+ };
+ case class C extends Product with Serializable {
+ <caseaccessor> <paramaccessor> val foo: Int = _;
+ <caseaccessor> <paramaccessor> val bar: Int = _;
+ def <init>(foo: Int, bar: Int) = {
+ super.<init>();
+ ()
+ }
+ };
+ val c = C.apply(2, 2);
+ scala.this.Predef.println(c.foo.$times(c.bar).$eq$eq(C.qwe))
+}
+true
+()
diff --git a/test/files/run/t5418a.check b/test/files/run/t5418a.check
new file mode 100644
index 0000000000..527022936d
--- /dev/null
+++ b/test/files/run/t5418a.check
@@ -0,0 +1 @@
+Expr[Class[_ <: java.lang.Object]](new Object().getClass())
diff --git a/test/files/run/t5418a.scala b/test/files/run/t5418a.scala
new file mode 100644
index 0000000000..90bc542be6
--- /dev/null
+++ b/test/files/run/t5418a.scala
@@ -0,0 +1,3 @@
+object Test extends App {
+ println(scala.reflect.runtime.universe.reify(new Object().getClass))
+} \ No newline at end of file
diff --git a/test/files/run/t5418b.check b/test/files/run/t5418b.check
new file mode 100644
index 0000000000..48d82a2aae
--- /dev/null
+++ b/test/files/run/t5418b.check
@@ -0,0 +1,2 @@
+new Object().getClass()
+TypeRef(ThisType(java.lang), java.lang.Class, List(TypeRef(NoPrefix, newTypeName("?0"), List())))
diff --git a/test/files/run/t5418b.scala b/test/files/run/t5418b.scala
new file mode 100644
index 0000000000..08e8bb163b
--- /dev/null
+++ b/test/files/run/t5418b.scala
@@ -0,0 +1,11 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
+
+object Test extends App {
+ val tb = cm.mkToolBox()
+ val untyped = reify(new Object().getClass).tree
+ val typed = tb.typeCheck(untyped)
+ println(typed)
+ println(showRaw(typed.tpe))
+} \ No newline at end of file
diff --git a/test/files/run/t5419.check b/test/files/run/t5419.check
index 50751b168e..a9c0f262e3 100644
--- a/test/files/run/t5419.check
+++ b/test/files/run/t5419.check
@@ -1 +1 @@
-5: @Foo.asInstanceOf[Int]
+5: @Foo.asInstanceOf[Int]
diff --git a/test/files/run/t5680.check b/test/files/run/t5680.check
index 9fec3b6505..0d825ab7d0 100644
--- a/test/files/run/t5680.check
+++ b/test/files/run/t5680.check
@@ -1,3 +1,3 @@
-[Lscala.runtime.BoxedUnit
-()
-()
+[Lscala.runtime.BoxedUnit
+()
+()
diff --git a/test/files/run/t5704.check b/test/files/run/t5704.check
index 0f6c84d2ec..102e3209c6 100644
--- a/test/files/run/t5704.check
+++ b/test/files/run/t5704.check
@@ -1 +1 @@
-String
+String
diff --git a/test/files/run/t5713.check b/test/files/run/t5713.check
index d3e9348123..1419eb9d79 100644
--- a/test/files/run/t5713.check
+++ b/test/files/run/t5713.check
@@ -1 +1 @@
-err
+err
diff --git a/test/files/run/t5770.check b/test/files/run/t5770.check
index eeb1d55321..f00c965d83 100644
--- a/test/files/run/t5770.check
+++ b/test/files/run/t5770.check
@@ -1,10 +1,10 @@
-1
-2
-3
-4
-5
-6
-7
-8
-9
-10
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
diff --git a/test/files/run/t5816.check b/test/files/run/t5816.check
index 920b64a50d..8e58ace9b4 100644
--- a/test/files/run/t5816.check
+++ b/test/files/run/t5816.check
@@ -1 +1 @@
-5.+(Test.this.y)
+5.+(Test.this.y)
diff --git a/test/files/run/t5881.check b/test/files/run/t5881.check
index 8e596e9323..f4aeec680a 100644
--- a/test/files/run/t5881.check
+++ b/test/files/run/t5881.check
@@ -1,2 +1,2 @@
-scala.collection.immutable.List
-scala.collection.immutable.List
+scala.collection.immutable.List
+scala.collection.immutable.List
diff --git a/test/files/run/t5943a1.check b/test/files/run/t5943a1.check
new file mode 100644
index 0000000000..9f4d160af8
--- /dev/null
+++ b/test/files/run/t5943a1.check
@@ -0,0 +1 @@
+scala.this.Predef.intWrapper(1).to(3).map[Int, scala.collection.immutable.IndexedSeq[Int]](((x$1: Int) => x$1.+(1)))(immutable.this.IndexedSeq.canBuildFrom[Int])
diff --git a/test/files/run/t5943a1.scala b/test/files/run/t5943a1.scala
new file mode 100644
index 0000000000..00f4afa808
--- /dev/null
+++ b/test/files/run/t5943a1.scala
@@ -0,0 +1,9 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
+
+object Test extends App {
+ val tb = cm.mkToolBox()
+ val expr = tb.parse("1 to 3 map (_+1)")
+ println(tb.typeCheck(expr))
+} \ No newline at end of file
diff --git a/test/files/run/t5943a2.check b/test/files/run/t5943a2.check
new file mode 100644
index 0000000000..29ad79c3ce
--- /dev/null
+++ b/test/files/run/t5943a2.check
@@ -0,0 +1 @@
+Vector(2, 3, 4)
diff --git a/test/files/run/t5943a2.scala b/test/files/run/t5943a2.scala
new file mode 100644
index 0000000000..fda800852d
--- /dev/null
+++ b/test/files/run/t5943a2.scala
@@ -0,0 +1,9 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
+
+object Test extends App {
+ val tb = cm.mkToolBox()
+ val expr = tb.parse("1 to 3 map (_+1)")
+ println(tb.eval(expr))
+} \ No newline at end of file
diff --git a/test/files/run/t6086-repl.check b/test/files/run/t6086-repl.check
index f868aa18d0..97f20bd66b 100644
--- a/test/files/run/t6086-repl.check
+++ b/test/files/run/t6086-repl.check
@@ -1,12 +1,12 @@
-Type in expressions to have them evaluated.
-Type :help for more information.
-
-scala>
-
-scala> case class X(s: String)
-defined class X
-
-scala> scala.reflect.runtime.universe.typeOf[X]
-res0: reflect.runtime.universe.Type = X
-
-scala>
+Type in expressions to have them evaluated.
+Type :help for more information.
+
+scala>
+
+scala> case class X(s: String)
+defined class X
+
+scala> scala.reflect.runtime.universe.typeOf[X]
+res0: reflect.runtime.universe.Type = X
+
+scala>
diff --git a/test/files/run/t6086-vanilla.check b/test/files/run/t6086-vanilla.check
index fd66be08d0..62d8fe9f6d 100644
--- a/test/files/run/t6086-vanilla.check
+++ b/test/files/run/t6086-vanilla.check
@@ -1 +1 @@
-X
+X
diff --git a/test/files/run/t6188.check b/test/files/run/t6188.check
index 1af3932ecd..5d64afc47b 100644
--- a/test/files/run/t6188.check
+++ b/test/files/run/t6188.check
@@ -1 +1 @@
-Failure(java.lang.Exception: this is an exception)
+Failure(java.lang.Exception: this is an exception)
diff --git a/test/files/run/t6199-mirror.check b/test/files/run/t6199-mirror.check
index ec969b5b93..6a452c185a 100644
--- a/test/files/run/t6199-mirror.check
+++ b/test/files/run/t6199-mirror.check
@@ -1 +1 @@
-()
+()
diff --git a/test/files/run/t6199-toolbox.check b/test/files/run/t6199-toolbox.check
index ec969b5b93..6a452c185a 100644
--- a/test/files/run/t6199-toolbox.check
+++ b/test/files/run/t6199-toolbox.check
@@ -1 +1 @@
-()
+()
diff --git a/test/files/run/t6260.check b/test/files/run/t6260.check
new file mode 100644
index 0000000000..54f98a10f0
--- /dev/null
+++ b/test/files/run/t6260.check
@@ -0,0 +1 @@
+Box(abcabc)
diff --git a/test/files/run/t6260.scala b/test/files/run/t6260.scala
new file mode 100644
index 0000000000..cfe9e1e640
--- /dev/null
+++ b/test/files/run/t6260.scala
@@ -0,0 +1,12 @@
+class Box[X <: CharSequence](val x: X) extends AnyVal {
+ def map[Y <: CharSequence](f: X => Y): Box[Y] =
+ ((bx: Box[X]) => new Box(f(bx.x)))(this)
+ override def toString = s"Box($x)"
+}
+
+object Test {
+ def main(args: Array[String]) {
+ val g = (x: String) => x + x
+ println(new Box("abc") map g)
+ }
+}
diff --git a/test/files/run/t6287.check b/test/files/run/t6287.check
index 2a783704a2..a86ecbee42 100644
--- a/test/files/run/t6287.check
+++ b/test/files/run/t6287.check
@@ -1,3 +1,3 @@
-Vector(2, 3, 4)
-Vector(2, 3, 4)
-Vector(2, 3, 4)
+Vector(2, 3, 4)
+Vector(2, 3, 4)
+Vector(2, 3, 4)
diff --git a/test/files/run/t6318_derived.check b/test/files/run/t6318_derived.check
index ad43b6579b..926f2a4ba2 100644
--- a/test/files/run/t6318_derived.check
+++ b/test/files/run/t6318_derived.check
@@ -1,3 +1,3 @@
-Some(X)
-true
-Some(X)
+Some(X)
+true
+Some(X)
diff --git a/test/files/run/t6318_primitives.check b/test/files/run/t6318_primitives.check
index bb474c3bdc..b330f91276 100644
--- a/test/files/run/t6318_primitives.check
+++ b/test/files/run/t6318_primitives.check
@@ -1,36 +1,36 @@
-true
-Some(1)
-false
-None
-true
-Some(1)
-false
-None
-true
-Some()
-false
-None
-true
-Some(1)
-false
-None
-true
-Some(1)
-false
-None
-true
-Some(1.0)
-false
-None
-true
-Some(1.0)
-false
-None
-true
-Some(true)
-false
-None
-true
-Some(())
-false
-None
+true
+Some(1)
+false
+None
+true
+Some(1)
+false
+None
+true
+Some()
+false
+None
+true
+Some(1)
+false
+None
+true
+Some(1)
+false
+None
+true
+Some(1.0)
+false
+None
+true
+Some(1.0)
+false
+None
+true
+Some(true)
+false
+None
+true
+Some(())
+false
+None
diff --git a/test/files/run/t6323b.check b/test/files/run/t6323b.check
index 80b6176178..d6b1d1fd90 100644
--- a/test/files/run/t6323b.check
+++ b/test/files/run/t6323b.check
@@ -1 +1 @@
-cannot reflect value a, because it's a member of a weak type Test
+cannot reflect value a, because it's a member of a weak type Test
diff --git a/test/files/run/t6329_repl.check b/test/files/run/t6329_repl.check
index d4804fae37..8663184bde 100644
--- a/test/files/run/t6329_repl.check
+++ b/test/files/run/t6329_repl.check
@@ -1,13 +1,13 @@
-Type in expressions to have them evaluated.
-Type :help for more information.
-
-scala>
-
-scala> classManifest[List[_]]
-warning: there were 1 deprecation warnings; re-run with -deprecation for details
-res0: scala.reflect.ClassTag[List[_]] = scala.collection.immutable.List[Any]
-
-scala> scala.reflect.classTag[List[_]]
-res1: scala.reflect.ClassTag[List[_]] = scala.collection.immutable.List
-
-scala>
+Type in expressions to have them evaluated.
+Type :help for more information.
+
+scala>
+
+scala> classManifest[List[_]]
+warning: there were 1 deprecation warnings; re-run with -deprecation for details
+res0: scala.reflect.ClassTag[List[_]] = scala.collection.immutable.List[Any]
+
+scala> scala.reflect.classTag[List[_]]
+res1: scala.reflect.ClassTag[List[_]] = scala.collection.immutable.List
+
+scala>
diff --git a/test/files/run/t6329_repl_bug.check b/test/files/run/t6329_repl_bug.check
index d4804fae37..8663184bde 100644
--- a/test/files/run/t6329_repl_bug.check
+++ b/test/files/run/t6329_repl_bug.check
@@ -1,13 +1,13 @@
-Type in expressions to have them evaluated.
-Type :help for more information.
-
-scala>
-
-scala> classManifest[List[_]]
-warning: there were 1 deprecation warnings; re-run with -deprecation for details
-res0: scala.reflect.ClassTag[List[_]] = scala.collection.immutable.List[Any]
-
-scala> scala.reflect.classTag[List[_]]
-res1: scala.reflect.ClassTag[List[_]] = scala.collection.immutable.List
-
-scala>
+Type in expressions to have them evaluated.
+Type :help for more information.
+
+scala>
+
+scala> classManifest[List[_]]
+warning: there were 1 deprecation warnings; re-run with -deprecation for details
+res0: scala.reflect.ClassTag[List[_]] = scala.collection.immutable.List[Any]
+
+scala> scala.reflect.classTag[List[_]]
+res1: scala.reflect.ClassTag[List[_]] = scala.collection.immutable.List
+
+scala>
diff --git a/test/files/run/t6329_vanilla.check b/test/files/run/t6329_vanilla.check
index 7e7c3d11df..8282afaeba 100644
--- a/test/files/run/t6329_vanilla.check
+++ b/test/files/run/t6329_vanilla.check
@@ -1,2 +1,2 @@
-scala.collection.immutable.List[Any]
-scala.collection.immutable.List
+scala.collection.immutable.List[Any]
+scala.collection.immutable.List
diff --git a/test/files/run/t6329_vanilla_bug.check b/test/files/run/t6329_vanilla_bug.check
index 7e7c3d11df..8282afaeba 100644
--- a/test/files/run/t6329_vanilla_bug.check
+++ b/test/files/run/t6329_vanilla_bug.check
@@ -1,2 +1,2 @@
-scala.collection.immutable.List[Any]
-scala.collection.immutable.List
+scala.collection.immutable.List[Any]
+scala.collection.immutable.List
diff --git a/test/files/run/t6337a.scala b/test/files/run/t6337a.scala
new file mode 100644
index 0000000000..f5490f5cf0
--- /dev/null
+++ b/test/files/run/t6337a.scala
@@ -0,0 +1,16 @@
+object Test {
+ def main(args: Array[String]) {
+ val x = X(XX(3))
+ assert(x.q.x.x + 9 == 13)
+ }
+}
+trait Q extends Any {
+ def x: Int
+ def inc: XX
+}
+case class X(val x: Q) extends AnyVal {
+ def q = X(x.inc)
+}
+case class XX(val x: Int) extends AnyVal with Q {
+ def inc = XX(x + 1)
+}
diff --git a/test/files/run/t6392a.check b/test/files/run/t6392a.check
index ec969b5b93..6a452c185a 100644
--- a/test/files/run/t6392a.check
+++ b/test/files/run/t6392a.check
@@ -1 +1 @@
-()
+()
diff --git a/test/files/run/t6392b.check b/test/files/run/t6392b.check
index ee19836b95..e9c7ecaa34 100644
--- a/test/files/run/t6392b.check
+++ b/test/files/run/t6392b.check
@@ -1 +1 @@
-ModuleDef(Modifiers(), newTermName("C"), Template(List(Select(Ident(scala#PK), newTypeName("AnyRef")#TPE)), emptyValDef, List(DefDef(Modifiers(), nme.CONSTRUCTOR, List(), List(List()), TypeTree(), Block(List(Apply(Select(Super(This(newTypeName("C")), tpnme.EMPTY), nme.CONSTRUCTOR#PCTOR), List())), Literal(Constant(())))))))
+ModuleDef(Modifiers(), newTermName("C"), Template(List(Select(Ident(scala#PK), newTypeName("AnyRef")#TPE)), emptyValDef, List(DefDef(Modifiers(), nme.CONSTRUCTOR, List(), List(List()), TypeTree(), Block(List(Apply(Select(Super(This(newTypeName("C")), tpnme.EMPTY), nme.CONSTRUCTOR#PCTOR), List())), Literal(Constant(())))))))
diff --git a/test/files/run/t6394a.check b/test/files/run/t6394a.check
new file mode 100644
index 0000000000..2a02d41ce2
--- /dev/null
+++ b/test/files/run/t6394a.check
@@ -0,0 +1 @@
+TEST
diff --git a/test/files/run/t6394a.flags b/test/files/run/t6394a.flags
new file mode 100644
index 0000000000..cd66464f2f
--- /dev/null
+++ b/test/files/run/t6394a.flags
@@ -0,0 +1 @@
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/t6394a/Macros_1.scala b/test/files/run/t6394a/Macros_1.scala
new file mode 100644
index 0000000000..3d39d3e40a
--- /dev/null
+++ b/test/files/run/t6394a/Macros_1.scala
@@ -0,0 +1,12 @@
+import scala.reflect.macros.Context
+
+object Macros {
+ def impl(c:Context): c.Expr[Any] = {
+ import c.universe._
+
+ val selfTree = This(c.enclosingClass.symbol.asModule.moduleClass)
+ c.Expr[AnyRef](selfTree)
+ }
+
+ def foo: Any = macro impl
+} \ No newline at end of file
diff --git a/test/files/run/t6394a/Test_2.scala b/test/files/run/t6394a/Test_2.scala
new file mode 100644
index 0000000000..75e84f0e38
--- /dev/null
+++ b/test/files/run/t6394a/Test_2.scala
@@ -0,0 +1,4 @@
+object Test extends App {
+ println(Macros.foo)
+ override def toString = "TEST"
+} \ No newline at end of file
diff --git a/test/files/run/t6394b.check b/test/files/run/t6394b.check
index 34997f71e3..2a02d41ce2 100644
--- a/test/files/run/t6394b.check
+++ b/test/files/run/t6394b.check
@@ -1 +1 @@
-TEST
+TEST
diff --git a/test/files/run/test-cpp.check b/test/files/run/test-cpp.check
index a7163edb5f..bfea438c60 100644
--- a/test/files/run/test-cpp.check
+++ b/test/files/run/test-cpp.check
@@ -1,65 +1,65 @@
-37c37
-< locals: value args, value x, value y
----
-> locals: value args
-42,43d41
-< 52 CONSTANT(2)
-< 52 STORE_LOCAL(value x)
-45,46d42
-< 53 LOAD_LOCAL(value x)
-< 53 STORE_LOCAL(value y)
-49c45
-< 54 LOAD_LOCAL(value y)
----
-> 54 CONSTANT(2)
-92c88
-< locals: value args, value x, value y
----
-> locals: value args, value x
-101,102d96
-< 82 LOAD_LOCAL(value x)
-< 82 STORE_LOCAL(value y)
-105c99
-< 83 LOAD_LOCAL(value y)
----
-> 83 LOAD_LOCAL(value x)
-135c129
-< locals: value args, value x, value y
----
-> locals: value args
-140,141d133
-< 66 THIS(TestAliasChainDerefThis)
-< 66 STORE_LOCAL(value x)
-143,144d134
-< 67 LOAD_LOCAL(value x)
-< 67 STORE_LOCAL(value y)
-147c137
-< 68 LOAD_LOCAL(value y)
----
-> 68 THIS(Object)
-176c166
-< locals: value x, value y
----
-> locals: value x
-181,182d170
-< 29 LOAD_LOCAL(value x)
-< 29 STORE_LOCAL(value y)
-185c173
-< 30 LOAD_LOCAL(value y)
----
-> 30 LOAD_LOCAL(value x)
-223,224d210
-< 97 LOAD_LOCAL(variable x)
-< 97 STORE_LOCAL(variable y)
-227c213
-< 98 LOAD_LOCAL(variable y)
----
-> 98 LOAD_LOCAL(variable x)
-233,234d218
-< 101 LOAD_LOCAL(variable y)
-< 101 STORE_LOCAL(variable x)
-236c220
-< 102 LOAD_LOCAL(variable x)
----
-> 102 LOAD_LOCAL(variable y)
-
+37c37
+< locals: value args, value x, value y
+---
+> locals: value args
+42,43d41
+< 52 CONSTANT(2)
+< 52 STORE_LOCAL(value x)
+45,46d42
+< 53 LOAD_LOCAL(value x)
+< 53 STORE_LOCAL(value y)
+49c45
+< 54 LOAD_LOCAL(value y)
+---
+> 54 CONSTANT(2)
+92c88
+< locals: value args, value x, value y
+---
+> locals: value args, value x
+101,102d96
+< 82 LOAD_LOCAL(value x)
+< 82 STORE_LOCAL(value y)
+105c99
+< 83 LOAD_LOCAL(value y)
+---
+> 83 LOAD_LOCAL(value x)
+135c129
+< locals: value args, value x, value y
+---
+> locals: value args
+140,141d133
+< 66 THIS(TestAliasChainDerefThis)
+< 66 STORE_LOCAL(value x)
+143,144d134
+< 67 LOAD_LOCAL(value x)
+< 67 STORE_LOCAL(value y)
+147c137
+< 68 LOAD_LOCAL(value y)
+---
+> 68 THIS(Object)
+176c166
+< locals: value x, value y
+---
+> locals: value x
+181,182d170
+< 29 LOAD_LOCAL(value x)
+< 29 STORE_LOCAL(value y)
+185c173
+< 30 LOAD_LOCAL(value y)
+---
+> 30 LOAD_LOCAL(value x)
+223,224d210
+< 97 LOAD_LOCAL(variable x)
+< 97 STORE_LOCAL(variable y)
+227c213
+< 98 LOAD_LOCAL(variable y)
+---
+> 98 LOAD_LOCAL(variable x)
+233,234d218
+< 101 LOAD_LOCAL(variable y)
+< 101 STORE_LOCAL(variable x)
+236c220
+< 102 LOAD_LOCAL(variable x)
+---
+> 102 LOAD_LOCAL(variable y)
+
diff --git a/test/files/run/toolbox_default_reporter_is_silent.check b/test/files/run/toolbox_default_reporter_is_silent.check
index ef0493b275..ce01362503 100644
--- a/test/files/run/toolbox_default_reporter_is_silent.check
+++ b/test/files/run/toolbox_default_reporter_is_silent.check
@@ -1 +1 @@
-hello
+hello
diff --git a/test/files/run/toolbox_typecheck_implicitsdisabled.check b/test/files/run/toolbox_typecheck_implicitsdisabled.check
index e2f2dbe4b9..db64e118ca 100644
--- a/test/files/run/toolbox_typecheck_implicitsdisabled.check
+++ b/test/files/run/toolbox_typecheck_implicitsdisabled.check
@@ -1,5 +1,5 @@
-{
- import scala.Predef._;
- scala.Predef.any2ArrowAssoc[Int](1).->[Int](2)
-}
-scala.tools.reflect.ToolBoxError: reflective typecheck has failed: value -> is not a member of Int
+{
+ import scala.Predef._;
+ scala.Predef.any2ArrowAssoc[Int](1).->[Int](2)
+}
+scala.tools.reflect.ToolBoxError: reflective typecheck has failed: value -> is not a member of Int
diff --git a/test/files/run/toolbox_typecheck_inferimplicitvalue.check b/test/files/run/toolbox_typecheck_inferimplicitvalue.check
index 23ba536aff..ec17b4203b 100644
--- a/test/files/run/toolbox_typecheck_inferimplicitvalue.check
+++ b/test/files/run/toolbox_typecheck_inferimplicitvalue.check
@@ -1 +1 @@
-C.MC
+C.MC
diff --git a/test/files/run/toolbox_typecheck_macrosdisabled.check b/test/files/run/toolbox_typecheck_macrosdisabled.check
index 49e25bd0e7..9e997dafed 100644
--- a/test/files/run/toolbox_typecheck_macrosdisabled.check
+++ b/test/files/run/toolbox_typecheck_macrosdisabled.check
@@ -1,41 +1,41 @@
-{
- val $u: ru.type = ru;
- val $m: $u.Mirror = ru.runtimeMirror({
- final class $anon extends scala.AnyRef {
- def <init>(): anonymous class $anon = {
- $anon.super.<init>();
- ()
- };
- ()
- };
- new $anon()
-}.getClass().getClassLoader());
- $u.Expr.apply[Int(2)]($m, {
- final class $treecreator1 extends TreeCreator {
- def <init>(): $treecreator1 = {
- $treecreator1.super.<init>();
- ()
- };
- def apply[U <: scala.reflect.api.Universe with Singleton]($m$untyped: scala.reflect.api.MirrorOf[U]): U#Tree = {
- val $u: U = $m$untyped.universe;
- val $m: $u.Mirror = $m$untyped.asInstanceOf[$u.Mirror];
- $u.Literal.apply($u.Constant.apply(2))
- }
- };
- new $treecreator1()
- })($u.TypeTag.apply[Int(2)]($m, {
- final class $typecreator2 extends TypeCreator {
- def <init>(): $typecreator2 = {
- $typecreator2.super.<init>();
- ()
- };
- def apply[U <: scala.reflect.api.Universe with Singleton]($m$untyped: scala.reflect.api.MirrorOf[U]): U#Type = {
- val $u: U = $m$untyped.universe;
- val $m: $u.Mirror = $m$untyped.asInstanceOf[$u.Mirror];
- $u.ConstantType.apply($u.Constant.apply(2))
- }
- };
- new $typecreator2()
- }))
-}
-ru.reify[Int](2)
+{
+ val $u: ru.type = ru;
+ val $m: $u.Mirror = ru.runtimeMirror({
+ final class $anon extends scala.AnyRef {
+ def <init>(): anonymous class $anon = {
+ $anon.super.<init>();
+ ()
+ };
+ ()
+ };
+ new $anon()
+}.getClass().getClassLoader());
+ $u.Expr.apply[Int(2)]($m, {
+ final class $treecreator1 extends TreeCreator {
+ def <init>(): $treecreator1 = {
+ $treecreator1.super.<init>();
+ ()
+ };
+ def apply[U <: scala.reflect.api.Universe with Singleton]($m$untyped: scala.reflect.api.MirrorOf[U]): U#Tree = {
+ val $u: U = $m$untyped.universe;
+ val $m: $u.Mirror = $m$untyped.asInstanceOf[$u.Mirror];
+ $u.Literal.apply($u.Constant.apply(2))
+ }
+ };
+ new $treecreator1()
+ })($u.TypeTag.apply[Int(2)]($m, {
+ final class $typecreator2 extends TypeCreator {
+ def <init>(): $typecreator2 = {
+ $typecreator2.super.<init>();
+ ()
+ };
+ def apply[U <: scala.reflect.api.Universe with Singleton]($m$untyped: scala.reflect.api.MirrorOf[U]): U#Type = {
+ val $u: U = $m$untyped.universe;
+ val $m: $u.Mirror = $m$untyped.asInstanceOf[$u.Mirror];
+ $u.ConstantType.apply($u.Constant.apply(2))
+ }
+ };
+ new $typecreator2()
+ }))
+}
+ru.reify[Int](2)
diff --git a/test/files/run/toolbox_typecheck_macrosdisabled2.check b/test/files/run/toolbox_typecheck_macrosdisabled2.check
index 8bbe65e21b..16c8d6c397 100644
--- a/test/files/run/toolbox_typecheck_macrosdisabled2.check
+++ b/test/files/run/toolbox_typecheck_macrosdisabled2.check
@@ -1,41 +1,41 @@
-{
- val $u: ru.type = ru;
- val $m: $u.Mirror = ru.runtimeMirror({
- final class $anon extends scala.AnyRef {
- def <init>(): anonymous class $anon = {
- $anon.super.<init>();
- ()
- };
- ()
- };
- new $anon()
-}.getClass().getClassLoader());
- $u.Expr.apply[Array[Int]]($m, {
- final class $treecreator1 extends TreeCreator {
- def <init>(): $treecreator1 = {
- $treecreator1.super.<init>();
- ()
- };
- def apply[U <: scala.reflect.api.Universe with Singleton]($m$untyped: scala.reflect.api.MirrorOf[U]): U#Tree = {
- val $u: U = $m$untyped.universe;
- val $m: $u.Mirror = $m$untyped.asInstanceOf[$u.Mirror];
- $u.Apply.apply($u.Select.apply($u.Select.apply($u.build.Ident($m.staticPackage("scala")), $u.newTermName("Array")), $u.newTermName("apply")), scala.collection.immutable.List.apply[$u.Literal]($u.Literal.apply($u.Constant.apply(2))))
- }
- };
- new $treecreator1()
- })($u.TypeTag.apply[Array[Int]]($m, {
- final class $typecreator2 extends TypeCreator {
- def <init>(): $typecreator2 = {
- $typecreator2.super.<init>();
- ()
- };
- def apply[U <: scala.reflect.api.Universe with Singleton]($m$untyped: scala.reflect.api.MirrorOf[U]): U#Type = {
- val $u: U = $m$untyped.universe;
- val $m: $u.Mirror = $m$untyped.asInstanceOf[$u.Mirror];
- $u.TypeRef.apply($u.ThisType.apply($m.staticPackage("scala").asModule.moduleClass), $m.staticClass("scala.Array"), scala.collection.immutable.List.apply[$u.Type]($m.staticClass("scala.Int").asType.toTypeConstructor))
- }
- };
- new $typecreator2()
- }))
-}
-ru.reify[Array[Int]](scala.Array.apply(2))
+{
+ val $u: ru.type = ru;
+ val $m: $u.Mirror = ru.runtimeMirror({
+ final class $anon extends scala.AnyRef {
+ def <init>(): anonymous class $anon = {
+ $anon.super.<init>();
+ ()
+ };
+ ()
+ };
+ new $anon()
+}.getClass().getClassLoader());
+ $u.Expr.apply[Array[Int]]($m, {
+ final class $treecreator1 extends TreeCreator {
+ def <init>(): $treecreator1 = {
+ $treecreator1.super.<init>();
+ ()
+ };
+ def apply[U <: scala.reflect.api.Universe with Singleton]($m$untyped: scala.reflect.api.MirrorOf[U]): U#Tree = {
+ val $u: U = $m$untyped.universe;
+ val $m: $u.Mirror = $m$untyped.asInstanceOf[$u.Mirror];
+ $u.Apply.apply($u.Select.apply($u.Select.apply($u.build.Ident($m.staticPackage("scala")), $u.newTermName("Array")), $u.newTermName("apply")), scala.collection.immutable.List.apply[$u.Literal]($u.Literal.apply($u.Constant.apply(2))))
+ }
+ };
+ new $treecreator1()
+ })($u.TypeTag.apply[Array[Int]]($m, {
+ final class $typecreator2 extends TypeCreator {
+ def <init>(): $typecreator2 = {
+ $typecreator2.super.<init>();
+ ()
+ };
+ def apply[U <: scala.reflect.api.Universe with Singleton]($m$untyped: scala.reflect.api.MirrorOf[U]): U#Type = {
+ val $u: U = $m$untyped.universe;
+ val $m: $u.Mirror = $m$untyped.asInstanceOf[$u.Mirror];
+ $u.TypeRef.apply($u.ThisType.apply($m.staticPackage("scala").asModule.moduleClass), $m.staticClass("scala.Array"), scala.collection.immutable.List.apply[$u.Type]($m.staticClass("scala.Int").asType.toTypeConstructor))
+ }
+ };
+ new $typecreator2()
+ }))
+}
+ru.reify[Array[Int]](scala.Array.apply(2))
diff --git a/test/files/run/typetags_core.check b/test/files/run/typetags_core.check
index 8d20e099c4..980b4719bf 100644
--- a/test/files/run/typetags_core.check
+++ b/test/files/run/typetags_core.check
@@ -1,30 +1,30 @@
-true
-TypeTag[Byte]
-true
-TypeTag[Short]
-true
-TypeTag[Char]
-true
-TypeTag[Int]
-true
-TypeTag[Long]
-true
-TypeTag[Float]
-true
-TypeTag[Double]
-true
-TypeTag[Boolean]
-true
-TypeTag[Unit]
-true
-TypeTag[Any]
-true
-TypeTag[AnyVal]
-true
-TypeTag[AnyRef]
-true
-TypeTag[java.lang.Object]
-true
-TypeTag[Null]
-true
-TypeTag[Nothing]
+true
+TypeTag[Byte]
+true
+TypeTag[Short]
+true
+TypeTag[Char]
+true
+TypeTag[Int]
+true
+TypeTag[Long]
+true
+TypeTag[Float]
+true
+TypeTag[Double]
+true
+TypeTag[Boolean]
+true
+TypeTag[Unit]
+true
+TypeTag[Any]
+true
+TypeTag[AnyVal]
+true
+TypeTag[AnyRef]
+true
+TypeTag[java.lang.Object]
+true
+TypeTag[Null]
+true
+TypeTag[Nothing]
diff --git a/test/files/run/typetags_serialize.check b/test/files/run/typetags_serialize.check
index 30952113f6..f79436ea5d 100644
--- a/test/files/run/typetags_serialize.check
+++ b/test/files/run/typetags_serialize.check
@@ -1,2 +1,2 @@
-java.io.NotSerializableException: scala.reflect.api.TypeTags$PredefTypeCreator
-java.io.NotSerializableException: Test$$typecreator1$1
+java.io.NotSerializableException: scala.reflect.api.TypeTags$PredefTypeCreator
+java.io.NotSerializableException: Test$$typecreator1$1
diff --git a/test/files/run/typetags_without_scala_reflect_manifest_lookup.check b/test/files/run/typetags_without_scala_reflect_manifest_lookup.check
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/test/files/run/typetags_without_scala_reflect_manifest_lookup.check
diff --git a/test/files/run/typetags_without_scala_reflect_manifest_lookup.scala b/test/files/run/typetags_without_scala_reflect_manifest_lookup.scala
new file mode 100644
index 0000000000..37047e7884
--- /dev/null
+++ b/test/files/run/typetags_without_scala_reflect_manifest_lookup.scala
@@ -0,0 +1,29 @@
+import scala.tools.partest._
+import scala.tools.nsc.Settings
+
+object Test extends DirectTest {
+ override def extraSettings = "-cp " + sys.props("partest.lib")
+
+ def code = """
+ object Test extends App {
+ // manifest lookup also involves type tag lookup
+ // because we support manifest <-> typetag convertability
+ //
+ // however when scala-reflect.jar (the home of type tags) is not on the classpath
+ // we need to omit the type tag lookup, because we lack the necessary symbols
+ // to do implicit search and tag materialization
+ // (such missing symbols are e.g. ApiUniverseClass and TypeTagsClass)
+ //
+ // the test case you're looking at checks exactly this
+ // we establish a classpath that only includes scala-library.jar
+ // and then force scalac to perform implicit search for a manifest
+ // if type tag lookup is not disabled, the compiler will crash
+ // if it is disabled, then the compilation will succeed
+ // http://groups.google.com/group/scala-internals/browse_thread/thread/166ce4b71b7c46bb
+ def foo[T: Manifest] = ()
+ foo[List[Int]]
+ }
+ """
+
+ def show = compile()
+} \ No newline at end of file
diff --git a/test/files/run/typetags_without_scala_reflect_typetag_lookup.check b/test/files/run/typetags_without_scala_reflect_typetag_lookup.check
new file mode 100644
index 0000000000..53df68cfc2
--- /dev/null
+++ b/test/files/run/typetags_without_scala_reflect_typetag_lookup.check
@@ -0,0 +1,3 @@
+newSource1:9: error: could not find implicit value for evidence parameter of type reflect.runtime.package.universe.TypeTag[Int]
+ Library.foo[Int]
+ ^
diff --git a/test/files/run/typetags_without_scala_reflect_typetag_lookup.scala b/test/files/run/typetags_without_scala_reflect_typetag_lookup.scala
new file mode 100644
index 0000000000..e51ecdb180
--- /dev/null
+++ b/test/files/run/typetags_without_scala_reflect_typetag_lookup.scala
@@ -0,0 +1,45 @@
+import scala.tools.partest._
+
+object Test extends DirectTest {
+ def code = ???
+
+ def library = """
+ import scala.reflect.runtime.universe._
+
+ object Library {
+ def foo[T: TypeTag] = ()
+ }
+ """
+ def compileLibrary() = {
+ val classpath = List(sys.props("partest.lib"), sys.props("partest.reflect")) mkString sys.props("path.separator")
+ compileString(newCompiler("-cp", classpath, "-d", testOutput.path))(library)
+ }
+
+ def app = """
+ object Test extends App {
+ // tries to materialize a type tag not having scala-reflect.jar on the classpath
+ // even though it's easy to materialize a type tag of Int, this line will fail
+ // because materialization involves classes from scala-reflect.jar
+ //
+ // in this test we make sure that the compiler doesn't crash
+ // but just displays several missing class file errors and an unavailable implicit message
+ Library.foo[Int]
+ }
+ """
+ def compileApp() = {
+ val classpath = List(sys.props("partest.lib"), testOutput.path) mkString sys.props("path.separator")
+ compileString(newCompiler("-cp", classpath, "-d", testOutput.path))(app)
+ }
+
+ def show(): Unit = {
+ val prevErr = System.err
+ val baos = new java.io.ByteArrayOutputStream();
+ System.setErr(new java.io.PrintStream(baos));
+ compileLibrary();
+ compileApp();
+ // we should get bad symbolic reference errors, because we're trying to call a method that can't be unpickled
+ // but we don't know the number of these errors and their order, so I just ignore them all
+ baos.toString.split("\n") filter (!_.startsWith("error: bad symbolic reference")) foreach println
+ System.setErr(prevErr)
+ }
+} \ No newline at end of file
diff --git a/test/files/run/typetags_without_scala_reflect_typetag_manifest_interop.check b/test/files/run/typetags_without_scala_reflect_typetag_manifest_interop.check
new file mode 100644
index 0000000000..729c0715df
--- /dev/null
+++ b/test/files/run/typetags_without_scala_reflect_typetag_manifest_interop.check
@@ -0,0 +1,3 @@
+newSource1:9: error: No Manifest available for App.this.T.
+ manifest[T]
+ ^
diff --git a/test/files/run/typetags_without_scala_reflect_typetag_manifest_interop.scala b/test/files/run/typetags_without_scala_reflect_typetag_manifest_interop.scala
new file mode 100644
index 0000000000..e984127583
--- /dev/null
+++ b/test/files/run/typetags_without_scala_reflect_typetag_manifest_interop.scala
@@ -0,0 +1,46 @@
+import scala.tools.partest._
+
+object Test extends DirectTest {
+ def code = ???
+
+ def library = """
+ import scala.reflect.runtime.universe._
+
+ trait Library {
+ type T
+ implicit val tt: TypeTag[T]
+ }
+ """
+ def compileLibrary() = {
+ val classpath = List(sys.props("partest.lib"), sys.props("partest.reflect")) mkString sys.props("path.separator")
+ compileString(newCompiler("-cp", classpath, "-d", testOutput.path))(library)
+ }
+
+ def app = """
+ trait App extends Library {
+ // tries to create a manifest from a type tag without having scala-reflect.jar on the classpath
+ // even though it's possible to convert a type tag into a manifest, this will fail
+ // because conversion requires classes from scala-reflect.jar
+ //
+ // in this test we make sure that the compiler doesn't crash
+ // but just displays several missing class file errors and an unavailable implicit message
+ manifest[T]
+ }
+ """
+ def compileApp() = {
+ val classpath = List(sys.props("partest.lib"), testOutput.path) mkString sys.props("path.separator")
+ compileString(newCompiler("-cp", classpath, "-d", testOutput.path))(app)
+ }
+
+ def show(): Unit = {
+ val prevErr = System.err
+ val baos = new java.io.ByteArrayOutputStream();
+ System.setErr(new java.io.PrintStream(baos));
+ compileLibrary();
+ compileApp();
+ // we should get bad symbolic reference errors, because we're trying to use an implicit that can't be unpickled
+ // but we don't know the number of these errors and their order, so I just ignore them all
+ baos.toString.split("\n") filter (!_.startsWith("error: bad symbolic reference")) foreach println
+ System.setErr(prevErr)
+ }
+} \ No newline at end of file
diff --git a/test/files/run/valueclasses-classmanifest-basic.check b/test/files/run/valueclasses-classmanifest-basic.check
index 554c75e074..bc56c4d894 100644
--- a/test/files/run/valueclasses-classmanifest-basic.check
+++ b/test/files/run/valueclasses-classmanifest-basic.check
@@ -1 +1 @@
-Foo
+Foo
diff --git a/test/files/run/valueclasses-classmanifest-existential.check b/test/files/run/valueclasses-classmanifest-existential.check
index e9fc6e27ea..4577aacc0e 100644
--- a/test/files/run/valueclasses-classmanifest-existential.check
+++ b/test/files/run/valueclasses-classmanifest-existential.check
@@ -1 +1 @@
-Foo[<?>]
+Foo[<?>]
diff --git a/test/files/run/valueclasses-classmanifest-generic.check b/test/files/run/valueclasses-classmanifest-generic.check
index 1418c5cff9..c6be42d550 100644
--- a/test/files/run/valueclasses-classmanifest-generic.check
+++ b/test/files/run/valueclasses-classmanifest-generic.check
@@ -1 +1 @@
-Foo[java.lang.String]
+Foo[java.lang.String]
diff --git a/test/files/run/valueclasses-classtag-basic.check b/test/files/run/valueclasses-classtag-basic.check
index 554c75e074..bc56c4d894 100644
--- a/test/files/run/valueclasses-classtag-basic.check
+++ b/test/files/run/valueclasses-classtag-basic.check
@@ -1 +1 @@
-Foo
+Foo
diff --git a/test/files/run/valueclasses-classtag-existential.check b/test/files/run/valueclasses-classtag-existential.check
index 15ac02630f..9e2b9e1da7 100644
--- a/test/files/run/valueclasses-classtag-existential.check
+++ b/test/files/run/valueclasses-classtag-existential.check
@@ -1 +1 @@
-Object
+Object
diff --git a/test/files/run/valueclasses-classtag-generic.check b/test/files/run/valueclasses-classtag-generic.check
index 554c75e074..bc56c4d894 100644
--- a/test/files/run/valueclasses-classtag-generic.check
+++ b/test/files/run/valueclasses-classtag-generic.check
@@ -1 +1 @@
-Foo
+Foo
diff --git a/test/files/run/valueclasses-manifest-basic.check b/test/files/run/valueclasses-manifest-basic.check
index 554c75e074..bc56c4d894 100644
--- a/test/files/run/valueclasses-manifest-basic.check
+++ b/test/files/run/valueclasses-manifest-basic.check
@@ -1 +1 @@
-Foo
+Foo
diff --git a/test/files/run/valueclasses-manifest-existential.check b/test/files/run/valueclasses-manifest-existential.check
index fdce051039..f91a575ea7 100644
--- a/test/files/run/valueclasses-manifest-existential.check
+++ b/test/files/run/valueclasses-manifest-existential.check
@@ -1 +1 @@
-Foo[_ <: Any]
+Foo[_ <: Any]
diff --git a/test/files/run/valueclasses-manifest-generic.check b/test/files/run/valueclasses-manifest-generic.check
index 1418c5cff9..c6be42d550 100644
--- a/test/files/run/valueclasses-manifest-generic.check
+++ b/test/files/run/valueclasses-manifest-generic.check
@@ -1 +1 @@
-Foo[java.lang.String]
+Foo[java.lang.String]
diff --git a/test/files/run/valueclasses-pavlov.check b/test/files/run/valueclasses-pavlov.check
new file mode 100644
index 0000000000..b112e5507e
--- /dev/null
+++ b/test/files/run/valueclasses-pavlov.check
@@ -0,0 +1,2 @@
+box1: ok
+box2: ok
diff --git a/test/files/run/valueclasses-pavlov.scala b/test/files/run/valueclasses-pavlov.scala
new file mode 100644
index 0000000000..e73897f653
--- /dev/null
+++ b/test/files/run/valueclasses-pavlov.scala
@@ -0,0 +1,26 @@
+trait Foo extends Any {
+ def box1(x: Box1): String
+ def box2(x: Box2): String
+}
+
+class Box1(val value: String) extends AnyVal
+
+class Box2(val value: String) extends AnyVal with Foo {
+ def box1(x: Box1) = "box1: ok"
+ def box2(x: Box2) = "box2: ok"
+}
+
+class C(x: String) {
+ def this() = this("")
+}
+
+object Test {
+
+ def main(args: Array[String]) {
+ val b1 = new Box1("")
+ val b2 = new Box2("")
+ val f: Foo = b2
+ println(f.box1(b1))
+ println(f.box2(b2))
+ }
+}
diff --git a/test/files/run/valueclasses-typetag-basic.check b/test/files/run/valueclasses-typetag-basic.check
index 554c75e074..bc56c4d894 100644
--- a/test/files/run/valueclasses-typetag-basic.check
+++ b/test/files/run/valueclasses-typetag-basic.check
@@ -1 +1 @@
-Foo
+Foo
diff --git a/test/files/run/valueclasses-typetag-existential.check b/test/files/run/valueclasses-typetag-existential.check
index 0efa24a45f..d166a13fdc 100644
--- a/test/files/run/valueclasses-typetag-existential.check
+++ b/test/files/run/valueclasses-typetag-existential.check
@@ -1 +1 @@
-Foo[_]
+Foo[_]
diff --git a/test/files/run/valueclasses-typetag-generic.check b/test/files/run/valueclasses-typetag-generic.check
index fce2e64f79..534d1b37c4 100644
--- a/test/files/run/valueclasses-typetag-generic.check
+++ b/test/files/run/valueclasses-typetag-generic.check
@@ -1 +1 @@
-Foo[String]
+Foo[String]
diff --git a/test/files/run/virtpatmat_typetag.check b/test/files/run/virtpatmat_typetag.check
index eaa9f3361f..cac9d9a4d6 100644
--- a/test/files/run/virtpatmat_typetag.check
+++ b/test/files/run/virtpatmat_typetag.check
@@ -1,10 +1,10 @@
-1 is not a Int; it's a class java.lang.Integer
-1 is a java.lang.Integer
-1 is not a java.lang.String; it's a class java.lang.Integer
-true is a Any
-woele is a java.lang.String
-1 is not a Int; it's a class java.lang.Integer
-1 is a java.lang.Integer
-1 is not a java.lang.String; it's a class java.lang.Integer
-true is a Any
-woele is a java.lang.String
+1 is not a Int; it's a class java.lang.Integer
+1 is a java.lang.Integer
+1 is not a java.lang.String; it's a class java.lang.Integer
+true is a Any
+woele is a java.lang.String
+1 is not a Int; it's a class java.lang.Integer
+1 is a java.lang.Integer
+1 is not a java.lang.String; it's a class java.lang.Integer
+true is a Any
+woele is a java.lang.String
diff --git a/test/files/scalacheck/duration.scala b/test/files/scalacheck/duration.scala
new file mode 100644
index 0000000000..5e93638614
--- /dev/null
+++ b/test/files/scalacheck/duration.scala
@@ -0,0 +1,69 @@
+import org.scalacheck._
+import Prop._
+import Gen._
+import Arbitrary._
+import math._
+import concurrent.duration.Duration.fromNanos
+
+object Test extends Properties("Division of Duration by Long") {
+
+ val weightedLong =
+ frequency(
+ 1 -> choose(-128L, 127L),
+ 1 -> (arbitrary[Byte] map (_.toLong << 8)),
+ 1 -> (arbitrary[Byte] map (_.toLong << 16)),
+ 1 -> (arbitrary[Byte] map (_.toLong << 24)),
+ 1 -> (arbitrary[Byte] map (_.toLong << 32)),
+ 1 -> (arbitrary[Byte] map (_.toLong << 40)),
+ 1 -> (arbitrary[Byte] map (_.toLong << 48)),
+ 1 -> (choose(-127L, 127L) map (_ << 56))
+ )
+
+ val genTwoSmall = for {
+ a <- weightedLong
+ b <- choose(-(Long.MaxValue / max(1, abs(a))), Long.MaxValue / max(1, abs(a)))
+ } yield (a, b)
+
+ val genTwoLarge = for {
+ a <- weightedLong
+ b <- arbitrary[Long] suchThat (b => (abs(b) > Long.MaxValue / max(1, abs(a))))
+ } yield (a, b)
+
+ val genClose = for {
+ a <- weightedLong
+ if a != 0
+ b <- choose(Long.MaxValue / a - 10, Long.MaxValue / a + 10)
+ } yield (a, b)
+
+ val genBorderline =
+ frequency(
+ 1 -> (Long.MinValue, 0L),
+ 1 -> (Long.MinValue, 1L),
+ 1 -> (Long.MinValue, -1L),
+ 1 -> (0L, Long.MinValue),
+ 1 -> (1L, Long.MinValue),
+ 1 -> (-1L, Long.MinValue),
+ 90 -> genClose
+ )
+
+ def mul(a: Long, b: Long): Long = {
+ (fromNanos(a) * b).toNanos
+ }
+
+ property("without overflow") = forAll(genTwoSmall) { case (a, b) =>
+ a * b == mul(a, b)
+ }
+
+ property("with overflow") = forAll(genTwoLarge) { case (a, b) =>
+ try { mul(a, b); false } catch { case _: IllegalArgumentException => true }
+ }
+
+ property("on overflow edge cases") = forAll(genBorderline) { case (a, b) =>
+ val shouldFit =
+ a != Long.MinValue && // must fail due to illegal duration length
+ (b != Long.MinValue || a == 0) && // Long factor may only be MinValue if the duration is zero, otherwise the result will be illegal
+ (abs(b) <= Long.MaxValue / max(1, abs(a))) // check the rest against the “safe” division method
+ try { mul(a, b); shouldFit }
+ catch { case _: IllegalArgumentException => !shouldFit }
+ }
+}
diff --git a/test/osgi/src/BasicLibrary.scala b/test/osgi/src/BasicLibrary.scala
new file mode 100644
index 0000000000..38dea69e99
--- /dev/null
+++ b/test/osgi/src/BasicLibrary.scala
@@ -0,0 +1,37 @@
+package tools.test.osgi
+package libonly
+
+import org.junit.Assert._
+import org.ops4j.pax.exam.CoreOptions._
+
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.ops4j.pax.exam
+import org.ops4j.pax.exam.junit.{
+ Configuration,
+ ExamReactorStrategy,
+ JUnit4TestRunner
+}
+import org.ops4j.pax.exam.spi.reactors.AllConfinedStagedReactorFactory
+import org.ops4j.pax.swissbox.framework.ServiceLookup
+import org.osgi.framework.BundleContext
+
+
+
+@RunWith(classOf[JUnit4TestRunner])
+@ExamReactorStrategy(Array(classOf[AllConfinedStagedReactorFactory]))
+class BasicLibraryTest extends ScalaOsgiHelper {
+ @Configuration
+ def config(): Array[exam.Option] =
+ justCoreLibraryOptions
+
+ @Test
+ def everythingLoads(): Unit = {
+ // Note - This tests sun.misc usage.
+ import scala.concurrent._
+ import scala.concurrent.util.Duration.Inf
+ import ExecutionContext.Implicits._
+ val x = Future(2) map (_ + 1)
+ assertEquals(3, Await.result(x, Inf))
+ }
+}
diff --git a/test/osgi/src/BasicReflection.scala b/test/osgi/src/BasicReflection.scala
new file mode 100644
index 0000000000..8a0a05d531
--- /dev/null
+++ b/test/osgi/src/BasicReflection.scala
@@ -0,0 +1,66 @@
+package tools.test.osgi
+package reflection
+package basic
+
+import org.junit.Assert._
+import org.ops4j.pax.exam.CoreOptions._
+
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.ops4j.pax.exam
+import org.ops4j.pax.exam.junit.{
+ Configuration,
+ ExamReactorStrategy,
+ JUnit4TestRunner
+}
+import org.ops4j.pax.exam.spi.reactors.AllConfinedStagedReactorFactory
+import org.ops4j.pax.swissbox.framework.ServiceLookup
+import org.osgi.framework.BundleContext
+
+
+class C {
+ val f1 = 2
+ var f2 = 3
+
+ def m1 = 4
+ def m2() = 5
+ def m3[T >: String <: Int]: T = ???
+ def m4[A[_], B <: A[Int]](x: A[B])(implicit y: Int) = ???
+ def m5(x: => Int, y: Int*): String = ???
+
+ class C
+ object M
+
+ override def toString = "an instance of C"
+}
+object M
+
+
+@RunWith(classOf[JUnit4TestRunner])
+@ExamReactorStrategy(Array(classOf[AllConfinedStagedReactorFactory]))
+class BasicReflectionTest extends ScalaOsgiHelper {
+
+ @Configuration
+ def config(): Array[exam.Option] =
+ justReflectionOptions
+
+ // Ensure Pax-exam requires C/M in our module
+ def dummy = {
+ new C
+ M.toString
+ }
+
+ @Test
+ def basicMirrorThroughOsgi(): Unit = {
+ // Note for now just assert that we can do this stuff.
+ import scala.reflect.runtime.universe._
+ val cm = runtimeMirror(classOf[C].getClassLoader)
+ val im = cm.reflect(new C)
+ assertEquals("Unable to reflect field name!",
+ "value f1",
+ im.reflectField(typeOf[C].member(newTermName("f1")).asTerm).symbol.toString)
+ assertEquals("Unable to reflect value!",
+ 2,
+ im.reflectField(typeOf[C].member(newTermName("f1")).asTerm).get)
+ }
+}
diff --git a/test/osgi/src/BasicTest.scala b/test/osgi/src/BasicTest.scala
new file mode 100644
index 0000000000..109b7b911a
--- /dev/null
+++ b/test/osgi/src/BasicTest.scala
@@ -0,0 +1,33 @@
+package tools.test.osgi
+
+import org.junit.Assert._
+import org.ops4j.pax.exam.CoreOptions._
+
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.ops4j.pax.exam
+import org.ops4j.pax.exam.junit.{
+ Configuration,
+ ExamReactorStrategy,
+ JUnit4TestRunner
+}
+import org.ops4j.pax.exam.spi.reactors.AllConfinedStagedReactorFactory
+import org.ops4j.pax.swissbox.framework.ServiceLookup
+import org.osgi.framework.BundleContext
+
+
+
+
+
+@RunWith(classOf[JUnit4TestRunner])
+@ExamReactorStrategy(Array(classOf[AllConfinedStagedReactorFactory]))
+class BasicTest extends ScalaOsgiHelper {
+ @Configuration
+ def config(): Array[exam.Option] = {
+ // TODO - Find scala bundles.
+ standardOptions
+ }
+
+ @Test
+ def everythingLoads(): Unit = ()
+}
diff --git a/test/osgi/src/ReflectionToolboxTest.scala b/test/osgi/src/ReflectionToolboxTest.scala
new file mode 100644
index 0000000000..bb48078e95
--- /dev/null
+++ b/test/osgi/src/ReflectionToolboxTest.scala
@@ -0,0 +1,49 @@
+package tools.test.osgi
+package reflection
+package toolbox
+
+import org.junit.Assert._
+import org.ops4j.pax.exam.CoreOptions._
+
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.ops4j.pax.exam
+import org.ops4j.pax.exam.junit.{
+ Configuration,
+ ExamReactorStrategy,
+ JUnit4TestRunner
+}
+import org.ops4j.pax.exam.spi.reactors.AllConfinedStagedReactorFactory
+import org.ops4j.pax.swissbox.framework.ServiceLookup
+import org.osgi.framework.BundleContext
+
+
+class C {
+ val f1 = 2
+}
+
+@RunWith(classOf[JUnit4TestRunner])
+@ExamReactorStrategy(Array(classOf[AllConfinedStagedReactorFactory]))
+class ReflectionToolBoxTest extends ScalaOsgiHelper {
+
+ @Configuration
+ def config(): Array[exam.Option] =
+ standardOptions
+
+
+ @Test
+ def basicMirrorThroughOsgi(): Unit = {
+ // Note - this tries to make sure when pulling a toolbox, we get the compiler.
+ import scala.reflect.runtime.universe._
+ import scala.tools.reflect.ToolBox
+ val cm = runtimeMirror(classOf[C].getClassLoader)
+ val tb = cm.mkToolBox()
+ val im = cm.reflect(new C)
+ val tree = tb.parse("1 to 3 map (_+1)")
+ val eval = tb.eval(tree)
+ assertEquals(Vector(2, 3, 4), eval)
+ assertEquals("Evaluate expression using local class.",
+ 2,
+ tb.eval(tb.parse("(new tools.test.osgi.reflection.toolbox.C).f1")))
+ }
+}
diff --git a/test/osgi/src/ScalaOsgiHelper.scala b/test/osgi/src/ScalaOsgiHelper.scala
new file mode 100644
index 0000000000..bcdc5c0df1
--- /dev/null
+++ b/test/osgi/src/ScalaOsgiHelper.scala
@@ -0,0 +1,36 @@
+package tools.test.osgi
+
+import org.ops4j.pax.exam.CoreOptions._
+import org.ops4j.pax.exam
+import java.io.File
+
+trait ScalaOsgiHelper {
+
+ private def allBundleFiles = {
+ def bundleLocation = new File(sys.props.getOrElse("scala.bundle.dir", "build/osgi"))
+ bundleLocation.listFiles filter (_.getName endsWith ".jar")
+ }
+
+ private def filteredBundleFiles(names: String*): Array[exam.Option] =
+ for(bundle <- allBundleFiles; if names exists (bundle.getName contains))
+ yield makeBundle(bundle)
+
+ private def makeBundle(file: File): exam.Option =
+ bundle(file.toURI.toASCIIString)
+
+ def standardOptions: Array[exam.Option] = {
+ val bundles = (allBundleFiles map makeBundle)
+ bundles ++ Array[exam.Option](felix(), equinox(), junitBundles())
+ }
+
+ def justReflectionOptions: Array[exam.Option] = {
+ val bundles = filteredBundleFiles("scala-library", "scala-reflect")
+ bundles ++ Array[exam.Option](felix(), equinox(), junitBundles())
+ }
+
+ def justCoreLibraryOptions: Array[exam.Option] = {
+ val bundles = filteredBundleFiles("scala-library")
+ bundles ++ Array[exam.Option](felix(), equinox(), junitBundles())
+ }
+
+}
diff --git a/test/partest.bat b/test/partest.bat
index 4c97a53122..b64347ce13 100755
--- a/test/partest.bat
+++ b/test/partest.bat
@@ -1,104 +1,104 @@
-@echo off
-
-rem ##########################################################################
-rem # Scala code runner 2.9.1.final
-rem ##########################################################################
-rem # (c) 2002-2011 LAMP/EPFL
-rem #
-rem # This is free software; see the distribution for copying conditions.
-rem # There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
-rem # PARTICULAR PURPOSE.
-rem ##########################################################################
-
-rem We adopt the following conventions:
-rem - System/user environment variables start with a letter
-rem - Local batch variables start with an underscore ('_')
-
-if "%OS%"=="Windows_NT" (
- @setlocal
- call :set_home
- set _ARGS=%*
-) else (
- set _SCALA_HOME="%SCALA_HOME%"
- rem The following line tests SCALA_HOME instead of _SCALA_HOME, because
- rem the above change to _SCALA_HOME is not visible within this block.
- if "%SCALA_HOME%"=="" goto error1
- call :set_args
-)
-
-rem We use the value of the JAVACMD environment variable if defined
-set _JAVACMD=%JAVACMD%
-if "%_JAVACMD%"=="" set _JAVACMD=java
-
-rem We use the value of the JAVACCMD environment variable if defined
-set _JAVACCMD=%JAVACCMD%
-if "%_JAVACCMD%"=="" set _JAVACCMD=javac
-
-rem We use the value of the JAVA_OPTS environment variable if defined
-set _JAVA_OPTS=%JAVA_OPTS%
-if "%_JAVA_OPTS%"=="" set _JAVA_OPTS=-Xmx1024M -Xms64M
-
-rem We use the value of the SCALAC_OPTS environment variable if defined
-set _SCALAC_OPTS=%SCALAC_OPTS%
-if "%_SCALAC_OPTS%"=="" set _SCALAC_OPTS=-deprecation
-
-set _EXTENSION_CLASSPATH=
-if "%_EXTENSION_CLASSPATH%"=="" (
- if exist "%_SCALA_HOME%\lib\scala-partest.jar" (
- for %%f in ("%_SCALA_HOME%\lib\*") do call :add_cpath "%%f"
- if "%OS%"=="Windows_NT" (
- for /d %%f in ("%_SCALA_HOME%\lib\*") do call :add_cpath "%%f"
- )
- ) else if exist "%_SCALA_HOME%\build\pack\lib\scala-partest.jar" (
- for %%f in ("%_SCALA_HOME%\build\pack\lib\*") do call :add_cpath "%%f"
- if "%OS%"=="Windows_NT" (
- for /d %%f in ("%_SCALA_HOME%\build\pack\lib\*") do call :add_cpath "%%f"
- )
- )
-)
-
-set _PROPS=-Dscala.home="%_SCALA_HOME%" -Dpartest.javacmd="%_JAVACMD%" -Dpartest.java_options="%_JAVA_OPTS%" -Dpartest.scalac_options="%_SCALAC_OPTS%" -Dpartest.javac_cmd="%_JAVACCMD%"
-
-rem echo %_JAVACMD% %_JAVA_OPTS% %_PROPS% -cp "%_EXTENSION_CLASSPATH%" scala.tools.partest.nest.NestRunner %_ARGS%
-%_JAVACMD% %_JAVA_OPTS% %_PROPS% -cp "%_EXTENSION_CLASSPATH%" scala.tools.partest.nest.NestRunner %_ARGS%
-goto end
-
-rem ##########################################################################
-rem # subroutines
-
-:add_cpath
- if "%_EXTENSION_CLASSPATH%"=="" (
- set _EXTENSION_CLASSPATH=%~1
- ) else (
- set _EXTENSION_CLASSPATH=%_EXTENSION_CLASSPATH%;%~1
- )
-goto :eof
-
-rem Variable "%~dps0" works on WinXP SP2 or newer
-rem (see http://support.microsoft.com/?kbid=833431)
-rem set _SCALA_HOME=%~dps0..
-:set_home
- set _BIN_DIR=
- for %%i in (%~sf0) do set _BIN_DIR=%_BIN_DIR%%%~dpsi
- set _SCALA_HOME=%_BIN_DIR%..
-goto :eof
-
-:set_args
- set _ARGS=
- :loop
- rem Argument %1 may contain quotes so we use parentheses here
- if (%1)==() goto :eof
- set _ARGS=%_ARGS% %1
- shift
- goto loop
-
-rem ##########################################################################
-rem # errors
-
-:error1
-echo ERROR: environment variable SCALA_HOME is undefined. It should point to your installation directory.
-goto end
-
-:end
-if "%OS%"=="Windows_NT" @endlocal
-exit /b %errorlevel%
+@echo off
+
+rem ##########################################################################
+rem # Scala code runner 2.9.1.final
+rem ##########################################################################
+rem # (c) 2002-2011 LAMP/EPFL
+rem #
+rem # This is free software; see the distribution for copying conditions.
+rem # There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
+rem # PARTICULAR PURPOSE.
+rem ##########################################################################
+
+rem We adopt the following conventions:
+rem - System/user environment variables start with a letter
+rem - Local batch variables start with an underscore ('_')
+
+if "%OS%"=="Windows_NT" (
+ @setlocal
+ call :set_home
+ set _ARGS=%*
+) else (
+ set _SCALA_HOME="%SCALA_HOME%"
+ rem The following line tests SCALA_HOME instead of _SCALA_HOME, because
+ rem the above change to _SCALA_HOME is not visible within this block.
+ if "%SCALA_HOME%"=="" goto error1
+ call :set_args
+)
+
+rem We use the value of the JAVACMD environment variable if defined
+set _JAVACMD=%JAVACMD%
+if "%_JAVACMD%"=="" set _JAVACMD=java
+
+rem We use the value of the JAVACCMD environment variable if defined
+set _JAVACCMD=%JAVACCMD%
+if "%_JAVACCMD%"=="" set _JAVACCMD=javac
+
+rem We use the value of the JAVA_OPTS environment variable if defined
+set _JAVA_OPTS=%JAVA_OPTS%
+if "%_JAVA_OPTS%"=="" set _JAVA_OPTS=-Xmx1024M -Xms64M
+
+rem We use the value of the SCALAC_OPTS environment variable if defined
+set _SCALAC_OPTS=%SCALAC_OPTS%
+if "%_SCALAC_OPTS%"=="" set _SCALAC_OPTS=-deprecation
+
+set _EXTENSION_CLASSPATH=
+if "%_EXTENSION_CLASSPATH%"=="" (
+ if exist "%_SCALA_HOME%\lib\scala-partest.jar" (
+ for %%f in ("%_SCALA_HOME%\lib\*") do call :add_cpath "%%f"
+ if "%OS%"=="Windows_NT" (
+ for /d %%f in ("%_SCALA_HOME%\lib\*") do call :add_cpath "%%f"
+ )
+ ) else if exist "%_SCALA_HOME%\build\pack\lib\scala-partest.jar" (
+ for %%f in ("%_SCALA_HOME%\build\pack\lib\*") do call :add_cpath "%%f"
+ if "%OS%"=="Windows_NT" (
+ for /d %%f in ("%_SCALA_HOME%\build\pack\lib\*") do call :add_cpath "%%f"
+ )
+ )
+)
+
+set _PROPS=-Dscala.home="%_SCALA_HOME%" -Dpartest.javacmd="%_JAVACMD%" -Dpartest.java_options="%_JAVA_OPTS%" -Dpartest.scalac_options="%_SCALAC_OPTS%" -Dpartest.javac_cmd="%_JAVACCMD%"
+
+rem echo %_JAVACMD% %_JAVA_OPTS% %_PROPS% -cp "%_EXTENSION_CLASSPATH%" scala.tools.partest.nest.NestRunner %_ARGS%
+%_JAVACMD% %_JAVA_OPTS% %_PROPS% -cp "%_EXTENSION_CLASSPATH%" scala.tools.partest.nest.NestRunner %_ARGS%
+goto end
+
+rem ##########################################################################
+rem # subroutines
+
+:add_cpath
+ if "%_EXTENSION_CLASSPATH%"=="" (
+ set _EXTENSION_CLASSPATH=%~1
+ ) else (
+ set _EXTENSION_CLASSPATH=%_EXTENSION_CLASSPATH%;%~1
+ )
+goto :eof
+
+rem Variable "%~dps0" works on WinXP SP2 or newer
+rem (see http://support.microsoft.com/?kbid=833431)
+rem set _SCALA_HOME=%~dps0..
+:set_home
+ set _BIN_DIR=
+ for %%i in (%~sf0) do set _BIN_DIR=%_BIN_DIR%%%~dpsi
+ set _SCALA_HOME=%_BIN_DIR%..
+goto :eof
+
+:set_args
+ set _ARGS=
+ :loop
+ rem Argument %1 may contain quotes so we use parentheses here
+ if (%1)==() goto :eof
+ set _ARGS=%_ARGS% %1
+ shift
+ goto loop
+
+rem ##########################################################################
+rem # errors
+
+:error1
+echo ERROR: environment variable SCALA_HOME is undefined. It should point to your installation directory.
+goto end
+
+:end
+if "%OS%"=="Windows_NT" @endlocal
+exit /b %errorlevel%
diff --git a/test/pending/neg/macro-invalidusage-badbounds-b.check b/test/pending/neg/macro-invalidusage-badbounds-b.check
index fd0b64533e..277f407d38 100644
--- a/test/pending/neg/macro-invalidusage-badbounds-b.check
+++ b/test/pending/neg/macro-invalidusage-badbounds-b.check
@@ -1,4 +1,4 @@
-Macros_Test_2.scala:7: error: type arguments [Int] do not conform to macro method foo's type parameter bounds [U <: String]
- foo[Int]
- ^
-one error found
+Macros_Test_2.scala:7: error: type arguments [Int] do not conform to macro method foo's type parameter bounds [U <: String]
+ foo[Int]
+ ^
+one error found
diff --git a/test/pending/neg/reify_packed.check b/test/pending/neg/reify_packed.check
index adba330d56..f26b902896 100644
--- a/test/pending/neg/reify_packed.check
+++ b/test/pending/neg/reify_packed.check
@@ -1,4 +1,4 @@
-reify_packed.scala:6: error: implementation restriction: cannot reify block of type List[_$1] that involves a type declared inside the block being reified. consider casting the return value to a suitable type.
- reify {
- ^
-one error found
+reify_packed.scala:6: error: implementation restriction: cannot reify block of type List[_$1] that involves a type declared inside the block being reified. consider casting the return value to a suitable type.
+ reify {
+ ^
+one error found
diff --git a/test/pending/run/macro-expand-implicit-macro-defeats-type-inference.check b/test/pending/run/macro-expand-implicit-macro-defeats-type-inference.check
index 5af32f38e0..e7cb9c367b 100644
--- a/test/pending/run/macro-expand-implicit-macro-defeats-type-inference.check
+++ b/test/pending/run/macro-expand-implicit-macro-defeats-type-inference.check
@@ -1,6 +1,6 @@
-openImplicits are: List()
-enclosingImplicits are: List((List[Int],scala.this.Predef.implicitly[List[Int]]))
-typetag is: TypeTag[Nothing]
-openImplicits are: List()
-enclosingImplicits are: List((List[String],Test.this.bar[String]))
-typetag is: TypeTag[Nothing]
+openImplicits are: List()
+enclosingImplicits are: List((List[Int],scala.this.Predef.implicitly[List[Int]]))
+typetag is: TypeTag[Nothing]
+openImplicits are: List()
+enclosingImplicits are: List((List[String],Test.this.bar[String]))
+typetag is: TypeTag[Nothing]
diff --git a/test/pending/run/macro-reify-tagless-b.check b/test/pending/run/macro-reify-tagless-b.check
index 49acd94ad6..61ebb4e547 100644
--- a/test/pending/run/macro-reify-tagless-b.check
+++ b/test/pending/run/macro-reify-tagless-b.check
@@ -1,3 +1,3 @@
error: macro must not return an expr that contains free type variables (namely: T). have you forgot to use c.TypeTag annotations for type parameters external to a reifee?
-
-java.lang.Error: reflective compilation has failed
+
+java.lang.Error: reflective compilation has failed
diff --git a/test/pending/run/macro-reify-typetag-hktypeparams-notags.check b/test/pending/run/macro-reify-typetag-hktypeparams-notags.check
index db8a19d5f7..53acc9184c 100644
--- a/test/pending/run/macro-reify-typetag-hktypeparams-notags.check
+++ b/test/pending/run/macro-reify-typetag-hktypeparams-notags.check
@@ -1,2 +1,2 @@
-TypeTag(C[T])
-TypeTag(List[C[T]])
+TypeTag(C[T])
+TypeTag(List[C[T]])
diff --git a/test/pending/run/t5943b1.scala b/test/pending/run/t5943b1.scala
new file mode 100644
index 0000000000..0d54718753
--- /dev/null
+++ b/test/pending/run/t5943b1.scala
@@ -0,0 +1,10 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
+
+// pending until https://issues.scala-lang.org/browse/SI-6393 is fixed
+object Test extends App {
+ val tb = cm.mkToolBox()
+ val expr = tb.parse("math.sqrt(4.0)")
+ println(tb.typeCheck(expr))
+} \ No newline at end of file
diff --git a/test/pending/run/t5943b2.scala b/test/pending/run/t5943b2.scala
new file mode 100644
index 0000000000..85299d9f12
--- /dev/null
+++ b/test/pending/run/t5943b2.scala
@@ -0,0 +1,10 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
+
+// pending until https://issues.scala-lang.org/browse/SI-6393 is fixed
+object Test extends App {
+ val tb = cm.mkToolBox()
+ val expr = tb.parse("math.sqrt(4.0)")
+ println(tb.eval(expr))
+} \ No newline at end of file
diff --git a/tools/binary-repo-lib.sh b/tools/binary-repo-lib.sh
index d43f3c8bff..4fe6dd67a0 100755
--- a/tools/binary-repo-lib.sh
+++ b/tools/binary-repo-lib.sh
@@ -191,7 +191,7 @@ pullJarFileToCache() {
if [[ ! -f "$cache_loc" ]]; then
# Note: After we follow up with JFrog, we should check the more stable raw file server first
# before hitting the more flaky artifactory.
- curlDownload $cache_loc ${remote_urlpush}/${uri}
+ curlDownload $cache_loc ${remote_urlget}/${uri}
if test "$(checkJarSha "$cache_loc" "$sha")" != "OK"; then
echo "Trouble downloading $uri. Please try pull-binary-libs again when your internet connection is stable."
exit 2
diff --git a/tools/class-dump b/tools/class-dump
new file mode 100755
index 0000000000..06a7e5acbc
--- /dev/null
+++ b/tools/class-dump
@@ -0,0 +1,6 @@
+#!/bin/sh
+#
+
+JAVAP_OPTS="-private"
+
+[[ -n "$1" ]] && ( cd "$(dirname "$1")" && javap $JAVAP_OPTS "$(basename "${1%%.class}")" )
diff --git a/tools/get-scala-commit-date.bat b/tools/get-scala-commit-date.bat
index 2a75073633..e169de1b04 100644
--- a/tools/get-scala-commit-date.bat
+++ b/tools/get-scala-commit-date.bat
@@ -1,9 +1,9 @@
-@echo off
-for %%X in (bash.exe) do (set FOUND=%%~$PATH:X)
-if defined FOUND (
- bash "%~dp0\get-scala-commit-date"
-) else (
- rem echo this script does not work with cmd.exe. please, install bash
- echo unknown
- exit 1
+@echo off
+for %%X in (bash.exe) do (set FOUND=%%~$PATH:X)
+if defined FOUND (
+ bash "%~dp0\get-scala-commit-date"
+) else (
+ rem echo this script does not work with cmd.exe. please, install bash
+ echo unknown
+ exit 1
) \ No newline at end of file
diff --git a/tools/get-scala-commit-sha.bat b/tools/get-scala-commit-sha.bat
index 390e2d99d0..1eaffc0a15 100644
--- a/tools/get-scala-commit-sha.bat
+++ b/tools/get-scala-commit-sha.bat
@@ -1,9 +1,9 @@
-@echo off
-for %%X in (bash.exe) do (set FOUND=%%~$PATH:X)
-if defined FOUND (
- bash "%~dp0\get-scala-commit-sha"
-) else (
- rem echo this script does not work with cmd.exe. please, install bash
- echo unknown
- exit 1
+@echo off
+for %%X in (bash.exe) do (set FOUND=%%~$PATH:X)
+if defined FOUND (
+ bash "%~dp0\get-scala-commit-sha"
+) else (
+ rem echo this script does not work with cmd.exe. please, install bash
+ echo unknown
+ exit 1
) \ No newline at end of file
diff --git a/tools/jar-dump b/tools/jar-dump
new file mode 100755
index 0000000000..166441b330
--- /dev/null
+++ b/tools/jar-dump
@@ -0,0 +1,4 @@
+#!/bin/sh
+#
+
+jar tf "$1" | sort