summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/Course-2002-01-msil.check34
-rw-r--r--test/files/run/Course-2002-02-msil.check187
-rw-r--r--test/files/run/Course-2002-03-msil.check67
-rw-r--r--test/files/run/Course-2002-04-msil.check64
-rw-r--r--test/files/run/Course-2002-08-msil.check171
-rw-r--r--test/files/run/Course-2002-09-msil.check50
-rw-r--r--test/files/run/Course-2002-10-msil.check46
-rw-r--r--test/files/run/absoverride-msil.check20
-rw-r--r--test/files/run/abstypetags_core.check28
-rw-r--r--test/files/run/abstypetags_core.scala32
-rw-r--r--test/files/run/arrayclone-new.scala6
-rw-r--r--test/files/run/arraytags_basic.check36
-rw-r--r--test/files/run/arraytags_basic.scala22
-rw-r--r--test/files/run/arraytags_core.check48
-rw-r--r--test/files/run/arraytags_core.scala50
-rw-r--r--test/files/run/arraytags_usage.check3
-rw-r--r--test/files/run/arraytags_usage.scala15
-rw-r--r--test/files/run/bitsets-msil.check33
-rw-r--r--test/files/run/boolord-msil.check4
-rw-r--r--test/files/run/bugs-msil.check96
-rw-r--r--test/files/run/caseClassHash.scala4
-rw-r--r--test/files/run/classtags_contextbound.scala2
-rw-r--r--test/files/run/classtags_core.check60
-rw-r--r--test/files/run/classtags_core.scala6
-rw-r--r--test/files/run/classtags_multi.scala2
-rw-r--r--test/files/run/classtags_use_concretetypetags.scala3
-rw-r--r--test/files/run/concretetypetags_core.check60
-rw-r--r--test/files/run/concretetypetags_core.scala62
-rw-r--r--test/files/run/concretetypetags_multi.check10
-rw-r--r--test/files/run/concretetypetags_multi.scala12
-rw-r--r--test/files/run/ctries-new/main.scala6
-rw-r--r--test/files/run/ctries-old/main.scala12
-rw-r--r--test/files/run/dynamic-proxy.check20
-rw-r--r--test/files/run/dynamic-proxy.flags1
-rw-r--r--test/files/run/dynamic-proxy.scala72
-rw-r--r--test/files/run/erasuretags_abstract.check4
-rw-r--r--test/files/run/erasuretags_abstract.scala9
-rw-r--r--test/files/run/erasuretags_basic.check24
-rw-r--r--test/files/run/erasuretags_basic.scala21
-rw-r--r--test/files/run/erasuretags_core.check32
-rw-r--r--test/files/run/erasuretags_core.scala34
-rw-r--r--test/files/run/erasuretags_usage.scala12
-rw-r--r--test/files/run/existentials-in-compiler.scala9
-rw-r--r--test/files/run/existentials3-new.check48
-rw-r--r--test/files/run/existentials3-new.scala14
-rw-r--r--test/files/run/freetypes_false_alarm1.check1
-rw-r--r--test/files/run/freetypes_false_alarm1.scala10
-rw-r--r--test/files/run/freetypes_false_alarm2.check1
-rw-r--r--test/files/run/freetypes_false_alarm2.scala8
-rw-r--r--test/files/run/getClassTest-new.scala6
-rw-r--r--test/files/run/impconvtimes-msil.check1
-rw-r--r--test/files/run/infix-msil.check2
-rw-r--r--test/files/run/interop_classmanifests_arepartially_typetags.check6
-rw-r--r--test/files/run/interop_classmanifests_arepartially_typetags.scala10
-rw-r--r--test/files/run/interop_classtags_are_classmanifests.check3
-rw-r--r--test/files/run/interop_classtags_are_classmanifests.scala10
-rw-r--r--test/files/run/interop_concretetypetags_are_classmanifests.scala9
-rw-r--r--test/files/run/interop_concretetypetags_are_manifests.scala9
-rw-r--r--test/files/run/interop_manifests_are_abstypetags.check (renamed from test/files/run/interop_concretetypetags_are_classmanifests.check)0
-rw-r--r--test/files/run/interop_manifests_are_abstypetags.scala11
-rw-r--r--test/files/run/interop_manifests_are_classtags.check6
-rw-r--r--test/files/run/interop_manifests_are_classtags.scala8
-rw-r--r--test/files/run/interop_manifests_are_concretetypetags.check6
-rw-r--r--test/files/run/interop_manifests_are_concretetypetags.scala10
-rw-r--r--test/files/run/interop_manifests_are_typetags.check9
-rw-r--r--test/files/run/interop_manifests_are_typetags.scala5
-rw-r--r--test/files/run/interop_typetags_are_manifests.check (renamed from test/files/run/interop_concretetypetags_are_manifests.check)2
-rw-r--r--test/files/run/interop_typetags_are_manifests.scala12
-rw-r--r--test/files/run/iq-msil.check12
-rw-r--r--test/files/run/macro-abort-fresh/Macros_1.scala2
-rw-r--r--test/files/run/macro-abort-fresh/Test_2.scala6
-rw-r--r--test/files/run/macro-basic-ma-md-mi/Impls_1.scala14
-rw-r--r--test/files/run/macro-basic-ma-mdmi/Impls_Macros_1.scala12
-rw-r--r--test/files/run/macro-basic-mamd-mi/Impls_1.scala14
-rw-r--r--test/files/run/macro-bodyexpandstoimpl/Impls_1.scala4
-rw-r--r--test/files/run/macro-declared-in-annotation/Impls_1.scala6
-rw-r--r--test/files/run/macro-declared-in-anonymous/Impls_1.scala6
-rw-r--r--test/files/run/macro-declared-in-block/Impls_1.scala6
-rw-r--r--test/files/run/macro-declared-in-class-class/Impls_1.scala6
-rw-r--r--test/files/run/macro-declared-in-class-object/Impls_1.scala6
-rw-r--r--test/files/run/macro-declared-in-class/Impls_1.scala6
-rw-r--r--test/files/run/macro-declared-in-default-param/Impls_1.scala6
-rw-r--r--test/files/run/macro-declared-in-implicit-class/Impls_Macros_1.scala6
-rw-r--r--test/files/run/macro-declared-in-method/Impls_1.scala6
-rw-r--r--test/files/run/macro-declared-in-object-class/Impls_1.scala6
-rw-r--r--test/files/run/macro-declared-in-object-object/Impls_1.scala6
-rw-r--r--test/files/run/macro-declared-in-object/Impls_1.scala6
-rw-r--r--test/files/run/macro-declared-in-package-object/Impls_1.scala6
-rw-r--r--test/files/run/macro-declared-in-refinement/Impls_1.scala6
-rw-r--r--test/files/run/macro-declared-in-trait/Impls_1.scala6
-rw-r--r--test/files/run/macro-def-infer-return-type-b/Test_2.scala8
-rw-r--r--test/files/run/macro-def-path-dependent-d/Impls_Macros_1.scala3
-rw-r--r--test/files/run/macro-expand-implicit-macro-has-implicit/Impls_1.scala6
-rw-r--r--test/files/run/macro-expand-implicit-macro-is-implicit/Impls_1.scala6
-rw-r--r--test/files/run/macro-expand-implicit-macro-is-val/Impls_1.scala6
-rw-r--r--test/files/run/macro-expand-implicit-macro-is-view/Impls_1.scala6
-rw-r--r--test/files/run/macro-expand-multiple-arglists/Impls_1.scala6
-rw-r--r--test/files/run/macro-expand-nullary-generic.check10
-rw-r--r--test/files/run/macro-expand-nullary-generic/Impls_1.scala7
-rw-r--r--test/files/run/macro-expand-nullary-nongeneric/Impls_1.scala6
-rw-r--r--test/files/run/macro-expand-overload/Impls_1.scala6
-rw-r--r--test/files/run/macro-expand-override/Impls_1.scala6
-rw-r--r--test/files/run/macro-expand-recursive/Impls_1.scala10
-rw-r--r--test/files/run/macro-expand-tparams-explicit.check2
-rw-r--r--test/files/run/macro-expand-tparams-explicit/Impls_1.scala7
-rw-r--r--test/files/run/macro-expand-tparams-implicit.check4
-rw-r--r--test/files/run/macro-expand-tparams-implicit/Impls_1.scala7
-rw-r--r--test/files/run/macro-expand-tparams-optional/Impls_1.scala6
-rw-r--r--test/files/run/macro-expand-tparams-prefix-a.check8
-rw-r--r--test/files/run/macro-expand-tparams-prefix-a/Impls_1.scala7
-rw-r--r--test/files/run/macro-expand-tparams-prefix-b.check4
-rw-r--r--test/files/run/macro-expand-tparams-prefix-b/Impls_1.scala7
-rw-r--r--test/files/run/macro-expand-tparams-prefix-c1.check6
-rw-r--r--test/files/run/macro-expand-tparams-prefix-c1/Impls_1.scala7
-rw-r--r--test/files/run/macro-expand-tparams-prefix-c2.check6
-rw-r--r--test/files/run/macro-expand-tparams-prefix-c2/Impls_Macros_1.scala7
-rw-r--r--test/files/run/macro-expand-tparams-prefix-d1.check6
-rw-r--r--test/files/run/macro-expand-tparams-prefix-d1/Impls_1.scala11
-rw-r--r--test/files/run/macro-expand-varargs-explicit-over-nonvarargs-bad/Impls_1.scala6
-rw-r--r--test/files/run/macro-expand-varargs-explicit-over-nonvarargs-bad/Macros_Test_2.scala6
-rw-r--r--test/files/run/macro-expand-varargs-explicit-over-nonvarargs-good/Impls_1.scala6
-rw-r--r--test/files/run/macro-expand-varargs-explicit-over-varargs/Impls_1.scala6
-rw-r--r--test/files/run/macro-expand-varargs-implicit-over-nonvarargs/Impls_1.scala6
-rw-r--r--test/files/run/macro-expand-varargs-implicit-over-varargs/Impls_1.scala6
-rw-r--r--test/files/run/macro-impl-default-params/Impls_Macros_1.scala9
-rw-r--r--test/files/run/macro-impl-rename-context/Impls_Macros_1.scala4
-rw-r--r--test/files/run/macro-invalidret-doesnt-conform-to-def-rettype/Impls_Macros_1.scala4
-rw-r--r--test/files/run/macro-invalidret-doesnt-conform-to-def-rettype/Test_2.scala6
-rw-r--r--test/files/run/macro-invalidret-nontypeable/Impls_Macros_1.scala6
-rw-r--r--test/files/run/macro-invalidret-nontypeable/Test_2.scala6
-rw-r--r--test/files/run/macro-invalidusage-badret/Test_2.scala8
-rw-r--r--test/files/run/macro-invalidusage-partialapplication-with-tparams.check3
-rw-r--r--test/files/run/macro-invalidusage-partialapplication-with-tparams.flags (renamed from test/files/run/macro-invalidret-doesnt-conform-to-impl-rettype.flags)0
-rw-r--r--test/files/run/macro-invalidusage-partialapplication-with-tparams/Impls_Macros_1.scala13
-rw-r--r--test/files/run/macro-invalidusage-partialapplication-with-tparams/Test_2.scala8
-rw-r--r--test/files/run/macro-invalidusage-partialapplication/Impls_Macros_1.scala4
-rw-r--r--test/files/run/macro-invalidusage-partialapplication/Test_2.scala6
-rw-r--r--test/files/run/macro-openmacros/Impls_Macros_1.scala12
-rw-r--r--test/files/run/macro-range/Common_1.scala3
-rw-r--r--test/files/run/macro-range/Expansion_Impossible_2.scala10
-rw-r--r--test/files/run/macro-reflective-ma-normal-mdmi/Impls_Macros_1.scala4
-rw-r--r--test/files/run/macro-reflective-ma-normal-mdmi/Test_2.scala6
-rw-r--r--test/files/run/macro-reflective-mamd-normal-mi/Impls_1.scala6
-rw-r--r--test/files/run/macro-reflective-mamd-normal-mi/Macros_Test_2.scala9
-rw-r--r--test/files/run/macro-reify-abstypetag-notypeparams.check2
-rw-r--r--test/files/run/macro-reify-abstypetag-notypeparams/Test.scala6
-rw-r--r--test/files/run/macro-reify-abstypetag-typeparams-notags.check2
-rw-r--r--test/files/run/macro-reify-abstypetag-typeparams-notags/Test.scala9
-rw-r--r--test/files/run/macro-reify-abstypetag-typeparams-tags.check2
-rw-r--r--test/files/run/macro-reify-abstypetag-typeparams-tags/Test.scala9
-rw-r--r--test/files/run/macro-reify-abstypetag-usetypetag.check2
-rw-r--r--test/files/run/macro-reify-abstypetag-usetypetag/Test.scala9
-rw-r--r--test/files/run/macro-reify-basic/Macros_1.scala2
-rw-r--r--test/files/run/macro-reify-eval-outside-reify/Impls_Macros_1.scala12
-rw-r--r--test/files/run/macro-reify-eval-outside-reify/Test_2.scala5
-rw-r--r--test/files/run/macro-reify-freevars.check6
-rw-r--r--test/files/run/macro-reify-freevars/Macros_1.scala11
-rw-r--r--test/files/run/macro-reify-freevars/Test_2.scala6
-rw-r--r--test/files/run/macro-reify-groundtypetag-notypeparams.check2
-rw-r--r--test/files/run/macro-reify-groundtypetag-notypeparams/Test.scala6
-rw-r--r--test/files/run/macro-reify-groundtypetag-typeparams-tags.check2
-rw-r--r--test/files/run/macro-reify-groundtypetag-typeparams-tags/Test.scala9
-rw-r--r--test/files/run/macro-reify-nested-a/Impls_Macros_1.scala30
-rw-r--r--test/files/run/macro-reify-nested-b/Impls_Macros_1.scala30
-rw-r--r--test/files/run/macro-reify-splice-outside-reify.check (renamed from test/files/run/macro-reify-eval-outside-reify.check)0
-rw-r--r--test/files/run/macro-reify-splice-outside-reify.flags (renamed from test/files/run/macro-reify-eval-eval.flags)0
-rw-r--r--test/files/run/macro-reify-splice-outside-reify/Impls_Macros_1.scala24
-rw-r--r--test/files/run/macro-reify-splice-outside-reify/Test_2.scala (renamed from test/files/run/macro-reify-value-outside-reify/Test_2.scala)6
-rw-r--r--test/files/run/macro-reify-splice-splice.check (renamed from test/files/run/macro-reify-eval-eval.check)0
-rw-r--r--test/files/run/macro-reify-splice-splice.flags (renamed from test/files/run/macro-reify-eval-outside-reify.flags)0
-rw-r--r--test/files/run/macro-reify-splice-splice/Macros_1.scala (renamed from test/files/run/macro-reify-eval-eval/Macros_1.scala)2
-rw-r--r--test/files/run/macro-reify-splice-splice/Test_2.scala (renamed from test/files/run/macro-reify-eval-eval/Test_2.scala)0
-rw-r--r--test/files/run/macro-reify-tagful-a/Macros_1.scala3
-rw-r--r--test/files/run/macro-reify-tagless-a/Impls_Macros_1.scala2
-rw-r--r--test/files/run/macro-reify-tagless-a/Test_2.scala6
-rw-r--r--test/files/run/macro-reify-typetag-notypeparams.check4
-rw-r--r--test/files/run/macro-reify-typetag-notypeparams/Test.scala2
-rw-r--r--test/files/run/macro-reify-typetag-typeparams-notags.check2
-rw-r--r--test/files/run/macro-reify-typetag-typeparams-notags/Test.scala9
-rw-r--r--test/files/run/macro-reify-typetag-typeparams-tags.check4
-rw-r--r--test/files/run/macro-reify-typetag-typeparams-tags/Test.scala2
-rw-r--r--test/files/run/macro-reify-typetag-usegroundtypetag.check2
-rw-r--r--test/files/run/macro-reify-typetag-usegroundtypetag/Test.scala9
-rw-r--r--test/files/run/macro-reify-unreify.check2
-rw-r--r--test/files/run/macro-reify-unreify/Macros_1.scala10
-rw-r--r--test/files/run/macro-reify-value-outside-reify.check1
-rw-r--r--test/files/run/macro-reify-value-outside-reify.flags1
-rw-r--r--test/files/run/macro-reify-value-outside-reify/Impls_Macros_1.scala12
-rw-r--r--test/files/run/macro-repl-basic.check108
-rw-r--r--test/files/run/macro-repl-basic.scala12
-rw-r--r--test/files/run/macro-rettype-mismatch.check5
-rw-r--r--test/files/run/macro-rettype-mismatch.flags1
-rw-r--r--test/files/run/macro-settings/Impls_Macros_1.scala2
-rw-r--r--test/files/run/macro-sip19-revised/Impls_Macros_1.scala10
-rw-r--r--test/files/run/macro-sip19/Impls_Macros_1.scala6
-rw-r--r--test/files/run/macro-typecheck-implicitsdisabled/Impls_Macros_1.scala4
-rw-r--r--test/files/run/macro-typecheck-macrosdisabled.check38
-rw-r--r--test/files/run/macro-typecheck-macrosdisabled/Impls_Macros_1.scala18
-rw-r--r--test/files/run/macro-typecheck-macrosdisabled2.check38
-rw-r--r--test/files/run/macro-typecheck-macrosdisabled2/Impls_Macros_1.scala20
-rw-r--r--test/files/run/macro-undetparams-consfromsls.check6
-rw-r--r--test/files/run/macro-undetparams-consfromsls/Impls_Macros_1.scala11
-rw-r--r--test/files/run/macro-undetparams-implicitval.check2
-rw-r--r--test/files/run/macro-undetparams-implicitval/Test.scala2
-rw-r--r--test/files/run/macro-undetparams-macroitself.check4
-rw-r--r--test/files/run/macro-undetparams-macroitself/Impls_Macros_1.scala3
-rw-r--r--test/files/run/manifests-new.scala16
-rw-r--r--test/files/run/misc-msil.check33
-rw-r--r--test/files/run/newTags.check5
-rw-r--r--test/files/run/newTags.scala14
-rw-r--r--test/files/run/patmat_unapp_abstype-new.scala21
-rw-r--r--test/files/run/primitive-sigs-2-new.check2
-rw-r--r--test/files/run/primitive-sigs-2-new.scala5
-rw-r--r--test/files/run/promotion-msil.check4
-rw-r--r--test/files/run/reflect-overload.scala21
-rw-r--r--test/files/run/reflection-constructormirror-inner-badpath.check2
-rw-r--r--test/files/run/reflection-constructormirror-inner-badpath.scala32
-rw-r--r--test/files/run/reflection-constructormirror-inner-good.check1
-rw-r--r--test/files/run/reflection-constructormirror-inner-good.scala26
-rw-r--r--test/files/run/reflection-constructormirror-nested-badpath.check2
-rw-r--r--test/files/run/reflection-constructormirror-nested-badpath.scala32
-rw-r--r--test/files/run/reflection-constructormirror-nested-good.check1
-rw-r--r--test/files/run/reflection-constructormirror-nested-good.scala26
-rw-r--r--test/files/run/reflection-constructormirror-toplevel-badpath.check2
-rw-r--r--test/files/run/reflection-constructormirror-toplevel-badpath.scala33
-rw-r--r--test/files/run/reflection-constructormirror-toplevel-good.check1
-rw-r--r--test/files/run/reflection-constructormirror-toplevel-good.scala27
-rw-r--r--test/files/run/reflection-fieldmirror-ctorparam.check1
-rw-r--r--test/files/run/reflection-fieldmirror-ctorparam.scala21
-rw-r--r--test/files/run/reflection-fieldmirror-getsetval.check2
-rw-r--r--test/files/run/reflection-fieldmirror-getsetval.scala24
-rw-r--r--test/files/run/reflection-fieldmirror-getsetvar.check2
-rw-r--r--test/files/run/reflection-fieldmirror-getsetvar.scala18
-rw-r--r--test/files/run/reflection-fieldmirror-nmelocalsuffixstring.check1
-rw-r--r--test/files/run/reflection-fieldmirror-nmelocalsuffixstring.scala16
-rw-r--r--test/files/run/reflection-fieldmirror-privatethis.check3
-rw-r--r--test/files/run/reflection-fieldmirror-privatethis.scala19
-rw-r--r--test/files/run/reflection-fieldmirror-sanitycheck.check6
-rw-r--r--test/files/run/reflection-fieldmirror-sanitycheck.scala22
-rw-r--r--test/files/run/reflection-implClass-new.scala38
-rw-r--r--test/files/run/reflection-implClass-old.scala38
-rw-r--r--test/files/run/reflection-implClass.scala40
-rw-r--r--test/files/run/reflection-modulemirror-inner-badpath.check2
-rw-r--r--test/files/run/reflection-modulemirror-inner-badpath.scala24
-rw-r--r--test/files/run/reflection-modulemirror-inner-good.check2
-rw-r--r--test/files/run/reflection-modulemirror-inner-good.scala23
-rw-r--r--test/files/run/reflection-modulemirror-nested-badpath.check2
-rw-r--r--test/files/run/reflection-modulemirror-nested-badpath.scala26
-rw-r--r--test/files/run/reflection-modulemirror-nested-good.check2
-rw-r--r--test/files/run/reflection-modulemirror-nested-good.scala24
-rw-r--r--test/files/run/reflection-modulemirror-toplevel-badpath.check2
-rw-r--r--test/files/run/reflection-modulemirror-toplevel-badpath.scala26
-rw-r--r--test/files/run/reflection-modulemirror-toplevel-good.check1
-rw-r--r--test/files/run/reflection-modulemirror-toplevel-good.scala20
-rw-r--r--test/files/run/reflection-repl.check9
-rw-r--r--test/files/run/reflection-repl.scala7
-rw-r--r--test/files/run/reflection-simple.scala3
-rw-r--r--test/files/run/reflinit.check1
-rw-r--r--test/files/run/reflinit.scala6
-rw-r--r--test/files/run/reify-repl-fail-gracefully.check42
-rw-r--r--test/files/run/reify-repl-fail-gracefully.scala2
-rw-r--r--test/files/run/reify_ann1a.check12
-rw-r--r--test/files/run/reify_ann1a.scala7
-rw-r--r--test/files/run/reify_ann1b.scala7
-rw-r--r--test/files/run/reify_ann2a.check16
-rw-r--r--test/files/run/reify_ann2a.scala7
-rw-r--r--test/files/run/reify_ann3.scala9
-rw-r--r--test/files/run/reify_ann4.scala9
-rw-r--r--test/files/run/reify_ann5.scala9
-rw-r--r--test/files/run/reify_anonymous.scala5
-rw-r--r--test/files/run/reify_classfileann_a.scala7
-rw-r--r--test/files/run/reify_classfileann_b.scala7
-rw-r--r--test/files/run/reify_closure1.scala9
-rw-r--r--test/files/run/reify_closure2a.scala9
-rw-r--r--test/files/run/reify_closure3a.scala9
-rw-r--r--test/files/run/reify_closure4a.scala9
-rw-r--r--test/files/run/reify_closure5a.scala9
-rw-r--r--test/files/run/reify_closure6.scala7
-rw-r--r--test/files/run/reify_closure7.scala9
-rw-r--r--test/files/run/reify_closure8a.scala9
-rw-r--r--test/files/run/reify_closure8b.check2
-rw-r--r--test/files/run/reify_closure8b.scala9
-rw-r--r--test/files/run/reify_closures10.scala9
-rw-r--r--test/files/run/reify_complex.scala5
-rw-r--r--test/files/run/reify_copypaste1.check2
-rw-r--r--test/files/run/reify_copypaste1.scala19
-rw-r--r--test/files/run/reify_copypaste2.check1
-rw-r--r--test/files/run/reify_copypaste2.scala10
-rw-r--r--test/files/run/reify_csv.scala3
-rw-r--r--test/files/run/reify_extendbuiltins.scala5
-rw-r--r--test/files/run/reify_for1.scala5
-rw-r--r--test/files/run/reify_fors_newpatmat.check (renamed from test/files/run/reify_fors.check)0
-rw-r--r--test/files/run/reify_fors_newpatmat.scala (renamed from test/files/run/reify_fors.scala)5
-rw-r--r--test/files/run/reify_fors_oldpatmat.check5
-rw-r--r--test/files/run/reify_fors_oldpatmat.flags (renamed from test/files/run/macro-invalidret-doesnt-conform-to-impl-rettype.check)0
-rw-r--r--test/files/run/reify_fors_oldpatmat.scala101
-rw-r--r--test/files/run/reify_generic.scala5
-rw-r--r--test/files/run/reify_generic2.scala5
-rw-r--r--test/files/run/reify_getter.scala9
-rw-r--r--test/files/run/reify_implicits-new.scala8
-rw-r--r--test/files/run/reify_implicits-old.scala5
-rw-r--r--test/files/run/reify_inheritance.scala5
-rw-r--r--test/files/run/reify_inner1.scala5
-rw-r--r--test/files/run/reify_inner2.scala5
-rw-r--r--test/files/run/reify_inner3.scala5
-rw-r--r--test/files/run/reify_inner4.scala5
-rw-r--r--test/files/run/reify_lazyevaluation.scala3
-rw-r--r--test/files/run/reify_maps_newpatmat.check (renamed from test/files/run/reify_maps.check)0
-rw-r--r--test/files/run/reify_maps_newpatmat.scala (renamed from test/files/run/reify_maps.scala)5
-rw-r--r--test/files/run/reify_maps_oldpatmat.check4
-rw-r--r--test/files/run/reify_maps_oldpatmat.flags (renamed from test/files/run/reify_fors.flags)0
-rw-r--r--test/files/run/reify_maps_oldpatmat.scala20
-rw-r--r--test/files/run/reify_metalevel_breach_+0_refers_to_1.scala11
-rw-r--r--test/files/run/reify_metalevel_breach_-1_refers_to_0_a.scala11
-rw-r--r--test/files/run/reify_metalevel_breach_-1_refers_to_0_b.scala12
-rw-r--r--test/files/run/reify_metalevel_breach_-1_refers_to_1.scala11
-rw-r--r--test/files/run/reify_nested_inner_refers_to_global.scala11
-rw-r--r--test/files/run/reify_nested_inner_refers_to_local.scala11
-rw-r--r--test/files/run/reify_nested_outer_refers_to_global.scala11
-rw-r--r--test/files/run/reify_nested_outer_refers_to_local.scala11
-rw-r--r--test/files/run/reify_newimpl_01.scala4
-rw-r--r--test/files/run/reify_newimpl_02.scala4
-rw-r--r--test/files/run/reify_newimpl_03.scala4
-rw-r--r--test/files/run/reify_newimpl_04.scala4
-rw-r--r--test/files/run/reify_newimpl_05.scala4
-rw-r--r--test/files/run/reify_newimpl_06.scala4
-rw-r--r--test/files/run/reify_newimpl_09.scala4
-rw-r--r--test/files/run/reify_newimpl_10.scala4
-rw-r--r--test/files/run/reify_newimpl_11.check4
-rw-r--r--test/files/run/reify_newimpl_11.scala4
-rw-r--r--test/files/run/reify_newimpl_12.scala4
-rw-r--r--test/files/run/reify_newimpl_13.check4
-rw-r--r--test/files/run/reify_newimpl_13.scala4
-rw-r--r--test/files/run/reify_newimpl_14.scala4
-rw-r--r--test/files/run/reify_newimpl_15.scala4
-rw-r--r--test/files/run/reify_newimpl_16.scala4
-rw-r--r--test/files/run/reify_newimpl_17.check4
-rw-r--r--test/files/run/reify_newimpl_17.scala4
-rw-r--r--test/files/run/reify_newimpl_18.scala4
-rw-r--r--test/files/run/reify_newimpl_19.check4
-rw-r--r--test/files/run/reify_newimpl_19.scala4
-rw-r--r--test/files/run/reify_newimpl_20.scala4
-rw-r--r--test/files/run/reify_newimpl_21.scala4
-rw-r--r--test/files/run/reify_newimpl_22.check12
-rw-r--r--test/files/run/reify_newimpl_22.scala6
-rw-r--r--test/files/run/reify_newimpl_23.check12
-rw-r--r--test/files/run/reify_newimpl_23.scala6
-rw-r--r--test/files/run/reify_newimpl_24.check24
-rw-r--r--test/files/run/reify_newimpl_24.scala16
-rw-r--r--test/files/run/reify_newimpl_25.check8
-rw-r--r--test/files/run/reify_newimpl_25.scala4
-rw-r--r--test/files/run/reify_newimpl_26.check12
-rw-r--r--test/files/run/reify_newimpl_26.scala6
-rw-r--r--test/files/run/reify_newimpl_27.scala4
-rw-r--r--test/files/run/reify_newimpl_28.scala4
-rw-r--r--test/files/run/reify_newimpl_29.scala4
-rw-r--r--test/files/run/reify_newimpl_30.scala4
-rw-r--r--test/files/run/reify_newimpl_31.scala4
-rw-r--r--test/files/run/reify_newimpl_32.scala4
-rw-r--r--test/files/run/reify_newimpl_33.scala4
-rw-r--r--test/files/run/reify_newimpl_34.scala4
-rw-r--r--test/files/run/reify_newimpl_35.check17
-rw-r--r--test/files/run/reify_newimpl_35.scala10
-rw-r--r--test/files/run/reify_newimpl_36.scala3
-rw-r--r--test/files/run/reify_newimpl_37.scala3
-rw-r--r--test/files/run/reify_newimpl_38.scala3
-rw-r--r--test/files/run/reify_newimpl_39.scala3
-rw-r--r--test/files/run/reify_newimpl_40.scala3
-rw-r--r--test/files/run/reify_newimpl_41.scala3
-rw-r--r--test/files/run/reify_newimpl_42.scala3
-rw-r--r--test/files/run/reify_newimpl_43.scala3
-rw-r--r--test/files/run/reify_newimpl_44.scala3
-rw-r--r--test/files/run/reify_newimpl_45.scala11
-rw-r--r--test/files/run/reify_newimpl_47.scala8
-rw-r--r--test/files/run/reify_newimpl_48.scala8
-rw-r--r--test/files/run/reify_newimpl_49.scala3
-rw-r--r--test/files/run/reify_newimpl_50.scala3
-rw-r--r--test/files/run/reify_newimpl_51.scala3
-rw-r--r--test/files/run/reify_newimpl_52.scala3
-rw-r--r--test/files/run/reify_printf.scala24
-rw-r--r--test/files/run/reify_properties.scala3
-rw-r--r--test/files/run/reify_sort.scala5
-rw-r--r--test/files/run/reify_sort1.scala5
-rw-r--r--test/files/run/reify_this.scala5
-rw-r--r--test/files/run/reify_timeofday.scala5
-rw-r--r--test/files/run/reify_typerefs_1a.scala9
-rw-r--r--test/files/run/reify_typerefs_1b.scala9
-rw-r--r--test/files/run/reify_typerefs_2a.scala9
-rw-r--r--test/files/run/reify_typerefs_2b.scala9
-rw-r--r--test/files/run/reify_typerefs_3a.scala9
-rw-r--r--test/files/run/reify_typerefs_3b.scala9
-rw-r--r--test/files/run/reify_varargs.scala5
-rw-r--r--test/files/run/repl-colon-type.check16
-rw-r--r--test/files/run/repl-type-verbose.check32
-rw-r--r--test/files/run/richs-msil.check66
-rw-r--r--test/files/run/runtime-msil.check64
-rw-r--r--test/files/run/runtimeEval1.check (renamed from test/files/run/t5273_2a.check)0
-rw-r--r--test/files/run/runtimeEval1.scala9
-rw-r--r--test/files/run/runtimeEval2.check1
-rw-r--r--test/files/run/runtimeEval2.scala11
-rw-r--r--test/files/run/t0421-new.scala6
-rw-r--r--test/files/run/t0677-new.scala6
-rw-r--r--test/files/run/t1195-new.check12
-rw-r--r--test/files/run/t1195-new.scala6
-rw-r--r--test/files/run/t2236-new.scala4
-rw-r--r--test/files/run/t2886.scala4
-rw-r--r--test/files/run/t3507-new.check2
-rw-r--r--test/files/run/t3507-new.scala4
-rw-r--r--test/files/run/t4110-new.check4
-rw-r--r--test/files/run/t4110-new.scala4
-rw-r--r--test/files/run/t4216.check71
-rw-r--r--test/files/run/t4216.scala3
-rw-r--r--test/files/run/t5224.scala2
-rw-r--r--test/files/run/t5225_1.scala2
-rw-r--r--test/files/run/t5225_2.scala2
-rw-r--r--test/files/run/t5229_1.scala5
-rw-r--r--test/files/run/t5229_2.scala9
-rw-r--r--test/files/run/t5230.scala9
-rw-r--r--test/files/run/t5256a.check8
-rw-r--r--test/files/run/t5256a.scala12
-rw-r--r--test/files/run/t5256b.check6
-rw-r--r--test/files/run/t5256b.scala12
-rw-r--r--test/files/run/t5256c.check6
-rw-r--r--test/files/run/t5256c.scala12
-rw-r--r--test/files/run/t5256d.check26
-rw-r--r--test/files/run/t5256d.scala13
-rw-r--r--test/files/run/t5256e.check8
-rw-r--r--test/files/run/t5256e.scala13
-rw-r--r--test/files/run/t5256f.check14
-rw-r--r--test/files/run/t5256f.scala17
-rw-r--r--test/files/run/t5256g.check3
-rw-r--r--test/files/run/t5256g.scala13
-rw-r--r--test/files/run/t5256h.check7
-rw-r--r--test/files/run/t5256h.scala10
-rw-r--r--test/files/run/t5258a.scala3
-rw-r--r--test/files/run/t5266_1.scala7
-rw-r--r--test/files/run/t5266_2.scala9
-rw-r--r--test/files/run/t5269.scala5
-rw-r--r--test/files/run/t5270.scala5
-rw-r--r--test/files/run/t5271_1.scala10
-rw-r--r--test/files/run/t5271_2.scala10
-rw-r--r--test/files/run/t5271_3.scala10
-rw-r--r--test/files/run/t5271_4.scala5
-rw-r--r--test/files/run/t5272_1_newpatmat.check (renamed from test/files/run/t5272_1.check)0
-rw-r--r--test/files/run/t5272_1_newpatmat.scala (renamed from test/files/run/t5272_1.scala)5
-rw-r--r--test/files/run/t5272_1_oldpatmat.check1
-rw-r--r--test/files/run/t5272_1_oldpatmat.flags (renamed from test/files/run/reify_maps.flags)0
-rw-r--r--test/files/run/t5272_1_oldpatmat.scala11
-rw-r--r--test/files/run/t5272_2_newpatmat.check (renamed from test/files/run/t5272_2.check)0
-rw-r--r--test/files/run/t5272_2_newpatmat.scala (renamed from test/files/run/t5272_2.scala)5
-rw-r--r--test/files/run/t5272_2_oldpatmat.check1
-rw-r--r--test/files/run/t5272_2_oldpatmat.flags (renamed from test/files/run/t5272_1.flags)0
-rw-r--r--test/files/run/t5272_2_oldpatmat.scala10
-rw-r--r--test/files/run/t5273_1_newpatmat.check (renamed from test/files/run/t5273_1.check)0
-rw-r--r--test/files/run/t5273_1_newpatmat.scala (renamed from test/files/run/t5273_1.scala)5
-rw-r--r--test/files/run/t5273_1_oldpatmat.check1
-rw-r--r--test/files/run/t5273_1_oldpatmat.flags (renamed from test/files/run/t5272_2.flags)0
-rw-r--r--test/files/run/t5273_1_oldpatmat.scala11
-rw-r--r--test/files/run/t5273_2a_newpatmat.check1
-rw-r--r--test/files/run/t5273_2a_newpatmat.scala (renamed from test/files/run/t5273_2a.scala)5
-rw-r--r--test/files/run/t5273_2a_oldpatmat.check1
-rw-r--r--test/files/run/t5273_2a_oldpatmat.flags (renamed from test/files/run/t5273_1.flags)0
-rw-r--r--test/files/run/t5273_2a_oldpatmat.scala9
-rw-r--r--test/files/run/t5273_2b.flags0
-rw-r--r--test/files/run/t5273_2b_newpatmat.check (renamed from test/files/run/t5273_2b.check)0
-rw-r--r--test/files/run/t5273_2b_newpatmat.scala (renamed from test/files/run/t5273_2b.scala)5
-rw-r--r--test/files/run/t5273_2b_oldpatmat.check1
-rw-r--r--test/files/run/t5273_2b_oldpatmat.flags (renamed from test/files/run/t5273_2a.flags)0
-rw-r--r--test/files/run/t5273_2b_oldpatmat.scala10
-rw-r--r--test/files/run/t5274_1.scala5
-rw-r--r--test/files/run/t5274_2.scala5
-rw-r--r--test/files/run/t5275.scala5
-rw-r--r--test/files/run/t5276_1a.scala5
-rw-r--r--test/files/run/t5276_1b.scala5
-rw-r--r--test/files/run/t5276_2a.scala5
-rw-r--r--test/files/run/t5276_2b.scala5
-rw-r--r--test/files/run/t5277_1.scala5
-rw-r--r--test/files/run/t5277_2.scala5
-rw-r--r--test/files/run/t5279.scala5
-rw-r--r--test/files/run/t5334_1.scala9
-rw-r--r--test/files/run/t5334_2.scala9
-rw-r--r--test/files/run/t5335.scala5
-rw-r--r--test/files/run/t5415.scala8
-rw-r--r--test/files/run/t5419.scala2
-rw-r--r--test/files/run/t5423.scala10
-rw-r--r--test/files/run/t5428.check1
-rw-r--r--test/files/run/t5428.scala29
-rw-r--r--test/files/run/t5704.check2
-rw-r--r--test/files/run/t5704.scala9
-rw-r--r--test/files/run/t5713/Impls_Macros_1.scala5
-rw-r--r--test/files/run/t5843.check9
-rw-r--r--test/files/run/t5843.scala15
-rw-r--r--test/files/run/t5857.scala45
-rw-r--r--test/files/run/t5867.check1
-rw-r--r--test/files/run/t5867.scala14
-rw-r--r--test/files/run/t5879.check16
-rw-r--r--test/files/run/t5879.scala74
-rw-r--r--test/files/run/t5880.scala41
-rw-r--r--test/files/run/toolbox_console_reporter.scala4
-rw-r--r--test/files/run/toolbox_default_reporter_is_silent.scala9
-rw-r--r--test/files/run/toolbox_silent_reporter.scala7
-rw-r--r--test/files/run/toolbox_typecheck_implicitsdisabled.check2
-rw-r--r--test/files/run/toolbox_typecheck_implicitsdisabled.scala7
-rw-r--r--test/files/run/toolbox_typecheck_macrosdisabled.check38
-rw-r--r--test/files/run/toolbox_typecheck_macrosdisabled.scala21
-rw-r--r--test/files/run/toolbox_typecheck_macrosdisabled2.check38
-rw-r--r--test/files/run/toolbox_typecheck_macrosdisabled2.scala19
-rw-r--r--test/files/run/triemap-hash.scala46
-rw-r--r--test/files/run/tuples-msil.check2
-rw-r--r--test/files/run/typetags_core.check32
-rw-r--r--test/files/run/typetags_core.scala34
-rw-r--r--test/files/run/typetags_multi.check5
-rw-r--r--test/files/run/typetags_multi.scala7
-rw-r--r--test/files/run/virtpatmat_typetag.check10
-rw-r--r--test/files/run/virtpatmat_typetag.flags1
-rw-r--r--test/files/run/virtpatmat_typetag.scala36
516 files changed, 3038 insertions, 2797 deletions
diff --git a/test/files/run/Course-2002-01-msil.check b/test/files/run/Course-2002-01-msil.check
deleted file mode 100644
index ca9d7ac54b..0000000000
--- a/test/files/run/Course-2002-01-msil.check
+++ /dev/null
@@ -1,34 +0,0 @@
-232
-667
-11
-10
-62.8318
-62.8318
-62.8318
-4
-81
-256
-25
-1
-737
-1
-0
-1
-76
-1.41421568627451
-1.73214285714286
-2.00000009292229
-1.41421568627451
-1.73214285714286
-2.00000009292229
-1.41421568627451
-1.73214285714286
-2.00000009292229
-sqrt(2) = 1.41421356237469
-sqrt(2) = 1.41421356237469
-cbrt(2) = 1.25992105001777
-1
-1 1
-1 2 1
-1 3 3 1
-1 4 6 4 1
diff --git a/test/files/run/Course-2002-02-msil.check b/test/files/run/Course-2002-02-msil.check
deleted file mode 100644
index 12ac0b1739..0000000000
--- a/test/files/run/Course-2002-02-msil.check
+++ /dev/null
@@ -1,187 +0,0 @@
-7
-120
-
-10
-100
-2.08333333333333
-3025.76877140318
-pi = 3.16597927284322
-
-10
-100
-2.08333333333333
-3025.76877140318
-pi = 3.16597927284322
-
-10
-100
-2.08333333333333
-3025.76877140318
-pi = 3.16597927284322
-
-10
-100
-2.08333333333333
-3025.76877140318
-pi = 3.16597927284322
-
-10
-100
-2.08333333333333
-3025.76877140318
-pi = 3.16597927284322
-
-10
-100
-2.08333333333333
-3025.76877140318
-pi = 3.16597927284322
-
-10
-100
-2.08333333333333
-3025.76877140318
-pi = 3.16597927284322
-
-pi = 3.18110488557771
-pi = 3.18110488557771
-
-10
-100
-2.08333333333333
-3025.76877140318
-pi = 3.16597927284322
-pi = 3.18110488557771
-pi = 3.18110488557771
-
-1.5
-1.41666666666667
-1.41421568627451
-1.41421356237469
-sqrt(2) = 1.41421356237469
-
-1.5
-1.41666666666667
-1.41421568627451
-1.41421356237469
-sqrt(2) = 1.41421356237469
-
-1 + 2 + .. + 5 = 15
-1 * 2 * .. * 5 = 120
-
-1^2 + 2^2 + .. + 5^2 = 55
-1^2 * 2^2 * .. * 5^2 = 14400
-
-factorial(0) = 1
-factorial(1) = 1
-factorial(2) = 2
-factorial(3) = 6
-factorial(4) = 24
-factorial(5) = 120
-
-1 + 2 + .. + 5 = 15
-1 * 2 * .. * 5 = 120
-
-1^2 + 2^2 + .. + 5^2 = 55
-1^2 * 2^2 * .. * 5^2 = 14400
-
-factorial(0) = 1
-factorial(1) = 1
-factorial(2) = 2
-factorial(3) = 6
-factorial(4) = 24
-factorial(5) = 120
-
-1 + 2 + .. + 5 = 15
-1 * 2 * .. * 5 = 120
-
-1^2 + 2^2 + .. + 5^2 = 55
-1^2 * 2^2 * .. * 5^2 = 14400
-
-factorial(0) = 1
-factorial(1) = 1
-factorial(2) = 2
-factorial(3) = 6
-factorial(4) = 24
-factorial(5) = 120
-
-fib(0) = 0
-fib(1) = 1
-fib(2) = 1
-fib(3) = 2
-fib(4) = 3
-fib(5) = 5
-fib(6) = 8
-fib(7) = 13
-fib(8) = 21
-fib(9) = 34
-fib(0) = 0
-fib(1) = 1
-fib(2) = 1
-fib(3) = 2
-fib(4) = 3
-fib(5) = 5
-fib(6) = 8
-fib(7) = 13
-fib(8) = 21
-fib(9) = 34
-power(0,0) = 1
-power(0,1) = 0
-power(0,2) = 0
-power(0,3) = 0
-power(0,4) = 0
-power(0,5) = 0
-power(0,6) = 0
-power(0,7) = 0
-power(0,8) = 0
-
-power(1,0) = 1
-power(1,1) = 1
-power(1,2) = 1
-power(1,3) = 1
-power(1,4) = 1
-power(1,5) = 1
-power(1,6) = 1
-power(1,7) = 1
-power(1,8) = 1
-
-power(2,0) = 1
-power(2,1) = 2
-power(2,2) = 4
-power(2,3) = 8
-power(2,4) = 16
-power(2,5) = 32
-power(2,6) = 64
-power(2,7) = 128
-power(2,8) = 256
-
-power(3,0) = 1
-power(3,1) = 3
-power(3,2) = 9
-power(3,3) = 27
-power(3,4) = 81
-power(3,5) = 243
-power(3,6) = 729
-power(3,7) = 2187
-power(3,8) = 6561
-
-power(4,0) = 1
-power(4,1) = 4
-power(4,2) = 16
-power(4,3) = 64
-power(4,4) = 256
-power(4,5) = 1024
-power(4,6) = 4096
-power(4,7) = 16384
-power(4,8) = 65536
-
-power(5,0) = 1
-power(5,1) = 5
-power(5,2) = 25
-power(5,3) = 125
-power(5,4) = 625
-power(5,5) = 3125
-power(5,6) = 15625
-power(5,7) = 78125
-power(5,8) = 390625
-
diff --git a/test/files/run/Course-2002-03-msil.check b/test/files/run/Course-2002-03-msil.check
deleted file mode 100644
index 3556893e16..0000000000
--- a/test/files/run/Course-2002-03-msil.check
+++ /dev/null
@@ -1,67 +0,0 @@
-1
-2
-1/2
-5/6
-
-1/3
-5/7
-3/2
-66/42
-
-1/3
-5/7
-3/2
-11/7
-
-11/7
-7/11
-11/7
-11/7
-
-13/36
-
-False
-True
-True
-False
-
-set0 = []
-set1 = [1]
-set2 = [1,2]
-set3 = [1,2,3]
-set4 = [1,2,3,4]
-
-set2 contains the following elements:
-1
-2
-
-set3 contains the following elements:
-1
-2
-3
-
-set4 contains the following elements:
-1
-2
-3
-4
-
-2 <- set2: True
-3 <- set2: False
-
-setx = [-10,-1,0,3,5,21]
-setx * 2 = [-20,-2,0,6,10,42]
-
-setx = [-10,-1,0,3,5,21]
-sety = [-9,-5,-1,0,3,7,8]
-setx & sety = [-1,0,3]
-sety & setx = [-1,0,3]
-setx > 0 = [3,5,21]
-sety > 0 = [3,7,8]
-setx & sety = [-1,0,3]
-sety & setx = [-1,0,3]
-
-1/1
-1/1
-1/1
-
diff --git a/test/files/run/Course-2002-04-msil.check b/test/files/run/Course-2002-04-msil.check
deleted file mode 100644
index fc6ad96eed..0000000000
--- a/test/files/run/Course-2002-04-msil.check
+++ /dev/null
@@ -1,64 +0,0 @@
-list0 = List(6, 3, 1, 8, 7, 1, 2, 5, 8, 4, 3, 4, 8)
-list1 = List(1, 1, 2, 3, 3, 4, 4, 5, 6, 7, 8, 8, 8)
-list2 = List(1, 1, 2, 3, 3, 4, 4, 5, 6, 7, 8, 8, 8)
-list3 = List(1, 1, 2, 3, 3, 4, 4, 5, 6, 7, 8, 8, 8)
-list4 = List(1, 1, 2, 3, 3, 4, 4, 5, 6, 7, 8, 8, 8)
-list5 = List(8, 8, 8, 7, 6, 5, 4, 4, 3, 3, 2, 1, 1)
-list6 = List(8, 8, 8, 7, 6, 5, 4, 4, 3, 3, 2, 1, 1)
-
-list0: List() -> List()
-list1: List(0) -> List(0)
-list2: List(0, 1) -> List(0, 1)
-list3: List(1, 0) -> List(0, 1)
-list4: List(0, 1, 2) -> List(0, 1, 2)
-list5: List(1, 0, 2) -> List(0, 1, 2)
-list6: List(0, 1, 2) -> List(0, 1, 2)
-list7: List(1, 0, 2) -> List(0, 1, 2)
-list8: List(2, 0, 1) -> List(0, 1, 2)
-list9: List(2, 1, 0) -> List(0, 1, 2)
-listA: List(6, 3, 1, 8, 7, 1, 2, 5, 8, 4) -> List(1, 1, 2, 3, 4, 5, 6, 7, 8, 8)
-
-f(x) = 5x^3+7x^2+5x+9
-f(0) = 9
-f(1) = 26
-f(2) = 87
-f(3) = 222
-
-v1 = List(2, 3, 4)
-v2 = List(6, 7, 8)
-
-id = List(List(1, 0, 0), List(0, 1, 0), List(0, 0, 1))
-m1 = List(List(2, 0, 0), List(0, 2, 0), List(0, 0, 2))
-m2 = List(List(1, 2, 3), List(4, 5, 6), List(7, 8, 9))
-
-v1 * v1 = 29
-v1 * v2 = 65
-v2 * v1 = 65
-v1 * v2 = 65
-
-id * v1 = List(2, 3, 4)
-m1 * v1 = List(4, 6, 8)
-m2 * v1 = List(20, 47, 74)
-
-trn(id) = List(List(1, 0, 0), List(0, 1, 0), List(0, 0, 1))
-trn(m1) = List(List(2, 0, 0), List(0, 2, 0), List(0, 0, 2))
-trn(m2) = List(List(1, 4, 7), List(2, 5, 8), List(3, 6, 9))
-
-List(v1) * id = List(List(2, 3, 4))
-List(v1) * m1 = List(List(4, 6, 8))
-List(v1) * m2 = List(List(42, 51, 60))
-
-id * List(v1) = List(List(2, 3, 4), List(0, 0, 0), List(0, 0, 0))
-m1 * List(v1) = List(List(4, 6, 8), List(0, 0, 0), List(0, 0, 0))
-m2 * List(v1) = List(List(2, 3, 4), List(8, 12, 16), List(14, 21, 28))
-
-id * id = List(List(1, 0, 0), List(0, 1, 0), List(0, 0, 1))
-id * m1 = List(List(2, 0, 0), List(0, 2, 0), List(0, 0, 2))
-m1 * id = List(List(2, 0, 0), List(0, 2, 0), List(0, 0, 2))
-m1 * m1 = List(List(4, 0, 0), List(0, 4, 0), List(0, 0, 4))
-id * m2 = List(List(1, 2, 3), List(4, 5, 6), List(7, 8, 9))
-m2 * id = List(List(1, 2, 3), List(4, 5, 6), List(7, 8, 9))
-m1 * m2 = List(List(2, 4, 6), List(8, 10, 12), List(14, 16, 18))
-m2 * m1 = List(List(2, 4, 6), List(8, 10, 12), List(14, 16, 18))
-m2 * m2 = List(List(30, 36, 42), List(66, 81, 96), List(102, 126, 150))
-
diff --git a/test/files/run/Course-2002-08-msil.check b/test/files/run/Course-2002-08-msil.check
deleted file mode 100644
index c5b26c719b..0000000000
--- a/test/files/run/Course-2002-08-msil.check
+++ /dev/null
@@ -1,171 +0,0 @@
-x = abc
-count = 111
-x = hello
-count = 112
-
-account deposit 50 -> ()
-account withdraw 20 -> 30
-account withdraw 20 -> 10
-account withdraw 15 ->
-
-x deposit 30 -> ()
-y withdraw 20 ->
-
-x deposit 30 -> ()
-x withdraw 20 -> 10
-
-x deposit 30 -> ()
-y withdraw 20 -> 10
-
-2^0 = 1
-2^1 = 2
-2^2 = 4
-2^3 = 8
-
-2^0 = 1
-2^1 = 2
-2^2 = 4
-2^3 = 8
-
-1 2 3
-List(1,2,3)
-
-out 0 new-value = False
-*** simulation started ***
-out 1 new-value = True
-!0 = 1
-
-*** simulation started ***
-out 2 new-value = False
-!1 = 0
-
-out 2 new-value = False
-
-*** simulation started ***
-0 & 0 = 0
-
-*** simulation started ***
-0 & 1 = 0
-
-*** simulation started ***
-out 11 new-value = True
-out 11 new-value = False
-1 & 0 = 0
-
-*** simulation started ***
-out 14 new-value = True
-1 & 1 = 1
-
-out 14 new-value = False
-
-*** simulation started ***
-0 | 0 = 0
-
-*** simulation started ***
-out 24 new-value = True
-0 | 1 = 1
-
-*** simulation started ***
-1 | 0 = 1
-
-*** simulation started ***
-1 | 1 = 1
-
-sum 34 new-value = False
-carry 34 new-value = False
-
-*** simulation started ***
-0 + 0 = 0
-
-*** simulation started ***
-sum 47 new-value = True
-0 + 1 = 1
-
-*** simulation started ***
-carry 50 new-value = True
-carry 50 new-value = False
-sum 54 new-value = False
-sum 54 new-value = True
-1 + 0 = 1
-
-*** simulation started ***
-carry 57 new-value = True
-sum 61 new-value = False
-1 + 1 = 2
-
-sum 61 new-value = False
-carry 61 new-value = False
-
-*** simulation started ***
-0 + 0 + 0 = 0
-
-*** simulation started ***
-sum 82 new-value = True
-0 + 0 + 1 = 1
-
-*** simulation started ***
-sum 89 new-value = False
-carry 90 new-value = True
-sum 97 new-value = True
-carry 98 new-value = False
-0 + 1 + 0 = 1
-
-*** simulation started ***
-sum 113 new-value = False
-carry 114 new-value = True
-0 + 1 + 1 = 2
-
-*** simulation started ***
-sum 121 new-value = True
-carry 122 new-value = False
-sum 129 new-value = False
-sum 129 new-value = True
-1 + 0 + 0 = 1
-
-*** simulation started ***
-carry 137 new-value = True
-sum 144 new-value = False
-1 + 0 + 1 = 2
-
-*** simulation started ***
-carry 152 new-value = False
-sum 152 new-value = True
-sum 158 new-value = False
-carry 159 new-value = True
-1 + 1 + 0 = 2
-
-*** simulation started ***
-sum 173 new-value = True
-1 + 1 + 1 = 3
-
-in 0 new-value = False
-ctrl0 0 new-value = False
-ctrl1 0 new-value = False
-ctrl2 0 new-value = False
-out0 0 new-value = False
-out1 0 new-value = False
-out2 0 new-value = False
-out3 0 new-value = False
-out4 0 new-value = False
-out5 0 new-value = False
-out6 0 new-value = False
-out7 0 new-value = False
-in 0 new-value = True
-*** simulation started ***
-out0 10 new-value = True
-ctrl0 10 new-value = True
-*** simulation started ***
-out1 13 new-value = True
-out0 14 new-value = False
-ctrl1 14 new-value = True
-*** simulation started ***
-out3 20 new-value = True
-out1 21 new-value = False
-ctrl2 21 new-value = True
-*** simulation started ***
-out7 30 new-value = True
-out3 31 new-value = False
-ctrl0 31 new-value = False
-*** simulation started ***
-out7 34 new-value = False
-out6 35 new-value = True
diff --git a/test/files/run/Course-2002-09-msil.check b/test/files/run/Course-2002-09-msil.check
deleted file mode 100644
index c921361db7..0000000000
--- a/test/files/run/Course-2002-09-msil.check
+++ /dev/null
@@ -1,50 +0,0 @@
-Probe: f = 32
-Probe: c = 0
-Probe: f = ?
-Probe: c = ?
-
-Probe: f = 212
-Probe: c = 100
-Probe: f = ?
-Probe: c = ?
-
-Probe: c = 0
-Probe: f = 32
-Probe: c = ?
-Probe: f = ?
-
-Probe: c = 100
-Probe: f = 212
-Probe: c = ?
-Probe: f = ?
-
-0 Celsius -> 32 Fahrenheits
-100 Celsius -> 212 Fahrenheits
-32 Fahrenheits -> 0 Celsius
-212 Fahrenheits -> 100 Celsius
-
-a = ?, b = ?, c = ? => ? * ? = ?
-a = 2, b = ?, c = ? => 2 * ? = ?
-a = ?, b = 3, c = ? => ? * 3 = ?
-a = ?, b = ?, c = 6 => ? * ? = 6
-a = 2, b = 3, c = ? => 2 * 3 = 6
-a = 2, b = ?, c = 6 => 2 * 3 = 6
-a = ?, b = 3, c = 6 => 2 * 3 = 6
-a = 2, b = 3, c = 6 => 2 * 3 = 6
-
-a = 0, b = ?, c = ? => 0 * ? = 0
-a = ?, b = 0, c = ? => ? * 0 = 0
-a = ?, b = ?, c = 0 => ? * ? = 0
-a = 0, b = 7, c = ? => 0 * 7 = 0
-a = 7, b = 0, c = ? => 7 * 0 = 0
-a = 0, b = 0, c = ? => 0 * 0 = 0
-a = 0, b = ?, c = 0 => 0 * ? = 0
-a = ?, b = 0, c = 0 => ? * 0 = 0
-a = 0, b = 7, c = 0 => 0 * 7 = 0
-a = 7, b = 0, c = 0 => 7 * 0 = 0
-a = 0, b = 0, c = 0 => 0 * 0 = 0
-
-a = 3, b = 4 => c = 5
-a = 3, c = 5 => b = 4
-b = 4, c = 5 => a = 3
-
diff --git a/test/files/run/Course-2002-10-msil.check b/test/files/run/Course-2002-10-msil.check
deleted file mode 100644
index bbd9414370..0000000000
--- a/test/files/run/Course-2002-10-msil.check
+++ /dev/null
@@ -1,46 +0,0 @@
-fib(0) = 0
-fib(1) = 1
-fib(2) = 1
-fib(3) = 2
-fib(4) = 3
-fib(5) = 5
-fib(6) = 8
-fib(7) = 13
-fib(8) = 21
-fib(9) = 34
-fib(10) = 55
-fib(11) = 89
-fib(12) = 144
-fib(13) = 233
-fib(14) = 377
-fib(15) = 610
-fib(16) = 987
-fib(17) = 1597
-fib(18) = 2584
-fib(19) = 4181
-
-pi(0) = 4 , 3.16666666666667 , 4
-pi(1) = 2.66666666666667 , 3.13333333333333 , 3.16666666666667
-pi(2) = 3.46666666666667 , 3.1452380952381 , 3.1421052631579
-pi(3) = 2.8952380952381 , 3.13968253968254 , 3.141599357319
-pi(4) = 3.33968253968254 , 3.14271284271284 , 3.14159271403378
-pi(5) = 2.97604617604618 , 3.14088134088134 , 3.14159265397529
-pi(6) = 3.28373848373848 , 3.14207181707182 , 3.14159265359118
-pi(7) = 3.01707181707182 , 3.14125482360776 , 3.14159265358978
-pi(8) = 3.25236593471888 , 3.1418396189294 , 3.14159265358979
-pi(9) = 3.0418396189294 , 3.1414067184965 , 3.14159265358979
-pi = 3.14159265358979 , 3.14159265358979 , 3.14159265358979
-
-ln(0) = 1 , 0.7 , 1
-ln(1) = 0.5 , 0.69047619047619 , 0.7
-ln(2) = 0.833333333333333 , 0.694444444444444 , 0.69327731092437
-ln(3) = 0.583333333333333 , 0.692424242424242 , 0.693148869332925
-ln(4) = 0.783333333333333 , 0.693589743589744 , 0.693147196073549
-ln(5) = 0.616666666666667 , 0.692857142857143 , 0.693147180663564
-ln(6) = 0.759523809523809 , 0.693347338935574 , 0.693147180560404
-ln(7) = 0.634523809523809 , 0.693003341687552 , 0.693147180559944
-ln(8) = 0.745634920634921 , 0.693253968253968 , 0.693147180559943
-ln(9) = 0.645634920634921 , 0.693065750674446 , 0.693147180559945
-ln = 0.693147180559945 , 0.693147180559945 , 0.693147180559945
-
-prime numbers: 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113
diff --git a/test/files/run/absoverride-msil.check b/test/files/run/absoverride-msil.check
deleted file mode 100644
index 938f62221f..0000000000
--- a/test/files/run/absoverride-msil.check
+++ /dev/null
@@ -1,20 +0,0 @@
-<sync>
-next: m
-</sync>
-log: m
-m
-<sync>
-next: s
-</sync>
-log: s
-s
-<sync>
-next: i
-</sync>
-log: i
-i
-<sync>
-next: l
-</sync>
-log: l
-l
diff --git a/test/files/run/abstypetags_core.check b/test/files/run/abstypetags_core.check
new file mode 100644
index 0000000000..55c8cb7e89
--- /dev/null
+++ b/test/files/run/abstypetags_core.check
@@ -0,0 +1,28 @@
+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[java.lang.Object]
+true
+TypeTag[Null]
+true
+TypeTag[Nothing]
+true
+TypeTag[java.lang.String]
diff --git a/test/files/run/abstypetags_core.scala b/test/files/run/abstypetags_core.scala
new file mode 100644
index 0000000000..a49817f4d4
--- /dev/null
+++ b/test/files/run/abstypetags_core.scala
@@ -0,0 +1,32 @@
+import scala.reflect.runtime.universe._
+
+object Test extends App {
+ println(implicitly[AbsTypeTag[Byte]] eq AbsTypeTag.Byte)
+ println(implicitly[AbsTypeTag[Byte]])
+ println(implicitly[AbsTypeTag[Short]] eq AbsTypeTag.Short)
+ println(implicitly[AbsTypeTag[Short]])
+ println(implicitly[AbsTypeTag[Char]] eq AbsTypeTag.Char)
+ println(implicitly[AbsTypeTag[Char]])
+ println(implicitly[AbsTypeTag[Int]] eq AbsTypeTag.Int)
+ println(implicitly[AbsTypeTag[Int]])
+ println(implicitly[AbsTypeTag[Long]] eq AbsTypeTag.Long)
+ println(implicitly[AbsTypeTag[Long]])
+ println(implicitly[AbsTypeTag[Float]] eq AbsTypeTag.Float)
+ println(implicitly[AbsTypeTag[Float]])
+ println(implicitly[AbsTypeTag[Double]] eq AbsTypeTag.Double)
+ println(implicitly[AbsTypeTag[Double]])
+ println(implicitly[AbsTypeTag[Boolean]] eq AbsTypeTag.Boolean)
+ println(implicitly[AbsTypeTag[Boolean]])
+ println(implicitly[AbsTypeTag[Unit]] eq AbsTypeTag.Unit)
+ println(implicitly[AbsTypeTag[Unit]])
+ println(implicitly[AbsTypeTag[Any]] eq AbsTypeTag.Any)
+ println(implicitly[AbsTypeTag[Any]])
+ println(implicitly[AbsTypeTag[Object]] eq AbsTypeTag.Object)
+ println(implicitly[AbsTypeTag[Object]])
+ println(implicitly[AbsTypeTag[Null]] eq AbsTypeTag.Null)
+ println(implicitly[AbsTypeTag[Null]])
+ println(implicitly[AbsTypeTag[Nothing]] eq AbsTypeTag.Nothing)
+ println(implicitly[AbsTypeTag[Nothing]])
+ println(implicitly[AbsTypeTag[String]] eq AbsTypeTag.String)
+ println(implicitly[AbsTypeTag[String]])
+} \ No newline at end of file
diff --git a/test/files/run/arrayclone-new.scala b/test/files/run/arrayclone-new.scala
index a4ba021409..506e4f527c 100644
--- a/test/files/run/arrayclone-new.scala
+++ b/test/files/run/arrayclone-new.scala
@@ -1,3 +1,5 @@
+import scala.reflect.{ClassTag, classTag}
+
object Test extends App{
BooleanArrayClone;
ByteArrayClone;
@@ -93,7 +95,7 @@ object PolymorphicArrayClone{
testIt(Array("one", "two"), "one", "two");
- class Mangler[T: ArrayTag](ts : T*){
+ class Mangler[T: ClassTag](ts : T*){
// this will always be a BoxedAnyArray even after we've unboxed its contents.
val it = ts.toArray[T];
}
@@ -103,4 +105,4 @@ object PolymorphicArrayClone{
val y : Array[Int] = mangled.it; // make sure it's unboxed
testIt(mangled.it, 0, 1);
-}
+} \ No newline at end of file
diff --git a/test/files/run/arraytags_basic.check b/test/files/run/arraytags_basic.check
deleted file mode 100644
index 92816b91bd..0000000000
--- a/test/files/run/arraytags_basic.check
+++ /dev/null
@@ -1,36 +0,0 @@
-class [I
-class [[I
-class [[[I
-class [Lscala.collection.immutable.List;
-class [[Lscala.collection.immutable.List;
-class [[[Lscala.collection.immutable.List;
-class [Lscala.collection.immutable.List;
-class [[Lscala.collection.immutable.List;
-class [[[Lscala.collection.immutable.List;
-class [Lscala.collection.immutable.Map;
-class [[Lscala.collection.immutable.Map;
-class [[[Lscala.collection.immutable.Map;
-class [[I
-class [[[I
-class [[[[I
-class [[Lscala.collection.immutable.List;
-class [[[Lscala.collection.immutable.List;
-class [[[[Lscala.collection.immutable.List;
-class [[Lscala.collection.immutable.List;
-class [[[Lscala.collection.immutable.List;
-class [[[[Lscala.collection.immutable.List;
-class [[Lscala.collection.immutable.Map;
-class [[[Lscala.collection.immutable.Map;
-class [[[[Lscala.collection.immutable.Map;
-class [[[I
-class [[[[I
-class [[[[[I
-class [[[Lscala.collection.immutable.List;
-class [[[[Lscala.collection.immutable.List;
-class [[[[[Lscala.collection.immutable.List;
-class [[[Lscala.collection.immutable.List;
-class [[[[Lscala.collection.immutable.List;
-class [[[[[Lscala.collection.immutable.List;
-class [[[Lscala.collection.immutable.Map;
-class [[[[Lscala.collection.immutable.Map;
-class [[[[[Lscala.collection.immutable.Map;
diff --git a/test/files/run/arraytags_basic.scala b/test/files/run/arraytags_basic.scala
deleted file mode 100644
index edc20e9bc1..0000000000
--- a/test/files/run/arraytags_basic.scala
+++ /dev/null
@@ -1,22 +0,0 @@
-object Test extends App {
- def test[T: ArrayTag] = {
- println(implicitly[ArrayTag[T]].newArray(10).getClass)
- println(implicitly[ArrayTag[T]].wrap.newArray(10).getClass)
- println(implicitly[ArrayTag[Array[T]]].wrap.newArray(10).getClass)
- }
-
- test[Int]
- test[List[Int]]
- test[List[String]]
- test[Map[Int, String]]
-
- test[Array[Int]]
- test[Array[List[Int]]]
- test[Array[List[String]]]
- test[Array[Map[Int, String]]]
-
- test[Array[Array[Int]]]
- test[Array[Array[List[Int]]]]
- test[Array[Array[List[String]]]]
- test[Array[Array[Map[Int, String]]]]
-} \ No newline at end of file
diff --git a/test/files/run/arraytags_core.check b/test/files/run/arraytags_core.check
deleted file mode 100644
index 82ed84ad78..0000000000
--- a/test/files/run/arraytags_core.check
+++ /dev/null
@@ -1,48 +0,0 @@
-class [B
-class [[B
-class [[[B
-class [S
-class [[S
-class [[[S
-class [C
-class [[C
-class [[[C
-class [I
-class [[I
-class [[[I
-class [J
-class [[J
-class [[[J
-class [F
-class [[F
-class [[[F
-class [D
-class [[D
-class [[[D
-class [Z
-class [[Z
-class [[[Z
-class [Lscala.runtime.BoxedUnit;
-class [[Lscala.runtime.BoxedUnit;
-class [[[Lscala.runtime.BoxedUnit;
-class [Ljava.lang.Object;
-class [[Ljava.lang.Object;
-class [[[Ljava.lang.Object;
-class [Ljava.lang.Object;
-class [[Ljava.lang.Object;
-class [[[Ljava.lang.Object;
-class [Ljava.lang.Object;
-class [[Ljava.lang.Object;
-class [[[Ljava.lang.Object;
-class [Ljava.lang.Object;
-class [[Ljava.lang.Object;
-class [[[Ljava.lang.Object;
-class [Lscala.runtime.Null$;
-class [[Lscala.runtime.Null$;
-class [[[Lscala.runtime.Null$;
-class [Lscala.runtime.Nothing$;
-class [[Lscala.runtime.Nothing$;
-class [[[Lscala.runtime.Nothing$;
-class [Ljava.lang.String;
-class [[Ljava.lang.String;
-class [[[Ljava.lang.String;
diff --git a/test/files/run/arraytags_core.scala b/test/files/run/arraytags_core.scala
deleted file mode 100644
index a59ae24f30..0000000000
--- a/test/files/run/arraytags_core.scala
+++ /dev/null
@@ -1,50 +0,0 @@
-object Test extends App {
- println(implicitly[ArrayTag[Byte]].newArray(10).getClass)
- println(implicitly[ArrayTag[Byte]].wrap.newArray(10).getClass)
- println(implicitly[ArrayTag[Array[Byte]]].wrap.newArray(10).getClass)
- println(implicitly[ArrayTag[Short]].newArray(10).getClass)
- println(implicitly[ArrayTag[Short]].wrap.newArray(10).getClass)
- println(implicitly[ArrayTag[Array[Short]]].wrap.newArray(10).getClass)
- println(implicitly[ArrayTag[Char]].newArray(10).getClass)
- println(implicitly[ArrayTag[Char]].wrap.newArray(10).getClass)
- println(implicitly[ArrayTag[Array[Char]]].wrap.newArray(10).getClass)
- println(implicitly[ArrayTag[Int]].newArray(10).getClass)
- println(implicitly[ArrayTag[Int]].wrap.newArray(10).getClass)
- println(implicitly[ArrayTag[Array[Int]]].wrap.newArray(10).getClass)
- println(implicitly[ArrayTag[Long]].newArray(10).getClass)
- println(implicitly[ArrayTag[Long]].wrap.newArray(10).getClass)
- println(implicitly[ArrayTag[Array[Long]]].wrap.newArray(10).getClass)
- println(implicitly[ArrayTag[Float]].newArray(10).getClass)
- println(implicitly[ArrayTag[Float]].wrap.newArray(10).getClass)
- println(implicitly[ArrayTag[Array[Float]]].wrap.newArray(10).getClass)
- println(implicitly[ArrayTag[Double]].newArray(10).getClass)
- println(implicitly[ArrayTag[Double]].wrap.newArray(10).getClass)
- println(implicitly[ArrayTag[Array[Double]]].wrap.newArray(10).getClass)
- println(implicitly[ArrayTag[Boolean]].newArray(10).getClass)
- println(implicitly[ArrayTag[Boolean]].wrap.newArray(10).getClass)
- println(implicitly[ArrayTag[Array[Boolean]]].wrap.newArray(10).getClass)
- println(implicitly[ArrayTag[Unit]].newArray(10).getClass)
- println(implicitly[ArrayTag[Unit]].wrap.newArray(10).getClass)
- println(implicitly[ArrayTag[Array[Unit]]].wrap.newArray(10).getClass)
- println(implicitly[ArrayTag[Any]].newArray(10).getClass)
- println(implicitly[ArrayTag[Any]].wrap.newArray(10).getClass)
- println(implicitly[ArrayTag[Array[Any]]].wrap.newArray(10).getClass)
- println(implicitly[ArrayTag[Object]].newArray(10).getClass)
- println(implicitly[ArrayTag[Object]].wrap.newArray(10).getClass)
- println(implicitly[ArrayTag[Array[Object]]].wrap.newArray(10).getClass)
- println(implicitly[ArrayTag[AnyVal]].newArray(10).getClass)
- println(implicitly[ArrayTag[AnyVal]].wrap.newArray(10).getClass)
- println(implicitly[ArrayTag[Array[AnyVal]]].wrap.newArray(10).getClass)
- println(implicitly[ArrayTag[AnyRef]].newArray(10).getClass)
- println(implicitly[ArrayTag[AnyRef]].wrap.newArray(10).getClass)
- println(implicitly[ArrayTag[Array[AnyRef]]].wrap.newArray(10).getClass)
- println(implicitly[ArrayTag[Null]].newArray(10).getClass)
- println(implicitly[ArrayTag[Null]].wrap.newArray(10).getClass)
- println(implicitly[ArrayTag[Array[Null]]].wrap.newArray(10).getClass)
- println(implicitly[ArrayTag[Nothing]].newArray(10).getClass)
- println(implicitly[ArrayTag[Nothing]].wrap.newArray(10).getClass)
- println(implicitly[ArrayTag[Array[Nothing]]].wrap.newArray(10).getClass)
- println(implicitly[ArrayTag[String]].newArray(10).getClass)
- println(implicitly[ArrayTag[String]].wrap.newArray(10).getClass)
- println(implicitly[ArrayTag[Array[String]]].wrap.newArray(10).getClass)
-} \ No newline at end of file
diff --git a/test/files/run/arraytags_usage.check b/test/files/run/arraytags_usage.check
deleted file mode 100644
index b1d02b7bfe..0000000000
--- a/test/files/run/arraytags_usage.check
+++ /dev/null
@@ -1,3 +0,0 @@
-class [I
-class [I
-class [I
diff --git a/test/files/run/arraytags_usage.scala b/test/files/run/arraytags_usage.scala
deleted file mode 100644
index 60b0a8f218..0000000000
--- a/test/files/run/arraytags_usage.scala
+++ /dev/null
@@ -1,15 +0,0 @@
-object Test extends App {
- def foo[T] = {
- class MyArrayTag extends ArrayTag[T] {
- def wrap: ArrayTag[Array[T]] = ???
- def newArray(len: Int): Array[T] = new Array[Int](len).asInstanceOf[Array[T]]
- }
-
- implicit val tag = new MyArrayTag()
- println(Array[T]().getClass)
- }
-
- foo[Int]
- foo[String]
- foo[Array[String]]
-} \ No newline at end of file
diff --git a/test/files/run/bitsets-msil.check b/test/files/run/bitsets-msil.check
deleted file mode 100644
index b187571bff..0000000000
--- a/test/files/run/bitsets-msil.check
+++ /dev/null
@@ -1,33 +0,0 @@
-ms0 = BitSet(2)
-ms1 = BitSet(2)
-ms2 = BitSet(2)
-mb0 = False
-mb1 = True
-mb2 = False
-xs0 = List(2)
-xs1 = List(2)
-xs2 = List(2)
-ma0 = List(2)
-ma1 = List(2)
-ma2 = List(2)
-mi0 = BitSet(2)
-mi1 = BitSet(2)
-mi2 = BitSet(2)
-
-is0 = BitSet()
-is1 = BitSet()
-is2 = BitSet(2)
-is3 = BitSet()
-ib0 = False
-ib1 = False
-ib2 = True
-ib3 = False
-ys0 = List()
-ys1 = List()
-ys2 = List(2)
-ys3 = List()
-ia0 = List()
-ia1 = List()
-ia2 = List(2)
-ia3 = List()
-
diff --git a/test/files/run/boolord-msil.check b/test/files/run/boolord-msil.check
deleted file mode 100644
index e5f1daa0e5..0000000000
--- a/test/files/run/boolord-msil.check
+++ /dev/null
@@ -1,4 +0,0 @@
-false < false = False
-false < true = True
-true < false = False
-true < true = False
diff --git a/test/files/run/bugs-msil.check b/test/files/run/bugs-msil.check
deleted file mode 100644
index 4e15409547..0000000000
--- a/test/files/run/bugs-msil.check
+++ /dev/null
@@ -1,96 +0,0 @@
-<<< bug 98
-mycase
->>> bug 98
-
-<<< bug 120
-one
-A
-B
-C
->>> bug 120
-
-<<< bug 135
-Some(The answer)
->>> bug 135
-
-<<< bug 142
-ok
-ok
-ok
-ok
-ok
-ok
-ok
-ok
->>> bug 142
-
-<<< bug 166
->>> bug 166
-
-<<< bug 167
->>> bug 167
-
-<<< bug 168
->>> bug 168
-
-<<< bug 174
->>> bug 174
-
-<<< bug 176
-1
->>> bug 176
-
-<<< bug 199
->>> bug 199
-
-<<< bug 213
-Cannot cast unit to Nothing
-Cannot cast empty string to Null
->>> bug 213
-
-<<< bug 217
->>> bug 217
-
-<<< bug 222
->>> bug 222
-
-<<< bug 225
->>> bug 225
-
-<<< bug 226
->>> bug 226
-
-<<< bug 233
-True
->>> bug 233
-
-<<< bug 250
->>> bug 250
-
-<<< bug 257
-I should come 1st and 2nd
-I should come 1st and 2nd
-I should come last
->>> bug 257
-
-<<< bug 266
-hello
-4
->>> bug 266
-
-<<< bug 316
->>> bug 316
-
-<<< bug 328
->>> bug 328
-
-<<< bug 396
-A
-B
-C
->>> bug 396
-
-<<< bug 399
-a
->>> bug 399
-
diff --git a/test/files/run/caseClassHash.scala b/test/files/run/caseClassHash.scala
index 7adfddedf8..c5cb09c355 100644
--- a/test/files/run/caseClassHash.scala
+++ b/test/files/run/caseClassHash.scala
@@ -11,8 +11,8 @@ object Test {
println("## method 1: " + foo1.##)
println("## method 2: " + foo2.##)
- println(" Murmur 1: " + scala.util.MurmurHash3.productHash(foo1))
- println(" Murmur 2: " + scala.util.MurmurHash3.productHash(foo2))
+ println(" Murmur 1: " + scala.util.hashing.MurmurHash3.productHash(foo1))
+ println(" Murmur 2: " + scala.util.hashing.MurmurHash3.productHash(foo2))
}
}
diff --git a/test/files/run/classtags_contextbound.scala b/test/files/run/classtags_contextbound.scala
index 5bb0ae8d80..2f12792154 100644
--- a/test/files/run/classtags_contextbound.scala
+++ b/test/files/run/classtags_contextbound.scala
@@ -1,3 +1,5 @@
+import scala.reflect.{ClassTag, classTag}
+
object Test extends App {
def mkArray[T: ClassTag] = Array[T]()
def foo[T: ClassTag] = mkArray[T]
diff --git a/test/files/run/classtags_core.check b/test/files/run/classtags_core.check
index ebccfcd54c..7beada3f1c 100644
--- a/test/files/run/classtags_core.check
+++ b/test/files/run/classtags_core.check
@@ -1,32 +1,28 @@
-true
-ClassTag[byte]
-true
-ClassTag[short]
-true
-ClassTag[char]
-true
-ClassTag[int]
-true
-ClassTag[long]
-true
-ClassTag[float]
-true
-ClassTag[double]
-true
-ClassTag[boolean]
-true
-ClassTag[void]
-true
-ClassTag[class java.lang.Object]
-true
-ClassTag[class java.lang.Object]
-true
-ClassTag[class java.lang.Object]
-true
-ClassTag[class java.lang.Object]
-true
-ClassTag[class scala.runtime.Null$]
-true
-ClassTag[class scala.runtime.Nothing$]
-true
-ClassTag[class java.lang.String]
+true
+ClassTag[byte]
+true
+ClassTag[short]
+true
+ClassTag[char]
+true
+ClassTag[int]
+true
+ClassTag[long]
+true
+ClassTag[float]
+true
+ClassTag[double]
+true
+ClassTag[boolean]
+true
+ClassTag[void]
+true
+ClassTag[class java.lang.Object]
+true
+ClassTag[class java.lang.Object]
+true
+ClassTag[class scala.runtime.Null$]
+true
+ClassTag[class scala.runtime.Nothing$]
+true
+ClassTag[class java.lang.String]
diff --git a/test/files/run/classtags_core.scala b/test/files/run/classtags_core.scala
index 9f2031377d..17c69d9c41 100644
--- a/test/files/run/classtags_core.scala
+++ b/test/files/run/classtags_core.scala
@@ -1,3 +1,5 @@
+import scala.reflect.{ClassTag, classTag}
+
object Test extends App {
println(implicitly[ClassTag[Byte]] eq ClassTag.Byte)
println(implicitly[ClassTag[Byte]])
@@ -21,10 +23,6 @@ object Test extends App {
println(implicitly[ClassTag[Any]])
println(implicitly[ClassTag[Object]] eq ClassTag.Object)
println(implicitly[ClassTag[Object]])
- println(implicitly[ClassTag[AnyVal]] eq ClassTag.AnyVal)
- println(implicitly[ClassTag[AnyVal]])
- println(implicitly[ClassTag[AnyRef]] eq ClassTag.AnyRef)
- println(implicitly[ClassTag[AnyRef]])
println(implicitly[ClassTag[Null]] eq ClassTag.Null)
println(implicitly[ClassTag[Null]])
println(implicitly[ClassTag[Nothing]] eq ClassTag.Nothing)
diff --git a/test/files/run/classtags_multi.scala b/test/files/run/classtags_multi.scala
index 5aafb55223..b4b47bcf0e 100644
--- a/test/files/run/classtags_multi.scala
+++ b/test/files/run/classtags_multi.scala
@@ -1,3 +1,5 @@
+import scala.reflect.{ClassTag, classTag}
+
object Test extends App {
println(classTag[Int])
println(classTag[Array[Int]])
diff --git a/test/files/run/classtags_use_concretetypetags.scala b/test/files/run/classtags_use_concretetypetags.scala
deleted file mode 100644
index 57e7085cec..0000000000
--- a/test/files/run/classtags_use_concretetypetags.scala
+++ /dev/null
@@ -1,3 +0,0 @@
-object Test extends App {
- def foo[T: ConcreteTypeTag] = Array[T]()
-} \ No newline at end of file
diff --git a/test/files/run/concretetypetags_core.check b/test/files/run/concretetypetags_core.check
index f124aa6a35..d042e0900d 100644
--- a/test/files/run/concretetypetags_core.check
+++ b/test/files/run/concretetypetags_core.check
@@ -1,32 +1,28 @@
-true
-ConcreteTypeTag[Byte]
-true
-ConcreteTypeTag[Short]
-true
-ConcreteTypeTag[Char]
-true
-ConcreteTypeTag[Int]
-true
-ConcreteTypeTag[Long]
-true
-ConcreteTypeTag[Float]
-true
-ConcreteTypeTag[Double]
-true
-ConcreteTypeTag[Boolean]
-true
-ConcreteTypeTag[Unit]
-true
-ConcreteTypeTag[Any]
-true
-ConcreteTypeTag[Object]
-true
-ConcreteTypeTag[AnyVal]
-true
-ConcreteTypeTag[AnyRef]
-true
-ConcreteTypeTag[Null]
-true
-ConcreteTypeTag[Nothing]
-true
-ConcreteTypeTag[String]
+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[java.lang.Object]
+true
+TypeTag[Null]
+true
+TypeTag[Nothing]
+true
+TypeTag[java.lang.String]
diff --git a/test/files/run/concretetypetags_core.scala b/test/files/run/concretetypetags_core.scala
index b6cfea3895..a870f77c5f 100644
--- a/test/files/run/concretetypetags_core.scala
+++ b/test/files/run/concretetypetags_core.scala
@@ -1,34 +1,32 @@
+import scala.reflect.runtime.universe._
+
object Test extends App {
- println(implicitly[ConcreteTypeTag[Byte]] eq ConcreteTypeTag.Byte)
- println(implicitly[ConcreteTypeTag[Byte]])
- println(implicitly[ConcreteTypeTag[Short]] eq ConcreteTypeTag.Short)
- println(implicitly[ConcreteTypeTag[Short]])
- println(implicitly[ConcreteTypeTag[Char]] eq ConcreteTypeTag.Char)
- println(implicitly[ConcreteTypeTag[Char]])
- println(implicitly[ConcreteTypeTag[Int]] eq ConcreteTypeTag.Int)
- println(implicitly[ConcreteTypeTag[Int]])
- println(implicitly[ConcreteTypeTag[Long]] eq ConcreteTypeTag.Long)
- println(implicitly[ConcreteTypeTag[Long]])
- println(implicitly[ConcreteTypeTag[Float]] eq ConcreteTypeTag.Float)
- println(implicitly[ConcreteTypeTag[Float]])
- println(implicitly[ConcreteTypeTag[Double]] eq ConcreteTypeTag.Double)
- println(implicitly[ConcreteTypeTag[Double]])
- println(implicitly[ConcreteTypeTag[Boolean]] eq ConcreteTypeTag.Boolean)
- println(implicitly[ConcreteTypeTag[Boolean]])
- println(implicitly[ConcreteTypeTag[Unit]] eq ConcreteTypeTag.Unit)
- println(implicitly[ConcreteTypeTag[Unit]])
- println(implicitly[ConcreteTypeTag[Any]] eq ConcreteTypeTag.Any)
- println(implicitly[ConcreteTypeTag[Any]])
- println(implicitly[ConcreteTypeTag[Object]] eq ConcreteTypeTag.Object)
- println(implicitly[ConcreteTypeTag[Object]])
- println(implicitly[ConcreteTypeTag[AnyVal]] eq ConcreteTypeTag.AnyVal)
- println(implicitly[ConcreteTypeTag[AnyVal]])
- println(implicitly[ConcreteTypeTag[AnyRef]] eq ConcreteTypeTag.AnyRef)
- println(implicitly[ConcreteTypeTag[AnyRef]])
- println(implicitly[ConcreteTypeTag[Null]] eq ConcreteTypeTag.Null)
- println(implicitly[ConcreteTypeTag[Null]])
- println(implicitly[ConcreteTypeTag[Nothing]] eq ConcreteTypeTag.Nothing)
- println(implicitly[ConcreteTypeTag[Nothing]])
- println(implicitly[ConcreteTypeTag[String]] eq ConcreteTypeTag.String)
- println(implicitly[ConcreteTypeTag[String]])
+ println(implicitly[TypeTag[Byte]] eq TypeTag.Byte)
+ println(implicitly[TypeTag[Byte]])
+ println(implicitly[TypeTag[Short]] eq TypeTag.Short)
+ println(implicitly[TypeTag[Short]])
+ println(implicitly[TypeTag[Char]] eq TypeTag.Char)
+ println(implicitly[TypeTag[Char]])
+ println(implicitly[TypeTag[Int]] eq TypeTag.Int)
+ println(implicitly[TypeTag[Int]])
+ println(implicitly[TypeTag[Long]] eq TypeTag.Long)
+ println(implicitly[TypeTag[Long]])
+ println(implicitly[TypeTag[Float]] eq TypeTag.Float)
+ println(implicitly[TypeTag[Float]])
+ println(implicitly[TypeTag[Double]] eq TypeTag.Double)
+ println(implicitly[TypeTag[Double]])
+ println(implicitly[TypeTag[Boolean]] eq TypeTag.Boolean)
+ println(implicitly[TypeTag[Boolean]])
+ println(implicitly[TypeTag[Unit]] eq TypeTag.Unit)
+ println(implicitly[TypeTag[Unit]])
+ println(implicitly[TypeTag[Any]] eq TypeTag.Any)
+ println(implicitly[TypeTag[Any]])
+ println(implicitly[TypeTag[Object]] eq TypeTag.Object)
+ println(implicitly[TypeTag[Object]])
+ println(implicitly[TypeTag[Null]] eq TypeTag.Null)
+ println(implicitly[TypeTag[Null]])
+ println(implicitly[TypeTag[Nothing]] eq TypeTag.Nothing)
+ println(implicitly[TypeTag[Nothing]])
+ println(implicitly[TypeTag[String]] eq TypeTag.String)
+ println(implicitly[TypeTag[String]])
} \ No newline at end of file
diff --git a/test/files/run/concretetypetags_multi.check b/test/files/run/concretetypetags_multi.check
index 613106985c..6110252c36 100644
--- a/test/files/run/concretetypetags_multi.check
+++ b/test/files/run/concretetypetags_multi.check
@@ -1,5 +1,5 @@
-ConcreteTypeTag[Int]
-ConcreteTypeTag[Array[Int]]
-ConcreteTypeTag[Array[Array[Int]]]
-ConcreteTypeTag[Array[Array[Array[Int]]]]
-ConcreteTypeTag[Array[Array[Array[Array[Int]]]]]
+TypeTag[Int]
+TypeTag[Array[Int]]
+TypeTag[Array[Array[Int]]]
+TypeTag[Array[Array[Array[Int]]]]
+TypeTag[Array[Array[Array[Array[Int]]]]]
diff --git a/test/files/run/concretetypetags_multi.scala b/test/files/run/concretetypetags_multi.scala
index 7e19d7db34..b30aac80a6 100644
--- a/test/files/run/concretetypetags_multi.scala
+++ b/test/files/run/concretetypetags_multi.scala
@@ -1,7 +1,9 @@
+import scala.reflect.runtime.universe._
+
object Test extends App {
- println(concreteTypeTag[Int])
- println(concreteTypeTag[Array[Int]])
- println(concreteTypeTag[Array[Array[Int]]])
- println(concreteTypeTag[Array[Array[Array[Int]]]])
- println(concreteTypeTag[Array[Array[Array[Array[Int]]]]])
+ println(implicitly[TypeTag[Int]])
+ println(implicitly[TypeTag[Array[Int]]])
+ println(implicitly[TypeTag[Array[Array[Int]]]])
+ println(implicitly[TypeTag[Array[Array[Array[Int]]]]])
+ println(implicitly[TypeTag[Array[Array[Array[Array[Int]]]]]])
} \ No newline at end of file
diff --git a/test/files/run/ctries-new/main.scala b/test/files/run/ctries-new/main.scala
index 1d40dab6c5..d7fe087e4d 100644
--- a/test/files/run/ctries-new/main.scala
+++ b/test/files/run/ctries-new/main.scala
@@ -1,3 +1,5 @@
+import scala.reflect.{ClassTag, classTag}
+
@@ -35,11 +37,11 @@ trait Spec {
var produced = false
try body
catch {
- case e => if (e.getClass == implicitly[ClassTag[T]].erasure) produced = true
+ case e => if (e.getClass == implicitly[ClassTag[T]].runtimeClass) produced = true
} finally {
assert(produced, "Did not produce exception of type: " + implicitly[ClassTag[T]])
}
}
}
-}
+} \ No newline at end of file
diff --git a/test/files/run/ctries-old/main.scala b/test/files/run/ctries-old/main.scala
index 8db7fcef54..78ba7f0db1 100644
--- a/test/files/run/ctries-old/main.scala
+++ b/test/files/run/ctries-old/main.scala
@@ -6,30 +6,30 @@
object Test {
-
+
def main(args: Array[String]) {
ConcurrentMapSpec.test()
IteratorSpec.test()
LNodeSpec.test()
SnapshotSpec.test()
}
-
+
}
trait Spec {
-
+
implicit def str2ops(s: String) = new {
def in[U](body: =>U) {
// just execute body
body
}
}
-
+
implicit def any2ops(a: Any) = new {
def shouldEqual(other: Any) = assert(a == other)
}
-
+
def evaluating[U](body: =>U) = new {
def shouldProduce[T <: Throwable: ClassManifest]() = {
var produced = false
@@ -41,5 +41,5 @@ trait Spec {
}
}
}
-
+
}
diff --git a/test/files/run/dynamic-proxy.check b/test/files/run/dynamic-proxy.check
deleted file mode 100644
index d1b85daff4..0000000000
--- a/test/files/run/dynamic-proxy.check
+++ /dev/null
@@ -1,20 +0,0 @@
-noargs
-noargs
-nullary
-value
-symbolic
-symbolic with args
-non-existent method
-before mutation
-mutation 1
-after mutation 1
-mutation 2
-after mutation 2
-overloaded with object
-overloaded with primitive
-overloaded with object in var
-overloaded with object in var 2
-typeArgs: I am a car
-default: 4
-default: 3
-named: 6
diff --git a/test/files/run/dynamic-proxy.flags b/test/files/run/dynamic-proxy.flags
deleted file mode 100644
index 48fd867160..0000000000
--- a/test/files/run/dynamic-proxy.flags
+++ /dev/null
@@ -1 +0,0 @@
--Xexperimental
diff --git a/test/files/run/dynamic-proxy.scala b/test/files/run/dynamic-proxy.scala
deleted file mode 100644
index ab5a8b1d66..0000000000
--- a/test/files/run/dynamic-proxy.scala
+++ /dev/null
@@ -1,72 +0,0 @@
-import scala.reflect._
-
-class Car{ override def toString = "I am a car" }
-object x{
- def nullary = "nullary"
- def noargs() = "noargs"
- def - = "symbolic"
- def $(s:String) = "symbolic with args"
- val value = "value"
- def overloaded(i:Int) = "overloaded with primitive"
- def overloaded(s:String) = s
- def default( a:Int, b:Int = 2 ) = "default: "+(a+b)
- def named( a:Int, b:Int, c:Int ) = "named: "+(a+b+c)
- def typeArgs[T]( v:T ) = "typeArgs: "+v
- var mutable = "before mutation"
- def multiArgLists( a:String )( b:String ) = "multiArgList " + a + b
- def bar( s:String )(implicit car:Car) = s + car.toString
-}
-
-object Test extends App{
- val d = new DynamicProxy{ val dynamicProxyTarget = x }
-
- println( d.noargs )
- println( d.noargs() )
- println( d.nullary )
- println( d.value )
- println( d.- )
- println( d.$("x") )
-
- try{
- println( d.test )
- } catch {
- case _ => println("non-existent method")
- }
-
- println( d.mutable )
-
- println("mutation 1")
- d.mutable_=("after mutation 1")
- println( d.mutable )
-
- println("mutation 2")
- d.mutable = "after mutation 2"
- println( d.mutable )
-
- println( d.overloaded("overloaded with object") )
- println( d.overloaded(1) )
-
- // test some non-constant arguments
- def s = "overloaded with object in var"
- println( d.overloaded(s) )
- println( d.overloaded(s + " 2") )
-
- val car = new Car
- println( d.typeArgs(car) ) // inferred
- // println( d.typeArgs[Car](car) ) // explicit not working (yet)
-
- println( d.default( 1,3 ) )
- println( d.default( 1 ) )
-
- println( d.named(1,c=3,b=2) ) // applyDynamicNamed seems to be broken
-
- // println( d.multiArgLists("a")("b") ) // not working yet
-
- /*
- // may never work
- // testing implicit parameters (first test works when moving x into TestDynamicReflect)
- implicit val car2 = new Car
- println( d.bar( "Yeah, ") ); // FAILS: could not find implicit value for parameter car
- {println( d.bar( "Yeah, ") )} // FAILS: could not find implicit value for parameter car
- */
-}
diff --git a/test/files/run/erasuretags_abstract.check b/test/files/run/erasuretags_abstract.check
deleted file mode 100644
index 17e7204664..0000000000
--- a/test/files/run/erasuretags_abstract.check
+++ /dev/null
@@ -1,4 +0,0 @@
-class java.lang.Object
-class java.lang.Object
-class java.lang.Object
-int
diff --git a/test/files/run/erasuretags_abstract.scala b/test/files/run/erasuretags_abstract.scala
deleted file mode 100644
index 8e4ad0d090..0000000000
--- a/test/files/run/erasuretags_abstract.scala
+++ /dev/null
@@ -1,9 +0,0 @@
-object Test extends App {
- def foo1[T] = erasureTag[T]
- println(foo1[Int].erasure)
- println(foo1[String].erasure)
- println(foo1[Array[Int]].erasure)
-
- def foo2[T <: Int] = erasureTag[T]
- println(foo2[Int].erasure)
-} \ No newline at end of file
diff --git a/test/files/run/erasuretags_basic.check b/test/files/run/erasuretags_basic.check
deleted file mode 100644
index c02a4d32af..0000000000
--- a/test/files/run/erasuretags_basic.check
+++ /dev/null
@@ -1,24 +0,0 @@
-int
-class [I
-class scala.collection.immutable.List
-class [Lscala.collection.immutable.List;
-class scala.collection.immutable.List
-class [Lscala.collection.immutable.List;
-interface scala.collection.immutable.Map
-class [Lscala.collection.immutable.Map;
-class [I
-class [[I
-class [Lscala.collection.immutable.List;
-class [[Lscala.collection.immutable.List;
-class [Lscala.collection.immutable.List;
-class [[Lscala.collection.immutable.List;
-class [Lscala.collection.immutable.Map;
-class [[Lscala.collection.immutable.Map;
-class [[I
-class [[[I
-class [[Lscala.collection.immutable.List;
-class [[[Lscala.collection.immutable.List;
-class [[Lscala.collection.immutable.List;
-class [[[Lscala.collection.immutable.List;
-class [[Lscala.collection.immutable.Map;
-class [[[Lscala.collection.immutable.Map;
diff --git a/test/files/run/erasuretags_basic.scala b/test/files/run/erasuretags_basic.scala
deleted file mode 100644
index d894fdf2e9..0000000000
--- a/test/files/run/erasuretags_basic.scala
+++ /dev/null
@@ -1,21 +0,0 @@
-object Test extends App {
- def test[T: ErasureTag] = {
- println(implicitly[ErasureTag[T]].erasure)
- println(implicitly[ErasureTag[Array[T]]].erasure)
- }
-
- test[Int]
- test[List[Int]]
- test[List[String]]
- test[Map[Int, String]]
-
- test[Array[Int]]
- test[Array[List[Int]]]
- test[Array[List[String]]]
- test[Array[Map[Int, String]]]
-
- test[Array[Array[Int]]]
- test[Array[Array[List[Int]]]]
- test[Array[Array[List[String]]]]
- test[Array[Array[Map[Int, String]]]]
-} \ No newline at end of file
diff --git a/test/files/run/erasuretags_core.check b/test/files/run/erasuretags_core.check
deleted file mode 100644
index 2c544678d1..0000000000
--- a/test/files/run/erasuretags_core.check
+++ /dev/null
@@ -1,32 +0,0 @@
-byte
-class [B
-short
-class [S
-char
-class [C
-int
-class [I
-long
-class [J
-float
-class [F
-double
-class [D
-boolean
-class [Z
-void
-class [Lscala.runtime.BoxedUnit;
-class java.lang.Object
-class [Ljava.lang.Object;
-class java.lang.Object
-class [Ljava.lang.Object;
-class java.lang.Object
-class [Ljava.lang.Object;
-class java.lang.Object
-class [Ljava.lang.Object;
-class scala.runtime.Null$
-class [Lscala.runtime.Null$;
-class scala.runtime.Nothing$
-class [Lscala.runtime.Nothing$;
-class java.lang.String
-class [Ljava.lang.String;
diff --git a/test/files/run/erasuretags_core.scala b/test/files/run/erasuretags_core.scala
deleted file mode 100644
index 5ed06dcd31..0000000000
--- a/test/files/run/erasuretags_core.scala
+++ /dev/null
@@ -1,34 +0,0 @@
-object Test extends App {
- println(implicitly[ErasureTag[Byte]].erasure)
- println(implicitly[ErasureTag[Array[Byte]]].erasure)
- println(implicitly[ErasureTag[Short]].erasure)
- println(implicitly[ErasureTag[Array[Short]]].erasure)
- println(implicitly[ErasureTag[Char]].erasure)
- println(implicitly[ErasureTag[Array[Char]]].erasure)
- println(implicitly[ErasureTag[Int]].erasure)
- println(implicitly[ErasureTag[Array[Int]]].erasure)
- println(implicitly[ErasureTag[Long]].erasure)
- println(implicitly[ErasureTag[Array[Long]]].erasure)
- println(implicitly[ErasureTag[Float]].erasure)
- println(implicitly[ErasureTag[Array[Float]]].erasure)
- println(implicitly[ErasureTag[Double]].erasure)
- println(implicitly[ErasureTag[Array[Double]]].erasure)
- println(implicitly[ErasureTag[Boolean]].erasure)
- println(implicitly[ErasureTag[Array[Boolean]]].erasure)
- println(implicitly[ErasureTag[Unit]].erasure)
- println(implicitly[ErasureTag[Array[Unit]]].erasure)
- println(implicitly[ErasureTag[Any]].erasure)
- println(implicitly[ErasureTag[Array[Any]]].erasure)
- println(implicitly[ErasureTag[Object]].erasure)
- println(implicitly[ErasureTag[Array[Object]]].erasure)
- println(implicitly[ErasureTag[AnyVal]].erasure)
- println(implicitly[ErasureTag[Array[AnyVal]]].erasure)
- println(implicitly[ErasureTag[AnyRef]].erasure)
- println(implicitly[ErasureTag[Array[AnyRef]]].erasure)
- println(implicitly[ErasureTag[Null]].erasure)
- println(implicitly[ErasureTag[Array[Null]]].erasure)
- println(implicitly[ErasureTag[Nothing]].erasure)
- println(implicitly[ErasureTag[Array[Nothing]]].erasure)
- println(implicitly[ErasureTag[String]].erasure)
- println(implicitly[ErasureTag[Array[String]]].erasure)
-} \ No newline at end of file
diff --git a/test/files/run/erasuretags_usage.scala b/test/files/run/erasuretags_usage.scala
deleted file mode 100644
index 16e53af071..0000000000
--- a/test/files/run/erasuretags_usage.scala
+++ /dev/null
@@ -1,12 +0,0 @@
-object Test extends App {
- def foo[T] = {
- class MyErasureTag(_erasure: Class[_]) extends ErasureTag[T] {
- def erasure: Class[T] = _erasure.asInstanceOf[Class[T]]
- }
-
- implicit val tag = new MyErasureTag(classOf[Int])
- println(typeTag[T])
- println(typeTag[T].tpe)
- println(typeTag[T].erasure)
- }
-} \ No newline at end of file
diff --git a/test/files/run/existentials-in-compiler.scala b/test/files/run/existentials-in-compiler.scala
index 8c04e4782c..1f314aa4e0 100644
--- a/test/files/run/existentials-in-compiler.scala
+++ b/test/files/run/existentials-in-compiler.scala
@@ -4,6 +4,7 @@ import scala.collection.{ mutable, immutable, generic }
object Test extends CompilerTest {
import global._
+ import rootMirror._
import definitions._
override def code = """
@@ -21,7 +22,7 @@ package extest {
trait Cov07[-A <: AnyRef, +B] { }
trait Cov08[-A <: AnyRef, B] { }
trait Cov09[-A <: AnyRef, -B] { }
-
+
trait Cov11[+A <: AnyRef, +B <: List[_]] { }
trait Cov12[+A <: AnyRef, B <: List[_]] { }
trait Cov13[+A <: AnyRef, -B <: List[_]] { }
@@ -31,7 +32,7 @@ package extest {
trait Cov17[-A <: AnyRef, +B <: List[_]] { }
trait Cov18[-A <: AnyRef, B <: List[_]] { }
trait Cov19[-A <: AnyRef, -B <: List[_]] { }
-
+
trait Cov21[+A, +B] { }
trait Cov22[+A, B] { }
trait Cov23[+A, -B] { }
@@ -41,7 +42,7 @@ package extest {
trait Cov27[-A, +B] { }
trait Cov28[-A, B] { }
trait Cov29[-A, -B] { }
-
+
trait Cov31[+A, +B, C <: ((A, B))] { }
trait Cov32[+A, B, C <: ((A, B))] { }
trait Cov33[+A, -B, C <: ((A, _))] { }
@@ -51,7 +52,7 @@ package extest {
trait Cov37[-A, +B, C <: ((_, B))] { }
trait Cov38[-A, B, C <: ((_, B))] { }
trait Cov39[-A, -B, C <: ((_, _))] { }
-
+
trait Cov41[+A >: Null, +B] { }
trait Cov42[+A >: Null, B] { }
trait Cov43[+A >: Null, -B] { }
diff --git a/test/files/run/existentials3-new.check b/test/files/run/existentials3-new.check
index 66674fbbd6..0d6f694a68 100644
--- a/test/files/run/existentials3-new.check
+++ b/test/files/run/existentials3-new.check
@@ -1,24 +1,24 @@
-ConcreteTypeTag[Bar.type], t=AbstractTypeRef, s= <: scala.runtime.AbstractFunction0[Bar] with Serializable{case def unapply(x$0: Bar): Boolean} with Singleton
-ConcreteTypeTag[Bar], t=AbstractTypeRef, s= <: Test.ToS with Product with Serializable{def copy(): Bar}
-ConcreteTypeTag[Test.ToS], t=RefinedType, s=f3
-ConcreteTypeTag[Test.ToS], t=RefinedType, s=f4
-ConcreteTypeTag[Test.ToS], t=RefinedType, s=f5
-ConcreteTypeTag[() => Test.ToS], t=TypeRef, s=class Function0
-ConcreteTypeTag[() => Test.ToS], t=TypeRef, s=class Function0
-ConcreteTypeTag[$anon], t=AbstractTypeRef, s= <: B with Test.ToS
-ConcreteTypeTag[$anon], t=AbstractTypeRef, s= <: B with A with Test.ToS
-TypeTag[List[Object{type T1}#T1]], t=TypeRef, s=class List
-ConcreteTypeTag[List[Seq[Int]]], t=TypeRef, s=class List
-ConcreteTypeTag[List[Seq[U forSome { type U <: Int }]]], t=TypeRef, s=class List
-ConcreteTypeTag[Bar.type], t=AbstractTypeRef, s= <: scala.runtime.AbstractFunction0[Bar] with Serializable{case def unapply(x$0: Bar): Boolean} with Singleton
-ConcreteTypeTag[Bar], t=AbstractTypeRef, s= <: Test.ToS with Product with Serializable{def copy(): Bar}
-ConcreteTypeTag[Test.ToS], t=RefinedType, s=g3
-ConcreteTypeTag[Test.ToS], t=RefinedType, s=g4
-ConcreteTypeTag[Test.ToS], t=RefinedType, s=g5
-ConcreteTypeTag[() => Test.ToS], t=TypeRef, s=class Function0
-ConcreteTypeTag[() => Test.ToS], t=TypeRef, s=class Function0
-ConcreteTypeTag[$anon], t=AbstractTypeRef, s= <: B with Test.ToS
-ConcreteTypeTag[$anon], t=AbstractTypeRef, s= <: B with A with Test.ToS
-TypeTag[List[Object{type T1}#T1]], t=TypeRef, s=class List
-ConcreteTypeTag[List[Seq[Int]]], t=TypeRef, s=class List
-ConcreteTypeTag[List[Seq[U forSome { type U <: Int }]]], t=TypeRef, s=class List
+Bar.type, t=AbstractTypeRef, s= <: scala.runtime.AbstractFunction0[Bar] with Serializable{case def unapply(x$0: Bar): Boolean} with Singleton
+Bar, t=AbstractTypeRef, s= <: Test.ToS with Product with Serializable{def copy(): 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=AbstractTypeRef, s= <: B with Test.ToS
+$anon, t=AbstractTypeRef, s= <: B with A with Test.ToS
+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=AbstractTypeRef, s= <: scala.runtime.AbstractFunction0[Bar] with Serializable{case def unapply(x$0: Bar): Boolean} with Singleton
+Bar, t=AbstractTypeRef, s= <: Test.ToS with Product with Serializable{def copy(): 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=AbstractTypeRef, s= <: B with Test.ToS
+$anon, t=AbstractTypeRef, s= <: B with A with Test.ToS
+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/existentials3-new.scala b/test/files/run/existentials3-new.scala
index 32129a04c6..649fac8327 100644
--- a/test/files/run/existentials3-new.scala
+++ b/test/files/run/existentials3-new.scala
@@ -1,3 +1,5 @@
+import scala.reflect.runtime.universe._
+
object Test {
trait ToS { final override def toString = getClass.getName }
@@ -31,12 +33,12 @@ object Test {
val g11 = { abstract class A extends Seq[Int] ; List[A]() }
val g12 = { abstract class A extends Seq[U forSome { type U <: Int }] ; List[A]() }
- def printTag(t: TypeTag[_]) = {
- val s = if (t.sym.isFreeType) t.sym.typeSignature.toString else t.sym.toString
- println("%s, t=%s, s=%s".format(t, t.tpe.kind, s))
+ def printTpe(t: Type) = {
+ val s = if (t.typeSymbol.isFreeType) t.typeSymbol.typeSignature.toString else t.typeSymbol.toString
+ println("%s, t=%s, s=%s".format(t, t.kind, s))
}
- def m[T: ConcreteTypeTag](x: T) = printTag(concreteTypeTag[T])
- def m2[T: TypeTag](x: T) = printTag(typeTag[T])
+ def m[T: TypeTag](x: T) = printTpe(typeOf[T])
+ def m2[T: AbsTypeTag](x: T) = printTpe(implicitly[AbsTypeTag[T]].tpe)
// tags do work for f10/g10
def main(args: Array[String]): Unit = {
@@ -75,4 +77,4 @@ object Misc {
}
def g1 = o1.f1 _
def g2 = o1.f2 _
-}
+} \ No newline at end of file
diff --git a/test/files/run/freetypes_false_alarm1.check b/test/files/run/freetypes_false_alarm1.check
new file mode 100644
index 0000000000..92efacc2b7
--- /dev/null
+++ b/test/files/run/freetypes_false_alarm1.check
@@ -0,0 +1 @@
+List[Int]
diff --git a/test/files/run/freetypes_false_alarm1.scala b/test/files/run/freetypes_false_alarm1.scala
new file mode 100644
index 0000000000..8d6797f792
--- /dev/null
+++ b/test/files/run/freetypes_false_alarm1.scala
@@ -0,0 +1,10 @@
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
+
+object Test extends App {
+ reify {
+ val ru = scala.reflect.runtime.universe
+ val tpe: ru.Type = ru.typeOf[List[Int]]
+ println(tpe)
+ }.eval
+} \ No newline at end of file
diff --git a/test/files/run/freetypes_false_alarm2.check b/test/files/run/freetypes_false_alarm2.check
new file mode 100644
index 0000000000..02e4a84d62
--- /dev/null
+++ b/test/files/run/freetypes_false_alarm2.check
@@ -0,0 +1 @@
+false \ No newline at end of file
diff --git a/test/files/run/freetypes_false_alarm2.scala b/test/files/run/freetypes_false_alarm2.scala
new file mode 100644
index 0000000000..3499f13fba
--- /dev/null
+++ b/test/files/run/freetypes_false_alarm2.scala
@@ -0,0 +1,8 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.tools.reflect.Eval
+
+object Test extends App {
+ val tpe = typeOf[ru.Type]
+ println(tpe.typeSymbol.isFreeType)
+} \ No newline at end of file
diff --git a/test/files/run/getClassTest-new.scala b/test/files/run/getClassTest-new.scala
index 89778ca2d3..7d8ec930f4 100644
--- a/test/files/run/getClassTest-new.scala
+++ b/test/files/run/getClassTest-new.scala
@@ -1,3 +1,5 @@
+import scala.reflect.{ClassTag, classTag}
+
class AnyVals {
def f1 = (5: Any).getClass
def f2 = (5: AnyVal).getClass
@@ -52,7 +54,7 @@ class MoreAnyRefs {
object Test {
def returnTypes[T: ClassTag] = (
- classTag[T].erasure.getMethods.toList
+ classTag[T].runtimeClass.getMethods.toList
filter (_.getName startsWith "f")
sortBy (_.getName)
map (m => m.getName + ": " + m.getGenericReturnType.toString)
@@ -63,4 +65,4 @@ object Test {
returnTypes[AnyRefs] foreach println
returnTypes[MoreAnyRefs] foreach println
}
-}
+} \ No newline at end of file
diff --git a/test/files/run/impconvtimes-msil.check b/test/files/run/impconvtimes-msil.check
deleted file mode 100644
index 082377e474..0000000000
--- a/test/files/run/impconvtimes-msil.check
+++ /dev/null
@@ -1 +0,0 @@
-3.0 * Hour = Measure(3,Hour)
diff --git a/test/files/run/infix-msil.check b/test/files/run/infix-msil.check
deleted file mode 100644
index b37cdcd80b..0000000000
--- a/test/files/run/infix-msil.check
+++ /dev/null
@@ -1,2 +0,0 @@
-op(op(op(,0,0),1,1),2,2)
-OK
diff --git a/test/files/run/interop_classmanifests_arepartially_typetags.check b/test/files/run/interop_classmanifests_arepartially_typetags.check
deleted file mode 100644
index 3dfcdccbec..0000000000
--- a/test/files/run/interop_classmanifests_arepartially_typetags.check
+++ /dev/null
@@ -1,6 +0,0 @@
-T
-int
-T
-class java.lang.String
-T
-class [I
diff --git a/test/files/run/interop_classmanifests_arepartially_typetags.scala b/test/files/run/interop_classmanifests_arepartially_typetags.scala
deleted file mode 100644
index 9bc1f32e86..0000000000
--- a/test/files/run/interop_classmanifests_arepartially_typetags.scala
+++ /dev/null
@@ -1,10 +0,0 @@
-object Test extends App {
- def classManifestIspartiallyTypeTag[T: ClassManifest] = {
- println(typeTag[T].tpe)
- println(typeTag[T].erasure)
- }
-
- classManifestIspartiallyTypeTag[Int]
- classManifestIspartiallyTypeTag[String]
- classManifestIspartiallyTypeTag[Array[Int]]
-} \ No newline at end of file
diff --git a/test/files/run/interop_classtags_are_classmanifests.check b/test/files/run/interop_classtags_are_classmanifests.check
index 02393dff23..c59e92d4eb 100644
--- a/test/files/run/interop_classtags_are_classmanifests.check
+++ b/test/files/run/interop_classtags_are_classmanifests.check
@@ -1,6 +1,3 @@
Int
java.lang.String
Array[Int]
-Int
-java.lang.String
-Array[Int]
diff --git a/test/files/run/interop_classtags_are_classmanifests.scala b/test/files/run/interop_classtags_are_classmanifests.scala
index 309c99a3f5..91b9d89c6e 100644
--- a/test/files/run/interop_classtags_are_classmanifests.scala
+++ b/test/files/run/interop_classtags_are_classmanifests.scala
@@ -1,12 +1,6 @@
-object Test extends App {
- def arrayTagIsClassManifest[T: ArrayTag] = {
- println(classManifest[T])
- }
-
- arrayTagIsClassManifest[Int]
- arrayTagIsClassManifest[String]
- arrayTagIsClassManifest[Array[Int]]
+import scala.reflect.{ClassTag, classTag}
+object Test extends App {
def classTagIsClassManifest[T: ClassTag] = {
println(classManifest[T])
}
diff --git a/test/files/run/interop_concretetypetags_are_classmanifests.scala b/test/files/run/interop_concretetypetags_are_classmanifests.scala
deleted file mode 100644
index b578d7e626..0000000000
--- a/test/files/run/interop_concretetypetags_are_classmanifests.scala
+++ /dev/null
@@ -1,9 +0,0 @@
-object Test extends App {
- def concreteTypeTagIsClassManifest[T: ConcreteTypeTag] = {
- println(classManifest[T])
- }
-
- concreteTypeTagIsClassManifest[Int]
- concreteTypeTagIsClassManifest[String]
- concreteTypeTagIsClassManifest[Array[Int]]
-} \ No newline at end of file
diff --git a/test/files/run/interop_concretetypetags_are_manifests.scala b/test/files/run/interop_concretetypetags_are_manifests.scala
deleted file mode 100644
index 731410bc10..0000000000
--- a/test/files/run/interop_concretetypetags_are_manifests.scala
+++ /dev/null
@@ -1,9 +0,0 @@
-object Test extends App {
- def concreteTypeTagIsManifest[T: ConcreteTypeTag] = {
- println(manifest[T])
- }
-
- concreteTypeTagIsManifest[Int]
- concreteTypeTagIsManifest[String]
- concreteTypeTagIsManifest[Array[Int]]
-} \ No newline at end of file
diff --git a/test/files/run/interop_concretetypetags_are_classmanifests.check b/test/files/run/interop_manifests_are_abstypetags.check
index c59e92d4eb..c59e92d4eb 100644
--- a/test/files/run/interop_concretetypetags_are_classmanifests.check
+++ b/test/files/run/interop_manifests_are_abstypetags.check
diff --git a/test/files/run/interop_manifests_are_abstypetags.scala b/test/files/run/interop_manifests_are_abstypetags.scala
new file mode 100644
index 0000000000..1cba2fdb4b
--- /dev/null
+++ b/test/files/run/interop_manifests_are_abstypetags.scala
@@ -0,0 +1,11 @@
+import scala.reflect.runtime.universe._
+
+object Test extends App {
+ def manifestIsAbsTypeTag[T: Manifest] = {
+ println(implicitly[AbsTypeTag[T]].tpe)
+ }
+
+ manifestIsAbsTypeTag[Int]
+ manifestIsAbsTypeTag[String]
+ manifestIsAbsTypeTag[Array[Int]]
+} \ No newline at end of file
diff --git a/test/files/run/interop_manifests_are_classtags.check b/test/files/run/interop_manifests_are_classtags.check
index 07ff6b984a..aaf4aba012 100644
--- a/test/files/run/interop_manifests_are_classtags.check
+++ b/test/files/run/interop_manifests_are_classtags.check
@@ -1,24 +1,18 @@
Int
-Int
List()
List(0, 0, 0, 0, 0)
java.lang.String
-java.lang.String
List()
List(null, null, null, null, null)
Array[Int]
-Array[Int]
List()
List(null, null, null, null, null)
Int
-Int
List()
List(0, 0, 0, 0, 0)
java.lang.String
-java.lang.String
List()
List(null, null, null, null, null)
Array[Int]
-Array[Int]
List()
List(null, null, null, null, null)
diff --git a/test/files/run/interop_manifests_are_classtags.scala b/test/files/run/interop_manifests_are_classtags.scala
index 582cea3467..03479e527a 100644
--- a/test/files/run/interop_manifests_are_classtags.scala
+++ b/test/files/run/interop_manifests_are_classtags.scala
@@ -1,7 +1,8 @@
+import scala.reflect.{ClassTag, classTag}
+
object Test extends App {
def classManifestIsClassTag[T: ClassManifest] = {
- println(arrayTag[T])
- println(erasureTag[T])
+ println(classTag[T])
println(Array[T]().toList)
println(new Array[T](5).toList)
}
@@ -11,8 +12,7 @@ object Test extends App {
classManifestIsClassTag[Array[Int]]
def manifestIsClassTag[T: Manifest] = {
- println(arrayTag[T])
- println(erasureTag[T])
+ println(classTag[T])
println(Array[T]().toList)
println(new Array[T](5).toList)
}
diff --git a/test/files/run/interop_manifests_are_concretetypetags.check b/test/files/run/interop_manifests_are_concretetypetags.check
deleted file mode 100644
index edab85ecf1..0000000000
--- a/test/files/run/interop_manifests_are_concretetypetags.check
+++ /dev/null
@@ -1,6 +0,0 @@
-Int
-int
-String
-class java.lang.String
-Array[Int]
-class [I
diff --git a/test/files/run/interop_manifests_are_concretetypetags.scala b/test/files/run/interop_manifests_are_concretetypetags.scala
deleted file mode 100644
index 0b82a56d0a..0000000000
--- a/test/files/run/interop_manifests_are_concretetypetags.scala
+++ /dev/null
@@ -1,10 +0,0 @@
-object Test extends App {
- def manifestIsConcreteTypeTag[T: Manifest] = {
- println(concreteTypeTag[T].tpe)
- println(concreteTypeTag[T].erasure)
- }
-
- manifestIsConcreteTypeTag[Int]
- manifestIsConcreteTypeTag[String]
- manifestIsConcreteTypeTag[Array[Int]]
-} \ No newline at end of file
diff --git a/test/files/run/interop_manifests_are_typetags.check b/test/files/run/interop_manifests_are_typetags.check
index edab85ecf1..c59e92d4eb 100644
--- a/test/files/run/interop_manifests_are_typetags.check
+++ b/test/files/run/interop_manifests_are_typetags.check
@@ -1,6 +1,3 @@
-Int
-int
-String
-class java.lang.String
-Array[Int]
-class [I
+Int
+java.lang.String
+Array[Int]
diff --git a/test/files/run/interop_manifests_are_typetags.scala b/test/files/run/interop_manifests_are_typetags.scala
index 03a7b7b6d5..294d3c22de 100644
--- a/test/files/run/interop_manifests_are_typetags.scala
+++ b/test/files/run/interop_manifests_are_typetags.scala
@@ -1,7 +1,8 @@
+import scala.reflect.runtime.universe._
+
object Test extends App {
def manifestIsTypeTag[T: Manifest] = {
- println(typeTag[T].tpe)
- println(typeTag[T].erasure)
+ println(typeOf[T])
}
manifestIsTypeTag[Int]
diff --git a/test/files/run/interop_concretetypetags_are_manifests.check b/test/files/run/interop_typetags_are_manifests.check
index c59e92d4eb..871167e3ab 100644
--- a/test/files/run/interop_concretetypetags_are_manifests.check
+++ b/test/files/run/interop_typetags_are_manifests.check
@@ -1,3 +1,3 @@
-Int
+int
java.lang.String
Array[Int]
diff --git a/test/files/run/interop_typetags_are_manifests.scala b/test/files/run/interop_typetags_are_manifests.scala
new file mode 100644
index 0000000000..1aca7f52cc
--- /dev/null
+++ b/test/files/run/interop_typetags_are_manifests.scala
@@ -0,0 +1,12 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.ClassTag
+
+object Test extends App {
+ def typeTagIsManifest[T: TypeTag : ClassTag] = {
+ println(manifest[T])
+ }
+
+ typeTagIsManifest[Int]
+ typeTagIsManifest[String]
+ typeTagIsManifest[Array[Int]]
+} \ No newline at end of file
diff --git a/test/files/run/iq-msil.check b/test/files/run/iq-msil.check
deleted file mode 100644
index 08f9fc755e..0000000000
--- a/test/files/run/iq-msil.check
+++ /dev/null
@@ -1,12 +0,0 @@
-Empty
-Head: 42
-q5: Queue(0,1,2,3,4,5,6,7,8,9)
-q5[5]: 5
-q5 == q5c: True
-q5c == q5: True
-q8: Queue(2,3,4,5,6,7,8,9,10,11)
-q8 == q9: True
-Elements: 1 2 3 4 5 6 7 8 9
-String: <1-2-3-4-5-6-7-8-9>
-Length: 9
-Front: 1
diff --git a/test/files/run/macro-abort-fresh/Macros_1.scala b/test/files/run/macro-abort-fresh/Macros_1.scala
index 4186c4c4a6..440d1e2915 100644
--- a/test/files/run/macro-abort-fresh/Macros_1.scala
+++ b/test/files/run/macro-abort-fresh/Macros_1.scala
@@ -2,7 +2,7 @@ import scala.reflect.makro.Context
object Impls {
def impl(c: Context) = {
- import c.mirror._
+ import c.universe._
println(c.fresh())
println(c.fresh("qwe"))
println(c.fresh(newTypeName("qwe")))
diff --git a/test/files/run/macro-abort-fresh/Test_2.scala b/test/files/run/macro-abort-fresh/Test_2.scala
index ecf48b9752..c6caa2b585 100644
--- a/test/files/run/macro-abort-fresh/Test_2.scala
+++ b/test/files/run/macro-abort-fresh/Test_2.scala
@@ -1,6 +1,8 @@
object Test extends App {
- import scala.reflect.mirror._
+ import scala.reflect.runtime.universe._
+ import scala.reflect.runtime.{currentMirror => cm}
+ import scala.tools.reflect.ToolBox
val tree = Select(Ident("Macros"), newTermName("foo"))
- try Expr(tree).eval
+ try cm.mkToolBox().runExpr(tree)
catch { case ex: Throwable => println(ex.getMessage) }
} \ No newline at end of file
diff --git a/test/files/run/macro-basic-ma-md-mi/Impls_1.scala b/test/files/run/macro-basic-ma-md-mi/Impls_1.scala
index 3f23e349d5..039488ba3e 100644
--- a/test/files/run/macro-basic-ma-md-mi/Impls_1.scala
+++ b/test/files/run/macro-basic-ma-md-mi/Impls_1.scala
@@ -2,20 +2,20 @@ import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo(c: Ctx)(x: c.Expr[Int]): c.Expr[Int] = {
- import c.mirror._
+ import c.universe._
val body = Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(1))))
- Expr[Int](body)
+ c.Expr[Int](body)
}
def bar(c: Ctx)(x: c.Expr[Int]): c.Expr[Int] = {
- import c.mirror._
+ import c.universe._
val body = Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(2))))
- Expr[Int](body)
+ c.Expr[Int](body)
}
def quux(c: Ctx)(x: c.Expr[Int]): c.Expr[Int] = {
- import c.mirror._
+ import c.universe._
val body = Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(3))))
- Expr[Int](body)
+ c.Expr[Int](body)
}
-}
+} \ No newline at end of file
diff --git a/test/files/run/macro-basic-ma-mdmi/Impls_Macros_1.scala b/test/files/run/macro-basic-ma-mdmi/Impls_Macros_1.scala
index 44bfe861e3..6e1e37a485 100644
--- a/test/files/run/macro-basic-ma-mdmi/Impls_Macros_1.scala
+++ b/test/files/run/macro-basic-ma-mdmi/Impls_Macros_1.scala
@@ -2,21 +2,21 @@ import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo(c: Ctx)(x: c.Expr[Int]): c.Expr[Int] = {
- import c.mirror._
+ import c.universe._
val body = Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(1))))
- Expr[Int](body)
+ c.Expr[Int](body)
}
def bar(c: Ctx)(x: c.Expr[Int]): c.Expr[Int] = {
- import c.mirror._
+ import c.universe._
val body = Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(2))))
- Expr[Int](body)
+ c.Expr[Int](body)
}
def quux(c: Ctx)(x: c.Expr[Int]): c.Expr[Int] = {
- import c.mirror._
+ import c.universe._
val body = Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(3))))
- Expr[Int](body)
+ c.Expr[Int](body)
}
}
diff --git a/test/files/run/macro-basic-mamd-mi/Impls_1.scala b/test/files/run/macro-basic-mamd-mi/Impls_1.scala
index 82d2cce2f5..96d26741f7 100644
--- a/test/files/run/macro-basic-mamd-mi/Impls_1.scala
+++ b/test/files/run/macro-basic-mamd-mi/Impls_1.scala
@@ -2,18 +2,18 @@ import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo(c: Ctx)(x: c.Expr[Int]): c.Expr[Int] = {
- import c.mirror._
- Expr(Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(1)))))
+ import c.universe._
+ c.Expr(Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(1)))))
}
def bar(c: Ctx)(x: c.Expr[Int]): c.Expr[Int] = {
- import c.mirror._
- Expr(Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(2)))))
+ import c.universe._
+ c.Expr(Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(2)))))
}
def quux(c: Ctx)(x: c.Expr[Int]): c.Expr[Int] = {
- import c.mirror._
+ import c.universe._
val body = Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(3))))
- Expr[Int](body)
+ c.Expr[Int](body)
}
-}
+} \ No newline at end of file
diff --git a/test/files/run/macro-bodyexpandstoimpl/Impls_1.scala b/test/files/run/macro-bodyexpandstoimpl/Impls_1.scala
index 5c5ec2c999..7de1e59cc7 100644
--- a/test/files/run/macro-bodyexpandstoimpl/Impls_1.scala
+++ b/test/files/run/macro-bodyexpandstoimpl/Impls_1.scala
@@ -5,8 +5,8 @@ object Impls {
def refToFoo(dummy: Int) = macro refToFoo_impl
def refToFoo_impl(c: Ctx)(dummy: c.Expr[Int]) = {
- import c.mirror._
+ import c.universe._
val body = Select(Ident(newTermName("Impls")), newTermName("foo"))
- Expr[Int](body)
+ c.Expr[Int](body)
}
} \ No newline at end of file
diff --git a/test/files/run/macro-declared-in-annotation/Impls_1.scala b/test/files/run/macro-declared-in-annotation/Impls_1.scala
index a1234a7374..2b309e1cc8 100644
--- a/test/files/run/macro-declared-in-annotation/Impls_1.scala
+++ b/test/files/run/macro-declared-in-annotation/Impls_1.scala
@@ -3,9 +3,9 @@ import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo(c: Ctx) = {
import c.{prefix => prefix}
- import c.mirror._
+ import c.universe._
val printPrefix = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("prefix = " + prefix))))
val body = Block(List(printPrefix), Literal(Constant("this is deprecated")))
- Expr[String](body)
+ c.Expr[String](body)
}
-}
+} \ No newline at end of file
diff --git a/test/files/run/macro-declared-in-anonymous/Impls_1.scala b/test/files/run/macro-declared-in-anonymous/Impls_1.scala
index c0827ace31..d95dbd42c6 100644
--- a/test/files/run/macro-declared-in-anonymous/Impls_1.scala
+++ b/test/files/run/macro-declared-in-anonymous/Impls_1.scala
@@ -3,9 +3,9 @@ import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo(c: Ctx) = {
import c.{prefix => prefix}
- import c.mirror._
+ import c.universe._
val printPrefix = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("prefix = " + prefix))))
val body = Block(List(printPrefix), Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("it works")))))
- Expr[Unit](body)
+ c.Expr[Unit](body)
}
-}
+} \ No newline at end of file
diff --git a/test/files/run/macro-declared-in-block/Impls_1.scala b/test/files/run/macro-declared-in-block/Impls_1.scala
index c0827ace31..d95dbd42c6 100644
--- a/test/files/run/macro-declared-in-block/Impls_1.scala
+++ b/test/files/run/macro-declared-in-block/Impls_1.scala
@@ -3,9 +3,9 @@ import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo(c: Ctx) = {
import c.{prefix => prefix}
- import c.mirror._
+ import c.universe._
val printPrefix = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("prefix = " + prefix))))
val body = Block(List(printPrefix), Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("it works")))))
- Expr[Unit](body)
+ c.Expr[Unit](body)
}
-}
+} \ No newline at end of file
diff --git a/test/files/run/macro-declared-in-class-class/Impls_1.scala b/test/files/run/macro-declared-in-class-class/Impls_1.scala
index c2e6933582..5c61086a40 100644
--- a/test/files/run/macro-declared-in-class-class/Impls_1.scala
+++ b/test/files/run/macro-declared-in-class-class/Impls_1.scala
@@ -3,9 +3,9 @@ import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo(c: Ctx) = {
import c.{prefix => prefix}
- import c.mirror._
+ import c.universe._
val printPrefix = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("prefix = " + prefix))))
val body = Block(printPrefix, Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("it works")))))
- Expr[Unit](body)
+ c.Expr[Unit](body)
}
-}
+} \ No newline at end of file
diff --git a/test/files/run/macro-declared-in-class-object/Impls_1.scala b/test/files/run/macro-declared-in-class-object/Impls_1.scala
index c2e6933582..5c61086a40 100644
--- a/test/files/run/macro-declared-in-class-object/Impls_1.scala
+++ b/test/files/run/macro-declared-in-class-object/Impls_1.scala
@@ -3,9 +3,9 @@ import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo(c: Ctx) = {
import c.{prefix => prefix}
- import c.mirror._
+ import c.universe._
val printPrefix = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("prefix = " + prefix))))
val body = Block(printPrefix, Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("it works")))))
- Expr[Unit](body)
+ c.Expr[Unit](body)
}
-}
+} \ No newline at end of file
diff --git a/test/files/run/macro-declared-in-class/Impls_1.scala b/test/files/run/macro-declared-in-class/Impls_1.scala
index c2e6933582..5c61086a40 100644
--- a/test/files/run/macro-declared-in-class/Impls_1.scala
+++ b/test/files/run/macro-declared-in-class/Impls_1.scala
@@ -3,9 +3,9 @@ import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo(c: Ctx) = {
import c.{prefix => prefix}
- import c.mirror._
+ import c.universe._
val printPrefix = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("prefix = " + prefix))))
val body = Block(printPrefix, Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("it works")))))
- Expr[Unit](body)
+ c.Expr[Unit](body)
}
-}
+} \ No newline at end of file
diff --git a/test/files/run/macro-declared-in-default-param/Impls_1.scala b/test/files/run/macro-declared-in-default-param/Impls_1.scala
index e45095812a..5e7351e954 100644
--- a/test/files/run/macro-declared-in-default-param/Impls_1.scala
+++ b/test/files/run/macro-declared-in-default-param/Impls_1.scala
@@ -3,9 +3,9 @@ import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo(c: Ctx) = {
import c.{prefix => prefix}
- import c.mirror._
+ import c.universe._
val printPrefix = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("prefix = " + prefix))))
val body = Block(List(printPrefix), Literal(Constant("it works")))
- Expr[String](body)
+ c.Expr[String](body)
}
-}
+} \ No newline at end of file
diff --git a/test/files/run/macro-declared-in-implicit-class/Impls_Macros_1.scala b/test/files/run/macro-declared-in-implicit-class/Impls_Macros_1.scala
index 8605d4a8be..e5fb4bcdf3 100644
--- a/test/files/run/macro-declared-in-implicit-class/Impls_Macros_1.scala
+++ b/test/files/run/macro-declared-in-implicit-class/Impls_Macros_1.scala
@@ -3,10 +3,10 @@ import scala.reflect.makro.{Context => Ctx}
object Impls {
def toOptionOfInt(c: Ctx) = {
import c.{prefix => prefix}
- import c.mirror._
+ import c.universe._
val printPrefix = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("prefix = " + prefix))))
val body = Block(printPrefix, Apply(Ident(definitions.SomeModule), List(Select(Select(prefix.tree, newTermName("x")), newTermName("toInt")))))
- Expr[Option[Int]](body)
+ c.Expr[Option[Int]](body)
}
}
@@ -16,4 +16,4 @@ object Macros {
class Foo(val x: String) {
def toOptionOfInt = macro Impls.toOptionOfInt
}
-}
+} \ No newline at end of file
diff --git a/test/files/run/macro-declared-in-method/Impls_1.scala b/test/files/run/macro-declared-in-method/Impls_1.scala
index c2e6933582..5c61086a40 100644
--- a/test/files/run/macro-declared-in-method/Impls_1.scala
+++ b/test/files/run/macro-declared-in-method/Impls_1.scala
@@ -3,9 +3,9 @@ import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo(c: Ctx) = {
import c.{prefix => prefix}
- import c.mirror._
+ import c.universe._
val printPrefix = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("prefix = " + prefix))))
val body = Block(printPrefix, Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("it works")))))
- Expr[Unit](body)
+ c.Expr[Unit](body)
}
-}
+} \ No newline at end of file
diff --git a/test/files/run/macro-declared-in-object-class/Impls_1.scala b/test/files/run/macro-declared-in-object-class/Impls_1.scala
index c2e6933582..5c61086a40 100644
--- a/test/files/run/macro-declared-in-object-class/Impls_1.scala
+++ b/test/files/run/macro-declared-in-object-class/Impls_1.scala
@@ -3,9 +3,9 @@ import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo(c: Ctx) = {
import c.{prefix => prefix}
- import c.mirror._
+ import c.universe._
val printPrefix = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("prefix = " + prefix))))
val body = Block(printPrefix, Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("it works")))))
- Expr[Unit](body)
+ c.Expr[Unit](body)
}
-}
+} \ No newline at end of file
diff --git a/test/files/run/macro-declared-in-object-object/Impls_1.scala b/test/files/run/macro-declared-in-object-object/Impls_1.scala
index c2e6933582..5c61086a40 100644
--- a/test/files/run/macro-declared-in-object-object/Impls_1.scala
+++ b/test/files/run/macro-declared-in-object-object/Impls_1.scala
@@ -3,9 +3,9 @@ import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo(c: Ctx) = {
import c.{prefix => prefix}
- import c.mirror._
+ import c.universe._
val printPrefix = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("prefix = " + prefix))))
val body = Block(printPrefix, Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("it works")))))
- Expr[Unit](body)
+ c.Expr[Unit](body)
}
-}
+} \ No newline at end of file
diff --git a/test/files/run/macro-declared-in-object/Impls_1.scala b/test/files/run/macro-declared-in-object/Impls_1.scala
index c2e6933582..5c61086a40 100644
--- a/test/files/run/macro-declared-in-object/Impls_1.scala
+++ b/test/files/run/macro-declared-in-object/Impls_1.scala
@@ -3,9 +3,9 @@ import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo(c: Ctx) = {
import c.{prefix => prefix}
- import c.mirror._
+ import c.universe._
val printPrefix = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("prefix = " + prefix))))
val body = Block(printPrefix, Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("it works")))))
- Expr[Unit](body)
+ c.Expr[Unit](body)
}
-}
+} \ No newline at end of file
diff --git a/test/files/run/macro-declared-in-package-object/Impls_1.scala b/test/files/run/macro-declared-in-package-object/Impls_1.scala
index c2e6933582..5c61086a40 100644
--- a/test/files/run/macro-declared-in-package-object/Impls_1.scala
+++ b/test/files/run/macro-declared-in-package-object/Impls_1.scala
@@ -3,9 +3,9 @@ import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo(c: Ctx) = {
import c.{prefix => prefix}
- import c.mirror._
+ import c.universe._
val printPrefix = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("prefix = " + prefix))))
val body = Block(printPrefix, Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("it works")))))
- Expr[Unit](body)
+ c.Expr[Unit](body)
}
-}
+} \ No newline at end of file
diff --git a/test/files/run/macro-declared-in-refinement/Impls_1.scala b/test/files/run/macro-declared-in-refinement/Impls_1.scala
index c2e6933582..5c61086a40 100644
--- a/test/files/run/macro-declared-in-refinement/Impls_1.scala
+++ b/test/files/run/macro-declared-in-refinement/Impls_1.scala
@@ -3,9 +3,9 @@ import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo(c: Ctx) = {
import c.{prefix => prefix}
- import c.mirror._
+ import c.universe._
val printPrefix = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("prefix = " + prefix))))
val body = Block(printPrefix, Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("it works")))))
- Expr[Unit](body)
+ c.Expr[Unit](body)
}
-}
+} \ No newline at end of file
diff --git a/test/files/run/macro-declared-in-trait/Impls_1.scala b/test/files/run/macro-declared-in-trait/Impls_1.scala
index c2e6933582..5c61086a40 100644
--- a/test/files/run/macro-declared-in-trait/Impls_1.scala
+++ b/test/files/run/macro-declared-in-trait/Impls_1.scala
@@ -3,9 +3,9 @@ import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo(c: Ctx) = {
import c.{prefix => prefix}
- import c.mirror._
+ import c.universe._
val printPrefix = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("prefix = " + prefix))))
val body = Block(printPrefix, Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("it works")))))
- Expr[Unit](body)
+ c.Expr[Unit](body)
}
-}
+} \ No newline at end of file
diff --git a/test/files/run/macro-def-infer-return-type-b/Test_2.scala b/test/files/run/macro-def-infer-return-type-b/Test_2.scala
index f8f15b4224..0f84859545 100644
--- a/test/files/run/macro-def-infer-return-type-b/Test_2.scala
+++ b/test/files/run/macro-def-infer-return-type-b/Test_2.scala
@@ -1,6 +1,8 @@
object Test extends App {
- import scala.reflect.mirror._
+ import scala.reflect.runtime.universe._
+ import scala.reflect.runtime.{currentMirror => cm}
+ import scala.tools.reflect.ToolBox
val tree = Apply(Select(Ident("Macros"), newTermName("foo")), List(Literal(Constant(42))))
- try Expr(tree).eval
+ try cm.mkToolBox().runExpr(tree)
catch { case ex: Throwable => println(ex.getMessage) }
-} \ No newline at end of file
+}
diff --git a/test/files/run/macro-def-path-dependent-d/Impls_Macros_1.scala b/test/files/run/macro-def-path-dependent-d/Impls_Macros_1.scala
index 32f03e778e..aca7f999d5 100644
--- a/test/files/run/macro-def-path-dependent-d/Impls_Macros_1.scala
+++ b/test/files/run/macro-def-path-dependent-d/Impls_Macros_1.scala
@@ -1,3 +1,4 @@
+import scala.reflect.runtime.universe._
import scala.reflect.makro.Context
import scala.reflect.api.Universe
@@ -5,4 +6,4 @@ object Test {
def materializeTypeTag[T](u: Universe)(e: T) = macro materializeTypeTag_impl[T]
def materializeTypeTag_impl[T: c.TypeTag](c: Context)(u: c.Expr[Universe])(e: c.Expr[T]): c.Expr[u.value.TypeTag[T]] = ???
-}
+} \ No newline at end of file
diff --git a/test/files/run/macro-expand-implicit-macro-has-implicit/Impls_1.scala b/test/files/run/macro-expand-implicit-macro-has-implicit/Impls_1.scala
index 39db275e1c..b59555539c 100644
--- a/test/files/run/macro-expand-implicit-macro-has-implicit/Impls_1.scala
+++ b/test/files/run/macro-expand-implicit-macro-has-implicit/Impls_1.scala
@@ -2,8 +2,8 @@ import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo(c: Ctx)(x: c.Expr[Int]) = {
- import c.mirror._
+ import c.universe._
val body = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(x.tree))
- Expr[Unit](body)
+ c.Expr[Unit](body)
}
-}
+} \ No newline at end of file
diff --git a/test/files/run/macro-expand-implicit-macro-is-implicit/Impls_1.scala b/test/files/run/macro-expand-implicit-macro-is-implicit/Impls_1.scala
index 0262485994..68ead9b9a5 100644
--- a/test/files/run/macro-expand-implicit-macro-is-implicit/Impls_1.scala
+++ b/test/files/run/macro-expand-implicit-macro-is-implicit/Impls_1.scala
@@ -2,8 +2,8 @@ import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo(c: Ctx)(x: c.Expr[String]): c.Expr[Option[Int]] = {
- import c.mirror._
+ import c.universe._
val body = Apply(Ident(definitions.SomeModule), List(Select(x.tree, newTermName("toInt"))))
- Expr[Option[Int]](body)
+ c.Expr[Option[Int]](body)
}
-}
+} \ No newline at end of file
diff --git a/test/files/run/macro-expand-implicit-macro-is-val/Impls_1.scala b/test/files/run/macro-expand-implicit-macro-is-val/Impls_1.scala
index 510d8502f6..a1dd5aa801 100644
--- a/test/files/run/macro-expand-implicit-macro-is-val/Impls_1.scala
+++ b/test/files/run/macro-expand-implicit-macro-is-val/Impls_1.scala
@@ -2,8 +2,8 @@ import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo(c: Ctx) = {
- import c.mirror._
+ import c.universe._
val body = Literal(Constant(2))
- Expr[Int](body)
+ c.Expr[Int](body)
}
-}
+} \ No newline at end of file
diff --git a/test/files/run/macro-expand-implicit-macro-is-view/Impls_1.scala b/test/files/run/macro-expand-implicit-macro-is-view/Impls_1.scala
index 0262485994..68ead9b9a5 100644
--- a/test/files/run/macro-expand-implicit-macro-is-view/Impls_1.scala
+++ b/test/files/run/macro-expand-implicit-macro-is-view/Impls_1.scala
@@ -2,8 +2,8 @@ import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo(c: Ctx)(x: c.Expr[String]): c.Expr[Option[Int]] = {
- import c.mirror._
+ import c.universe._
val body = Apply(Ident(definitions.SomeModule), List(Select(x.tree, newTermName("toInt"))))
- Expr[Option[Int]](body)
+ c.Expr[Option[Int]](body)
}
-}
+} \ No newline at end of file
diff --git a/test/files/run/macro-expand-multiple-arglists/Impls_1.scala b/test/files/run/macro-expand-multiple-arglists/Impls_1.scala
index ae1c50eace..2c1748bc29 100644
--- a/test/files/run/macro-expand-multiple-arglists/Impls_1.scala
+++ b/test/files/run/macro-expand-multiple-arglists/Impls_1.scala
@@ -2,9 +2,9 @@ import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo(c: Ctx)(x: c.Expr[Int])(y: c.Expr[Int]) = {
- import c.mirror._
+ import c.universe._
val sum = Apply(Select(x.tree, newTermName("$minus")), List(y.tree))
val body = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(sum))
- Expr[Unit](body)
+ c.Expr[Unit](body)
}
-}
+} \ No newline at end of file
diff --git a/test/files/run/macro-expand-nullary-generic.check b/test/files/run/macro-expand-nullary-generic.check
index 6dfe04af12..0895c30c3f 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 ConcreteTypeTag[Int]
-it works ConcreteTypeTag[Int]
-it works ConcreteTypeTag[Int]
-it works ConcreteTypeTag[Int]
-it works ConcreteTypeTag[Int]
+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-nullary-generic/Impls_1.scala b/test/files/run/macro-expand-nullary-generic/Impls_1.scala
index 10352594f5..edbe6d504a 100644
--- a/test/files/run/macro-expand-nullary-generic/Impls_1.scala
+++ b/test/files/run/macro-expand-nullary-generic/Impls_1.scala
@@ -1,14 +1,15 @@
+import scala.reflect.runtime.universe._
import scala.reflect.makro.{Context => Ctx}
object Impls {
def impl[T: c.TypeTag](c: Ctx) = {
- import c.mirror._
+ import c.universe._
val body = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("it works " + implicitly[c.TypeTag[T]]))))
- Expr[Unit](body)
+ c.Expr[Unit](body)
}
def fooNullary[T: c.TypeTag](c: Ctx) = impl[T](c)
def fooEmpty[T: c.TypeTag](c: Ctx)() = impl[T](c)
def barNullary[T: c.TypeTag](c: Ctx)(x: c.Expr[Int]) = impl[T](c)
def barEmpty[T: c.TypeTag](c: Ctx)(x: c.Expr[Int])() = impl[T](c)
-}
+} \ No newline at end of file
diff --git a/test/files/run/macro-expand-nullary-nongeneric/Impls_1.scala b/test/files/run/macro-expand-nullary-nongeneric/Impls_1.scala
index 7dc58abba8..0d849a085d 100644
--- a/test/files/run/macro-expand-nullary-nongeneric/Impls_1.scala
+++ b/test/files/run/macro-expand-nullary-nongeneric/Impls_1.scala
@@ -2,13 +2,13 @@ import scala.reflect.makro.{Context => Ctx}
object Impls {
def impl(c: Ctx) = {
- import c.mirror._
+ import c.universe._
val body = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("it works"))))
- Expr[Unit](body)
+ c.Expr[Unit](body)
}
def fooNullary(c: Ctx) = impl(c)
def fooEmpty(c: Ctx)() = impl(c)
def barNullary(c: Ctx)(x: c.Expr[Int]) = impl(c)
def barEmpty(c: Ctx)(x: c.Expr[Int])() = impl(c)
-}
+} \ No newline at end of file
diff --git a/test/files/run/macro-expand-overload/Impls_1.scala b/test/files/run/macro-expand-overload/Impls_1.scala
index 1dc4adc20e..f4646d43df 100644
--- a/test/files/run/macro-expand-overload/Impls_1.scala
+++ b/test/files/run/macro-expand-overload/Impls_1.scala
@@ -3,13 +3,13 @@ import scala.reflect.makro.{Context => Ctx}
object Impls {
def impl(c: Ctx)(tag: String, x: c.Expr[_]) = {
import c.{prefix => prefix}
- import c.mirror._
+ import c.universe._
val body = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant(tag)), Literal(Constant(prefix.toString)), x.tree))
- Expr[Unit](body)
+ c.Expr[Unit](body)
}
def fooObjectString(c: Ctx)(x: c.Expr[_]) = impl(c)("fooObjectString", x)
def fooObjectInt(c: Ctx)(x: c.Expr[_]) = impl(c)("fooObjectInt", x)
def fooClassString(c: Ctx)(x: c.Expr[_]) = impl(c)("fooClassString", x)
def fooClassInt(c: Ctx)(x: c.Expr[_]) = impl(c)("fooClassInt", x)
-}
+} \ No newline at end of file
diff --git a/test/files/run/macro-expand-override/Impls_1.scala b/test/files/run/macro-expand-override/Impls_1.scala
index 0b127f5a59..d6493caad9 100644
--- a/test/files/run/macro-expand-override/Impls_1.scala
+++ b/test/files/run/macro-expand-override/Impls_1.scala
@@ -3,13 +3,13 @@ import scala.reflect.makro.{Context => Ctx}
object Impls {
def impl(c: Ctx)(tag: String, x: c.Expr[_]) = {
import c.{prefix => prefix}
- import c.mirror._
+ import c.universe._
val body = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant(tag)), Literal(Constant(prefix.toString)), x.tree))
- Expr[Unit](body)
+ c.Expr[Unit](body)
}
def fooBString(c: Ctx)(x: c.Expr[_]) = impl(c)("fooBString", x)
def fooBInt(c: Ctx)(x: c.Expr[_]) = impl(c)("fooBInt", x)
def fooDInt(c: Ctx)(x: c.Expr[_]) = impl(c)("fooDInt", x)
def fooZString(c: Ctx)(x: c.Expr[_]) = impl(c)("fooZString", x)
-}
+} \ No newline at end of file
diff --git a/test/files/run/macro-expand-recursive/Impls_1.scala b/test/files/run/macro-expand-recursive/Impls_1.scala
index 6eff805989..26833ca0b9 100644
--- a/test/files/run/macro-expand-recursive/Impls_1.scala
+++ b/test/files/run/macro-expand-recursive/Impls_1.scala
@@ -2,14 +2,14 @@ import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo(c: Ctx) = {
- import c.mirror._
+ import c.universe._
val body = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("it works"))))
- Expr[Unit](body)
+ c.Expr[Unit](body)
}
def fooFoo(c: Ctx) = {
- import c.mirror._
+ import c.universe._
val body = Select(Ident(newTermName("Macros")), newTermName("foo"))
- Expr[Unit](body)
+ c.Expr[Unit](body)
}
-}
+} \ No newline at end of file
diff --git a/test/files/run/macro-expand-tparams-explicit.check b/test/files/run/macro-expand-tparams-explicit.check
index 5670e27c4e..19e6d39bc8 100644
--- a/test/files/run/macro-expand-tparams-explicit.check
+++ b/test/files/run/macro-expand-tparams-explicit.check
@@ -1 +1 @@
-ConcreteTypeTag[Int]
+TypeTag[Int]
diff --git a/test/files/run/macro-expand-tparams-explicit/Impls_1.scala b/test/files/run/macro-expand-tparams-explicit/Impls_1.scala
index 957d8331fc..d1843275d0 100644
--- a/test/files/run/macro-expand-tparams-explicit/Impls_1.scala
+++ b/test/files/run/macro-expand-tparams-explicit/Impls_1.scala
@@ -1,10 +1,11 @@
+import scala.reflect.runtime.universe._
import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo[U: c.TypeTag](c: Ctx) = {
- import c.mirror._
+ import c.universe._
val U = implicitly[c.TypeTag[U]]
val body = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant(U.toString))))
- Expr[Unit](body)
+ c.Expr[Unit](body)
}
-}
+} \ No newline at end of file
diff --git a/test/files/run/macro-expand-tparams-implicit.check b/test/files/run/macro-expand-tparams-implicit.check
index e57fc1217b..80c6b826ba 100644
--- a/test/files/run/macro-expand-tparams-implicit.check
+++ b/test/files/run/macro-expand-tparams-implicit.check
@@ -1,2 +1,2 @@
-ConcreteTypeTag[Int]
-ConcreteTypeTag[String]
+TypeTag[Int]
+TypeTag[String]
diff --git a/test/files/run/macro-expand-tparams-implicit/Impls_1.scala b/test/files/run/macro-expand-tparams-implicit/Impls_1.scala
index c25d12be60..cbc5460720 100644
--- a/test/files/run/macro-expand-tparams-implicit/Impls_1.scala
+++ b/test/files/run/macro-expand-tparams-implicit/Impls_1.scala
@@ -1,10 +1,11 @@
+import scala.reflect.runtime.universe._
import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo[U: c.TypeTag](c: Ctx)(x: c.Expr[U]) = {
- import c.mirror._
+ import c.universe._
val U = implicitly[c.TypeTag[U]]
val body = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant(U.toString))))
- Expr[Unit](body)
+ c.Expr[Unit](body)
}
-}
+} \ No newline at end of file
diff --git a/test/files/run/macro-expand-tparams-optional/Impls_1.scala b/test/files/run/macro-expand-tparams-optional/Impls_1.scala
index 37efb009c4..97363edd9a 100644
--- a/test/files/run/macro-expand-tparams-optional/Impls_1.scala
+++ b/test/files/run/macro-expand-tparams-optional/Impls_1.scala
@@ -2,8 +2,8 @@ import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo[U](c: Ctx) = {
- import c.mirror._
+ import c.universe._
val body = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("don't know U"))))
- Expr[Unit](body)
+ c.Expr[Unit](body)
}
-}
+} \ No newline at end of file
diff --git a/test/files/run/macro-expand-tparams-prefix-a.check b/test/files/run/macro-expand-tparams-prefix-a.check
index 922be1a6dd..6c23b47d64 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 @@
-ConcreteTypeTag[Int]
-ConcreteTypeTag[Int]
-ConcreteTypeTag[String]
-ConcreteTypeTag[Boolean]
+TypeTag[Int]
+TypeTag[Int]
+TypeTag[String]
+TypeTag[Boolean]
diff --git a/test/files/run/macro-expand-tparams-prefix-a/Impls_1.scala b/test/files/run/macro-expand-tparams-prefix-a/Impls_1.scala
index c25d12be60..cbc5460720 100644
--- a/test/files/run/macro-expand-tparams-prefix-a/Impls_1.scala
+++ b/test/files/run/macro-expand-tparams-prefix-a/Impls_1.scala
@@ -1,10 +1,11 @@
+import scala.reflect.runtime.universe._
import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo[U: c.TypeTag](c: Ctx)(x: c.Expr[U]) = {
- import c.mirror._
+ import c.universe._
val U = implicitly[c.TypeTag[U]]
val body = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant(U.toString))))
- Expr[Unit](body)
+ c.Expr[Unit](body)
}
-}
+} \ No newline at end of file
diff --git a/test/files/run/macro-expand-tparams-prefix-b.check b/test/files/run/macro-expand-tparams-prefix-b.check
index a336bb51ec..67dabff11e 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 @@
-ConcreteTypeTag[Boolean] ConcreteTypeTag[Int]
-ConcreteTypeTag[Boolean] ConcreteTypeTag[String]
+TypeTag[Boolean] TypeTag[Int]
+TypeTag[Boolean] TypeTag[String]
diff --git a/test/files/run/macro-expand-tparams-prefix-b/Impls_1.scala b/test/files/run/macro-expand-tparams-prefix-b/Impls_1.scala
index 8af3ecc9ae..3d29fa467d 100644
--- a/test/files/run/macro-expand-tparams-prefix-b/Impls_1.scala
+++ b/test/files/run/macro-expand-tparams-prefix-b/Impls_1.scala
@@ -1,11 +1,12 @@
+import scala.reflect.runtime.universe._
import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo[T: c.TypeTag, U: c.TypeTag](c: Ctx)(x: c.Expr[U]) = {
- import c.mirror._
+ import c.universe._
val T = implicitly[c.TypeTag[T]]
val U = implicitly[c.TypeTag[U]]
val body = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant(T.toString + " " + U.toString))))
- Expr[Unit](body)
+ c.Expr[Unit](body)
}
-}
+} \ No newline at end of file
diff --git a/test/files/run/macro-expand-tparams-prefix-c1.check b/test/files/run/macro-expand-tparams-prefix-c1.check
index 87f295aa49..8d1c4e3416 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 @@
-ConcreteTypeTag[Int]
-ConcreteTypeTag[String]
-ConcreteTypeTag[Boolean]
+TypeTag[Int]
+TypeTag[String]
+TypeTag[Boolean]
diff --git a/test/files/run/macro-expand-tparams-prefix-c1/Impls_1.scala b/test/files/run/macro-expand-tparams-prefix-c1/Impls_1.scala
index 4da5a9b823..a834d809da 100644
--- a/test/files/run/macro-expand-tparams-prefix-c1/Impls_1.scala
+++ b/test/files/run/macro-expand-tparams-prefix-c1/Impls_1.scala
@@ -1,12 +1,13 @@
+import scala.reflect.runtime.universe._
import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo[T, U: c.TypeTag, V](c: Ctx)(implicit T: c.TypeTag[T], V: c.TypeTag[V]): c.Expr[Unit] = {
- import c.mirror._
- Expr(Block(List(
+ import c.universe._
+ c.Expr(Block(List(
Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant(T.toString)))),
Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant(implicitly[c.TypeTag[U]].toString)))),
Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant(V.toString))))),
Literal(Constant(()))))
}
-}
+} \ No newline at end of file
diff --git a/test/files/run/macro-expand-tparams-prefix-c2.check b/test/files/run/macro-expand-tparams-prefix-c2.check
index 87f295aa49..8d1c4e3416 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 @@
-ConcreteTypeTag[Int]
-ConcreteTypeTag[String]
-ConcreteTypeTag[Boolean]
+TypeTag[Int]
+TypeTag[String]
+TypeTag[Boolean]
diff --git a/test/files/run/macro-expand-tparams-prefix-c2/Impls_Macros_1.scala b/test/files/run/macro-expand-tparams-prefix-c2/Impls_Macros_1.scala
index 4d137a4aef..e0de1f3f83 100644
--- a/test/files/run/macro-expand-tparams-prefix-c2/Impls_Macros_1.scala
+++ b/test/files/run/macro-expand-tparams-prefix-c2/Impls_Macros_1.scala
@@ -1,9 +1,10 @@
+import scala.reflect.runtime.universe._
import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo[T, U: c.TypeTag, V](c: Ctx)(implicit T: c.TypeTag[T], V: c.TypeTag[V]): c.Expr[Unit] = {
- import c.mirror._
- Expr(Block(List(
+ import c.universe._
+ c.Expr(Block(List(
Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant(T.toString)))),
Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant(implicitly[c.TypeTag[U]].toString)))),
Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant(V.toString))))),
@@ -15,4 +16,4 @@ class D[T] {
class C[U] {
def foo[V] = macro Impls.foo[T, U, V]
}
-}
+} \ No newline at end of file
diff --git a/test/files/run/macro-expand-tparams-prefix-d1.check b/test/files/run/macro-expand-tparams-prefix-d1.check
index ca7a220475..319edfbed0 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 @@
-TypeTag[T]
-TypeTag[U]
-ConcreteTypeTag[Boolean]
+AbsTypeTag[T]
+AbsTypeTag[U]
+TypeTag[Boolean]
diff --git a/test/files/run/macro-expand-tparams-prefix-d1/Impls_1.scala b/test/files/run/macro-expand-tparams-prefix-d1/Impls_1.scala
index 4da5a9b823..f497e5f7a9 100644
--- a/test/files/run/macro-expand-tparams-prefix-d1/Impls_1.scala
+++ b/test/files/run/macro-expand-tparams-prefix-d1/Impls_1.scala
@@ -1,12 +1,13 @@
+import scala.reflect.runtime.universe._
import scala.reflect.makro.{Context => Ctx}
object Impls {
- def foo[T, U: c.TypeTag, V](c: Ctx)(implicit T: c.TypeTag[T], V: c.TypeTag[V]): c.Expr[Unit] = {
- import c.mirror._
- Expr(Block(List(
+ def foo[T, U: c.AbsTypeTag, V](c: Ctx)(implicit T: c.AbsTypeTag[T], V: c.AbsTypeTag[V]): c.Expr[Unit] = {
+ import c.universe._
+ c.Expr(Block(List(
Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant(T.toString)))),
- Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant(implicitly[c.TypeTag[U]].toString)))),
+ Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant(implicitly[c.AbsTypeTag[U]].toString)))),
Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant(V.toString))))),
Literal(Constant(()))))
}
-}
+} \ No newline at end of file
diff --git a/test/files/run/macro-expand-varargs-explicit-over-nonvarargs-bad/Impls_1.scala b/test/files/run/macro-expand-varargs-explicit-over-nonvarargs-bad/Impls_1.scala
index d97f0af786..b83fa046e5 100644
--- a/test/files/run/macro-expand-varargs-explicit-over-nonvarargs-bad/Impls_1.scala
+++ b/test/files/run/macro-expand-varargs-explicit-over-nonvarargs-bad/Impls_1.scala
@@ -2,8 +2,8 @@ import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo(c: Ctx)(xs: c.Expr[Int]*) = {
- import c.mirror._
+ import c.universe._
val body = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), xs.map(_.tree).toList)
- Expr[Unit](body)
+ c.Expr[Unit](body)
}
-}
+} \ No newline at end of file
diff --git a/test/files/run/macro-expand-varargs-explicit-over-nonvarargs-bad/Macros_Test_2.scala b/test/files/run/macro-expand-varargs-explicit-over-nonvarargs-bad/Macros_Test_2.scala
index 01fc9d4462..c0319fcd6c 100644
--- a/test/files/run/macro-expand-varargs-explicit-over-nonvarargs-bad/Macros_Test_2.scala
+++ b/test/files/run/macro-expand-varargs-explicit-over-nonvarargs-bad/Macros_Test_2.scala
@@ -3,8 +3,10 @@ object Macros {
}
object Test extends App {
- import scala.reflect.mirror._
+ import scala.reflect.runtime.universe._
+ import scala.reflect.runtime.{currentMirror => cm}
+ import scala.tools.reflect.ToolBox
val tree = Apply(Select(Ident("Macros"), newTermName("foo")), List(Typed(Apply(Ident(definitions.ListModule), List(Literal(Constant(1)), Literal(Constant(2)))), Ident(tpnme.WILDCARD_STAR))))
- try Expr(tree).eval
+ try cm.mkToolBox().runExpr(tree)
catch { case ex: Throwable => println(ex.getMessage) }
} \ No newline at end of file
diff --git a/test/files/run/macro-expand-varargs-explicit-over-nonvarargs-good/Impls_1.scala b/test/files/run/macro-expand-varargs-explicit-over-nonvarargs-good/Impls_1.scala
index f9667d78b8..5f550064e1 100644
--- a/test/files/run/macro-expand-varargs-explicit-over-nonvarargs-good/Impls_1.scala
+++ b/test/files/run/macro-expand-varargs-explicit-over-nonvarargs-good/Impls_1.scala
@@ -2,12 +2,12 @@ import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo(c: Ctx)(xs: c.Expr[Int]*) = {
- import c.mirror._
+ import c.universe._
val stripped_xs = xs map (_.tree) toList match {
case List(Typed(stripped, Ident(wildstar))) if wildstar == tpnme.WILDCARD_STAR => List(stripped)
case _ => ???
}
val body = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), stripped_xs)
- Expr[Unit](body)
+ c.Expr[Unit](body)
}
-}
+} \ No newline at end of file
diff --git a/test/files/run/macro-expand-varargs-explicit-over-varargs/Impls_1.scala b/test/files/run/macro-expand-varargs-explicit-over-varargs/Impls_1.scala
index 8c609daa0e..8c75a7e0ea 100644
--- a/test/files/run/macro-expand-varargs-explicit-over-varargs/Impls_1.scala
+++ b/test/files/run/macro-expand-varargs-explicit-over-varargs/Impls_1.scala
@@ -6,8 +6,8 @@ object Impls {
}
def foo(c: Ctx)(xs: c.Expr[Int]*) = {
- import c.mirror._
+ import c.universe._
val body = Apply(Select(Ident(newTermName("Impls")), newTermName("myprintln")), xs.map(_.tree).toList)
- Expr[Unit](body)
+ c.Expr[Unit](body)
}
-}
+} \ No newline at end of file
diff --git a/test/files/run/macro-expand-varargs-implicit-over-nonvarargs/Impls_1.scala b/test/files/run/macro-expand-varargs-implicit-over-nonvarargs/Impls_1.scala
index d97f0af786..b83fa046e5 100644
--- a/test/files/run/macro-expand-varargs-implicit-over-nonvarargs/Impls_1.scala
+++ b/test/files/run/macro-expand-varargs-implicit-over-nonvarargs/Impls_1.scala
@@ -2,8 +2,8 @@ import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo(c: Ctx)(xs: c.Expr[Int]*) = {
- import c.mirror._
+ import c.universe._
val body = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), xs.map(_.tree).toList)
- Expr[Unit](body)
+ c.Expr[Unit](body)
}
-}
+} \ No newline at end of file
diff --git a/test/files/run/macro-expand-varargs-implicit-over-varargs/Impls_1.scala b/test/files/run/macro-expand-varargs-implicit-over-varargs/Impls_1.scala
index 8c609daa0e..8c75a7e0ea 100644
--- a/test/files/run/macro-expand-varargs-implicit-over-varargs/Impls_1.scala
+++ b/test/files/run/macro-expand-varargs-implicit-over-varargs/Impls_1.scala
@@ -6,8 +6,8 @@ object Impls {
}
def foo(c: Ctx)(xs: c.Expr[Int]*) = {
- import c.mirror._
+ import c.universe._
val body = Apply(Select(Ident(newTermName("Impls")), newTermName("myprintln")), xs.map(_.tree).toList)
- Expr[Unit](body)
+ c.Expr[Unit](body)
}
-}
+} \ No newline at end of file
diff --git a/test/files/run/macro-impl-default-params/Impls_Macros_1.scala b/test/files/run/macro-impl-default-params/Impls_Macros_1.scala
index cece1c09e4..8154ab0341 100644
--- a/test/files/run/macro-impl-default-params/Impls_Macros_1.scala
+++ b/test/files/run/macro-impl-default-params/Impls_Macros_1.scala
@@ -1,20 +1,21 @@
+import scala.reflect.runtime.universe._
import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo_targs[T, U: c.TypeTag](c: Ctx = null)(x: c.Expr[Int] = null) = {
import c.{prefix => prefix}
- import c.mirror._
+ import c.universe._
val U = implicitly[c.TypeTag[U]]
val body = Block(
Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("invoking foo_targs...")))),
- Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("type of prefix is: " + prefix.tpe)))),
+ Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("type of prefix is: " + prefix.staticTpe)))),
Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("type of prefix tree is: " + prefix.tree.tpe)))),
Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("U is: " + U.tpe)))),
Literal(Constant(())))
- Expr[Unit](body)
+ c.Expr[Unit](body)
}
}
class Macros[T] {
def foo_targs[U](x: Int) = macro Impls.foo_targs[T, U]
-}
+} \ No newline at end of file
diff --git a/test/files/run/macro-impl-rename-context/Impls_Macros_1.scala b/test/files/run/macro-impl-rename-context/Impls_Macros_1.scala
index 000e351f4d..367a45a2c3 100644
--- a/test/files/run/macro-impl-rename-context/Impls_Macros_1.scala
+++ b/test/files/run/macro-impl-rename-context/Impls_Macros_1.scala
@@ -2,11 +2,11 @@ import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo(unconventionalName: Ctx)(x: unconventionalName.Expr[Int]) = {
- import unconventionalName.mirror._
+ import unconventionalName.universe._
val body = Block(
Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("invoking foo...")))),
Literal(Constant(())))
- Expr[Unit](body)
+ unconventionalName.Expr[Unit](body)
}
}
diff --git a/test/files/run/macro-invalidret-doesnt-conform-to-def-rettype/Impls_Macros_1.scala b/test/files/run/macro-invalidret-doesnt-conform-to-def-rettype/Impls_Macros_1.scala
index 828ccf34e2..5a7d1a6b9a 100644
--- a/test/files/run/macro-invalidret-doesnt-conform-to-def-rettype/Impls_Macros_1.scala
+++ b/test/files/run/macro-invalidret-doesnt-conform-to-def-rettype/Impls_Macros_1.scala
@@ -2,8 +2,8 @@ import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo(c: Ctx): c.Expr[Int] = {
- import c.mirror._
- Expr(Literal(Constant("42")))
+ import c.universe._
+ c.Expr(Literal(Constant("42")))
}
}
diff --git a/test/files/run/macro-invalidret-doesnt-conform-to-def-rettype/Test_2.scala b/test/files/run/macro-invalidret-doesnt-conform-to-def-rettype/Test_2.scala
index ecf48b9752..c6caa2b585 100644
--- a/test/files/run/macro-invalidret-doesnt-conform-to-def-rettype/Test_2.scala
+++ b/test/files/run/macro-invalidret-doesnt-conform-to-def-rettype/Test_2.scala
@@ -1,6 +1,8 @@
object Test extends App {
- import scala.reflect.mirror._
+ import scala.reflect.runtime.universe._
+ import scala.reflect.runtime.{currentMirror => cm}
+ import scala.tools.reflect.ToolBox
val tree = Select(Ident("Macros"), newTermName("foo"))
- try Expr(tree).eval
+ try cm.mkToolBox().runExpr(tree)
catch { case ex: Throwable => println(ex.getMessage) }
} \ No newline at end of file
diff --git a/test/files/run/macro-invalidret-nontypeable/Impls_Macros_1.scala b/test/files/run/macro-invalidret-nontypeable/Impls_Macros_1.scala
index f3a0476a35..04eef976c5 100644
--- a/test/files/run/macro-invalidret-nontypeable/Impls_Macros_1.scala
+++ b/test/files/run/macro-invalidret-nontypeable/Impls_Macros_1.scala
@@ -2,12 +2,12 @@ import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo(c: Ctx) = {
- import c.mirror._
+ import c.universe._
val body = Ident("IDoNotExist")
- Expr[Int](body)
+ c.Expr[Int](body)
}
}
object Macros {
def foo = macro Impls.foo
-}
+} \ No newline at end of file
diff --git a/test/files/run/macro-invalidret-nontypeable/Test_2.scala b/test/files/run/macro-invalidret-nontypeable/Test_2.scala
index ecf48b9752..c6caa2b585 100644
--- a/test/files/run/macro-invalidret-nontypeable/Test_2.scala
+++ b/test/files/run/macro-invalidret-nontypeable/Test_2.scala
@@ -1,6 +1,8 @@
object Test extends App {
- import scala.reflect.mirror._
+ import scala.reflect.runtime.universe._
+ import scala.reflect.runtime.{currentMirror => cm}
+ import scala.tools.reflect.ToolBox
val tree = Select(Ident("Macros"), newTermName("foo"))
- try Expr(tree).eval
+ try cm.mkToolBox().runExpr(tree)
catch { case ex: Throwable => println(ex.getMessage) }
} \ No newline at end of file
diff --git a/test/files/run/macro-invalidusage-badret/Test_2.scala b/test/files/run/macro-invalidusage-badret/Test_2.scala
index aeb3c26eaa..8322e8a4e0 100644
--- a/test/files/run/macro-invalidusage-badret/Test_2.scala
+++ b/test/files/run/macro-invalidusage-badret/Test_2.scala
@@ -1,6 +1,8 @@
object Test extends App {
- import scala.reflect.mirror._
+ import scala.reflect.runtime.universe._
+ import scala.reflect.runtime.{currentMirror => cm}
+ import scala.tools.reflect.ToolBox
val tree = Typed(Apply(Select(Ident("Macros"), newTermName("foo")), List(Literal(Constant(42)))), Ident(newTypeName("String")))
- try Expr(tree).eval
+ try cm.mkToolBox().runExpr(tree)
catch { case ex: Throwable => println(ex.getMessage) }
-} \ No newline at end of file
+}
diff --git a/test/files/run/macro-invalidusage-partialapplication-with-tparams.check b/test/files/run/macro-invalidusage-partialapplication-with-tparams.check
new file mode 100644
index 0000000000..73f57b0b81
--- /dev/null
+++ b/test/files/run/macro-invalidusage-partialapplication-with-tparams.check
@@ -0,0 +1,3 @@
+reflective compilation has failed:
+
+macros cannot be partially applied
diff --git a/test/files/run/macro-invalidret-doesnt-conform-to-impl-rettype.flags b/test/files/run/macro-invalidusage-partialapplication-with-tparams.flags
index cd66464f2f..cd66464f2f 100644
--- a/test/files/run/macro-invalidret-doesnt-conform-to-impl-rettype.flags
+++ b/test/files/run/macro-invalidusage-partialapplication-with-tparams.flags
diff --git a/test/files/run/macro-invalidusage-partialapplication-with-tparams/Impls_Macros_1.scala b/test/files/run/macro-invalidusage-partialapplication-with-tparams/Impls_Macros_1.scala
new file mode 100644
index 0000000000..67a19a6d62
--- /dev/null
+++ b/test/files/run/macro-invalidusage-partialapplication-with-tparams/Impls_Macros_1.scala
@@ -0,0 +1,13 @@
+import scala.reflect.makro.{Context => Ctx}
+
+object Impls {
+ def foo[T: c.TypeTag](c: Ctx)(x: c.Expr[T]) = {
+ import c.universe._
+ val body = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant(x.tree.toString))))
+ c.Expr[Unit](body)
+ }
+}
+
+object Macros {
+ def foo[T](x: T) = macro Impls.foo[T]
+} \ No newline at end of file
diff --git a/test/files/run/macro-invalidusage-partialapplication-with-tparams/Test_2.scala b/test/files/run/macro-invalidusage-partialapplication-with-tparams/Test_2.scala
new file mode 100644
index 0000000000..f51cc7e699
--- /dev/null
+++ b/test/files/run/macro-invalidusage-partialapplication-with-tparams/Test_2.scala
@@ -0,0 +1,8 @@
+object Test extends App {
+ import scala.reflect.runtime.universe._
+ import scala.reflect.runtime.{currentMirror => cm}
+ import scala.tools.reflect.ToolBox
+ val tree = Select(Ident("Macros"), newTermName("foo"))
+ try cm.mkToolBox().runExpr(tree)
+ catch { case ex: Throwable => println(ex.getMessage) }
+}
diff --git a/test/files/run/macro-invalidusage-partialapplication/Impls_Macros_1.scala b/test/files/run/macro-invalidusage-partialapplication/Impls_Macros_1.scala
index 449b91d074..e5bdca008e 100644
--- a/test/files/run/macro-invalidusage-partialapplication/Impls_Macros_1.scala
+++ b/test/files/run/macro-invalidusage-partialapplication/Impls_Macros_1.scala
@@ -2,10 +2,10 @@ import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo(c: Ctx)(x: c.Expr[Int])(y: c.Expr[Int]) = {
- import c.mirror._
+ import c.universe._
val sum = Apply(Select(x.tree, newTermName("$plus")), List(y.tree))
val body = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(sum))
- Expr[Unit](body)
+ c.Expr[Unit](body)
}
}
diff --git a/test/files/run/macro-invalidusage-partialapplication/Test_2.scala b/test/files/run/macro-invalidusage-partialapplication/Test_2.scala
index 293d906048..64020b2aa9 100644
--- a/test/files/run/macro-invalidusage-partialapplication/Test_2.scala
+++ b/test/files/run/macro-invalidusage-partialapplication/Test_2.scala
@@ -1,6 +1,8 @@
object Test extends App {
- import scala.reflect.mirror._
+ import scala.reflect.runtime.universe._
+ import scala.reflect.runtime.{currentMirror => cm}
+ import scala.tools.reflect.ToolBox
val tree = Apply(Select(Ident("Macros"), newTermName("foo")), List(Literal(Constant(40))))
- try Expr(tree).eval
+ try cm.mkToolBox().runExpr(tree)
catch { case ex: Throwable => println(ex.getMessage) }
}
diff --git a/test/files/run/macro-openmacros/Impls_Macros_1.scala b/test/files/run/macro-openmacros/Impls_Macros_1.scala
index 9fd658656e..ffeccce1e8 100644
--- a/test/files/run/macro-openmacros/Impls_Macros_1.scala
+++ b/test/files/run/macro-openmacros/Impls_Macros_1.scala
@@ -5,7 +5,7 @@ object Macros {
// we're macros, so we can reflect against our source path
// so we don't need any partests to clean up after us!
val c.CompilationUnit(file, _, _) = c.enclosingUnit
- val dir = file.getParentFile
+ val dir = file.getCanonicalFile.getParentFile
def normalizePaths(s: String) = {
val base = (dir.getCanonicalPath + java.io.File.separator).replace('\\', '/')
var regex = """\Q%s\E""" format base
@@ -13,12 +13,12 @@ object Macros {
if (isWin) regex = "(?i)" + regex
s.replace('\\', '/').replaceAll(regex, "")
}
-
- import c.mirror._
- val next = if (c.enclosingMacros.length < 3) Expr[Unit](Select(Ident(staticModule("Macros")), newTermName("foo"))) else c.literalUnit
+
+ import c.universe._
+ val next = if (c.enclosingMacros.length < 3) c.Expr[Unit](Select(Ident(c.mirror.staticModule("Macros")), newTermName("foo"))) else c.literalUnit
c.reify {
- println(c.literal(normalizePaths(c.enclosingMacros.toString)).eval)
- next.eval
+ println(c.literal(normalizePaths(c.enclosingMacros.toString)).splice)
+ next.splice
}
}
diff --git a/test/files/run/macro-range/Common_1.scala b/test/files/run/macro-range/Common_1.scala
index bd46e1f529..650257ae16 100644
--- a/test/files/run/macro-range/Common_1.scala
+++ b/test/files/run/macro-range/Common_1.scala
@@ -1,4 +1,3 @@
-import reflect.api.Modifier
import reflect.makro.Context
abstract class RangeDefault {
@@ -12,7 +11,7 @@ abstract class RangeDefault {
/** This class should go into reflect.macro once it is a bit more stable. */
abstract class Utils {
val context: Context
- import context.mirror._
+ import context.universe._
class TreeSubstituter(from: List[Symbol], to: List[Tree]) extends Transformer {
override def transform(tree: Tree): Tree = tree match {
diff --git a/test/files/run/macro-range/Expansion_Impossible_2.scala b/test/files/run/macro-range/Expansion_Impossible_2.scala
index 051afff99c..fecce6bc48 100644
--- a/test/files/run/macro-range/Expansion_Impossible_2.scala
+++ b/test/files/run/macro-range/Expansion_Impossible_2.scala
@@ -1,4 +1,3 @@
-import reflect.api.Modifier
import reflect.makro.Context
object Impls {
@@ -7,14 +6,15 @@ object Impls {
//println("macro-expand, _this = "+ _this)
object utils extends Utils { val context: c.type = c }
import utils._
- import c.mirror._
+ import c.universe._
+ import Flag._
- val initName = newTermName("<init>")
+ val initName = nme.CONSTRUCTOR
// Either:
// scala"{ var i = $low; val h = $hi; while (i < h) { $f(i); i = i + 1 } }
// or:
// scala"($_this: RangeDefault).foreach($f)"
- Expr(c.prefix.tree match {
+ c.Expr(c.prefix.tree match {
case Apply(Select(New(tpt), initName), List(lo, hi)) if tpt.symbol.fullName == "Range" =>
val iname = newTermName("$i")
val hname = newTermName("$h")
@@ -28,7 +28,7 @@ object Impls {
val generated =
Block(
List(
- ValDef(Modifiers(Set(Modifier.mutable)), iname, TypeTree(), lo),
+ ValDef(Modifiers(MUTABLE), iname, TypeTree(), lo),
ValDef(Modifiers(), hname, TypeTree(), hi)),
makeWhile(labelname, cond, body))
// todo. read the compiler config and print if -Ydebug is set
diff --git a/test/files/run/macro-reflective-ma-normal-mdmi/Impls_Macros_1.scala b/test/files/run/macro-reflective-ma-normal-mdmi/Impls_Macros_1.scala
index f6caf89dca..b10f4121a6 100644
--- a/test/files/run/macro-reflective-ma-normal-mdmi/Impls_Macros_1.scala
+++ b/test/files/run/macro-reflective-ma-normal-mdmi/Impls_Macros_1.scala
@@ -2,9 +2,9 @@ import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo(c: Ctx)(x: c.Expr[Int]) = {
- import c.mirror._
+ import c.universe._
val body = Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(1))))
- Expr[Int](body)
+ c.Expr[Int](body)
}
}
diff --git a/test/files/run/macro-reflective-ma-normal-mdmi/Test_2.scala b/test/files/run/macro-reflective-ma-normal-mdmi/Test_2.scala
index 632708a125..67666a632b 100644
--- a/test/files/run/macro-reflective-ma-normal-mdmi/Test_2.scala
+++ b/test/files/run/macro-reflective-ma-normal-mdmi/Test_2.scala
@@ -1,5 +1,7 @@
object Test extends App {
- import scala.reflect.mirror._
+ import scala.reflect.runtime.universe._
+ import scala.reflect.runtime.{currentMirror => cm}
+ import scala.tools.reflect.ToolBox
val tree = Apply(Select(Ident("Macros"), newTermName("foo")), List(Literal(Constant(42))))
- println(Expr(tree).eval)
+ println(cm.mkToolBox().runExpr(tree))
}
diff --git a/test/files/run/macro-reflective-mamd-normal-mi/Impls_1.scala b/test/files/run/macro-reflective-mamd-normal-mi/Impls_1.scala
index dc7d42d23e..dd8fcd4d9e 100644
--- a/test/files/run/macro-reflective-mamd-normal-mi/Impls_1.scala
+++ b/test/files/run/macro-reflective-mamd-normal-mi/Impls_1.scala
@@ -2,8 +2,8 @@ import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo(c: Ctx)(x: c.Expr[Int]) = {
- import c.mirror._
+ import c.universe._
val body = Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(1))))
- Expr[Int](body)
+ c.Expr[Int](body)
}
-}
+} \ No newline at end of file
diff --git a/test/files/run/macro-reflective-mamd-normal-mi/Macros_Test_2.scala b/test/files/run/macro-reflective-mamd-normal-mi/Macros_Test_2.scala
index cf34f1685d..32a8958577 100644
--- a/test/files/run/macro-reflective-mamd-normal-mi/Macros_Test_2.scala
+++ b/test/files/run/macro-reflective-mamd-normal-mi/Macros_Test_2.scala
@@ -3,15 +3,18 @@
//}
object Test extends App {
- import scala.reflect.mirror._
+ import scala.reflect.runtime.universe._
+ import scala.reflect.runtime.universe.Flag._
+ import scala.reflect.runtime.{currentMirror => cm}
+ import scala.tools.reflect.ToolBox
val macrobody = Select(Ident(newTermName("Impls")), newTermName("foo"))
val macroparam = ValDef(NoMods, newTermName("x"), TypeTree(definitions.IntClass.asType), EmptyTree)
- val macrodef = DefDef(Modifiers(Set(scala.reflect.api.Modifier.`macro`)), newTermName("foo"), Nil, List(List(macroparam)), TypeTree(), macrobody)
+ val macrodef = DefDef(Modifiers(MACRO), newTermName("foo"), Nil, List(List(macroparam)), TypeTree(), macrobody)
val modulector = DefDef(NoMods, nme.CONSTRUCTOR, Nil, List(List()), TypeTree(), Block(Apply(Select(Super(This(EmptyTypeName), EmptyTypeName), nme.CONSTRUCTOR), List())))
val module = ModuleDef(NoMods, newTermName("Macros"), Template(Nil, emptyValDef, List(modulector, macrodef)))
val macroapp = Apply(Select(Ident("Macros"), newTermName("foo")), List(Literal(Constant(42))))
val tree = Block(macrodef, module, macroapp)
- val toolbox = mkToolBox(options = "-language:experimental.macros")
+ val toolbox = cm.mkToolBox(options = "-language:experimental.macros")
println(toolbox.runExpr(tree))
}
diff --git a/test/files/run/macro-reify-abstypetag-notypeparams.check b/test/files/run/macro-reify-abstypetag-notypeparams.check
new file mode 100644
index 0000000000..aadd713bef
--- /dev/null
+++ b/test/files/run/macro-reify-abstypetag-notypeparams.check
@@ -0,0 +1,2 @@
+TypeTag[Int]
+TypeTag[List[Int]]
diff --git a/test/files/run/macro-reify-abstypetag-notypeparams/Test.scala b/test/files/run/macro-reify-abstypetag-notypeparams/Test.scala
new file mode 100644
index 0000000000..34f742b9fb
--- /dev/null
+++ b/test/files/run/macro-reify-abstypetag-notypeparams/Test.scala
@@ -0,0 +1,6 @@
+import scala.reflect.runtime.universe._
+
+object Test extends App {
+ println(implicitly[AbsTypeTag[Int]])
+ println(implicitly[AbsTypeTag[List[Int]]])
+} \ No newline at end of file
diff --git a/test/files/run/macro-reify-abstypetag-typeparams-notags.check b/test/files/run/macro-reify-abstypetag-typeparams-notags.check
new file mode 100644
index 0000000000..be62b59a69
--- /dev/null
+++ b/test/files/run/macro-reify-abstypetag-typeparams-notags.check
@@ -0,0 +1,2 @@
+AbsTypeTag[T]
+AbsTypeTag[List[T]]
diff --git a/test/files/run/macro-reify-abstypetag-typeparams-notags/Test.scala b/test/files/run/macro-reify-abstypetag-typeparams-notags/Test.scala
new file mode 100644
index 0000000000..0b42cc07b5
--- /dev/null
+++ b/test/files/run/macro-reify-abstypetag-typeparams-notags/Test.scala
@@ -0,0 +1,9 @@
+import scala.reflect.runtime.universe._
+
+object Test extends App {
+ def fooNoTypeTag[T] = {
+ println(implicitly[AbsTypeTag[T]])
+ println(implicitly[AbsTypeTag[List[T]]])
+ }
+ fooNoTypeTag[Int]
+} \ No newline at end of file
diff --git a/test/files/run/macro-reify-abstypetag-typeparams-tags.check b/test/files/run/macro-reify-abstypetag-typeparams-tags.check
new file mode 100644
index 0000000000..d6ca5a85ef
--- /dev/null
+++ b/test/files/run/macro-reify-abstypetag-typeparams-tags.check
@@ -0,0 +1,2 @@
+TypeTag[Int]
+AbsTypeTag[List[Int]]
diff --git a/test/files/run/macro-reify-abstypetag-typeparams-tags/Test.scala b/test/files/run/macro-reify-abstypetag-typeparams-tags/Test.scala
new file mode 100644
index 0000000000..82a7b7971d
--- /dev/null
+++ b/test/files/run/macro-reify-abstypetag-typeparams-tags/Test.scala
@@ -0,0 +1,9 @@
+import scala.reflect.runtime.universe._
+
+object Test extends App {
+ def fooTypeTag[T: AbsTypeTag] = {
+ println(implicitly[AbsTypeTag[T]])
+ println(implicitly[AbsTypeTag[List[T]]])
+ }
+ fooTypeTag[Int]
+} \ No newline at end of file
diff --git a/test/files/run/macro-reify-abstypetag-usetypetag.check b/test/files/run/macro-reify-abstypetag-usetypetag.check
new file mode 100644
index 0000000000..d6ca5a85ef
--- /dev/null
+++ b/test/files/run/macro-reify-abstypetag-usetypetag.check
@@ -0,0 +1,2 @@
+TypeTag[Int]
+AbsTypeTag[List[Int]]
diff --git a/test/files/run/macro-reify-abstypetag-usetypetag/Test.scala b/test/files/run/macro-reify-abstypetag-usetypetag/Test.scala
new file mode 100644
index 0000000000..3c62725c42
--- /dev/null
+++ b/test/files/run/macro-reify-abstypetag-usetypetag/Test.scala
@@ -0,0 +1,9 @@
+import scala.reflect.runtime.universe._
+
+object Test extends App {
+ def fooTypeTag[T: TypeTag] = {
+ println(implicitly[AbsTypeTag[T]])
+ println(implicitly[AbsTypeTag[List[T]]])
+ }
+ fooTypeTag[Int]
+} \ No newline at end of file
diff --git a/test/files/run/macro-reify-basic/Macros_1.scala b/test/files/run/macro-reify-basic/Macros_1.scala
index b2243d131c..7a43ee58be 100644
--- a/test/files/run/macro-reify-basic/Macros_1.scala
+++ b/test/files/run/macro-reify-basic/Macros_1.scala
@@ -5,7 +5,7 @@ object Macros {
object Impls {
def foo(c: Ctx)(s: c.Expr[String]) = c.reify {
- println("hello " + s.eval)
+ println("hello " + s.splice)
}
}
} \ No newline at end of file
diff --git a/test/files/run/macro-reify-eval-outside-reify/Impls_Macros_1.scala b/test/files/run/macro-reify-eval-outside-reify/Impls_Macros_1.scala
deleted file mode 100644
index 086f9aeef2..0000000000
--- a/test/files/run/macro-reify-eval-outside-reify/Impls_Macros_1.scala
+++ /dev/null
@@ -1,12 +0,0 @@
-import scala.reflect.makro.{Context => Ctx}
-
-object Impls {
- def foo(c: Ctx)(x: c.Expr[Int]) = {
- val x1 = c.Expr[Int](c.resetAllAttrs(x.tree))
- c.literal(x1.eval)
- }
-}
-
-object Macros {
- def foo(x: Int) = macro Impls.foo
-}
diff --git a/test/files/run/macro-reify-eval-outside-reify/Test_2.scala b/test/files/run/macro-reify-eval-outside-reify/Test_2.scala
deleted file mode 100644
index 632708a125..0000000000
--- a/test/files/run/macro-reify-eval-outside-reify/Test_2.scala
+++ /dev/null
@@ -1,5 +0,0 @@
-object Test extends App {
- import scala.reflect.mirror._
- val tree = Apply(Select(Ident("Macros"), newTermName("foo")), List(Literal(Constant(42))))
- println(Expr(tree).eval)
-}
diff --git a/test/files/run/macro-reify-freevars.check b/test/files/run/macro-reify-freevars.check
index 068742f0b6..2e925f9fa8 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:8:9. Have you forgotten to use eval 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-freevars/Macros_1.scala b/test/files/run/macro-reify-freevars/Macros_1.scala
index 3cc559a0af..eafc7f9a82 100644
--- a/test/files/run/macro-reify-freevars/Macros_1.scala
+++ b/test/files/run/macro-reify-freevars/Macros_1.scala
@@ -1,13 +1,14 @@
package scala.collection.slick
+
object QueryableMacros{
def map[T:c.TypeTag, S:c.TypeTag]
(c: scala.reflect.makro.Context)
- (projection: c.mirror.Expr[T => S])
- : c.mirror.Expr[scala.collection.slick.Queryable[S]] = {
- import c.mirror._
+ (projection: c.Expr[T => S])
+ : c.Expr[scala.collection.slick.Queryable[S]] = {
+ import c.universe._
val code = EmptyTree
c.reify{
- Queryable.factory[S]( code.asInstanceOf[reflect.mirror.Tree] )
+ Queryable.factory[S]( code.asInstanceOf[reflect.runtime.universe.Tree] )
}
}
}
@@ -15,5 +16,5 @@ class Queryable[T]{
def map[S]( projection: T => S ) : Queryable[S] = macro QueryableMacros.map[T,S]
}
object Queryable{
- def factory[S]( projection:scala.reflect.mirror.Tree ) : Queryable[S] = null
+ def factory[S]( projection:reflect.runtime.universe.Tree ) : Queryable[S] = null
} \ No newline at end of file
diff --git a/test/files/run/macro-reify-freevars/Test_2.scala b/test/files/run/macro-reify-freevars/Test_2.scala
index e7077f9c7f..603cf10d41 100644
--- a/test/files/run/macro-reify-freevars/Test_2.scala
+++ b/test/files/run/macro-reify-freevars/Test_2.scala
@@ -1,9 +1,11 @@
object Test extends App {
- import scala.reflect.mirror._
+ import scala.reflect.runtime.universe._
+ import scala.reflect.runtime.{currentMirror => cm}
+ import scala.tools.reflect.ToolBox
val q = New(AppliedTypeTree(Select(Select(Select(Ident("scala"), newTermName("collection")), newTermName("slick")), newTypeName("Queryable")), List(Ident("Int"))))
val x = ValDef(NoMods, newTermName("x"), Ident("Int"), EmptyTree)
val fn = Function(List(x), Apply(Select(Ident(newTermName("x")), newTermName("$plus")), List(Literal(Constant("5")))))
val tree = Apply(Select(q, newTermName("map")), List(fn))
- try Expr(tree).eval
+ try cm.mkToolBox().runExpr(tree)
catch { case ex: Throwable => println(ex.getMessage) }
} \ No newline at end of file
diff --git a/test/files/run/macro-reify-groundtypetag-notypeparams.check b/test/files/run/macro-reify-groundtypetag-notypeparams.check
deleted file mode 100644
index d75b3c72b2..0000000000
--- a/test/files/run/macro-reify-groundtypetag-notypeparams.check
+++ /dev/null
@@ -1,2 +0,0 @@
-ConcreteTypeTag[Int]
-ConcreteTypeTag[List[Int]]
diff --git a/test/files/run/macro-reify-groundtypetag-notypeparams/Test.scala b/test/files/run/macro-reify-groundtypetag-notypeparams/Test.scala
deleted file mode 100644
index d2f8fab5ec..0000000000
--- a/test/files/run/macro-reify-groundtypetag-notypeparams/Test.scala
+++ /dev/null
@@ -1,6 +0,0 @@
-import scala.reflect.mirror._
-
-object Test extends App {
- println(implicitly[ConcreteTypeTag[Int]])
- println(implicitly[ConcreteTypeTag[List[Int]]])
-} \ No newline at end of file
diff --git a/test/files/run/macro-reify-groundtypetag-typeparams-tags.check b/test/files/run/macro-reify-groundtypetag-typeparams-tags.check
deleted file mode 100644
index d75b3c72b2..0000000000
--- a/test/files/run/macro-reify-groundtypetag-typeparams-tags.check
+++ /dev/null
@@ -1,2 +0,0 @@
-ConcreteTypeTag[Int]
-ConcreteTypeTag[List[Int]]
diff --git a/test/files/run/macro-reify-groundtypetag-typeparams-tags/Test.scala b/test/files/run/macro-reify-groundtypetag-typeparams-tags/Test.scala
deleted file mode 100644
index 6d7eab5f9a..0000000000
--- a/test/files/run/macro-reify-groundtypetag-typeparams-tags/Test.scala
+++ /dev/null
@@ -1,9 +0,0 @@
-import scala.reflect.mirror._
-
-object Test extends App {
- def fooTypeTag[T: ConcreteTypeTag] = {
- println(implicitly[ConcreteTypeTag[T]])
- println(implicitly[ConcreteTypeTag[List[T]]])
- }
- fooTypeTag[Int]
-} \ No newline at end of file
diff --git a/test/files/run/macro-reify-nested-a/Impls_Macros_1.scala b/test/files/run/macro-reify-nested-a/Impls_Macros_1.scala
index 1ce8f44671..f9a08df90d 100644
--- a/test/files/run/macro-reify-nested-a/Impls_Macros_1.scala
+++ b/test/files/run/macro-reify-nested-a/Impls_Macros_1.scala
@@ -1,17 +1,19 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
import scala.reflect.makro.Context
case class Utils[C <: Context]( c:C ) {
- import c.mirror._
+ import c.universe._
import c.{Tree=>_}
- object removeDoubleReify extends c.mirror.Transformer {
+ object removeDoubleReify extends c.universe.Transformer {
def apply( tree:Tree ) = transform(tree)
override def transform(tree: Tree): Tree = {
super.transform {
tree match {
- case Apply(TypeApply(Select(_this, termname), _), reified::Nil )
- if termname.toString == "factory" => c.unreifyTree(reified)
- case Apply(Select(_this, termname), reified::Nil )
- if termname.toString == "factory" => c.unreifyTree(reified)
+ case Apply(TypeApply(Select(_this, termname), _), reification::Nil )
+ if termname.toString == "factory" => c.unreifyTree(reification)
+ case Apply(Select(_this, termname), reification::Nil )
+ if termname.toString == "factory" => c.unreifyTree(reification)
case _ => tree
}
}
@@ -19,25 +21,25 @@ case class Utils[C <: Context]( c:C ) {
}
}
object QueryableMacros{
- def _helper[C <: Context,S:c.TypeTag]( c:C )( name:String, projection:c.mirror.Expr[_] ) = {
- import c.mirror._
- val element_type = implicitly[c.TypeTag[S]].tpe
- val foo = Expr[reflect.mirror.Expr[Queryable[S]]](
- c.reifyTree( c.reflectMirrorPrefix, c.typeCheck(
+ def _helper[C <: Context,S:c.TypeTag]( c:C )( name:String, projection:c.Expr[_] ) = {
+ import c.universe._
+ val element_type = c.typeOf[S]
+ val foo = c.Expr[ru.Expr[Queryable[S]]](
+ c.reifyTree( c.runtimeUniverse, EmptyTree, c.typeCheck(
Utils[c.type](c).removeDoubleReify(
Apply(Select(c.prefix.tree, newTermName( name )), List( projection.tree ))
).asInstanceOf[Tree]
)))
- c.reify{ Queryable.factory[S]( foo.eval )}
+ c.reify{ Queryable.factory[S]( foo.splice )}
}
def map[T:c.TypeTag, S:c.TypeTag]
(c: scala.reflect.makro.Context)
- (projection: c.mirror.Expr[T => S]): c.mirror.Expr[Queryable[S]] = _helper[c.type,S]( c )( "_map", projection )
+ (projection: c.Expr[T => S]): c.Expr[Queryable[S]] = _helper[c.type,S]( c )( "_map", projection )
}
class Queryable[T]{
def _map[S]( projection: T => S ) : Queryable[S] = ???
def map[S]( projection: T => S ) : Queryable[S] = macro QueryableMacros.map[T,S]
}
object Queryable{
- def factory[S]( projection:scala.reflect.mirror.Expr[Queryable[S]] ) : Queryable[S] = null
+ def factory[S]( projection:ru.Expr[Queryable[S]] ) : Queryable[S] = null
} \ No newline at end of file
diff --git a/test/files/run/macro-reify-nested-b/Impls_Macros_1.scala b/test/files/run/macro-reify-nested-b/Impls_Macros_1.scala
index 1ce8f44671..f9a08df90d 100644
--- a/test/files/run/macro-reify-nested-b/Impls_Macros_1.scala
+++ b/test/files/run/macro-reify-nested-b/Impls_Macros_1.scala
@@ -1,17 +1,19 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
import scala.reflect.makro.Context
case class Utils[C <: Context]( c:C ) {
- import c.mirror._
+ import c.universe._
import c.{Tree=>_}
- object removeDoubleReify extends c.mirror.Transformer {
+ object removeDoubleReify extends c.universe.Transformer {
def apply( tree:Tree ) = transform(tree)
override def transform(tree: Tree): Tree = {
super.transform {
tree match {
- case Apply(TypeApply(Select(_this, termname), _), reified::Nil )
- if termname.toString == "factory" => c.unreifyTree(reified)
- case Apply(Select(_this, termname), reified::Nil )
- if termname.toString == "factory" => c.unreifyTree(reified)
+ case Apply(TypeApply(Select(_this, termname), _), reification::Nil )
+ if termname.toString == "factory" => c.unreifyTree(reification)
+ case Apply(Select(_this, termname), reification::Nil )
+ if termname.toString == "factory" => c.unreifyTree(reification)
case _ => tree
}
}
@@ -19,25 +21,25 @@ case class Utils[C <: Context]( c:C ) {
}
}
object QueryableMacros{
- def _helper[C <: Context,S:c.TypeTag]( c:C )( name:String, projection:c.mirror.Expr[_] ) = {
- import c.mirror._
- val element_type = implicitly[c.TypeTag[S]].tpe
- val foo = Expr[reflect.mirror.Expr[Queryable[S]]](
- c.reifyTree( c.reflectMirrorPrefix, c.typeCheck(
+ def _helper[C <: Context,S:c.TypeTag]( c:C )( name:String, projection:c.Expr[_] ) = {
+ import c.universe._
+ val element_type = c.typeOf[S]
+ val foo = c.Expr[ru.Expr[Queryable[S]]](
+ c.reifyTree( c.runtimeUniverse, EmptyTree, c.typeCheck(
Utils[c.type](c).removeDoubleReify(
Apply(Select(c.prefix.tree, newTermName( name )), List( projection.tree ))
).asInstanceOf[Tree]
)))
- c.reify{ Queryable.factory[S]( foo.eval )}
+ c.reify{ Queryable.factory[S]( foo.splice )}
}
def map[T:c.TypeTag, S:c.TypeTag]
(c: scala.reflect.makro.Context)
- (projection: c.mirror.Expr[T => S]): c.mirror.Expr[Queryable[S]] = _helper[c.type,S]( c )( "_map", projection )
+ (projection: c.Expr[T => S]): c.Expr[Queryable[S]] = _helper[c.type,S]( c )( "_map", projection )
}
class Queryable[T]{
def _map[S]( projection: T => S ) : Queryable[S] = ???
def map[S]( projection: T => S ) : Queryable[S] = macro QueryableMacros.map[T,S]
}
object Queryable{
- def factory[S]( projection:scala.reflect.mirror.Expr[Queryable[S]] ) : Queryable[S] = null
+ def factory[S]( projection:ru.Expr[Queryable[S]] ) : Queryable[S] = null
} \ No newline at end of file
diff --git a/test/files/run/macro-reify-eval-outside-reify.check b/test/files/run/macro-reify-splice-outside-reify.check
index 2f562a182f..2f562a182f 100644
--- a/test/files/run/macro-reify-eval-outside-reify.check
+++ b/test/files/run/macro-reify-splice-outside-reify.check
diff --git a/test/files/run/macro-reify-eval-eval.flags b/test/files/run/macro-reify-splice-outside-reify.flags
index cd66464f2f..cd66464f2f 100644
--- a/test/files/run/macro-reify-eval-eval.flags
+++ b/test/files/run/macro-reify-splice-outside-reify.flags
diff --git a/test/files/run/macro-reify-splice-outside-reify/Impls_Macros_1.scala b/test/files/run/macro-reify-splice-outside-reify/Impls_Macros_1.scala
new file mode 100644
index 0000000000..3ddfe6a737
--- /dev/null
+++ b/test/files/run/macro-reify-splice-outside-reify/Impls_Macros_1.scala
@@ -0,0 +1,24 @@
+import scala.reflect.makro.{Context => Ctx}
+
+object Impls {
+ def foo(c: Ctx)(x: c.Expr[Int]) = {
+ val x1 = c.Expr[Int](c.resetAllAttrs(x.tree))
+// was: c.literal(x1.splice)
+ c.literal(eval(c)(x1))
+ }
+
+ private def eval[T](c: Ctx)(x: c.Expr[T]): T = {
+ import scala.reflect.runtime.{universe => ru}
+ val mirror = ru.runtimeMirror(c.libraryClassLoader)
+ import scala.tools.reflect.ToolBox
+ val toolBox = mirror.mkToolBox()
+ val importer = ru.mkImporter(c.universe).asInstanceOf[ru.Importer { val from: c.universe.type }]
+ val tree = c.resetAllAttrs(x.tree.duplicate)
+ val imported = importer.importTree(tree)
+ toolBox.runExpr(imported).asInstanceOf[T]
+ }
+}
+
+object Macros {
+ def foo(x: Int) = macro Impls.foo
+}
diff --git a/test/files/run/macro-reify-value-outside-reify/Test_2.scala b/test/files/run/macro-reify-splice-outside-reify/Test_2.scala
index 128cad4510..5bca7db668 100644
--- a/test/files/run/macro-reify-value-outside-reify/Test_2.scala
+++ b/test/files/run/macro-reify-splice-outside-reify/Test_2.scala
@@ -1,6 +1,8 @@
object Test extends App {
- import scala.reflect.mirror._
+ import scala.reflect.runtime.universe._
+ import scala.reflect.runtime.{currentMirror => cm}
+ import scala.tools.reflect.ToolBox
val tree = Apply(Select(Ident("Macros"), newTermName("foo")), List(Literal(Constant(42))))
- try println(Expr(tree).eval)
+ try println(cm.mkToolBox().runExpr(tree))
catch { case ex: Throwable => println(ex.getMessage) }
}
diff --git a/test/files/run/macro-reify-eval-eval.check b/test/files/run/macro-reify-splice-splice.check
index f35d3e67b4..f35d3e67b4 100644
--- a/test/files/run/macro-reify-eval-eval.check
+++ b/test/files/run/macro-reify-splice-splice.check
diff --git a/test/files/run/macro-reify-eval-outside-reify.flags b/test/files/run/macro-reify-splice-splice.flags
index cd66464f2f..cd66464f2f 100644
--- a/test/files/run/macro-reify-eval-outside-reify.flags
+++ b/test/files/run/macro-reify-splice-splice.flags
diff --git a/test/files/run/macro-reify-eval-eval/Macros_1.scala b/test/files/run/macro-reify-splice-splice/Macros_1.scala
index 6b8ac94f0e..030a0a217e 100644
--- a/test/files/run/macro-reify-eval-eval/Macros_1.scala
+++ b/test/files/run/macro-reify-splice-splice/Macros_1.scala
@@ -6,7 +6,7 @@ object Macros {
object Impls {
def foo(c: Ctx) = c.reify {
- { c.reify(c.reify("hello world")) }.eval.eval
+ { c.reify(c.reify("hello world")) }.splice.splice
}
}
} \ No newline at end of file
diff --git a/test/files/run/macro-reify-eval-eval/Test_2.scala b/test/files/run/macro-reify-splice-splice/Test_2.scala
index f697da6020..f697da6020 100644
--- a/test/files/run/macro-reify-eval-eval/Test_2.scala
+++ b/test/files/run/macro-reify-splice-splice/Test_2.scala
diff --git a/test/files/run/macro-reify-tagful-a/Macros_1.scala b/test/files/run/macro-reify-tagful-a/Macros_1.scala
index 2ff12091a1..63f117220a 100644
--- a/test/files/run/macro-reify-tagful-a/Macros_1.scala
+++ b/test/files/run/macro-reify-tagful-a/Macros_1.scala
@@ -1,3 +1,4 @@
+import scala.reflect.runtime.universe._
import scala.reflect.makro.{Context => Ctx}
object Macros {
@@ -5,7 +6,7 @@ object Macros {
object Impls {
def foo[T: c.TypeTag](c: Ctx)(s: c.Expr[T]) = c.reify {
- List(s.eval)
+ List(s.splice)
}
}
} \ No newline at end of file
diff --git a/test/files/run/macro-reify-tagless-a/Impls_Macros_1.scala b/test/files/run/macro-reify-tagless-a/Impls_Macros_1.scala
index 45e39d7d1c..3796ae99cb 100644
--- a/test/files/run/macro-reify-tagless-a/Impls_Macros_1.scala
+++ b/test/files/run/macro-reify-tagless-a/Impls_Macros_1.scala
@@ -5,7 +5,7 @@ object Macros {
object Impls {
def foo[T](c: Ctx)(s: c.Expr[T]) = c.reify {
- List[T](s.eval)
+ List[T](s.splice)
}
}
} \ No newline at end of file
diff --git a/test/files/run/macro-reify-tagless-a/Test_2.scala b/test/files/run/macro-reify-tagless-a/Test_2.scala
index 94efbd0c37..7029e59ea1 100644
--- a/test/files/run/macro-reify-tagless-a/Test_2.scala
+++ b/test/files/run/macro-reify-tagless-a/Test_2.scala
@@ -2,11 +2,13 @@ object Test extends App {
//val list: List[String] = Macros.foo("hello world")
//println(list)
- import scala.reflect.mirror._
+ import scala.reflect.runtime.universe._
+ import scala.reflect.runtime.{currentMirror => cm}
+ import scala.tools.reflect.ToolBox
val tpt = AppliedTypeTree(Ident(definitions.ListClass), List(Ident(definitions.StringClass)))
val rhs = Apply(Select(Ident("Macros"), newTermName("foo")), List(Literal(Constant("hello world"))))
val list = ValDef(NoMods, newTermName("list"), tpt, rhs)
val tree = Block(list, Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Ident(list.name))))
- try Expr(tree).eval
+ try cm.mkToolBox().runExpr(tree)
catch { case ex: Throwable => println(ex.getMessage) }
}
diff --git a/test/files/run/macro-reify-typetag-notypeparams.check b/test/files/run/macro-reify-typetag-notypeparams.check
index d75b3c72b2..aadd713bef 100644
--- a/test/files/run/macro-reify-typetag-notypeparams.check
+++ b/test/files/run/macro-reify-typetag-notypeparams.check
@@ -1,2 +1,2 @@
-ConcreteTypeTag[Int]
-ConcreteTypeTag[List[Int]]
+TypeTag[Int]
+TypeTag[List[Int]]
diff --git a/test/files/run/macro-reify-typetag-notypeparams/Test.scala b/test/files/run/macro-reify-typetag-notypeparams/Test.scala
index 041a44273d..be9feac4ca 100644
--- a/test/files/run/macro-reify-typetag-notypeparams/Test.scala
+++ b/test/files/run/macro-reify-typetag-notypeparams/Test.scala
@@ -1,4 +1,4 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
object Test extends App {
println(implicitly[TypeTag[Int]])
diff --git a/test/files/run/macro-reify-typetag-typeparams-notags.check b/test/files/run/macro-reify-typetag-typeparams-notags.check
deleted file mode 100644
index 11d78ece41..0000000000
--- a/test/files/run/macro-reify-typetag-typeparams-notags.check
+++ /dev/null
@@ -1,2 +0,0 @@
-TypeTag[T]
-TypeTag[List[T]]
diff --git a/test/files/run/macro-reify-typetag-typeparams-notags/Test.scala b/test/files/run/macro-reify-typetag-typeparams-notags/Test.scala
deleted file mode 100644
index a89499e7fe..0000000000
--- a/test/files/run/macro-reify-typetag-typeparams-notags/Test.scala
+++ /dev/null
@@ -1,9 +0,0 @@
-import scala.reflect.mirror._
-
-object Test extends App {
- def fooNoTypeTag[T] = {
- println(implicitly[TypeTag[T]])
- println(implicitly[TypeTag[List[T]]])
- }
- fooNoTypeTag[Int]
-} \ No newline at end of file
diff --git a/test/files/run/macro-reify-typetag-typeparams-tags.check b/test/files/run/macro-reify-typetag-typeparams-tags.check
index 458593c449..aadd713bef 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 @@
-ConcreteTypeTag[Int]
-*ConcreteTypeTag[List[Int]]
+TypeTag[Int]
+TypeTag[List[Int]]
diff --git a/test/files/run/macro-reify-typetag-typeparams-tags/Test.scala b/test/files/run/macro-reify-typetag-typeparams-tags/Test.scala
index b32680a4b8..be0ce33e41 100644
--- a/test/files/run/macro-reify-typetag-typeparams-tags/Test.scala
+++ b/test/files/run/macro-reify-typetag-typeparams-tags/Test.scala
@@ -1,4 +1,4 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
object Test extends App {
def fooTypeTag[T: TypeTag] = {
diff --git a/test/files/run/macro-reify-typetag-usegroundtypetag.check b/test/files/run/macro-reify-typetag-usegroundtypetag.check
deleted file mode 100644
index 458593c449..0000000000
--- a/test/files/run/macro-reify-typetag-usegroundtypetag.check
+++ /dev/null
@@ -1,2 +0,0 @@
-ConcreteTypeTag[Int]
-*ConcreteTypeTag[List[Int]]
diff --git a/test/files/run/macro-reify-typetag-usegroundtypetag/Test.scala b/test/files/run/macro-reify-typetag-usegroundtypetag/Test.scala
deleted file mode 100644
index de235f51cc..0000000000
--- a/test/files/run/macro-reify-typetag-usegroundtypetag/Test.scala
+++ /dev/null
@@ -1,9 +0,0 @@
-import scala.reflect.mirror._
-
-object Test extends App {
- def fooTypeTag[T: ConcreteTypeTag] = {
- println(implicitly[TypeTag[T]])
- println(implicitly[TypeTag[List[T]]])
- }
- fooTypeTag[Int]
-} \ No newline at end of file
diff --git a/test/files/run/macro-reify-unreify.check b/test/files/run/macro-reify-unreify.check
index a5334cc355..8f8d9d944d 100644
--- a/test/files/run/macro-reify-unreify.check
+++ b/test/files/run/macro-reify-unreify.check
@@ -1 +1 @@
-hello world = Expr[String("hello world")]("hello world")
+hello world = Expr[java.lang.String("hello world")]("hello world")
diff --git a/test/files/run/macro-reify-unreify/Macros_1.scala b/test/files/run/macro-reify-unreify/Macros_1.scala
index 1b0b9c6421..14777506d3 100644
--- a/test/files/run/macro-reify-unreify/Macros_1.scala
+++ b/test/files/run/macro-reify-unreify/Macros_1.scala
@@ -5,14 +5,14 @@ object Macros {
object Impls {
def foo(c: Ctx)(s: c.Expr[String]) = {
- import c.mirror._
+ import c.universe._
- val world = c.reifyTree(c.reflectMirrorPrefix, s.tree)
- val greeting = c.reifyTree(c.reflectMirrorPrefix, c.typeCheck(Apply(Select(Literal(Constant("hello ")), newTermName("$plus")), List(c.unreifyTree(world)))))
- val typedGreeting = Expr[String](greeting)
+ val world = c.reifyTree(c.runtimeUniverse, EmptyTree, s.tree)
+ val greeting = c.reifyTree(c.runtimeUniverse, EmptyTree, c.typeCheck(Apply(Select(Literal(Constant("hello ")), newTermName("$plus")), List(c.unreifyTree(world)))))
+ val typedGreeting = c.Expr[String](greeting)
c.reify {
- println("hello " + s.eval + " = " + typedGreeting.eval)
+ println("hello " + s.splice + " = " + typedGreeting.splice)
}
}
}
diff --git a/test/files/run/macro-reify-value-outside-reify.check b/test/files/run/macro-reify-value-outside-reify.check
deleted file mode 100644
index 2f562a182f..0000000000
--- a/test/files/run/macro-reify-value-outside-reify.check
+++ /dev/null
@@ -1 +0,0 @@
-42
diff --git a/test/files/run/macro-reify-value-outside-reify.flags b/test/files/run/macro-reify-value-outside-reify.flags
deleted file mode 100644
index cd66464f2f..0000000000
--- a/test/files/run/macro-reify-value-outside-reify.flags
+++ /dev/null
@@ -1 +0,0 @@
--language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-reify-value-outside-reify/Impls_Macros_1.scala b/test/files/run/macro-reify-value-outside-reify/Impls_Macros_1.scala
deleted file mode 100644
index 109e19e44a..0000000000
--- a/test/files/run/macro-reify-value-outside-reify/Impls_Macros_1.scala
+++ /dev/null
@@ -1,12 +0,0 @@
-import scala.reflect.makro.{Context => Ctx}
-
-object Impls {
- def foo(c: Ctx)(x: c.Expr[Int]) = {
- val x1 = c.Expr[Int](c.resetAllAttrs(x.tree))
- c.literal(x1.value)
- }
-}
-
-object Macros {
- def foo(x: Int) = macro Impls.foo
-}
diff --git a/test/files/run/macro-repl-basic.check b/test/files/run/macro-repl-basic.check
index 9e0f9aa1a2..dc65e5c55b 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.makro.{Context => Ctx}
-import scala.reflect.makro.{Context=>Ctx}
-
-scala>
-
-scala> object Impls {
- def foo(c: Ctx)(x: c.Expr[Int]) = {
- import c.mirror._
- val body = Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(1))))
- Expr[Int](body)
- }
-
- def bar(c: Ctx)(x: c.Expr[Int]) = {
- import c.mirror._
- val body = Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(2))))
- Expr[Int](body)
- }
-
- def quux(c: Ctx)(x: c.Expr[Int]) = {
- import c.mirror._
- val body = Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(3))))
- 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.makro.{Context => Ctx}
+import scala.reflect.makro.{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-basic.scala b/test/files/run/macro-repl-basic.scala
index e8849b4b56..fba0aab116 100644
--- a/test/files/run/macro-repl-basic.scala
+++ b/test/files/run/macro-repl-basic.scala
@@ -7,21 +7,21 @@ object Test extends ReplTest {
|
|object Impls {
| def foo(c: Ctx)(x: c.Expr[Int]) = {
- | import c.mirror._
+ | import c.universe._
| val body = Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(1))))
- | Expr[Int](body)
+ | c.Expr[Int](body)
| }
|
| def bar(c: Ctx)(x: c.Expr[Int]) = {
- | import c.mirror._
+ | import c.universe._
| val body = Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(2))))
- | Expr[Int](body)
+ | c.Expr[Int](body)
| }
|
| def quux(c: Ctx)(x: c.Expr[Int]) = {
- | import c.mirror._
+ | import c.universe._
| val body = Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(3))))
- | Expr[Int](body)
+ | c.Expr[Int](body)
| }
|}
|object Macros {
diff --git a/test/files/run/macro-rettype-mismatch.check b/test/files/run/macro-rettype-mismatch.check
deleted file mode 100644
index f6e4bc09fd..0000000000
--- a/test/files/run/macro-rettype-mismatch.check
+++ /dev/null
@@ -1,5 +0,0 @@
-error: type mismatch;
- found : Int(2)
- required: String
-
-java.lang.Error: reflective compilation has failed
diff --git a/test/files/run/macro-rettype-mismatch.flags b/test/files/run/macro-rettype-mismatch.flags
deleted file mode 100644
index cd66464f2f..0000000000
--- a/test/files/run/macro-rettype-mismatch.flags
+++ /dev/null
@@ -1 +0,0 @@
--language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-settings/Impls_Macros_1.scala b/test/files/run/macro-settings/Impls_Macros_1.scala
index 8c7254c79a..56e28b506c 100644
--- a/test/files/run/macro-settings/Impls_Macros_1.scala
+++ b/test/files/run/macro-settings/Impls_Macros_1.scala
@@ -2,7 +2,7 @@ import scala.reflect.makro.Context
object Impls {
def impl(c: Context) = c.reify {
- println(c.literal(c.settings.toString).eval)
+ println(c.literal(c.settings.toString).splice)
}
}
diff --git a/test/files/run/macro-sip19-revised/Impls_Macros_1.scala b/test/files/run/macro-sip19-revised/Impls_Macros_1.scala
index e8f6e1df85..994421808e 100644
--- a/test/files/run/macro-sip19-revised/Impls_Macros_1.scala
+++ b/test/files/run/macro-sip19-revised/Impls_Macros_1.scala
@@ -2,16 +2,16 @@ import scala.reflect.makro.Context
object Macros {
def impl(c: Context) = {
- import c.mirror._
+ import c.universe._
- val inscope = c.inferImplicitValue(staticClass("SourceLocation").asType)
- val outer = Expr[SourceLocation](if (!inscope.isEmpty) inscope else Literal(Constant(null)))
+ val inscope = c.inferImplicitValue(c.mirror.staticClass("SourceLocation").asType)
+ val outer = c.Expr[SourceLocation](if (!inscope.isEmpty) inscope else Literal(Constant(null)))
val Apply(fun, args) = c.enclosingImplicits(0)._2
val fileName = fun.pos.fileInfo.getName
val line = fun.pos.line
val charOffset = fun.pos.point
- c.reify { SourceLocation1(outer.eval, c.literal(fileName).eval, c.literal(line).eval, c.literal(charOffset).eval) }
+ c.reify { SourceLocation1(outer.splice, c.literal(fileName).splice, c.literal(line).splice, c.literal(charOffset).splice) }
}
implicit def sourceLocation: SourceLocation1 = macro impl
@@ -31,4 +31,4 @@ trait SourceLocation {
val charOffset: Int
}
-case class SourceLocation1(val outer: SourceLocation, val fileName: String, val line: Int, val charOffset: Int) extends SourceLocation
+case class SourceLocation1(val outer: SourceLocation, val fileName: String, val line: Int, val charOffset: Int) extends SourceLocation \ No newline at end of file
diff --git a/test/files/run/macro-sip19/Impls_Macros_1.scala b/test/files/run/macro-sip19/Impls_Macros_1.scala
index 39b29ad64c..c006ceb691 100644
--- a/test/files/run/macro-sip19/Impls_Macros_1.scala
+++ b/test/files/run/macro-sip19/Impls_Macros_1.scala
@@ -2,12 +2,12 @@ import scala.reflect.makro.Context
object Macros {
def impl(c: Context) = {
- import c.mirror._
+ import c.universe._
val Apply(fun, args) = c.enclosingImplicits(0)._2
val fileName = fun.pos.fileInfo.getName
val line = fun.pos.line
val charOffset = fun.pos.point
- c.reify { SourceLocation(c.literal(fileName).eval, c.literal(line).eval, c.literal(charOffset).eval) }
+ c.reify { SourceLocation(c.literal(fileName).splice, c.literal(line).splice, c.literal(charOffset).splice) }
}
implicit def sourceLocation: SourceLocation = macro impl
@@ -22,4 +22,4 @@ case class SourceLocation(
/** The character offset */
val charOffset: Int
-)
+) \ No newline at end of file
diff --git a/test/files/run/macro-typecheck-implicitsdisabled/Impls_Macros_1.scala b/test/files/run/macro-typecheck-implicitsdisabled/Impls_Macros_1.scala
index 4f0f76aed6..8ed435d629 100644
--- a/test/files/run/macro-typecheck-implicitsdisabled/Impls_Macros_1.scala
+++ b/test/files/run/macro-typecheck-implicitsdisabled/Impls_Macros_1.scala
@@ -2,7 +2,7 @@ import scala.reflect.makro.Context
object Macros {
def impl_with_implicits_enabled(c: Context) = {
- import c.mirror._
+ import c.universe._
val tree1 = Apply(Select(Literal(Constant(1)), newTermName("$minus$greater")), List(Literal(Constant(2))))
val ttree1 = c.typeCheck(tree1, withImplicitViewsDisabled = false)
@@ -12,7 +12,7 @@ object Macros {
def foo_with_implicits_enabled = macro impl_with_implicits_enabled
def impl_with_implicits_disabled(c: Context) = {
- import c.mirror._
+ import c.universe._
try {
val tree2 = Apply(Select(Literal(Constant(1)), newTermName("$minus$greater")), List(Literal(Constant(2))))
diff --git a/test/files/run/macro-typecheck-macrosdisabled.check b/test/files/run/macro-typecheck-macrosdisabled.check
index 3e1057520b..da1a28bc24 100644
--- a/test/files/run/macro-typecheck-macrosdisabled.check
+++ b/test/files/run/macro-typecheck-macrosdisabled.check
@@ -1,5 +1,37 @@
{
- val $mr: reflect.mirror.type = scala.reflect.`package`.mirror;
- $mr.Expr.apply[Int(2)]($mr.Literal.apply($mr.Constant.apply(2)))($mr.ConcreteTypeTag.apply[Int(2)]($mr.ConstantType.apply($mr.Constant.apply(2)), classOf[scala.Int]))
+ 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.base.Universe with Singleton]($m$untyped: scala.reflect.base.MirrorOf[U]): U#Tree = {
+ val $u: scala.reflect.api.Universe = $m$untyped.universe.asInstanceOf[scala.reflect.api.Universe];
+ val $m: $u.Mirror = $m$untyped.asInstanceOf[$u.Mirror];
+ $treecreator1.this.applyImpl[$u.type]($m).asInstanceOf[U#Tree]
+ };
+ private def applyImpl[U >: Nothing <: scala.reflect.api.Universe with Singleton]($m$untyped: scala.reflect.base.MirrorOf[U]): scala.reflect.base.Universe#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.base.Universe with Singleton]($m$untyped: scala.reflect.base.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()
+ }))
}
-mr.reify[Int](2)
+ru.reify[Int](2)
diff --git a/test/files/run/macro-typecheck-macrosdisabled/Impls_Macros_1.scala b/test/files/run/macro-typecheck-macrosdisabled/Impls_Macros_1.scala
index 3de9367994..2c9bce92a5 100644
--- a/test/files/run/macro-typecheck-macrosdisabled/Impls_Macros_1.scala
+++ b/test/files/run/macro-typecheck-macrosdisabled/Impls_Macros_1.scala
@@ -2,10 +2,10 @@ import scala.reflect.makro.Context
object Macros {
def impl_with_macros_enabled(c: Context) = {
- import c.mirror._
+ import c.universe._
- val mr = Select(Select(Select(Ident(newTermName("scala")), newTermName("reflect")), newTermName("package")), newTermName("mirror"))
- val tree1 = Apply(Select(mr, newTermName("reify")), List(Literal(Constant(2))))
+ val ru = Select(Select(Select(Select(Ident(newTermName("scala")), newTermName("reflect")), newTermName("runtime")), newTermName("package")), newTermName("universe"))
+ val tree1 = Apply(Select(ru, newTermName("reify")), List(Literal(Constant(2))))
val ttree1 = c.typeCheck(tree1, withMacrosDisabled = false)
c.literal(ttree1.toString)
}
@@ -13,14 +13,14 @@ object Macros {
def foo_with_macros_enabled = macro impl_with_macros_enabled
def impl_with_macros_disabled(c: Context) = {
- import c.mirror._
+ import c.universe._
- val mrPkg = staticModule("scala.reflect.package")
- val mrSym = selectTerm(mrPkg, "mirror")
- val NullaryMethodType(mrTpe) = mrSym.typeSignature
- val mr = newFreeTerm("mr", mrTpe, scala.reflect.mirror)
+ val rupkg = c.mirror.staticModule("scala.reflect.runtime.package")
+ val rusym = build.selectTerm(rupkg, "universe")
+ val NullaryMethodType(rutpe) = rusym.typeSignature
+ val ru = build.newFreeTerm("ru", rutpe, scala.reflect.runtime.universe)
- val tree2 = Apply(Select(Ident(mr), newTermName("reify")), List(Literal(Constant(2))))
+ val tree2 = Apply(Select(Ident(ru), newTermName("reify")), List(Literal(Constant(2))))
val ttree2 = c.typeCheck(tree2, withMacrosDisabled = true)
c.literal(ttree2.toString)
}
diff --git a/test/files/run/macro-typecheck-macrosdisabled2.check b/test/files/run/macro-typecheck-macrosdisabled2.check
index 02da6ad0c7..e440b2c0cb 100644
--- a/test/files/run/macro-typecheck-macrosdisabled2.check
+++ b/test/files/run/macro-typecheck-macrosdisabled2.check
@@ -1,5 +1,37 @@
{
- val $mr: reflect.mirror.type = scala.reflect.`package`.mirror;
- $mr.Expr.apply[Array[Int]]($mr.Apply.apply($mr.Select.apply($mr.Select.apply($mr.Ident($mr.staticModule("scala")), $mr.newTermName("Array")), $mr.newTermName("apply")), scala.collection.immutable.List.apply[$mr.Literal]($mr.Literal.apply($mr.Constant.apply(2)))))($mr.ConcreteTypeTag.apply[Array[Int]]($mr.TypeRef.apply($mr.thisModuleType("scala"), $mr.staticClass("scala.Array"), scala.collection.immutable.List.apply[$mr.Type]($mr.staticClass("scala.Int").asTypeConstructor)), ScalaRunTime.this.arrayClass(classOf[scala.Int])))
+ 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.base.Universe with Singleton]($m$untyped: scala.reflect.base.MirrorOf[U]): U#Tree = {
+ val $u: scala.reflect.api.Universe = $m$untyped.universe.asInstanceOf[scala.reflect.api.Universe];
+ val $m: $u.Mirror = $m$untyped.asInstanceOf[$u.Mirror];
+ $treecreator1.this.applyImpl[$u.type]($m).asInstanceOf[U#Tree]
+ };
+ private def applyImpl[U >: Nothing <: scala.reflect.api.Universe with Singleton]($m$untyped: scala.reflect.base.MirrorOf[U]): scala.reflect.base.Universe#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.staticModule("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.base.Universe with Singleton]($m$untyped: scala.reflect.base.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.staticModule("scala").asModuleSymbol.moduleClass), $m.staticClass("scala.Array"), scala.collection.immutable.List.apply[$u.Type]($m.staticClass("scala.Int").asTypeSymbol.asTypeConstructor))
+ }
+ };
+ new $typecreator2()
+ }))
}
-mr.reify[Array[Int]](scala.Array.apply(2))
+ru.reify[Array[Int]](scala.Array.apply(2))
diff --git a/test/files/run/macro-typecheck-macrosdisabled2/Impls_Macros_1.scala b/test/files/run/macro-typecheck-macrosdisabled2/Impls_Macros_1.scala
index 1b840a6204..0aca9781f4 100644
--- a/test/files/run/macro-typecheck-macrosdisabled2/Impls_Macros_1.scala
+++ b/test/files/run/macro-typecheck-macrosdisabled2/Impls_Macros_1.scala
@@ -2,10 +2,10 @@ import scala.reflect.makro.Context
object Macros {
def impl_with_macros_enabled(c: Context) = {
- import c.mirror._
+ import c.universe._
- val mr = Select(Select(Select(Ident(newTermName("scala")), newTermName("reflect")), newTermName("package")), newTermName("mirror"))
- val tree1 = Apply(Select(mr, newTermName("reify")), List(Apply(Select(Ident(newTermName("scala")), newTermName("Array")), List(Literal(Constant(2))))))
+ val ru = Select(Select(Select(Select(Ident(newTermName("scala")), newTermName("reflect")), newTermName("runtime")), newTermName("package")), newTermName("universe"))
+ val tree1 = Apply(Select(ru, newTermName("reify")), List(Apply(Select(Ident(newTermName("scala")), newTermName("Array")), List(Literal(Constant(2))))))
val ttree1 = c.typeCheck(tree1, withMacrosDisabled = false)
c.literal(ttree1.toString)
}
@@ -13,17 +13,17 @@ object Macros {
def foo_with_macros_enabled = macro impl_with_macros_enabled
def impl_with_macros_disabled(c: Context) = {
- import c.mirror._
+ import c.universe._
- val mrPkg = staticModule("scala.reflect.package")
- val mrSym = selectTerm(mrPkg, "mirror")
- val NullaryMethodType(mrTpe) = mrSym.typeSignature
- val mr = newFreeTerm("mr", mrTpe, scala.reflect.mirror)
+ val rupkg = c.mirror.staticModule("scala.reflect.runtime.package")
+ val rusym = build.selectTerm(rupkg, "universe")
+ val NullaryMethodType(rutpe) = rusym.typeSignature
+ val ru = build.newFreeTerm("ru", rutpe, scala.reflect.runtime.universe)
- val tree2 = Apply(Select(Ident(mr), newTermName("reify")), List(Apply(Select(Ident(newTermName("scala")), newTermName("Array")), List(Literal(Constant(2))))))
+ val tree2 = Apply(Select(Ident(ru), newTermName("reify")), List(Apply(Select(Ident(newTermName("scala")), newTermName("Array")), List(Literal(Constant(2))))))
val ttree2 = c.typeCheck(tree2, withMacrosDisabled = true)
c.literal(ttree2.toString)
}
def foo_with_macros_disabled = macro impl_with_macros_disabled
-} \ No newline at end of file
+}
diff --git a/test/files/run/macro-undetparams-consfromsls.check b/test/files/run/macro-undetparams-consfromsls.check
index 49e9140d5a..4b83c55437 100644
--- a/test/files/run/macro-undetparams-consfromsls.check
+++ b/test/files/run/macro-undetparams-consfromsls.check
@@ -1,5 +1,5 @@
-A = ConcreteTypeTag[Int]
-B = ConcreteTypeTag[Nothing]
+A = TypeTag[Int]
+B = TypeTag[Nothing]
List(1)
-A = ConcreteTypeTag[Any]
+A = TypeTag[Any]
List(abc, 1)
diff --git a/test/files/run/macro-undetparams-consfromsls/Impls_Macros_1.scala b/test/files/run/macro-undetparams-consfromsls/Impls_Macros_1.scala
index c22ff96028..b9bb2cfcca 100644
--- a/test/files/run/macro-undetparams-consfromsls/Impls_Macros_1.scala
+++ b/test/files/run/macro-undetparams-consfromsls/Impls_Macros_1.scala
@@ -1,13 +1,14 @@
+import scala.reflect.runtime.universe._
import scala.reflect.makro.Context
object Macros {
- def cons_impl[A: c.TypeTag](c: Context)(x: c.Expr[A], xs: c.Expr[List[A]]): c.Expr[List[A]] = c.reify {
- println("A = " + c.literal(implicitly[c.TypeTag[A]].toString).eval)
- x.eval :: xs.eval
+ def cons_impl[A: c.AbsTypeTag](c: Context)(x: c.Expr[A], xs: c.Expr[List[A]]): c.Expr[List[A]] = c.reify {
+ println("A = " + c.literal(implicitly[c.AbsTypeTag[A]].toString).splice)
+ x.splice :: xs.splice
}
- def nil_impl[B: c.TypeTag](c: Context): c.Expr[List[B]] = c.reify {
- println("B = " + c.literal(implicitly[c.TypeTag[B]].toString).eval)
+ def nil_impl[B: c.AbsTypeTag](c: Context): c.Expr[List[B]] = c.reify {
+ println("B = " + c.literal(implicitly[c.AbsTypeTag[B]].toString).splice)
Nil
}
diff --git a/test/files/run/macro-undetparams-implicitval.check b/test/files/run/macro-undetparams-implicitval.check
index 6c2b601aa5..30681fa40d 100644
--- a/test/files/run/macro-undetparams-implicitval.check
+++ b/test/files/run/macro-undetparams-implicitval.check
@@ -1 +1 @@
-ConcreteTypeTag[Nothing]
+TypeTag[Nothing]
diff --git a/test/files/run/macro-undetparams-implicitval/Test.scala b/test/files/run/macro-undetparams-implicitval/Test.scala
index 5278295451..72fd2f3d72 100644
--- a/test/files/run/macro-undetparams-implicitval/Test.scala
+++ b/test/files/run/macro-undetparams-implicitval/Test.scala
@@ -1,3 +1,5 @@
+import scala.reflect.runtime.universe._
+
object Test extends App {
def foo[T: TypeTag] = println(implicitly[TypeTag[T]])
foo
diff --git a/test/files/run/macro-undetparams-macroitself.check b/test/files/run/macro-undetparams-macroitself.check
index e57fc1217b..80c6b826ba 100644
--- a/test/files/run/macro-undetparams-macroitself.check
+++ b/test/files/run/macro-undetparams-macroitself.check
@@ -1,2 +1,2 @@
-ConcreteTypeTag[Int]
-ConcreteTypeTag[String]
+TypeTag[Int]
+TypeTag[String]
diff --git a/test/files/run/macro-undetparams-macroitself/Impls_Macros_1.scala b/test/files/run/macro-undetparams-macroitself/Impls_Macros_1.scala
index 9d65e8b0da..9b1dd8e017 100644
--- a/test/files/run/macro-undetparams-macroitself/Impls_Macros_1.scala
+++ b/test/files/run/macro-undetparams-macroitself/Impls_Macros_1.scala
@@ -1,7 +1,8 @@
+import scala.reflect.runtime.universe._
import scala.reflect.makro.Context
object Macros {
- def impl[T: c.TypeTag](c: Context)(foo: c.Expr[T]): c.Expr[Unit] = c.reify { println(c.literal(implicitly[c.TypeTag[T]].toString).eval) }
+ def impl[T: c.TypeTag](c: Context)(foo: c.Expr[T]): c.Expr[Unit] = c.reify { println(c.literal(implicitly[c.TypeTag[T]].toString).splice) }
def foo[T](foo: T) = macro impl[T]
} \ No newline at end of file
diff --git a/test/files/run/manifests-new.scala b/test/files/run/manifests-new.scala
index 4485ce9124..f1596dee81 100644
--- a/test/files/run/manifests-new.scala
+++ b/test/files/run/manifests-new.scala
@@ -1,3 +1,5 @@
+import scala.reflect.runtime.universe._
+
object Test
{
object Variances extends Enumeration {
@@ -54,15 +56,15 @@ object Test
}
def assertAnyRef[T: TypeTag] = List(
- typeTag[T].tpe <:< typeTag[Any].tpe,
- typeTag[T].tpe <:< typeTag[AnyRef].tpe,
- !(typeTag[T].tpe <:< typeTag[AnyVal].tpe)
+ typeOf[T] <:< typeOf[Any],
+ typeOf[T] <:< typeOf[AnyRef],
+ !(typeOf[T] <:< typeOf[AnyVal])
) foreach (assert(_, "assertAnyRef"))
def assertAnyVal[T: TypeTag] = List(
- typeTag[T].tpe <:< typeTag[Any].tpe,
- !(typeTag[T].tpe <:< typeTag[AnyRef].tpe),
- typeTag[T].tpe <:< typeTag[AnyVal].tpe
+ typeOf[T] <:< typeOf[Any],
+ !(typeOf[T] <:< typeOf[AnyRef]),
+ typeOf[T] <:< typeOf[AnyVal]
) foreach (assert(_, "assertAnyVal"))
def assertSameType[T: TypeTag, U: TypeTag] = assert(typeCompare[T, U] == SAME, "assertSameType")
@@ -144,4 +146,4 @@ object Test
}
def main(args: Array[String]): Unit = runAllTests
-}
+} \ No newline at end of file
diff --git a/test/files/run/misc-msil.check b/test/files/run/misc-msil.check
deleted file mode 100644
index 480a840b9a..0000000000
--- a/test/files/run/misc-msil.check
+++ /dev/null
@@ -1,33 +0,0 @@
-### Hello
-### 17
-### Bye
-
-### fib(0) = 1
-### fib(1) = 1
-### fib(2) = 2
-### fib(3) = 3
-### fib(4) = 5
-=== MyClass::toString ===
-=== MySubclass::toString ===
-=== MyClass::test ===
-
-identity
-
-A.a = 1
-B.a = 5
-B.b = 2
-
-X.a = 4
-Y.a = 11
-Y.b = 5
-Y.b = 5
-
-X::foo
-
-Y::foo
-X::foo
-
-3
-3
-
-True
diff --git a/test/files/run/newTags.check b/test/files/run/newTags.check
new file mode 100644
index 0000000000..d83740c40c
--- /dev/null
+++ b/test/files/run/newTags.check
@@ -0,0 +1,5 @@
+TypeRef(ThisType(class immutable),class List,List(TypeRef(ThisType(class scala),class Int,List())))
+List[Int]
+TypeRef(ThisType(class immutable),class Map,List(TypeRef(ThisType(class lang),class String,List()), TypeRef(ThisType(class lang),class String,List())))
+scala.collection.immutable.Map[java.lang.String,java.lang.String]
+TypeTag[TypeRef(ThisType(class immutable),class Map,List(TypeRef(ThisType(class lang),class String,List()), TypeRef(ThisType(class lang),class String,List())))]
diff --git a/test/files/run/newTags.scala b/test/files/run/newTags.scala
new file mode 100644
index 0000000000..a758599515
--- /dev/null
+++ b/test/files/run/newTags.scala
@@ -0,0 +1,14 @@
+import scala.reflect.base.{Universe => BaseUniverse}
+import scala.reflect.{basis => rb}
+import scala.reflect.runtime.{universe => ru}
+
+object Test extends App {
+ println(rb.typeOf[List[Int]])
+ println(ru.typeOf[List[Int]])
+ def foo[T: rb.TypeTag] = {
+ println(rb.typeOf[T])
+ println(ru.typeOf[T])
+ println(implicitly[BaseUniverse#TypeTag[T]])
+ }
+ foo[Map[String, String]]
+} \ No newline at end of file
diff --git a/test/files/run/patmat_unapp_abstype-new.scala b/test/files/run/patmat_unapp_abstype-new.scala
index 45496f08a2..1141177504 100644
--- a/test/files/run/patmat_unapp_abstype-new.scala
+++ b/test/files/run/patmat_unapp_abstype-new.scala
@@ -1,10 +1,10 @@
+import reflect.{ClassTag, classTag}
+
// abstract types and extractors, oh my!
trait TypesAPI {
trait Type
- // an alternative fix (implemented in the virtual pattern matcher, is to replace the isInstanceOf by a manifest-based run-time test)
- // that's what typeRefMani is for
- type TypeRef <: Type //; implicit def typeRefMani: Manifest[TypeRef]
+ type TypeRef <: Type
val TypeRef: TypeRefExtractor; trait TypeRefExtractor {
def apply(x: Int): TypeRef
def unapply(x: TypeRef): Option[(Int)]
@@ -19,11 +19,6 @@ trait TypesUser extends TypesAPI {
def shouldNotCrash(tp: Type): Unit = {
tp match {
case TypeRef(x) => println("TypeRef")
- // the above checks tp.isInstanceOf[TypeRef], which is erased to tp.isInstanceOf[Type]
- // before calling TypeRef.unapply(tp), which will then crash unless tp.isInstanceOf[TypesImpl#TypeRef] (which is not implied by tp.isInstanceOf[Type])
- // tp.isInstanceOf[TypesImpl#TypeRef] is equivalent to classOf[TypesImpl#TypeRef].isAssignableFrom(tp.getClass)
- // this is equivalent to manifest
- // it is NOT equivalent to manifest[Type] <:< typeRefMani
case MethodType(x) => println("MethodType")
case _ => println("none of the above")
}
@@ -34,7 +29,6 @@ trait TypesImpl extends TypesAPI {
object TypeRef extends TypeRefExtractor // this will have a bridged unapply(x: Type) = unapply(x.asInstanceOf[TypeRef])
case class TypeRef(n: Int) extends Type // this has a bridge from TypesAPI#Type to TypesImpl#TypeRef
// --> the cast in the bridge will fail because the pattern matcher can't type test against the abstract types in TypesUser
- //lazy val typeRefMani = manifest[TypeRef]
}
trait Foos {
@@ -63,16 +57,15 @@ trait Intermed extends Foos {
object TestUnappStaticallyKnownSynthetic extends TypesImpl with TypesUser {
def test() = {
- shouldNotCrash(TypeRef(10)) // should and does print "TypeRef"
- // once #1697/#2337 are fixed, this should generate the correct output
- shouldNotCrash(MethodType(10)) // should print "MethodType" but prints "none of the above" -- good one, pattern matcher!
+ shouldNotCrash(TypeRef(10)) // prints "TypeRef"
+ shouldNotCrash(MethodType(10)) // prints "MethodType"
}
}
object TestUnappDynamicSynth extends RealFoos with Intermed {
- case class FooToo(n: Int) extends Bar
+ case class NotAFoo(n: Int) extends Bar
def test() = {
- crash(FooToo(10))
+ crash(NotAFoo(10))
crash(new Foo(5))
}
}
diff --git a/test/files/run/primitive-sigs-2-new.check b/test/files/run/primitive-sigs-2-new.check
index b82ddbeaff..6f79d73d38 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.ArrayTag<T>)
+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-new.scala b/test/files/run/primitive-sigs-2-new.scala
index 7e13014cb2..cf6de9c81b 100644
--- a/test/files/run/primitive-sigs-2-new.scala
+++ b/test/files/run/primitive-sigs-2-new.scala
@@ -1,3 +1,4 @@
+import scala.reflect.{ClassTag, classTag}
import java.{ lang => jl }
trait T[A] {
@@ -10,7 +11,7 @@ class Arr {
def arr1(xs: Array[Int]): List[Int] = xs.toList
def arr2(xs: Array[jl.Character]): List[jl.Character] = xs.toList
def arr3(xss: Array[Array[Float]]): Array[Float] = xss map (_.sum)
- def arr4[T: ArrayTag](xss: Array[Array[T]]): Array[T] = xss map (_.head)
+ def arr4[T: ClassTag](xss: Array[Array[T]]): Array[T] = xss map (_.head)
}
object Test {
@@ -28,4 +29,4 @@ object Test {
println(new C f)
c3m.sorted foreach println
}
-}
+} \ No newline at end of file
diff --git a/test/files/run/promotion-msil.check b/test/files/run/promotion-msil.check
deleted file mode 100644
index 41e36c369d..0000000000
--- a/test/files/run/promotion-msil.check
+++ /dev/null
@@ -1,4 +0,0 @@
-2
-6
-20
-30
diff --git a/test/files/run/reflect-overload.scala b/test/files/run/reflect-overload.scala
index af82a1948d..870a200813 100644
--- a/test/files/run/reflect-overload.scala
+++ b/test/files/run/reflect-overload.scala
@@ -1,16 +1,19 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{currentMirror => cm}
+
object Test extends App {
- import reflect.mirror._
val s = "hello world"
- val sc = symbolOfInstance(s)
+ val m = cm.reflect(s)
+ val sc = m.symbol
val st = sc.asType
- val m = st member newTermName("indexOf")
+ val meth = (st member newTermName("indexOf")).asTermSymbol
val IntType = definitions.IntClass.asType
- val indexOf = m resolveOverloaded(actuals = List(IntType))
- assert(invoke(s, indexOf)('w') == 6)
- assert((invoke(s, indexOf)('w') match { case x: Int => x }) == 6)
+ val indexOf = (meth resolveOverloaded(actuals = List(IntType))).asMethodSymbol
+ assert(m.reflectMethod(indexOf)('w') == 6)
+ assert((m.reflectMethod(indexOf)('w') match { case x: Int => x }) == 6)
- val m2 = st member newTermName("substring")
- val substring = m2 resolveOverloaded(actuals = List(IntType, IntType))
- assert(invoke(s, substring)(2, 6) == "llo ")
+ val meth2 = (st member newTermName("substring")).asTermSymbol
+ val substring = (meth2 resolveOverloaded(actuals = List(IntType, IntType))).asMethodSymbol
+ assert(m.reflectMethod(substring)(2, 6) == "llo ")
}
diff --git a/test/files/run/reflection-constructormirror-inner-badpath.check b/test/files/run/reflection-constructormirror-inner-badpath.check
new file mode 100644
index 0000000000..28b936eca1
--- /dev/null
+++ b/test/files/run/reflection-constructormirror-inner-badpath.check
@@ -0,0 +1,2 @@
+this is an inner class, use reflectClass on an InstanceMirror to obtain its ClassMirror
+()
diff --git a/test/files/run/reflection-constructormirror-inner-badpath.scala b/test/files/run/reflection-constructormirror-inner-badpath.scala
new file mode 100644
index 0000000000..a42bedea83
--- /dev/null
+++ b/test/files/run/reflection-constructormirror-inner-badpath.scala
@@ -0,0 +1,32 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.ClassTag
+
+class Foo{
+ case class R(
+ sales : Int,
+ name : String
+ )
+
+ def foo = {
+ val expectedType = implicitly[TypeTag[R]]
+ val classTag = implicitly[ClassTag[R]]
+ val cl = classTag.runtimeClass.getClassLoader
+ val cm = runtimeMirror(cl)
+ val constructor = expectedType.tpe.member( nme.CONSTRUCTOR ).asMethodSymbol
+ val sig = constructor.typeSignature
+ val sym = cm.classSymbol( classTag.runtimeClass )
+ try {
+ val cls = cm.reflectClass( sym )
+ cls.reflectConstructor( constructor )( 5,"test" ).asInstanceOf[R]
+ println("this indicates a failure")
+ } catch {
+ case ex: Throwable =>
+ println(ex.getMessage)
+ }
+ }
+
+}
+object Test extends App{
+ val foo = new Foo
+ println( foo.foo )
+} \ No newline at end of file
diff --git a/test/files/run/reflection-constructormirror-inner-good.check b/test/files/run/reflection-constructormirror-inner-good.check
new file mode 100644
index 0000000000..811ecb2e3f
--- /dev/null
+++ b/test/files/run/reflection-constructormirror-inner-good.check
@@ -0,0 +1 @@
+R(5,test)
diff --git a/test/files/run/reflection-constructormirror-inner-good.scala b/test/files/run/reflection-constructormirror-inner-good.scala
new file mode 100644
index 0000000000..c09f464b24
--- /dev/null
+++ b/test/files/run/reflection-constructormirror-inner-good.scala
@@ -0,0 +1,26 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.ClassTag
+
+class Foo{
+ case class R(
+ sales : Int,
+ name : String
+ )
+
+ def foo = {
+ val expectedType = implicitly[TypeTag[R]]
+ val classTag = implicitly[ClassTag[R]]
+ val cl = classTag.runtimeClass.getClassLoader
+ val cm = runtimeMirror(cl)
+ val constructor = expectedType.tpe.member( nme.CONSTRUCTOR ).asMethodSymbol
+ val sig = constructor.typeSignature
+ val sym = cm.classSymbol( classTag.runtimeClass )
+ val cls = cm.reflect( this ).reflectClass( sym )
+ cls.reflectConstructor( constructor )( 5,"test" ).asInstanceOf[R]
+ }
+
+}
+object Test extends App{
+ val foo = new Foo
+ println( foo.foo )
+} \ No newline at end of file
diff --git a/test/files/run/reflection-constructormirror-nested-badpath.check b/test/files/run/reflection-constructormirror-nested-badpath.check
new file mode 100644
index 0000000000..9ceb603dc2
--- /dev/null
+++ b/test/files/run/reflection-constructormirror-nested-badpath.check
@@ -0,0 +1,2 @@
+this is a static class, use reflectClass on a RuntimeMirror to obtain its ClassMirror
+()
diff --git a/test/files/run/reflection-constructormirror-nested-badpath.scala b/test/files/run/reflection-constructormirror-nested-badpath.scala
new file mode 100644
index 0000000000..ece0044c61
--- /dev/null
+++ b/test/files/run/reflection-constructormirror-nested-badpath.scala
@@ -0,0 +1,32 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.ClassTag
+
+class Foo{
+ import Test._
+ def foo = {
+ val expectedType = implicitly[TypeTag[R]]
+ val classTag = implicitly[ClassTag[R]]
+ val cl = classTag.runtimeClass.getClassLoader
+ val cm = runtimeMirror(cl)
+ val constructor = expectedType.tpe.member( nme.CONSTRUCTOR ).asMethodSymbol
+ val sig = constructor.typeSignature
+ val sym = cm.classSymbol( classTag.runtimeClass )
+ try {
+ val cls = cm.reflect( this ).reflectClass( sym )
+ cls.reflectConstructor( constructor )( 5,"test" ).asInstanceOf[R]
+ println("this indicates a failure")
+ } catch {
+ case ex: Throwable =>
+ println(ex.getMessage)
+ }
+ }
+
+}
+object Test extends App{
+ case class R(
+ sales : Int,
+ name : String
+ )
+ val foo = new Foo
+ println( foo.foo )
+} \ No newline at end of file
diff --git a/test/files/run/reflection-constructormirror-nested-good.check b/test/files/run/reflection-constructormirror-nested-good.check
new file mode 100644
index 0000000000..811ecb2e3f
--- /dev/null
+++ b/test/files/run/reflection-constructormirror-nested-good.check
@@ -0,0 +1 @@
+R(5,test)
diff --git a/test/files/run/reflection-constructormirror-nested-good.scala b/test/files/run/reflection-constructormirror-nested-good.scala
new file mode 100644
index 0000000000..432e9d3707
--- /dev/null
+++ b/test/files/run/reflection-constructormirror-nested-good.scala
@@ -0,0 +1,26 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.ClassTag
+
+class Foo{
+ import Test._
+ def foo = {
+ val expectedType = implicitly[TypeTag[R]]
+ val classTag = implicitly[ClassTag[R]]
+ val cl = classTag.runtimeClass.getClassLoader
+ val cm = runtimeMirror(cl)
+ val constructor = expectedType.tpe.member( nme.CONSTRUCTOR ).asMethodSymbol
+ val sig = constructor.typeSignature
+ val sym = cm.classSymbol( classTag.runtimeClass )
+ val cls = cm.reflectClass( sym )
+ cls.reflectConstructor( constructor )( 5,"test" ).asInstanceOf[R]
+ }
+}
+
+object Test extends App{
+ case class R(
+ sales : Int,
+ name : String
+ )
+ val foo = new Foo
+ println( foo.foo )
+} \ No newline at end of file
diff --git a/test/files/run/reflection-constructormirror-toplevel-badpath.check b/test/files/run/reflection-constructormirror-toplevel-badpath.check
new file mode 100644
index 0000000000..9ceb603dc2
--- /dev/null
+++ b/test/files/run/reflection-constructormirror-toplevel-badpath.check
@@ -0,0 +1,2 @@
+this is a static class, use reflectClass on a RuntimeMirror to obtain its ClassMirror
+()
diff --git a/test/files/run/reflection-constructormirror-toplevel-badpath.scala b/test/files/run/reflection-constructormirror-toplevel-badpath.scala
new file mode 100644
index 0000000000..7a7adbd603
--- /dev/null
+++ b/test/files/run/reflection-constructormirror-toplevel-badpath.scala
@@ -0,0 +1,33 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.ClassTag
+
+case class R(
+ sales : Int,
+ name : String
+)
+
+class Foo{
+ import Test._
+ def foo = {
+ val expectedType = implicitly[TypeTag[R]]
+ val classTag = implicitly[ClassTag[R]]
+ val cl = classTag.runtimeClass.getClassLoader
+ val cm = runtimeMirror(cl)
+ val constructor = expectedType.tpe.member( nme.CONSTRUCTOR ).asMethodSymbol
+ val sig = constructor.typeSignature
+ val sym = cm.classSymbol( classTag.runtimeClass )
+ try {
+ val cls = cm.reflect( this ).reflectClass( sym )
+ cls.reflectConstructor( constructor )( 5,"test" ).asInstanceOf[R]
+ println("this indicates a failure")
+ } catch {
+ case ex: Throwable =>
+ println(ex.getMessage)
+ }
+ }
+}
+
+object Test extends App{
+ val foo = new Foo
+ println( foo.foo )
+} \ No newline at end of file
diff --git a/test/files/run/reflection-constructormirror-toplevel-good.check b/test/files/run/reflection-constructormirror-toplevel-good.check
new file mode 100644
index 0000000000..811ecb2e3f
--- /dev/null
+++ b/test/files/run/reflection-constructormirror-toplevel-good.check
@@ -0,0 +1 @@
+R(5,test)
diff --git a/test/files/run/reflection-constructormirror-toplevel-good.scala b/test/files/run/reflection-constructormirror-toplevel-good.scala
new file mode 100644
index 0000000000..96713a11cb
--- /dev/null
+++ b/test/files/run/reflection-constructormirror-toplevel-good.scala
@@ -0,0 +1,27 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.ClassTag
+
+case class R(
+ sales : Int,
+ name : String
+)
+
+class Foo{
+ import Test._
+ def foo = {
+ val expectedType = implicitly[TypeTag[R]]
+ val classTag = implicitly[ClassTag[R]]
+ val cl = classTag.runtimeClass.getClassLoader
+ val cm = runtimeMirror(cl)
+ val constructor = expectedType.tpe.member( nme.CONSTRUCTOR ).asMethodSymbol
+ val sig = constructor.typeSignature
+ val sym = cm.classSymbol( classTag.runtimeClass )
+ val cls = cm.reflectClass( sym )
+ cls.reflectConstructor( constructor )( 5,"test" ).asInstanceOf[R]
+ }
+}
+
+object Test extends App{
+ val foo = new Foo
+ println( foo.foo )
+} \ No newline at end of file
diff --git a/test/files/run/reflection-fieldmirror-ctorparam.check b/test/files/run/reflection-fieldmirror-ctorparam.check
new file mode 100644
index 0000000000..8b99a6f772
--- /dev/null
+++ b/test/files/run/reflection-fieldmirror-ctorparam.check
@@ -0,0 +1 @@
+class java.lang.NoSuchFieldException: Test$A$$x
diff --git a/test/files/run/reflection-fieldmirror-ctorparam.scala b/test/files/run/reflection-fieldmirror-ctorparam.scala
new file mode 100644
index 0000000000..fa9dd81d7f
--- /dev/null
+++ b/test/files/run/reflection-fieldmirror-ctorparam.scala
@@ -0,0 +1,21 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{currentMirror => cm}
+
+object Test extends App {
+ class A(x: Int) {
+ private[this] var xx = x
+ }
+
+ val a = new A(42)
+
+ val im: InstanceMirror = cm.reflect(a)
+ val cs = im.symbol
+ val f = cs.typeSignature.declaration(newTermName("x")).asTermSymbol
+ try {
+ val fm: FieldMirror = im.reflectField(f)
+ println(fm.get)
+ } catch {
+ case ex: Throwable =>
+ println(s"${ex.getClass}: ${ex.getMessage}")
+ }
+}
diff --git a/test/files/run/reflection-fieldmirror-getsetval.check b/test/files/run/reflection-fieldmirror-getsetval.check
new file mode 100644
index 0000000000..707bbcccce
--- /dev/null
+++ b/test/files/run/reflection-fieldmirror-getsetval.check
@@ -0,0 +1,2 @@
+42
+cannot set an immutable field
diff --git a/test/files/run/reflection-fieldmirror-getsetval.scala b/test/files/run/reflection-fieldmirror-getsetval.scala
new file mode 100644
index 0000000000..af9a6e4c56
--- /dev/null
+++ b/test/files/run/reflection-fieldmirror-getsetval.scala
@@ -0,0 +1,24 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{currentMirror => cm}
+
+object Test extends App {
+ class A {
+ val x: Int = 42
+ }
+
+ val a = new A
+
+ val im: InstanceMirror = cm.reflect(a)
+ val cs = im.symbol
+ val f = cs.typeSignature.declaration(newTermName("x" + nme.LOCAL_SUFFIX_STRING)).asTermSymbol
+ val fm: FieldMirror = im.reflectField(f)
+ try {
+ println(fm.get)
+ fm.set(2)
+ println(fm.get)
+ println("this indicates a failure")
+ } catch {
+ case ex: Throwable =>
+ println(ex.getMessage)
+ }
+}
diff --git a/test/files/run/reflection-fieldmirror-getsetvar.check b/test/files/run/reflection-fieldmirror-getsetvar.check
new file mode 100644
index 0000000000..a9b0ccc6a0
--- /dev/null
+++ b/test/files/run/reflection-fieldmirror-getsetvar.check
@@ -0,0 +1,2 @@
+42
+2
diff --git a/test/files/run/reflection-fieldmirror-getsetvar.scala b/test/files/run/reflection-fieldmirror-getsetvar.scala
new file mode 100644
index 0000000000..d9fbdaade0
--- /dev/null
+++ b/test/files/run/reflection-fieldmirror-getsetvar.scala
@@ -0,0 +1,18 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{currentMirror => cm}
+
+object Test extends App {
+ class A {
+ var x: Int = 42
+ }
+
+ val a = new A
+
+ val im: InstanceMirror = cm.reflect(a)
+ val cs = im.symbol
+ val f = cs.typeSignature.declaration(newTermName("x" + nme.LOCAL_SUFFIX_STRING)).asTermSymbol
+ val fm: FieldMirror = im.reflectField(f)
+ println(fm.get)
+ fm.set(2)
+ println(fm.get)
+}
diff --git a/test/files/run/reflection-fieldmirror-nmelocalsuffixstring.check b/test/files/run/reflection-fieldmirror-nmelocalsuffixstring.check
new file mode 100644
index 0000000000..fe75c80bca
--- /dev/null
+++ b/test/files/run/reflection-fieldmirror-nmelocalsuffixstring.check
@@ -0,0 +1 @@
+true
diff --git a/test/files/run/reflection-fieldmirror-nmelocalsuffixstring.scala b/test/files/run/reflection-fieldmirror-nmelocalsuffixstring.scala
new file mode 100644
index 0000000000..d89e6a90ef
--- /dev/null
+++ b/test/files/run/reflection-fieldmirror-nmelocalsuffixstring.scala
@@ -0,0 +1,16 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{currentMirror => cm}
+
+object Test extends App {
+ class A {
+ var x: Int = 42
+ }
+
+ val a = new A
+
+ val im: InstanceMirror = cm.reflect(a)
+ val cs = im.symbol
+ val f = cs.typeSignature.declaration(newTermName("x" + nme.LOCAL_SUFFIX_STRING)).asTermSymbol
+ val fm: FieldMirror = im.reflectField(f)
+ println(fm.symbol.isVariable)
+}
diff --git a/test/files/run/reflection-fieldmirror-privatethis.check b/test/files/run/reflection-fieldmirror-privatethis.check
new file mode 100644
index 0000000000..889b7c2c34
--- /dev/null
+++ b/test/files/run/reflection-fieldmirror-privatethis.check
@@ -0,0 +1,3 @@
+true
+42
+2
diff --git a/test/files/run/reflection-fieldmirror-privatethis.scala b/test/files/run/reflection-fieldmirror-privatethis.scala
new file mode 100644
index 0000000000..0c415e09e4
--- /dev/null
+++ b/test/files/run/reflection-fieldmirror-privatethis.scala
@@ -0,0 +1,19 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{currentMirror => cm}
+
+object Test extends App {
+ class A {
+ private[this] var x: Int = 42
+ }
+
+ val a = new A
+
+ val im: InstanceMirror = cm.reflect(a)
+ val cs = im.symbol
+ val f = cs.typeSignature.declaration(newTermName("x")).asTermSymbol
+ val fm: FieldMirror = im.reflectField(f)
+ println(fm.symbol.isVariable)
+ println(fm.get)
+ fm.set(2)
+ println(fm.get)
+}
diff --git a/test/files/run/reflection-fieldmirror-sanitycheck.check b/test/files/run/reflection-fieldmirror-sanitycheck.check
new file mode 100644
index 0000000000..e5134de4e3
--- /dev/null
+++ b/test/files/run/reflection-fieldmirror-sanitycheck.check
@@ -0,0 +1,6 @@
+expected a field symbol, you provided a method symbol
+A typical cause of this problem is using a field accessor symbol instead of a field symbol.
+To obtain a field symbol append nme.LOCAL_SUFFIX_STRING to the name of the field,
+when searching for a member with Type.members or Type.declarations.
+This is a temporary inconvenience that will be resolved before 2.10.0-final.
+More information can be found here: https://issues.scala-lang.org/browse/SI-5895.
diff --git a/test/files/run/reflection-fieldmirror-sanitycheck.scala b/test/files/run/reflection-fieldmirror-sanitycheck.scala
new file mode 100644
index 0000000000..6a992dd282
--- /dev/null
+++ b/test/files/run/reflection-fieldmirror-sanitycheck.scala
@@ -0,0 +1,22 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{currentMirror => cm}
+
+object Test extends App {
+ class A {
+ var x: Int = 42
+ }
+
+ val a = new A
+
+ val im: InstanceMirror = cm.reflect(a)
+ val cs = im.symbol
+ //val f = cs.typeSignature.declaration(newTermName("x" + nme.LOCAL_SUFFIX_STRING)).asTermSymbol
+ val f = cs.typeSignature.declaration(newTermName("x")).asTermSymbol
+ try {
+ val fm: FieldMirror = im.reflectField(f)
+ println("this indicates a failure")
+ } catch {
+ case ex: Throwable =>
+ println(ex.getMessage)
+ }
+}
diff --git a/test/files/run/reflection-implClass-new.scala b/test/files/run/reflection-implClass-new.scala
deleted file mode 100644
index 27374f2106..0000000000
--- a/test/files/run/reflection-implClass-new.scala
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * Tries to load a symbol for the `Foo$class` using Scala reflection.
- * Since trait implementation classes do not get pickling information
- * symbol for them should be created using fallback mechanism
- * that exposes Java reflection information dressed up in
- * a Scala symbol.
- */
-object Test extends App with Outer {
- import scala.reflect.mirror
-
- assert(mirror.classToSymbol(classTag[Foo].erasure).typeSignature.declaration(mirror.newTermName("bar")).typeSignature ==
- mirror.classToSymbol(classTag[Bar].erasure).typeSignature.declaration(mirror.newTermName("foo")).typeSignature)
-
- val s1 = implClass(classTag[Foo].erasure)
- assert(s1 != mirror.NoSymbol)
- assert(s1.typeSignature != mirror.NoType)
- assert(s1.companionSymbol.typeSignature != mirror.NoType)
- assert(s1.companionSymbol.typeSignature.declaration(mirror.newTermName("bar")) != mirror.NoSymbol)
- val s2 = implClass(classTag[Bar].erasure)
- assert(s2 != mirror.NoSymbol)
- assert(s2.typeSignature != mirror.NoType)
- assert(s2.companionSymbol.typeSignature != mirror.NoType)
- assert(s2.companionSymbol.typeSignature.declaration(mirror.newTermName("foo")) != mirror.NoSymbol)
- def implClass(clazz: Class[_]) = {
- val implClass = Class.forName(clazz.getName + "$class")
- mirror.classToSymbol(implClass)
- }
-}
-
-trait Foo {
- def bar = 1
-}
-
-trait Outer {
- trait Bar {
- def foo = 1
- }
-}
diff --git a/test/files/run/reflection-implClass-old.scala b/test/files/run/reflection-implClass-old.scala
deleted file mode 100644
index 6583624d8b..0000000000
--- a/test/files/run/reflection-implClass-old.scala
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * Tries to load a symbol for the `Foo$class` using Scala reflection.
- * Since trait implementation classes do not get pickling information
- * symbol for them should be created using fallback mechanism
- * that exposes Java reflection information dressed up in
- * a Scala symbol.
- */
-object Test extends App with Outer {
- import scala.reflect.mirror
-
- assert(mirror.classToSymbol(manifest[Foo].erasure).typeSignature.declaration(mirror.newTermName("bar")).typeSignature ==
- mirror.classToSymbol(manifest[Bar].erasure).typeSignature.declaration(mirror.newTermName("foo")).typeSignature)
-
- val s1 = implClass(manifest[Foo].erasure)
- assert(s1 != mirror.NoSymbol)
- assert(s1.typeSignature != mirror.NoType)
- assert(s1.companionSymbol.typeSignature != mirror.NoType)
- assert(s1.companionSymbol.typeSignature.declaration(mirror.newTermName("bar")) != mirror.NoSymbol)
- val s2 = implClass(manifest[Bar].erasure)
- assert(s2 != mirror.NoSymbol)
- assert(s2.typeSignature != mirror.NoType)
- assert(s2.companionSymbol.typeSignature != mirror.NoType)
- assert(s2.companionSymbol.typeSignature.declaration(mirror.newTermName("foo")) != mirror.NoSymbol)
- def implClass(clazz: Class[_]) = {
- val implClass = Class.forName(clazz.getName + "$class")
- mirror.classToSymbol(implClass)
- }
-}
-
-trait Foo {
- def bar = 1
-}
-
-trait Outer {
- trait Bar {
- def foo = 1
- }
-}
diff --git a/test/files/run/reflection-implClass.scala b/test/files/run/reflection-implClass.scala
new file mode 100644
index 0000000000..b3c0081ccf
--- /dev/null
+++ b/test/files/run/reflection-implClass.scala
@@ -0,0 +1,40 @@
+/**
+ * Tries to load a symbol for the `Foo$class` using Scala reflection.
+ * Since trait implementation classes do not get pickling information
+ * symbol for them should be created using fallback mechanism
+ * that exposes Java reflection information dressed up in
+ * a Scala symbol.
+ */
+object Test extends App with Outer {
+ import scala.reflect.{ClassTag, classTag}
+ import scala.reflect.runtime.universe._
+ import scala.reflect.runtime.{currentMirror => cm}
+
+ assert(cm.classSymbol(classTag[Foo].runtimeClass).typeSignature.declaration(newTermName("bar")).typeSignature ==
+ cm.classSymbol(classTag[Bar].runtimeClass).typeSignature.declaration(newTermName("foo")).typeSignature)
+
+ val s1 = implClass(classTag[Foo].runtimeClass)
+ assert(s1 != NoSymbol)
+ assert(s1.typeSignature != NoType)
+ assert(s1.companionSymbol.typeSignature != NoType)
+ assert(s1.companionSymbol.typeSignature.declaration(newTermName("bar")) != NoSymbol)
+ val s2 = implClass(classTag[Bar].runtimeClass)
+ assert(s2 != NoSymbol)
+ assert(s2.typeSignature != NoType)
+ assert(s2.companionSymbol.typeSignature != NoType)
+ assert(s2.companionSymbol.typeSignature.declaration(newTermName("foo")) != NoSymbol)
+ def implClass(clazz: Class[_]) = {
+ val implClass = Class.forName(clazz.getName + "$class")
+ cm.classSymbol(implClass)
+ }
+}
+
+trait Foo {
+ def bar = 1
+}
+
+trait Outer {
+ trait Bar {
+ def foo = 1
+ }
+}
diff --git a/test/files/run/reflection-modulemirror-inner-badpath.check b/test/files/run/reflection-modulemirror-inner-badpath.check
new file mode 100644
index 0000000000..d3fe43336e
--- /dev/null
+++ b/test/files/run/reflection-modulemirror-inner-badpath.check
@@ -0,0 +1,2 @@
+this is an inner module, use reflectModule on an InstanceMirror to obtain its ModuleMirror
+()
diff --git a/test/files/run/reflection-modulemirror-inner-badpath.scala b/test/files/run/reflection-modulemirror-inner-badpath.scala
new file mode 100644
index 0000000000..de200c548b
--- /dev/null
+++ b/test/files/run/reflection-modulemirror-inner-badpath.scala
@@ -0,0 +1,24 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.reflect.ClassTag
+
+class Foo{
+ object R { override def toString = "R" }
+ def foo = {
+ val classTag = implicitly[ClassTag[R.type]]
+ val sym = cm.moduleSymbol(classTag.runtimeClass)
+ try {
+ val cls = cm.reflectModule(sym)
+ cls.instance
+ println("this indicates a failure")
+ } catch {
+ case ex: Throwable =>
+ println(ex.getMessage)
+ }
+ }
+}
+
+object Test extends App{
+ val foo = new Foo
+ println(foo.foo)
+} \ No newline at end of file
diff --git a/test/files/run/reflection-modulemirror-inner-good.check b/test/files/run/reflection-modulemirror-inner-good.check
new file mode 100644
index 0000000000..0bf38a73d1
--- /dev/null
+++ b/test/files/run/reflection-modulemirror-inner-good.check
@@ -0,0 +1,2 @@
+inner and nested modules are not supported yet
+()
diff --git a/test/files/run/reflection-modulemirror-inner-good.scala b/test/files/run/reflection-modulemirror-inner-good.scala
new file mode 100644
index 0000000000..b5540dbe1c
--- /dev/null
+++ b/test/files/run/reflection-modulemirror-inner-good.scala
@@ -0,0 +1,23 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.reflect.ClassTag
+
+class Foo{
+ object R { override def toString = "R" }
+ def foo = {
+ val classTag = implicitly[ClassTag[R.type]]
+ val sym = cm.moduleSymbol(classTag.runtimeClass)
+ val cls = cm.reflect(this).reflectModule(sym)
+ try {
+ cls.instance
+ } catch {
+ case ex: Throwable =>
+ println(ex.getMessage)
+ }
+ }
+}
+
+object Test extends App{
+ val foo = new Foo
+ println(foo.foo)
+} \ No newline at end of file
diff --git a/test/files/run/reflection-modulemirror-nested-badpath.check b/test/files/run/reflection-modulemirror-nested-badpath.check
new file mode 100644
index 0000000000..16a5b10390
--- /dev/null
+++ b/test/files/run/reflection-modulemirror-nested-badpath.check
@@ -0,0 +1,2 @@
+this is a static module, use reflectModule on a RuntimeMirror to obtain its ModuleMirror
+()
diff --git a/test/files/run/reflection-modulemirror-nested-badpath.scala b/test/files/run/reflection-modulemirror-nested-badpath.scala
new file mode 100644
index 0000000000..43cae00f9c
--- /dev/null
+++ b/test/files/run/reflection-modulemirror-nested-badpath.scala
@@ -0,0 +1,26 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.reflect.ClassTag
+
+class Foo{
+ import Test._
+ def foo = {
+ val classTag = implicitly[ClassTag[R.type]]
+ val sym = cm.moduleSymbol(classTag.runtimeClass)
+ try {
+ val cls = cm.reflect(this).reflectModule(sym)
+ cls.instance
+ println("this indicates a failure")
+ } catch {
+ case ex: Throwable =>
+ println(ex.getMessage)
+ }
+ }
+
+}
+
+object Test extends App{
+ object R { override def toString = "R" }
+ val foo = new Foo
+ println(foo.foo)
+}
diff --git a/test/files/run/reflection-modulemirror-nested-good.check b/test/files/run/reflection-modulemirror-nested-good.check
new file mode 100644
index 0000000000..0bf38a73d1
--- /dev/null
+++ b/test/files/run/reflection-modulemirror-nested-good.check
@@ -0,0 +1,2 @@
+inner and nested modules are not supported yet
+()
diff --git a/test/files/run/reflection-modulemirror-nested-good.scala b/test/files/run/reflection-modulemirror-nested-good.scala
new file mode 100644
index 0000000000..8390bbaac7
--- /dev/null
+++ b/test/files/run/reflection-modulemirror-nested-good.scala
@@ -0,0 +1,24 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.reflect.ClassTag
+
+class Foo{
+ import Test._
+ def foo = {
+ val classTag = implicitly[ClassTag[R.type]]
+ val sym = cm.moduleSymbol(classTag.runtimeClass)
+ val cls = cm.reflectModule(sym)
+ try {
+ cls.instance
+ } catch {
+ case ex: Throwable =>
+ println(ex.getMessage)
+ }
+ }
+}
+
+object Test extends App{
+ object R { override def toString = "R" }
+ val foo = new Foo
+ println(foo.foo)
+} \ No newline at end of file
diff --git a/test/files/run/reflection-modulemirror-toplevel-badpath.check b/test/files/run/reflection-modulemirror-toplevel-badpath.check
new file mode 100644
index 0000000000..16a5b10390
--- /dev/null
+++ b/test/files/run/reflection-modulemirror-toplevel-badpath.check
@@ -0,0 +1,2 @@
+this is a static module, use reflectModule on a RuntimeMirror to obtain its ModuleMirror
+()
diff --git a/test/files/run/reflection-modulemirror-toplevel-badpath.scala b/test/files/run/reflection-modulemirror-toplevel-badpath.scala
new file mode 100644
index 0000000000..8b2994cabb
--- /dev/null
+++ b/test/files/run/reflection-modulemirror-toplevel-badpath.scala
@@ -0,0 +1,26 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.reflect.ClassTag
+
+object R { override def toString = "R" }
+
+class Foo{
+ import Test._
+ def foo = {
+ val classTag = implicitly[ClassTag[R.type]]
+ val sym = cm.moduleSymbol(classTag.runtimeClass)
+ try {
+ val cls = cm.reflect(this).reflectModule(sym)
+ cls.instance
+ println("this indicates a failure")
+ } catch {
+ case ex: Throwable =>
+ println(ex.getMessage)
+ }
+ }
+}
+
+object Test extends App{
+ val foo = new Foo
+ println(foo.foo)
+} \ No newline at end of file
diff --git a/test/files/run/reflection-modulemirror-toplevel-good.check b/test/files/run/reflection-modulemirror-toplevel-good.check
new file mode 100644
index 0000000000..ac044e5e46
--- /dev/null
+++ b/test/files/run/reflection-modulemirror-toplevel-good.check
@@ -0,0 +1 @@
+R \ No newline at end of file
diff --git a/test/files/run/reflection-modulemirror-toplevel-good.scala b/test/files/run/reflection-modulemirror-toplevel-good.scala
new file mode 100644
index 0000000000..0663136a22
--- /dev/null
+++ b/test/files/run/reflection-modulemirror-toplevel-good.scala
@@ -0,0 +1,20 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.reflect.ClassTag
+
+object R { override def toString = "R" }
+
+class Foo{
+ import Test._
+ def foo = {
+ val classTag = implicitly[ClassTag[R.type]]
+ val sym = cm.moduleSymbol(classTag.runtimeClass)
+ val cls = cm.reflectModule(sym)
+ cls.instance
+ }
+}
+
+object Test extends App{
+ val foo = new Foo
+ println(foo.foo)
+} \ No newline at end of file
diff --git a/test/files/run/reflection-repl.check b/test/files/run/reflection-repl.check
new file mode 100644
index 0000000000..e93fb6d6e7
--- /dev/null
+++ b/test/files/run/reflection-repl.check
@@ -0,0 +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 = List[Nothing]
+
+scala>
diff --git a/test/files/run/reflection-repl.scala b/test/files/run/reflection-repl.scala
new file mode 100644
index 0000000000..72b65a1a70
--- /dev/null
+++ b/test/files/run/reflection-repl.scala
@@ -0,0 +1,7 @@
+import scala.tools.partest.ReplTest
+
+object Test extends ReplTest {
+ def code = """
+ |scala.reflect.runtime.universe.typeOf[List[Nothing]]
+ |""".stripMargin
+}
diff --git a/test/files/run/reflection-simple.scala b/test/files/run/reflection-simple.scala
index fb3feec3cb..ec34b71cec 100644
--- a/test/files/run/reflection-simple.scala
+++ b/test/files/run/reflection-simple.scala
@@ -5,7 +5,8 @@ object Test {
def main(args: Array[String]) {
System.out.println("Running")
case class Foo(a: Int, b: Int, c: Int)
- val props = reflect.mirror.classToType(classOf[Foo]).members.filter(_.isTerm).map(_.toString)
+ import scala.reflect.runtime.{currentMirror => cm}
+ val props = cm.classSymbol(classOf[Foo]).typeSignature.members.filter(_.isTerm).map(_.toString)
props.toList.sorted foreach System.out.println
}
}
diff --git a/test/files/run/reflinit.check b/test/files/run/reflinit.check
new file mode 100644
index 0000000000..a9df3544ac
--- /dev/null
+++ b/test/files/run/reflinit.check
@@ -0,0 +1 @@
+List[Int]
diff --git a/test/files/run/reflinit.scala b/test/files/run/reflinit.scala
new file mode 100644
index 0000000000..6d3ba3a4df
--- /dev/null
+++ b/test/files/run/reflinit.scala
@@ -0,0 +1,6 @@
+import scala.reflect.runtime.universe._
+
+object Test extends App {
+ val tt2 = typeOf[List[Int]]
+ println(tt2)
+} \ No newline at end of file
diff --git a/test/files/run/reify-repl-fail-gracefully.check b/test/files/run/reify-repl-fail-gracefully.check
index 680db12667..5a97983e54 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.mirror._
-import scala.reflect.mirror._
-
-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-repl-fail-gracefully.scala b/test/files/run/reify-repl-fail-gracefully.scala
index d7a06e8da8..ed6d6cb6c9 100644
--- a/test/files/run/reify-repl-fail-gracefully.scala
+++ b/test/files/run/reify-repl-fail-gracefully.scala
@@ -3,7 +3,7 @@ import scala.tools.partest.ReplTest
object Test extends ReplTest {
def code = """
|import language.experimental.macros
- |import scala.reflect.mirror._
+ |import scala.reflect.runtime.universe._
|
|reify
""".stripMargin
diff --git a/test/files/run/reify_ann1a.check b/test/files/run/reify_ann1a.check
index a3944ae1ee..9df18b2362 100644
--- a/test/files/run/reify_ann1a.check
+++ b/test/files/run/reify_ann1a.check
@@ -14,15 +14,15 @@
()
}
{
- @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 Object {
- @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] = {
+ @ann(immutable.this.List.apply[java.lang.String]("1a")) @ann(immutable.this.List.apply[java.lang.String]("1b")) class C[@ann(immutable.this.List.apply[java.lang.String]("2a")) @ann(immutable.this.List.apply[java.lang.String]("2b")) T] extends Object {
+ @ann(immutable.this.List.apply[java.lang.String]("3a")) @ann(immutable.this.List.apply[java.lang.String]("3b")) <paramaccessor> private[this] val x: T @ann(immutable.this.List.apply[java.lang.String]("4b")) @ann(immutable.this.List.apply[java.lang.String]("4a")) = _;
+ def <init>(@ann(immutable.this.List.apply[java.lang.String]("3a")) @ann(immutable.this.List.apply[java.lang.String]("3b")) x: T @ann(immutable.this.List.apply[java.lang.String]("4b")) @ann(immutable.this.List.apply[java.lang.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")));
+ @ann(immutable.this.List.apply[java.lang.String]("5a")) @ann(immutable.this.List.apply[java.lang.String]("5b")) def f(x: Int @ann(immutable.this.List.apply[java.lang.String]("6b")) @ann(immutable.this.List.apply[java.lang.String]("6a"))): Int = {
+ @ann(immutable.this.List.apply[java.lang.String]("7a")) @ann(immutable.this.List.apply[java.lang.String]("7b")) val r: Int @ann(immutable.this.List.apply[java.lang.String]("8b")) @ann(immutable.this.List.apply[java.lang.String]("8a")) = ((x.+(3): Int @ann(immutable.this.List.apply[java.lang.String]("8a"))): Int @ann(immutable.this.List.apply[java.lang.String]("8b")) @ann(immutable.this.List.apply[java.lang.String]("8a")));
+ val s: Int @ann(immutable.this.List.apply[java.lang.String]("9b")) @ann(immutable.this.List.apply[java.lang.String]("9a")) = (4: Int @ann(immutable.this.List.apply[java.lang.String]("9b")) @ann(immutable.this.List.apply[java.lang.String]("9a")));
r.+(s)
}
};
diff --git a/test/files/run/reify_ann1a.scala b/test/files/run/reify_ann1a.scala
index 6c062ca2c2..9f994fb2eb 100644
--- a/test/files/run/reify_ann1a.scala
+++ b/test/files/run/reify_ann1a.scala
@@ -1,4 +1,7 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
class ann(bar: List[String]) extends annotation.StaticAnnotation
@@ -16,7 +19,7 @@ object Test extends App {
println(tree.toString)
// test 2: import and typecheck
- val toolbox = mkToolBox()
+ val toolbox = cm.mkToolBox()
val ttree = toolbox.typeCheck(tree)
println(ttree.toString)
diff --git a/test/files/run/reify_ann1b.scala b/test/files/run/reify_ann1b.scala
index 4faddef72c..3e0d3e0802 100644
--- a/test/files/run/reify_ann1b.scala
+++ b/test/files/run/reify_ann1b.scala
@@ -1,4 +1,7 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
class ann(bar: String) extends annotation.ClassfileAnnotation
@@ -16,7 +19,7 @@ object Test extends App {
println(tree.toString)
// test 2: import and typecheck
- val toolbox = mkToolBox()
+ val toolbox = cm.mkToolBox()
val ttree = toolbox.typeCheck(tree)
println(ttree.toString)
diff --git a/test/files/run/reify_ann2a.check b/test/files/run/reify_ann2a.check
index 5022c50ca8..bb30441f8c 100644
--- a/test/files/run/reify_ann2a.check
+++ b/test/files/run/reify_ann2a.check
@@ -22,21 +22,21 @@
}
{
class ann extends scala.annotation.Annotation with scala.annotation.StaticAnnotation {
- <paramaccessor> private[this] val bar: List[String] = _;
- def <init>(bar: List[String]): ann = {
+ <paramaccessor> private[this] val bar: List[java.lang.String] = _;
+ def <init>(bar: List[java.lang.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 Object {
- @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] = {
+ @ann(immutable.this.List.apply[java.lang.String]("1a")) @ann(immutable.this.List.apply[java.lang.String]("1b")) class C[@ann(immutable.this.List.apply[java.lang.String]("2a")) @ann(immutable.this.List.apply[java.lang.String]("2b")) T] extends Object {
+ @ann(immutable.this.List.apply[java.lang.String]("3a")) @ann(immutable.this.List.apply[java.lang.String]("3b")) <paramaccessor> private[this] val x: T @ann(immutable.this.List.apply[java.lang.String]("4b")) @ann(immutable.this.List.apply[java.lang.String]("4a")) = _;
+ def <init>(@ann(immutable.this.List.apply[java.lang.String]("3a")) @ann(immutable.this.List.apply[java.lang.String]("3b")) x: T @ann(immutable.this.List.apply[java.lang.String]("4b")) @ann(immutable.this.List.apply[java.lang.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")));
+ @ann(immutable.this.List.apply[java.lang.String]("5a")) @ann(immutable.this.List.apply[java.lang.String]("5b")) def f(x: Int @ann(immutable.this.List.apply[java.lang.String]("6b")) @ann(immutable.this.List.apply[java.lang.String]("6a"))): Int = {
+ @ann(immutable.this.List.apply[java.lang.String]("7a")) @ann(immutable.this.List.apply[java.lang.String]("7b")) val r: Int @ann(immutable.this.List.apply[java.lang.String]("8b")) @ann(immutable.this.List.apply[java.lang.String]("8a")) = ((x.+(3): Int @ann(immutable.this.List.apply[java.lang.String]("8a"))): Int @ann(immutable.this.List.apply[java.lang.String]("8b")) @ann(immutable.this.List.apply[java.lang.String]("8a")));
+ val s: Int @ann(immutable.this.List.apply[java.lang.String]("9b")) @ann(immutable.this.List.apply[java.lang.String]("9a")) = (4: Int @ann(immutable.this.List.apply[java.lang.String]("9b")) @ann(immutable.this.List.apply[java.lang.String]("9a")));
r.+(s)
}
};
diff --git a/test/files/run/reify_ann2a.scala b/test/files/run/reify_ann2a.scala
index a1723c221d..63a17ee192 100644
--- a/test/files/run/reify_ann2a.scala
+++ b/test/files/run/reify_ann2a.scala
@@ -1,4 +1,7 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
object Test extends App {
// test 1: reify
@@ -16,7 +19,7 @@ object Test extends App {
println(tree.toString)
// test 2: import and typecheck
- val toolbox = mkToolBox()
+ val toolbox = cm.mkToolBox()
val ttree = toolbox.typeCheck(tree)
println(ttree.toString)
diff --git a/test/files/run/reify_ann3.scala b/test/files/run/reify_ann3.scala
index d65e641619..dbb6a1b443 100644
--- a/test/files/run/reify_ann3.scala
+++ b/test/files/run/reify_ann3.scala
@@ -1,4 +1,7 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
import scala.annotation._
import scala.annotation.meta._
@@ -10,10 +13,10 @@ object Test extends App {
println(tree.toString)
// test 2: import and typecheck
- val toolbox = mkToolBox()
+ val toolbox = cm.mkToolBox()
val ttree = toolbox.typeCheck(tree)
println(ttree.toString)
// test 3: import and compile
toolbox.runExpr(tree)
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_ann4.scala b/test/files/run/reify_ann4.scala
index 5655812689..b4845d1586 100644
--- a/test/files/run/reify_ann4.scala
+++ b/test/files/run/reify_ann4.scala
@@ -1,4 +1,7 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
import scala.annotation._
import scala.annotation.meta._
@@ -14,10 +17,10 @@ object Test extends App {
println(tree.toString)
// test 2: import and typecheck
- val toolbox = mkToolBox()
+ val toolbox = cm.mkToolBox()
val ttree = toolbox.typeCheck(tree)
println(ttree.toString)
// test 3: import and compile
toolbox.runExpr(tree)
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_ann5.scala b/test/files/run/reify_ann5.scala
index aecc61de46..0ae8d317ce 100644
--- a/test/files/run/reify_ann5.scala
+++ b/test/files/run/reify_ann5.scala
@@ -1,4 +1,7 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
import scala.annotation._
import scala.annotation.meta._
import scala.beans._
@@ -11,10 +14,10 @@ object Test extends App {
println(tree.toString)
// test 2: import and typecheck
- val toolbox = mkToolBox()
+ val toolbox = cm.mkToolBox()
val ttree = toolbox.typeCheck(tree)
println(ttree.toString)
// test 3: import and compile
toolbox.runExpr(tree)
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_anonymous.scala b/test/files/run/reify_anonymous.scala
index cd740f0190..d743014dfd 100644
--- a/test/files/run/reify_anonymous.scala
+++ b/test/files/run/reify_anonymous.scala
@@ -1,7 +1,8 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
reify {
println(new {def x = 2; def y = x * x}.y)
}.eval
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_classfileann_a.scala b/test/files/run/reify_classfileann_a.scala
index 9aec69b4a3..0abb7b8154 100644
--- a/test/files/run/reify_classfileann_a.scala
+++ b/test/files/run/reify_classfileann_a.scala
@@ -1,4 +1,7 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
class ann(bar: String, quux: Array[String] = Array(), baz: ann = null) extends annotation.ClassfileAnnotation
@@ -10,7 +13,7 @@ object Test extends App {
println(tree.toString)
// test 2: import and typecheck
- val toolbox = mkToolBox()
+ val toolbox = cm.mkToolBox()
val ttree = toolbox.typeCheck(tree)
println(ttree.toString)
diff --git a/test/files/run/reify_classfileann_b.scala b/test/files/run/reify_classfileann_b.scala
index a37f20e72e..5ceb652a8b 100644
--- a/test/files/run/reify_classfileann_b.scala
+++ b/test/files/run/reify_classfileann_b.scala
@@ -1,4 +1,7 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
class ann(bar: String, quux: Array[String] = Array(), baz: ann = null) extends annotation.ClassfileAnnotation
@@ -14,7 +17,7 @@ object Test extends App {
println(tree.toString)
// test 2: import and typecheck
- val toolbox = mkToolBox()
+ val toolbox = cm.mkToolBox()
val ttree = toolbox.typeCheck(tree)
println(ttree.toString)
diff --git a/test/files/run/reify_closure1.scala b/test/files/run/reify_closure1.scala
index 3f5c8a8724..ce68975acc 100644
--- a/test/files/run/reify_closure1.scala
+++ b/test/files/run/reify_closure1.scala
@@ -1,4 +1,7 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
object Test extends App {
def foo[T](ys: List[T]): Int => Int = {
@@ -6,11 +9,11 @@ object Test extends App {
x
}}
- val toolbox = mkToolBox()
+ val toolbox = cm.mkToolBox()
val dyn = toolbox.runExpr(fun.tree)
dyn.asInstanceOf[Int => Int]
}
println(foo(List(1, 2, 3))(10))
println(foo(List(1, 2, 3, 4))(10))
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_closure2a.scala b/test/files/run/reify_closure2a.scala
index f5669a0e2c..cb53e7ffa8 100644
--- a/test/files/run/reify_closure2a.scala
+++ b/test/files/run/reify_closure2a.scala
@@ -1,4 +1,7 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
object Test extends App {
def foo(y: Int): Int => Int = {
@@ -6,11 +9,11 @@ object Test extends App {
x + y
}}
- val toolbox = mkToolBox()
+ val toolbox = cm.mkToolBox()
val dyn = toolbox.runExpr(fun.tree)
dyn.asInstanceOf[Int => Int]
}
println(foo(1)(10))
println(foo(2)(10))
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_closure3a.scala b/test/files/run/reify_closure3a.scala
index 056a705d7d..cf8c161afa 100644
--- a/test/files/run/reify_closure3a.scala
+++ b/test/files/run/reify_closure3a.scala
@@ -1,4 +1,7 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
object Test extends App {
def foo(y: Int): Int => Int = {
@@ -8,11 +11,11 @@ object Test extends App {
x + y1
}}
- val toolbox = mkToolBox()
+ val toolbox = cm.mkToolBox()
val dyn = toolbox.runExpr(fun.tree)
dyn.asInstanceOf[Int => Int]
}
println(foo(1)(10))
println(foo(2)(10))
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_closure4a.scala b/test/files/run/reify_closure4a.scala
index a63d20e561..1521295f16 100644
--- a/test/files/run/reify_closure4a.scala
+++ b/test/files/run/reify_closure4a.scala
@@ -1,4 +1,7 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
object Test extends App {
def foo(y: Int): Int => Int = {
@@ -8,11 +11,11 @@ object Test extends App {
x + y1
}}
- val toolbox = mkToolBox()
+ val toolbox = cm.mkToolBox()
val dyn = toolbox.runExpr(fun.tree)
dyn.asInstanceOf[Int => Int]
}
println(foo(1)(10))
println(foo(2)(10))
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_closure5a.scala b/test/files/run/reify_closure5a.scala
index 2e8b413f4c..84c2c08727 100644
--- a/test/files/run/reify_closure5a.scala
+++ b/test/files/run/reify_closure5a.scala
@@ -1,4 +1,7 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
object Test extends App {
def foo[T: TypeTag](ys: List[T]): Int => Int = {
@@ -6,7 +9,7 @@ object Test extends App {
x + ys.length
}}
- val toolbox = mkToolBox()
+ val toolbox = cm.mkToolBox()
val dyn = toolbox.runExpr(fun.tree)
dyn.asInstanceOf[Int => Int]
}
@@ -15,4 +18,4 @@ object Test extends App {
println(fun1(10))
var fun2 = foo(List(1, 2, 3, 4))
println(fun2(10))
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_closure6.scala b/test/files/run/reify_closure6.scala
index 2cbd4ce819..d007e80899 100644
--- a/test/files/run/reify_closure6.scala
+++ b/test/files/run/reify_closure6.scala
@@ -1,4 +1,7 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
object Test extends App {
var q = 0
@@ -13,7 +16,7 @@ object Test extends App {
x + ys.length * z + q + y
}}
- val toolbox = mkToolBox()
+ val toolbox = cm.mkToolBox()
val dyn = toolbox.runExpr(fun.tree)
dyn.asInstanceOf[Int => Int]
}
diff --git a/test/files/run/reify_closure7.scala b/test/files/run/reify_closure7.scala
index b9f87dbdeb..3d4956a724 100644
--- a/test/files/run/reify_closure7.scala
+++ b/test/files/run/reify_closure7.scala
@@ -1,4 +1,7 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
object Test extends App {
var q = 0
@@ -15,7 +18,7 @@ object Test extends App {
}}
if (clo == null) {
- val toolbox = mkToolBox()
+ val toolbox = cm.mkToolBox()
val dyn = toolbox.runExpr(fun.tree)
clo = dyn.asInstanceOf[Int => Int]
}
@@ -27,4 +30,4 @@ object Test extends App {
println("first invocation = " + fun1(10))
val fun2 = foo(List(1, 2, 3, 4))
println("second invocation = " + fun2(10))
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_closure8a.scala b/test/files/run/reify_closure8a.scala
index 9de121b42f..8db3d38241 100644
--- a/test/files/run/reify_closure8a.scala
+++ b/test/files/run/reify_closure8a.scala
@@ -1,12 +1,15 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
object Test extends App {
class Foo(val y: Int) {
def fun = reify{y}
}
- val toolbox = mkToolBox()
+ val toolbox = cm.mkToolBox()
val dyn = toolbox.runExpr(new Foo(10).fun.tree)
val foo = dyn.asInstanceOf[Int]
println(foo)
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_closure8b.check b/test/files/run/reify_closure8b.check
index e0ec7d2c8f..585e6d5740 100644
--- a/test/files/run/reify_closure8b.check
+++ b/test/files/run/reify_closure8b.check
@@ -1,3 +1,3 @@
-scala.reflect.runtime.ToolBoxes$ToolBox$ToolBoxError: reflective compilation has failed:
+scala.tools.reflect.ToolBoxError: reflective compilation has failed:
value y is not a member of Test.Foo
diff --git a/test/files/run/reify_closure8b.scala b/test/files/run/reify_closure8b.scala
index 431da3230e..9cdc0e997f 100644
--- a/test/files/run/reify_closure8b.scala
+++ b/test/files/run/reify_closure8b.scala
@@ -1,4 +1,7 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
object Test extends App {
// will fail because y is a private field
@@ -8,11 +11,11 @@ object Test extends App {
}
try {
- val dyn = mkToolBox().runExpr(new Foo(10).fun.tree)
+ val dyn = cm.mkToolBox().runExpr(new Foo(10).fun.tree)
val foo = dyn.asInstanceOf[Int]
println(foo)
} catch {
case ex: Throwable =>
println(ex)
}
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_closures10.scala b/test/files/run/reify_closures10.scala
index 0ccce77a94..2d9b833851 100644
--- a/test/files/run/reify_closures10.scala
+++ b/test/files/run/reify_closures10.scala
@@ -1,10 +1,13 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
object Test extends App {
val x = 2
val y = 3
val code = reify{println(x + y); x + y}
- val toolbox = mkToolBox()
+ val toolbox = cm.mkToolBox()
println(toolbox.runExpr(code.tree))
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_complex.scala b/test/files/run/reify_complex.scala
index ecc25ffca5..4abec3900e 100644
--- a/test/files/run/reify_complex.scala
+++ b/test/files/run/reify_complex.scala
@@ -1,4 +1,5 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
reify {
@@ -21,4 +22,4 @@ object Test extends App {
val x = new Complex(2, 1); val y = new Complex(1, 3)
println(x + y)
}.eval
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_copypaste1.check b/test/files/run/reify_copypaste1.check
new file mode 100644
index 0000000000..49a25ea881
--- /dev/null
+++ b/test/files/run/reify_copypaste1.check
@@ -0,0 +1,2 @@
+List(1, 2)
+
diff --git a/test/files/run/reify_copypaste1.scala b/test/files/run/reify_copypaste1.scala
new file mode 100644
index 0000000000..7eaa4fa7b5
--- /dev/null
+++ b/test/files/run/reify_copypaste1.scala
@@ -0,0 +1,19 @@
+import scala.reflect.runtime._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.universe.definitions._
+import scala.reflect.runtime.universe.Flag._
+import scala.tools.reflect.ToolBox
+
+object Test extends App {
+ val stdout = System.out
+ val output = new java.io.ByteArrayOutputStream()
+ System.setOut(new java.io.PrintStream(output))
+ val toolBox = currentMirror.mkToolBox(options = "-Yreify-copypaste")
+ val reify = Select(Select(Select(Select(Ident(ScalaPackage), newTermName("reflect")), newTermName("runtime")), newTermName("universe")), newTermName("reify"))
+ val reifee = Block(List(ValDef(Modifiers(LAZY), newTermName("x"), TypeTree(), Apply(Ident(ListModule), List(Literal(Constant(1)), Literal(Constant(2)))))), Ident(newTermName("x")))
+ toolBox.runExpr(Apply(reify, List(reifee)))
+ val Block(List(tpeCopypaste), exprCopypaste @ ModuleDef(_, _, Template(_, _, (_ :: stats) :+ expr))) = toolBox.parseExpr(output.toString())
+ output.reset()
+ toolBox.runExpr(Block(stats, expr))
+ stdout.println(output.toString)
+} \ No newline at end of file
diff --git a/test/files/run/reify_copypaste2.check b/test/files/run/reify_copypaste2.check
new file mode 100644
index 0000000000..9c34f5179b
--- /dev/null
+++ b/test/files/run/reify_copypaste2.check
@@ -0,0 +1 @@
+scala.reflect.runtime.`package`.universe.reify(Test.this.x)
diff --git a/test/files/run/reify_copypaste2.scala b/test/files/run/reify_copypaste2.scala
new file mode 100644
index 0000000000..12d08cf244
--- /dev/null
+++ b/test/files/run/reify_copypaste2.scala
@@ -0,0 +1,10 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
+
+object Test extends App {
+ val x = 2
+ val outer = reify{reify{x}}
+ println(outer.tree)
+} \ No newline at end of file
diff --git a/test/files/run/reify_csv.scala b/test/files/run/reify_csv.scala
index 966521575c..c35624469c 100644
--- a/test/files/run/reify_csv.scala
+++ b/test/files/run/reify_csv.scala
@@ -1,4 +1,5 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
val csv = """
diff --git a/test/files/run/reify_extendbuiltins.scala b/test/files/run/reify_extendbuiltins.scala
index f95e9ab6ec..a2d546579d 100644
--- a/test/files/run/reify_extendbuiltins.scala
+++ b/test/files/run/reify_extendbuiltins.scala
@@ -1,4 +1,5 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
reify {
@@ -11,4 +12,4 @@ object Test extends App {
println("10! = " + (10!))
}.eval
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_for1.scala b/test/files/run/reify_for1.scala
index 9d1e32f7e5..e1f5347572 100644
--- a/test/files/run/reify_for1.scala
+++ b/test/files/run/reify_for1.scala
@@ -1,4 +1,5 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
reify {
@@ -6,4 +7,4 @@ object Test extends App {
val sumOfSquares2 = (1 to 100).filter(_ % 3 == 0).map(Math.pow(_, 2)).sum
assert(sumOfSquares1 == sumOfSquares2)
}.eval
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_fors.check b/test/files/run/reify_fors_newpatmat.check
index eefddedc20..eefddedc20 100644
--- a/test/files/run/reify_fors.check
+++ b/test/files/run/reify_fors_newpatmat.check
diff --git a/test/files/run/reify_fors.scala b/test/files/run/reify_fors_newpatmat.scala
index 635fce049e..6bee9538a8 100644
--- a/test/files/run/reify_fors.scala
+++ b/test/files/run/reify_fors_newpatmat.scala
@@ -1,4 +1,5 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
reify {
@@ -97,4 +98,4 @@ object Test extends App {
val ys = List(2.0, 1.0, 3.0)
println("scalProd(" + xs + ", " + ys +") = " + scalProd(xs, ys))
}.eval
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_fors_oldpatmat.check b/test/files/run/reify_fors_oldpatmat.check
new file mode 100644
index 0000000000..eefddedc20
--- /dev/null
+++ b/test/files/run/reify_fors_oldpatmat.check
@@ -0,0 +1,5 @@
+Persons over 20: John Richard
+divisors(34) = List(1, 2, 17, 34)
+findNums(15) = (4,1) (5,2) (6,1) (7,4) (8,3) (8,5) (9,2) (9,4) (10,1) (10,3) (10,7) (11,2) (11,6) (11,8) (12,1) (12,5) (12,7) (13,4) (13,6) (13,10) (14,3) (14,5) (14,9)
+average(List(3.5, 5.0, 4.5)) = 4.333333333333333
+scalProd(List(3.5, 5.0, 4.5), List(2.0, 1.0, 3.0)) = 25.5
diff --git a/test/files/run/macro-invalidret-doesnt-conform-to-impl-rettype.check b/test/files/run/reify_fors_oldpatmat.flags
index e69de29bb2..e69de29bb2 100644
--- a/test/files/run/macro-invalidret-doesnt-conform-to-impl-rettype.check
+++ b/test/files/run/reify_fors_oldpatmat.flags
diff --git a/test/files/run/reify_fors_oldpatmat.scala b/test/files/run/reify_fors_oldpatmat.scala
new file mode 100644
index 0000000000..6bee9538a8
--- /dev/null
+++ b/test/files/run/reify_fors_oldpatmat.scala
@@ -0,0 +1,101 @@
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
+
+object Test extends App {
+ reify {
+ object Persons {
+ /** A list of persons. To create a list, we use Predef.List
+ * which takes a variable number of arguments and constructs
+ * a list out of them.
+ */
+ val persons = List(
+ new Person("Bob", 17),
+ new Person("John", 40),
+ new Person("Richard", 68)
+ )
+
+ /** A Person class. 'val' constructor parameters become
+ * public members of the class.
+ */
+ class Person(val name: String, val age: Int)
+
+ /** Return an iterator over persons that are older than 20.
+ */
+ def olderThan20(xs: Seq[Person]): Iterator[String] =
+ olderThan20(xs.iterator)
+
+ /** Return an iterator over persons older than 20, given
+ * an iterator over persons.
+ */
+ def olderThan20(xs: Iterator[Person]): Iterator[String] = {
+
+ // The first expression is called a 'generator' and makes
+ // 'p' take values from 'xs'. The second expression is
+ // called a 'filter' and it is a boolean expression which
+ // selects only persons older than 20. There can be more than
+ // one generator and filter. The 'yield' expression is evaluated
+ // for each 'p' which satisfies the filters and used to assemble
+ // the resulting iterator
+ for (p <- xs if p.age > 20) yield p.name
+ }
+ }
+
+ /** Some functions over lists of numbers which demonstrate
+ * the use of for comprehensions.
+ */
+ object Numeric {
+
+ /** Return the divisors of n. */
+ def divisors(n: Int): List[Int] =
+ for (i <- List.range(1, n+1) if n % i == 0) yield i
+
+ /** Is 'n' a prime number? */
+ def isPrime(n: Int) = divisors(n).length == 2
+
+ /** Return pairs of numbers whose sum is prime. */
+ def findNums(n: Int): Iterable[(Int, Int)] = {
+
+ // a for comprehension using two generators
+ for (i <- 1 until n;
+ j <- 1 until (i-1);
+ if isPrime(i + j)) yield (i, j)
+ }
+
+ /** Return the sum of the elements of 'xs'. */
+ def sum(xs: List[Double]): Double =
+ xs.foldLeft(0.0) { (x, y) => x + y }
+
+ /** Return the sum of pairwise product of the two lists. */
+ def scalProd(xs: List[Double], ys: List[Double]) =
+ sum(for((x, y) <- xs zip ys) yield x * y);
+
+ /** Remove duplicate elements in 'xs'. */
+ def removeDuplicates[A](xs: List[A]): List[A] =
+ if (xs.isEmpty)
+ xs
+ else
+ xs.head :: removeDuplicates(for (x <- xs.tail if x != xs.head) yield x)
+ }
+
+ // import all members of object 'persons' in the current scope
+ import Persons._
+
+ print("Persons over 20:")
+ olderThan20(persons) foreach { x => print(" " + x) }
+ println
+
+ import Numeric._
+
+ println("divisors(34) = " + divisors(34))
+
+ print("findNums(15) =")
+ findNums(15) foreach { x => print(" " + x) }
+ println
+
+ val xs = List(3.5, 5.0, 4.5)
+ println("average(" + xs + ") = " + sum(xs) / xs.length)
+
+ val ys = List(2.0, 1.0, 3.0)
+ println("scalProd(" + xs + ", " + ys +") = " + scalProd(xs, ys))
+ }.eval
+} \ No newline at end of file
diff --git a/test/files/run/reify_generic.scala b/test/files/run/reify_generic.scala
index 7033c4e237..7baffac6a3 100644
--- a/test/files/run/reify_generic.scala
+++ b/test/files/run/reify_generic.scala
@@ -1,8 +1,9 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
reify {
val product = List(1, 2, 3).head * List[Any](4, 2, 0).head.asInstanceOf[Int]
println(product)
}.eval
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_generic2.scala b/test/files/run/reify_generic2.scala
index 8f9def318e..36ab61e077 100644
--- a/test/files/run/reify_generic2.scala
+++ b/test/files/run/reify_generic2.scala
@@ -1,4 +1,5 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
reify {
@@ -6,4 +7,4 @@ object Test extends App {
val product = List(new C, new C).length * List[C](new C, new C).length
println(product)
}.eval
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_getter.scala b/test/files/run/reify_getter.scala
index 8bae293e72..26767603a0 100644
--- a/test/files/run/reify_getter.scala
+++ b/test/files/run/reify_getter.scala
@@ -1,4 +1,7 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
object Test extends App {
val code = reify {
@@ -9,7 +12,7 @@ object Test extends App {
new C().x
}
- val toolbox = mkToolBox()
+ val toolbox = cm.mkToolBox()
val evaluated = toolbox.runExpr(code.tree)
println("evaluated = " + evaluated)
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_implicits-new.scala b/test/files/run/reify_implicits-new.scala
index 69198391d1..42a1deef26 100644
--- a/test/files/run/reify_implicits-new.scala
+++ b/test/files/run/reify_implicits-new.scala
@@ -1,8 +1,10 @@
-import scala.reflect.mirror._
+import scala.reflect.{ClassTag, classTag}
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
reify {
- implicit def arrayWrapper[A : ArrayTag](x: Array[A]) =
+ implicit def arrayWrapper[A : ClassTag](x: Array[A]) =
new {
def sort(p: (A, A) => Boolean) = {
util.Sorting.stableSort(x, p); x
@@ -11,4 +13,4 @@ object Test extends App {
val x = Array(2, 3, 1, 4)
println("x = "+ x.sort((x: Int, y: Int) => x < y).toList)
}.eval
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_implicits-old.scala b/test/files/run/reify_implicits-old.scala
index 60971c3cfb..8ff256d2d4 100644
--- a/test/files/run/reify_implicits-old.scala
+++ b/test/files/run/reify_implicits-old.scala
@@ -1,4 +1,5 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
reify {
@@ -11,4 +12,4 @@ object Test extends App {
val x = Array(2, 3, 1, 4)
println("x = "+ x.sort((x: Int, y: Int) => x < y).toList)
}.eval
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_inheritance.scala b/test/files/run/reify_inheritance.scala
index dd86c355a3..c732664438 100644
--- a/test/files/run/reify_inheritance.scala
+++ b/test/files/run/reify_inheritance.scala
@@ -1,4 +1,5 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
reify {
@@ -13,4 +14,4 @@ object Test extends App {
println(new D().y * new C().x)
}.eval
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_inner1.scala b/test/files/run/reify_inner1.scala
index ea77ece6df..8da338ee4a 100644
--- a/test/files/run/reify_inner1.scala
+++ b/test/files/run/reify_inner1.scala
@@ -1,4 +1,5 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
reify {
@@ -12,4 +13,4 @@ object Test extends App {
val inner = new outer.D()
println(inner.x)
}.eval
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_inner2.scala b/test/files/run/reify_inner2.scala
index 67c403f7e5..f82eff8f03 100644
--- a/test/files/run/reify_inner2.scala
+++ b/test/files/run/reify_inner2.scala
@@ -1,4 +1,5 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
reify {
@@ -12,4 +13,4 @@ object Test extends App {
val inner = outer.D
println(inner.x)
}.eval
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_inner3.scala b/test/files/run/reify_inner3.scala
index ad401d81da..72f8d9a38a 100644
--- a/test/files/run/reify_inner3.scala
+++ b/test/files/run/reify_inner3.scala
@@ -1,4 +1,5 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
reify {
@@ -12,4 +13,4 @@ object Test extends App {
val inner = new outer.D
println(inner.x)
}.eval
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_inner4.scala b/test/files/run/reify_inner4.scala
index 140c8e9ed4..ecbbf149a4 100644
--- a/test/files/run/reify_inner4.scala
+++ b/test/files/run/reify_inner4.scala
@@ -1,4 +1,5 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
reify {
@@ -12,4 +13,4 @@ object Test extends App {
val inner = outer.D
println(inner.x)
}.eval
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_lazyevaluation.scala b/test/files/run/reify_lazyevaluation.scala
index 1a0c858914..5b310d95f7 100644
--- a/test/files/run/reify_lazyevaluation.scala
+++ b/test/files/run/reify_lazyevaluation.scala
@@ -1,4 +1,5 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
reify {
diff --git a/test/files/run/reify_maps.check b/test/files/run/reify_maps_newpatmat.check
index 08cbbb1359..08cbbb1359 100644
--- a/test/files/run/reify_maps.check
+++ b/test/files/run/reify_maps_newpatmat.check
diff --git a/test/files/run/reify_maps.scala b/test/files/run/reify_maps_newpatmat.scala
index 3fcc21892f..b538355b03 100644
--- a/test/files/run/reify_maps.scala
+++ b/test/files/run/reify_maps_newpatmat.scala
@@ -1,4 +1,5 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
reify {
@@ -16,4 +17,4 @@ object Test extends App {
}
)
}.eval
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_maps_oldpatmat.check b/test/files/run/reify_maps_oldpatmat.check
new file mode 100644
index 0000000000..08cbbb1359
--- /dev/null
+++ b/test/files/run/reify_maps_oldpatmat.check
@@ -0,0 +1,4 @@
+red has code: 16711680
+Unknown color: green
+Unknown color: blue
+turquoise has code: 65535
diff --git a/test/files/run/reify_fors.flags b/test/files/run/reify_maps_oldpatmat.flags
index e69de29bb2..e69de29bb2 100644
--- a/test/files/run/reify_fors.flags
+++ b/test/files/run/reify_maps_oldpatmat.flags
diff --git a/test/files/run/reify_maps_oldpatmat.scala b/test/files/run/reify_maps_oldpatmat.scala
new file mode 100644
index 0000000000..b538355b03
--- /dev/null
+++ b/test/files/run/reify_maps_oldpatmat.scala
@@ -0,0 +1,20 @@
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
+
+object Test extends App {
+ reify {
+ val colors = Map("red" -> 0xFF0000,
+ "turquoise" -> 0x00FFFF,
+ "black" -> 0x000000,
+ "orange" -> 0xFF8040,
+ "brown" -> 0x804000)
+ for (name <- List("red", "green", "blue", "turquoise")) println(
+ colors.get(name) match {
+ case Some(code) =>
+ name + " has code: " + code
+ case None =>
+ "Unknown color: " + name
+ }
+ )
+ }.eval
+} \ No newline at end of file
diff --git a/test/files/run/reify_metalevel_breach_+0_refers_to_1.scala b/test/files/run/reify_metalevel_breach_+0_refers_to_1.scala
index fe23bc8438..8ea92c511b 100644
--- a/test/files/run/reify_metalevel_breach_+0_refers_to_1.scala
+++ b/test/files/run/reify_metalevel_breach_+0_refers_to_1.scala
@@ -1,13 +1,18 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
+import scala.tools.reflect.Eval
object Test extends App {
val code = reify{
val x = 2
val inner = reify{x}
+// was: inner.splice
inner.eval
};
- val toolbox = mkToolBox()
+ val toolbox = cm.mkToolBox()
val evaluated = toolbox.runExpr(code.tree)
println("evaluated = " + evaluated)
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_metalevel_breach_-1_refers_to_0_a.scala b/test/files/run/reify_metalevel_breach_-1_refers_to_0_a.scala
index 5d98a38592..7ff4f84de0 100644
--- a/test/files/run/reify_metalevel_breach_-1_refers_to_0_a.scala
+++ b/test/files/run/reify_metalevel_breach_-1_refers_to_0_a.scala
@@ -1,11 +1,16 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
+import scala.tools.reflect.Eval
object Test extends App {
val x = 2
val outer = reify{reify{x}}
+// was: val code = reify{outer.splice.splice}
val code = reify{outer.eval.eval}
- val toolbox = mkToolBox()
+ val toolbox = cm.mkToolBox()
val evaluated = toolbox.runExpr(code.tree)
println("evaluated = " + evaluated)
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_metalevel_breach_-1_refers_to_0_b.scala b/test/files/run/reify_metalevel_breach_-1_refers_to_0_b.scala
index ca31d83acd..7f1f9d8478 100644
--- a/test/files/run/reify_metalevel_breach_-1_refers_to_0_b.scala
+++ b/test/files/run/reify_metalevel_breach_-1_refers_to_0_b.scala
@@ -1,15 +1,21 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
+import scala.tools.reflect.Eval
object Test extends App {
val x = 2
val code = reify{
{
val inner = reify{reify{x}}
+// was: inner.splice
inner.eval
+// was: }.splice
}.eval
}
- val toolbox = mkToolBox()
+ val toolbox = cm.mkToolBox()
val evaluated = toolbox.runExpr(code.tree)
println("evaluated = " + evaluated)
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_metalevel_breach_-1_refers_to_1.scala b/test/files/run/reify_metalevel_breach_-1_refers_to_1.scala
index 56d85c6ba1..65e0931b6e 100644
--- a/test/files/run/reify_metalevel_breach_-1_refers_to_1.scala
+++ b/test/files/run/reify_metalevel_breach_-1_refers_to_1.scala
@@ -1,13 +1,18 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
+import scala.tools.reflect.Eval
object Test extends App {
val code = reify{
val x = 2
val inner = reify{reify{x}}
+// was: inner.splice.splice
inner.eval.eval
};
- val toolbox = mkToolBox()
+ val toolbox = cm.mkToolBox()
val evaluated = toolbox.runExpr(code.tree)
println("evaluated = " + evaluated)
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_nested_inner_refers_to_global.scala b/test/files/run/reify_nested_inner_refers_to_global.scala
index 14899bcf99..f45c1daed9 100644
--- a/test/files/run/reify_nested_inner_refers_to_global.scala
+++ b/test/files/run/reify_nested_inner_refers_to_global.scala
@@ -1,14 +1,17 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
object Test extends App {
val code = {
val x = 2
reify{
- reify{x}.eval
+ reify{x}.splice
}
}
- val toolbox = mkToolBox()
+ val toolbox = cm.mkToolBox()
val evaluated = toolbox.runExpr(code.tree)
println("evaluated = " + evaluated)
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_nested_inner_refers_to_local.scala b/test/files/run/reify_nested_inner_refers_to_local.scala
index fd56585f72..4a3d8bb02b 100644
--- a/test/files/run/reify_nested_inner_refers_to_local.scala
+++ b/test/files/run/reify_nested_inner_refers_to_local.scala
@@ -1,12 +1,17 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
+import scala.tools.reflect.Eval
object Test extends App {
val code = reify{
val x = 2
+// was: reify{x}.eval
reify{x}.eval
};
- val toolbox = mkToolBox()
+ val toolbox = cm.mkToolBox()
val evaluated = toolbox.runExpr(code.tree)
println("evaluated = " + evaluated)
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_nested_outer_refers_to_global.scala b/test/files/run/reify_nested_outer_refers_to_global.scala
index f34e4fe04b..b628975e59 100644
--- a/test/files/run/reify_nested_outer_refers_to_global.scala
+++ b/test/files/run/reify_nested_outer_refers_to_global.scala
@@ -1,4 +1,7 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
object Test extends App {
val code = {
@@ -6,11 +9,11 @@ object Test extends App {
val outer = reify{x}
reify{
val x = 42
- outer.eval
+ outer.splice
};
}
- val toolbox = mkToolBox()
+ val toolbox = cm.mkToolBox()
val evaluated = toolbox.runExpr(code.tree)
println("evaluated = " + evaluated)
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_nested_outer_refers_to_local.scala b/test/files/run/reify_nested_outer_refers_to_local.scala
index e16c851d8d..80564fa9a2 100644
--- a/test/files/run/reify_nested_outer_refers_to_local.scala
+++ b/test/files/run/reify_nested_outer_refers_to_local.scala
@@ -1,4 +1,7 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
object Test extends App {
val outer = {
@@ -7,10 +10,10 @@ object Test extends App {
}
val code = reify{
val x = 42
- outer.eval
+ outer.splice
};
- val toolbox = mkToolBox()
+ val toolbox = cm.mkToolBox()
val evaluated = toolbox.runExpr(code.tree)
println("evaluated = " + evaluated)
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_newimpl_01.scala b/test/files/run/reify_newimpl_01.scala
index f7539a15b0..e4b46e428f 100644
--- a/test/files/run/reify_newimpl_01.scala
+++ b/test/files/run/reify_newimpl_01.scala
@@ -1,4 +1,6 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.ToolBox
+import scala.tools.reflect.Eval
object Test extends App {
{
diff --git a/test/files/run/reify_newimpl_02.scala b/test/files/run/reify_newimpl_02.scala
index 2c085efa04..fa7ee17acf 100644
--- a/test/files/run/reify_newimpl_02.scala
+++ b/test/files/run/reify_newimpl_02.scala
@@ -1,4 +1,6 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.ToolBox
+import scala.tools.reflect.Eval
object Test extends App {
{
diff --git a/test/files/run/reify_newimpl_03.scala b/test/files/run/reify_newimpl_03.scala
index 361cfc50bb..8d65425528 100644
--- a/test/files/run/reify_newimpl_03.scala
+++ b/test/files/run/reify_newimpl_03.scala
@@ -1,4 +1,6 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.ToolBox
+import scala.tools.reflect.Eval
object Test extends App {
{
diff --git a/test/files/run/reify_newimpl_04.scala b/test/files/run/reify_newimpl_04.scala
index d80a7c9ffd..21341ed102 100644
--- a/test/files/run/reify_newimpl_04.scala
+++ b/test/files/run/reify_newimpl_04.scala
@@ -1,4 +1,6 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.ToolBox
+import scala.tools.reflect.Eval
object Test extends App {
{
diff --git a/test/files/run/reify_newimpl_05.scala b/test/files/run/reify_newimpl_05.scala
index 85c1711bdb..635eba3827 100644
--- a/test/files/run/reify_newimpl_05.scala
+++ b/test/files/run/reify_newimpl_05.scala
@@ -1,4 +1,6 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.ToolBox
+import scala.tools.reflect.Eval
object Test extends App {
{
diff --git a/test/files/run/reify_newimpl_06.scala b/test/files/run/reify_newimpl_06.scala
index 257b54167a..0bf37da8c6 100644
--- a/test/files/run/reify_newimpl_06.scala
+++ b/test/files/run/reify_newimpl_06.scala
@@ -1,4 +1,6 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.ToolBox
+import scala.tools.reflect.Eval
object Test extends App {
class C(val y: Int) {
diff --git a/test/files/run/reify_newimpl_09.scala b/test/files/run/reify_newimpl_09.scala
index 2c81945a2a..27fbd37b71 100644
--- a/test/files/run/reify_newimpl_09.scala
+++ b/test/files/run/reify_newimpl_09.scala
@@ -1,4 +1,6 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.ToolBox
+import scala.tools.reflect.Eval
object Test extends App {
{
diff --git a/test/files/run/reify_newimpl_10.scala b/test/files/run/reify_newimpl_10.scala
index 6e70b4d216..791e52943a 100644
--- a/test/files/run/reify_newimpl_10.scala
+++ b/test/files/run/reify_newimpl_10.scala
@@ -1,4 +1,6 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.ToolBox
+import scala.tools.reflect.Eval
object Test extends App {
{
diff --git a/test/files/run/reify_newimpl_11.check b/test/files/run/reify_newimpl_11.check
index e2a8206132..21bd28667e 100644
--- a/test/files/run/reify_newimpl_11.check
+++ b/test/files/run/reify_newimpl_11.check
@@ -1,2 +1,2 @@
-scala.reflect.runtime.ToolBoxes$ToolBox$ToolBoxError: reflective toolbox has failed:
-unresolved free type variables (namely: T defined by C in reify_newimpl_11.scala:4: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_11.scala b/test/files/run/reify_newimpl_11.scala
index 4e91c7a457..e8ca664418 100644
--- a/test/files/run/reify_newimpl_11.scala
+++ b/test/files/run/reify_newimpl_11.scala
@@ -1,4 +1,6 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.ToolBox
+import scala.tools.reflect.Eval
object Test extends App {
class C[T] {
diff --git a/test/files/run/reify_newimpl_12.scala b/test/files/run/reify_newimpl_12.scala
index 433168ce28..246d7b4d4c 100644
--- a/test/files/run/reify_newimpl_12.scala
+++ b/test/files/run/reify_newimpl_12.scala
@@ -1,4 +1,6 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.ToolBox
+import scala.tools.reflect.Eval
object Test extends App {
class C[T: TypeTag] {
diff --git a/test/files/run/reify_newimpl_13.check b/test/files/run/reify_newimpl_13.check
index 7c47310cf2..e28732bd6a 100644
--- a/test/files/run/reify_newimpl_13.check
+++ b/test/files/run/reify_newimpl_13.check
@@ -1,2 +1,2 @@
-scala.reflect.runtime.ToolBoxes$ToolBox$ToolBoxError: reflective toolbox has failed:
-unresolved free type variables (namely: T defined by C in reify_newimpl_13.scala:5: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_13.scala b/test/files/run/reify_newimpl_13.scala
index dd1980b74f..1b2b8cb529 100644
--- a/test/files/run/reify_newimpl_13.scala
+++ b/test/files/run/reify_newimpl_13.scala
@@ -1,4 +1,6 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.ToolBox
+import scala.tools.reflect.Eval
object Test extends App {
{
diff --git a/test/files/run/reify_newimpl_14.scala b/test/files/run/reify_newimpl_14.scala
index 3f52f19cfb..284e87acd3 100644
--- a/test/files/run/reify_newimpl_14.scala
+++ b/test/files/run/reify_newimpl_14.scala
@@ -1,4 +1,6 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.ToolBox
+import scala.tools.reflect.Eval
object Test extends App {
{
diff --git a/test/files/run/reify_newimpl_15.scala b/test/files/run/reify_newimpl_15.scala
index b707b2583d..cb66e8549e 100644
--- a/test/files/run/reify_newimpl_15.scala
+++ b/test/files/run/reify_newimpl_15.scala
@@ -1,4 +1,6 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.ToolBox
+import scala.tools.reflect.Eval
object Test extends App {
class C {
diff --git a/test/files/run/reify_newimpl_16.scala b/test/files/run/reify_newimpl_16.scala
index 98fc15878c..a0cadf4d48 100644
--- a/test/files/run/reify_newimpl_16.scala
+++ b/test/files/run/reify_newimpl_16.scala
@@ -1,4 +1,6 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.ToolBox
+import scala.tools.reflect.Eval
object Test extends App {
{
diff --git a/test/files/run/reify_newimpl_17.check b/test/files/run/reify_newimpl_17.check
index 0fb9ddfc2d..e592e0e94e 100644
--- a/test/files/run/reify_newimpl_17.check
+++ b/test/files/run/reify_newimpl_17.check
@@ -1,2 +1,2 @@
-scala.reflect.runtime.ToolBoxes$ToolBox$ToolBoxError: reflective toolbox has failed:
-unresolved free type variables (namely: U defined by C in reify_newimpl_17.scala:4: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: U defined by C in reify_newimpl_17.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_17.scala b/test/files/run/reify_newimpl_17.scala
index 331777fcfb..8fbcd52502 100644
--- a/test/files/run/reify_newimpl_17.scala
+++ b/test/files/run/reify_newimpl_17.scala
@@ -1,4 +1,6 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.ToolBox
+import scala.tools.reflect.Eval
object Test extends App {
class C[U] {
diff --git a/test/files/run/reify_newimpl_18.scala b/test/files/run/reify_newimpl_18.scala
index 704e54928a..8456fd1b8f 100644
--- a/test/files/run/reify_newimpl_18.scala
+++ b/test/files/run/reify_newimpl_18.scala
@@ -1,4 +1,6 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.ToolBox
+import scala.tools.reflect.Eval
object Test extends App {
class C[U: TypeTag] {
diff --git a/test/files/run/reify_newimpl_19.check b/test/files/run/reify_newimpl_19.check
index 32f9300f53..1d96992869 100644
--- a/test/files/run/reify_newimpl_19.check
+++ b/test/files/run/reify_newimpl_19.check
@@ -1,2 +1,2 @@
-scala.reflect.runtime.ToolBoxes$ToolBox$ToolBoxError: reflective toolbox has failed:
-unresolved free type variables (namely: T defined by C in reify_newimpl_19.scala:5: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_19.scala b/test/files/run/reify_newimpl_19.scala
index 0ea8ae6992..ba2d39cfdb 100644
--- a/test/files/run/reify_newimpl_19.scala
+++ b/test/files/run/reify_newimpl_19.scala
@@ -1,4 +1,6 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.ToolBox
+import scala.tools.reflect.Eval
object Test extends App {
class C {
diff --git a/test/files/run/reify_newimpl_20.scala b/test/files/run/reify_newimpl_20.scala
index 16895a449e..f8ddb53a22 100644
--- a/test/files/run/reify_newimpl_20.scala
+++ b/test/files/run/reify_newimpl_20.scala
@@ -1,4 +1,6 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.ToolBox
+import scala.tools.reflect.Eval
object Test extends App {
class C {
diff --git a/test/files/run/reify_newimpl_21.scala b/test/files/run/reify_newimpl_21.scala
index 99f9ac9089..97261b21ed 100644
--- a/test/files/run/reify_newimpl_21.scala
+++ b/test/files/run/reify_newimpl_21.scala
@@ -1,4 +1,6 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.ToolBox
+import scala.tools.reflect.Eval
object Test extends App {
trait C {
diff --git a/test/files/run/reify_newimpl_22.check b/test/files/run/reify_newimpl_22.check
index 51699cbc29..ebcf42f52f 100644
--- a/test/files/run/reify_newimpl_22.check
+++ b/test/files/run/reify_newimpl_22.check
@@ -3,8 +3,14 @@ Type :help for more information.
scala>
-scala> import scala.reflect.mirror._
-import scala.reflect.mirror._
+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
@@ -13,7 +19,7 @@ scala> {
}
println(code.eval)
}
-<console>:13: free term: Ident(newTermName("x")) defined by res0 in <console>:12:21
+<console>:15: free term: Ident(newTermName("x")) defined by res0 in <console>:14:21
val code = reify {
^
2
diff --git a/test/files/run/reify_newimpl_22.scala b/test/files/run/reify_newimpl_22.scala
index a211ad360c..8512620a16 100644
--- a/test/files/run/reify_newimpl_22.scala
+++ b/test/files/run/reify_newimpl_22.scala
@@ -3,7 +3,9 @@ import scala.tools.partest.ReplTest
object Test extends ReplTest {
override def extraSettings = "-Xlog-free-terms"
def code = """
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.ToolBox
+import scala.tools.reflect.Eval
{
val x = 2
val code = reify {
@@ -12,4 +14,4 @@ import scala.reflect.mirror._
println(code.eval)
}
"""
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_newimpl_23.check b/test/files/run/reify_newimpl_23.check
index 33d15190fb..c8ed424c86 100644
--- a/test/files/run/reify_newimpl_23.check
+++ b/test/files/run/reify_newimpl_23.check
@@ -3,8 +3,14 @@ Type :help for more information.
scala>
-scala> import scala.reflect.mirror._
-import scala.reflect.mirror._
+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 {
@@ -12,7 +18,7 @@ scala> def foo[T]{
}
println(code.eval)
}
-<console>:11: free type: Ident(newTypeName("T")) defined by foo in <console>:10:16
+<console>:13: free type: Ident(newTypeName("T")) defined by foo in <console>:12:16
val code = reify {
^
foo: [T]=> Unit
diff --git a/test/files/run/reify_newimpl_23.scala b/test/files/run/reify_newimpl_23.scala
index 15da4e497e..d4c2a68ce6 100644
--- a/test/files/run/reify_newimpl_23.scala
+++ b/test/files/run/reify_newimpl_23.scala
@@ -3,7 +3,9 @@ import scala.tools.partest.ReplTest
object Test extends ReplTest {
override def extraSettings = "-Xlog-free-types"
def code = """
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.ToolBox
+import scala.tools.reflect.Eval
def foo[T]{
val code = reify {
List[T]()
@@ -11,4 +13,4 @@ def foo[T]{
println(code.eval)
}
"""
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_newimpl_24.check b/test/files/run/reify_newimpl_24.check
deleted file mode 100644
index 66b18c790e..0000000000
--- a/test/files/run/reify_newimpl_24.check
+++ /dev/null
@@ -1,24 +0,0 @@
-Type in expressions to have them evaluated.
-Type :help for more information.
-
-scala>
-
-scala> import scala.reflect.mirror._
-import scala.reflect.mirror._
-
-scala> {
- val x = 2
- val code = reify {
- val y = reify { x }
- y.eval
- }
- println(code.eval)
-}
-<console>:15: this splice cannot be resolved statically
- y.eval
- ^
-2
-
-scala>
-
-scala>
diff --git a/test/files/run/reify_newimpl_24.scala b/test/files/run/reify_newimpl_24.scala
deleted file mode 100644
index 7b21eeeb10..0000000000
--- a/test/files/run/reify_newimpl_24.scala
+++ /dev/null
@@ -1,16 +0,0 @@
-import scala.tools.partest.ReplTest
-
-object Test extends ReplTest {
- override def extraSettings = "-Xlog-runtime-splices"
- def code = """
-import scala.reflect.mirror._
-{
- val x = 2
- val code = reify {
- val y = reify { x }
- y.eval
- }
- println(code.eval)
-}
- """
-}
diff --git a/test/files/run/reify_newimpl_25.check b/test/files/run/reify_newimpl_25.check
index 37ff83c9ee..a688a98fbc 100644
--- a/test/files/run/reify_newimpl_25.check
+++ b/test/files/run/reify_newimpl_25.check
@@ -3,18 +3,16 @@ Type :help for more information.
scala>
-scala> import scala.reflect.mirror._
-import scala.reflect.mirror._
-
scala> {
+ import scala.reflect.runtime.universe._
val x = "2"
val tt = implicitly[TypeTag[x.type]]
println(tt)
}
-<console>:13: free term: Ident(newTermName("x")) defined by res0 in <console>:12:21
+<console>:11: free term: Ident(newTermName("x")) defined by res0 in <console>:10:21
val tt = implicitly[TypeTag[x.type]]
^
-ConcreteTypeTag[x.type]
+TypeTag[x.type]
scala>
diff --git a/test/files/run/reify_newimpl_25.scala b/test/files/run/reify_newimpl_25.scala
index 1f66f5e681..01cc04b59f 100644
--- a/test/files/run/reify_newimpl_25.scala
+++ b/test/files/run/reify_newimpl_25.scala
@@ -3,11 +3,11 @@ import scala.tools.partest.ReplTest
object Test extends ReplTest {
override def extraSettings = "-Xlog-free-terms"
def code = """
-import scala.reflect.mirror._
{
+ import scala.reflect.runtime.universe._
val x = "2"
val tt = implicitly[TypeTag[x.type]]
println(tt)
}
"""
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_newimpl_26.check b/test/files/run/reify_newimpl_26.check
index d92b3bd817..6c5f124960 100644
--- a/test/files/run/reify_newimpl_26.check
+++ b/test/files/run/reify_newimpl_26.check
@@ -3,20 +3,18 @@ Type :help for more information.
scala>
-scala> import scala.reflect.mirror._
-import scala.reflect.mirror._
-
scala> def foo[T]{
- val tt = implicitly[TypeTag[List[T]]]
+ import scala.reflect.runtime.universe._
+ val tt = implicitly[AbsTypeTag[List[T]]]
println(tt)
}
-<console>:11: free type: Ident(newTypeName("T")) defined by foo in <console>:10:16
- val tt = implicitly[TypeTag[List[T]]]
+<console>:9: free type: Ident(newTypeName("T")) defined by foo in <console>:7:16
+ val tt = implicitly[AbsTypeTag[List[T]]]
^
foo: [T]=> Unit
scala> foo[Int]
-TypeTag[List[T]]
+AbsTypeTag[List[T]]
scala>
diff --git a/test/files/run/reify_newimpl_26.scala b/test/files/run/reify_newimpl_26.scala
index f2dd1bfc4e..a12d8a2970 100644
--- a/test/files/run/reify_newimpl_26.scala
+++ b/test/files/run/reify_newimpl_26.scala
@@ -3,11 +3,11 @@ import scala.tools.partest.ReplTest
object Test extends ReplTest {
override def extraSettings = "-Xlog-free-types"
def code = """
-import scala.reflect.mirror._
def foo[T]{
- val tt = implicitly[TypeTag[List[T]]]
+ import scala.reflect.runtime.universe._
+ val tt = implicitly[AbsTypeTag[List[T]]]
println(tt)
}
foo[Int]
"""
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_newimpl_27.scala b/test/files/run/reify_newimpl_27.scala
index b3d6d5c865..db9ada36e4 100644
--- a/test/files/run/reify_newimpl_27.scala
+++ b/test/files/run/reify_newimpl_27.scala
@@ -1,4 +1,6 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.ToolBox
+import scala.tools.reflect.Eval
object Test extends App {
object C {
diff --git a/test/files/run/reify_newimpl_28.scala b/test/files/run/reify_newimpl_28.scala
index f7874b8548..524a110704 100644
--- a/test/files/run/reify_newimpl_28.scala
+++ b/test/files/run/reify_newimpl_28.scala
@@ -1,4 +1,6 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.ToolBox
+import scala.tools.reflect.Eval
object Test extends App {
{
diff --git a/test/files/run/reify_newimpl_29.scala b/test/files/run/reify_newimpl_29.scala
index e32762f335..033c360b8c 100644
--- a/test/files/run/reify_newimpl_29.scala
+++ b/test/files/run/reify_newimpl_29.scala
@@ -1,4 +1,6 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.ToolBox
+import scala.tools.reflect.Eval
object Test extends App {
class C {
diff --git a/test/files/run/reify_newimpl_30.scala b/test/files/run/reify_newimpl_30.scala
index e4ba3221e1..573d05a630 100644
--- a/test/files/run/reify_newimpl_30.scala
+++ b/test/files/run/reify_newimpl_30.scala
@@ -1,4 +1,6 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.ToolBox
+import scala.tools.reflect.Eval
object Test extends App {
{
diff --git a/test/files/run/reify_newimpl_31.scala b/test/files/run/reify_newimpl_31.scala
index 20a851e32e..2e20aa0f62 100644
--- a/test/files/run/reify_newimpl_31.scala
+++ b/test/files/run/reify_newimpl_31.scala
@@ -1,4 +1,6 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.ToolBox
+import scala.tools.reflect.Eval
object Test extends App {
object C {
diff --git a/test/files/run/reify_newimpl_32.scala b/test/files/run/reify_newimpl_32.scala
index 788486ec00..095e59d919 100644
--- a/test/files/run/reify_newimpl_32.scala
+++ b/test/files/run/reify_newimpl_32.scala
@@ -1,4 +1,6 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.ToolBox
+import scala.tools.reflect.Eval
object Test extends App {
{
diff --git a/test/files/run/reify_newimpl_33.scala b/test/files/run/reify_newimpl_33.scala
index 84a8258256..98bb2e5102 100644
--- a/test/files/run/reify_newimpl_33.scala
+++ b/test/files/run/reify_newimpl_33.scala
@@ -1,4 +1,6 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.ToolBox
+import scala.tools.reflect.Eval
object Test extends App {
object C {
diff --git a/test/files/run/reify_newimpl_34.scala b/test/files/run/reify_newimpl_34.scala
index 5935ab385c..a0a575ed7d 100644
--- a/test/files/run/reify_newimpl_34.scala
+++ b/test/files/run/reify_newimpl_34.scala
@@ -1,4 +1,6 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.ToolBox
+import scala.tools.reflect.Eval
object Test extends App {
{
diff --git a/test/files/run/reify_newimpl_35.check b/test/files/run/reify_newimpl_35.check
new file mode 100644
index 0000000000..f8306003b5
--- /dev/null
+++ b/test/files/run/reify_newimpl_35.check
@@ -0,0 +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>
diff --git a/test/files/run/reify_newimpl_35.scala b/test/files/run/reify_newimpl_35.scala
new file mode 100644
index 0000000000..f2ebf5181b
--- /dev/null
+++ b/test/files/run/reify_newimpl_35.scala
@@ -0,0 +1,10 @@
+import scala.tools.partest.ReplTest
+
+object Test extends ReplTest {
+ override def extraSettings = "-Xlog-free-types"
+ def code = """
+import scala.reflect.runtime.universe._
+def foo[T: TypeTag] = reify{List[T]()}
+println(foo)
+ """
+}
diff --git a/test/files/run/reify_newimpl_36.scala b/test/files/run/reify_newimpl_36.scala
index c76efce27a..490e645cf7 100644
--- a/test/files/run/reify_newimpl_36.scala
+++ b/test/files/run/reify_newimpl_36.scala
@@ -1,4 +1,5 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
{
diff --git a/test/files/run/reify_newimpl_37.scala b/test/files/run/reify_newimpl_37.scala
index e83d35dbe1..7c4d4af3dd 100644
--- a/test/files/run/reify_newimpl_37.scala
+++ b/test/files/run/reify_newimpl_37.scala
@@ -1,4 +1,5 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
{
diff --git a/test/files/run/reify_newimpl_38.scala b/test/files/run/reify_newimpl_38.scala
index 70ef49ecf7..fd898b9ab2 100644
--- a/test/files/run/reify_newimpl_38.scala
+++ b/test/files/run/reify_newimpl_38.scala
@@ -1,4 +1,5 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
{
diff --git a/test/files/run/reify_newimpl_39.scala b/test/files/run/reify_newimpl_39.scala
index faa45d917d..885c738275 100644
--- a/test/files/run/reify_newimpl_39.scala
+++ b/test/files/run/reify_newimpl_39.scala
@@ -1,4 +1,5 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
{
diff --git a/test/files/run/reify_newimpl_40.scala b/test/files/run/reify_newimpl_40.scala
index a983a92324..018bf720f3 100644
--- a/test/files/run/reify_newimpl_40.scala
+++ b/test/files/run/reify_newimpl_40.scala
@@ -1,4 +1,5 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
{
diff --git a/test/files/run/reify_newimpl_41.scala b/test/files/run/reify_newimpl_41.scala
index 9aedccc98a..9bb79fb2b9 100644
--- a/test/files/run/reify_newimpl_41.scala
+++ b/test/files/run/reify_newimpl_41.scala
@@ -1,4 +1,5 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
{
diff --git a/test/files/run/reify_newimpl_42.scala b/test/files/run/reify_newimpl_42.scala
index 1e21bd59bc..bd7deadea6 100644
--- a/test/files/run/reify_newimpl_42.scala
+++ b/test/files/run/reify_newimpl_42.scala
@@ -1,4 +1,5 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
{
diff --git a/test/files/run/reify_newimpl_43.scala b/test/files/run/reify_newimpl_43.scala
index 962461db8b..88ea224322 100644
--- a/test/files/run/reify_newimpl_43.scala
+++ b/test/files/run/reify_newimpl_43.scala
@@ -1,4 +1,5 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
{
diff --git a/test/files/run/reify_newimpl_44.scala b/test/files/run/reify_newimpl_44.scala
index 962461db8b..88ea224322 100644
--- a/test/files/run/reify_newimpl_44.scala
+++ b/test/files/run/reify_newimpl_44.scala
@@ -1,4 +1,5 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
{
diff --git a/test/files/run/reify_newimpl_45.scala b/test/files/run/reify_newimpl_45.scala
index b2b52eaf5b..d2254d6dde 100644
--- a/test/files/run/reify_newimpl_45.scala
+++ b/test/files/run/reify_newimpl_45.scala
@@ -1,11 +1,14 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
object Test extends App {
class C[T >: Null] {
val code = reify{val x: T = "2".asInstanceOf[T]; println("ima worx: %s".format(x)); x}
- println(freeTypes(code.tree))
- val T = freeTypes(code.tree)(0)
- mkToolBox().runExpr(code.tree, Map(T -> definitions.StringClass.asType))
+ println(code.tree.freeTypes)
+ val T = code.tree.freeTypes(0)
+ cm.mkToolBox().runExpr(code.tree, Map(T -> definitions.StringClass.asType))
}
new C[String]
diff --git a/test/files/run/reify_newimpl_47.scala b/test/files/run/reify_newimpl_47.scala
index bd1bd1fe65..8740132f6a 100644
--- a/test/files/run/reify_newimpl_47.scala
+++ b/test/files/run/reify_newimpl_47.scala
@@ -1,4 +1,6 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.ToolBox
+import scala.tools.reflect.Eval
object Test extends App {
val outer = {
@@ -8,8 +10,8 @@ object Test extends App {
val code = reify{
val x = 42
- outer.eval
+ outer.splice
}
println(code.eval)
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_newimpl_48.scala b/test/files/run/reify_newimpl_48.scala
index 1522509907..9899bc09a0 100644
--- a/test/files/run/reify_newimpl_48.scala
+++ b/test/files/run/reify_newimpl_48.scala
@@ -1,4 +1,6 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.ToolBox
+import scala.tools.reflect.Eval
object Test extends App {
val outer1 = {
@@ -13,8 +15,8 @@ object Test extends App {
val code = reify{
val x = 4
- x + outer1.eval + outer2.eval
+ x + outer1.splice + outer2.splice
}
println(code.eval)
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_newimpl_49.scala b/test/files/run/reify_newimpl_49.scala
index 68d968e28b..2222bd69d5 100644
--- a/test/files/run/reify_newimpl_49.scala
+++ b/test/files/run/reify_newimpl_49.scala
@@ -1,4 +1,5 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
{
diff --git a/test/files/run/reify_newimpl_50.scala b/test/files/run/reify_newimpl_50.scala
index b81d72a4eb..279cb161a0 100644
--- a/test/files/run/reify_newimpl_50.scala
+++ b/test/files/run/reify_newimpl_50.scala
@@ -1,4 +1,5 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
{
diff --git a/test/files/run/reify_newimpl_51.scala b/test/files/run/reify_newimpl_51.scala
index ccbae2e160..f823bf4033 100644
--- a/test/files/run/reify_newimpl_51.scala
+++ b/test/files/run/reify_newimpl_51.scala
@@ -1,4 +1,5 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
{
diff --git a/test/files/run/reify_newimpl_52.scala b/test/files/run/reify_newimpl_52.scala
index 60b16d3618..f01199e830 100644
--- a/test/files/run/reify_newimpl_52.scala
+++ b/test/files/run/reify_newimpl_52.scala
@@ -1,4 +1,5 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
{
diff --git a/test/files/run/reify_printf.scala b/test/files/run/reify_printf.scala
index dc092c1a85..1b1c6fdbb8 100644
--- a/test/files/run/reify_printf.scala
+++ b/test/files/run/reify_printf.scala
@@ -1,20 +1,20 @@
import java.io.{ ByteArrayOutputStream, PrintStream }
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
import scala.reflect.api._
import scala.reflect.api.Trees
import scala.reflect.internal.Types
import scala.util.matching.Regex
object Test extends App {
- val tree = tree_printf(reify("hello %s").tree, reify("world").tree)
-
- import scala.reflect.mirror._
- val toolbox = mkToolBox()
-
val output = new ByteArrayOutputStream()
Console.setOut(new PrintStream(output))
- val evaluated = toolbox.runExpr(tree)
+ val toolbox = cm.mkToolBox()
+ val tree = tree_printf(reify("hello %s").tree, reify("world").tree)
+ val evaluated = toolbox.runExpr(tree)
assert(output.toString() == "hello world", output.toString() +" == hello world")
/*
@@ -30,9 +30,9 @@ object Test extends App {
(
Some(
ValDef(
- Modifiers()
+ NoMods
, local
- , TypeTree().setType(tpe)
+ , TypeTree(tpe)
, value
)
)
@@ -44,8 +44,8 @@ object Test extends App {
val Literal(Constant(s_format: String)) = format
val paramsStack = scala.collection.mutable.Stack(params: _*)
val parsed = s_format.split("(?<=%[\\w%])|(?=%[\\w%])") map {
- case "%d" => createTempValDef( paramsStack.pop, classToType(classOf[Int]) )
- case "%s" => createTempValDef( paramsStack.pop, classToType(classOf[String]) )
+ case "%d" => createTempValDef( paramsStack.pop, IntTpe )
+ case "%s" => createTempValDef( paramsStack.pop, StringTpe )
case "%%" => {
(None:Option[Tree], Literal(Constant("%")))
}
@@ -68,4 +68,4 @@ object Test extends App {
): Tree
Block((evals ++ prints).toList, Literal(Constant(())))
}
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_properties.scala b/test/files/run/reify_properties.scala
index 5cacc262ac..01a9b12a92 100644
--- a/test/files/run/reify_properties.scala
+++ b/test/files/run/reify_properties.scala
@@ -1,4 +1,5 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
reify {
diff --git a/test/files/run/reify_sort.scala b/test/files/run/reify_sort.scala
index 0b373b358f..17e3976c09 100644
--- a/test/files/run/reify_sort.scala
+++ b/test/files/run/reify_sort.scala
@@ -1,4 +1,5 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
reify {
@@ -47,4 +48,4 @@ object Test extends App {
sort(ar)
println(ar)
}.eval
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_sort1.scala b/test/files/run/reify_sort1.scala
index 56125619e9..6fb3cc5895 100644
--- a/test/files/run/reify_sort1.scala
+++ b/test/files/run/reify_sort1.scala
@@ -1,4 +1,5 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
reify {
@@ -17,4 +18,4 @@ object Test extends App {
println(xs)
println(sort(xs))
}.eval
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_this.scala b/test/files/run/reify_this.scala
index 280d735ab6..ecbf394bba 100644
--- a/test/files/run/reify_this.scala
+++ b/test/files/run/reify_this.scala
@@ -1,4 +1,5 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
trait Eval {
def eval(tree: Expr[_]) = tree.eval
@@ -16,4 +17,4 @@ object Test extends App with Eval {
// select a value from module
val x = 2
eval(reify{println(x)})
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_timeofday.scala b/test/files/run/reify_timeofday.scala
index 481ab04df5..efeb81debf 100644
--- a/test/files/run/reify_timeofday.scala
+++ b/test/files/run/reify_timeofday.scala
@@ -1,4 +1,5 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
reify {
@@ -38,4 +39,4 @@ object Test extends App {
case e: Exception => println("Exception")
}
}.eval
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_typerefs_1a.scala b/test/files/run/reify_typerefs_1a.scala
index 15d8d17835..53033e210c 100644
--- a/test/files/run/reify_typerefs_1a.scala
+++ b/test/files/run/reify_typerefs_1a.scala
@@ -1,4 +1,7 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
class Expression {
override def toString = "Expression"
@@ -9,7 +12,7 @@ object Test extends App {
List(new Expression, new Expression)
};
- val toolbox = mkToolBox()
+ val toolbox = cm.mkToolBox()
val evaluated = toolbox.runExpr(code.tree)
println("evaluated = " + evaluated)
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_typerefs_1b.scala b/test/files/run/reify_typerefs_1b.scala
index 06ce1e35ac..12604454ed 100644
--- a/test/files/run/reify_typerefs_1b.scala
+++ b/test/files/run/reify_typerefs_1b.scala
@@ -1,4 +1,7 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
object Expression {
override def toString = "Expression"
@@ -9,7 +12,7 @@ object Test extends App {
List(Expression, Expression)
};
- val toolbox = mkToolBox()
+ val toolbox = cm.mkToolBox()
val evaluated = toolbox.runExpr(code.tree)
println("evaluated = " + evaluated)
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_typerefs_2a.scala b/test/files/run/reify_typerefs_2a.scala
index d03efea222..ffc3dfc942 100644
--- a/test/files/run/reify_typerefs_2a.scala
+++ b/test/files/run/reify_typerefs_2a.scala
@@ -1,4 +1,7 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
package foo {
class Expression {
@@ -11,7 +14,7 @@ object Test extends App {
List(new foo.Expression, new foo.Expression)
};
- val toolbox = mkToolBox()
+ val toolbox = cm.mkToolBox()
val evaluated = toolbox.runExpr(code.tree)
println("evaluated = " + evaluated)
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_typerefs_2b.scala b/test/files/run/reify_typerefs_2b.scala
index 3d9f7d61b8..f5d1633d79 100644
--- a/test/files/run/reify_typerefs_2b.scala
+++ b/test/files/run/reify_typerefs_2b.scala
@@ -1,4 +1,7 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
package foo {
object Expression {
@@ -11,7 +14,7 @@ object Test extends App {
List(foo.Expression, foo.Expression)
};
- val toolbox = mkToolBox()
+ val toolbox = cm.mkToolBox()
val evaluated = toolbox.runExpr(code.tree)
println("evaluated = " + evaluated)
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_typerefs_3a.scala b/test/files/run/reify_typerefs_3a.scala
index 4128073f60..67b2c2d8aa 100644
--- a/test/files/run/reify_typerefs_3a.scala
+++ b/test/files/run/reify_typerefs_3a.scala
@@ -1,4 +1,7 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
object foo {
class Expression {
@@ -11,7 +14,7 @@ object Test extends App {
List(new foo.Expression, new foo.Expression)
};
- val toolbox = mkToolBox()
+ val toolbox = cm.mkToolBox()
val evaluated = toolbox.runExpr(code.tree)
println("evaluated = " + evaluated)
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_typerefs_3b.scala b/test/files/run/reify_typerefs_3b.scala
index a7ede00c9c..41a0a667e2 100644
--- a/test/files/run/reify_typerefs_3b.scala
+++ b/test/files/run/reify_typerefs_3b.scala
@@ -1,4 +1,7 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
object foo {
object Expression {
@@ -11,7 +14,7 @@ object Test extends App {
List(foo.Expression, foo.Expression)
};
- val toolbox = mkToolBox()
+ val toolbox = cm.mkToolBox()
val evaluated = toolbox.runExpr(code.tree)
println("evaluated = " + evaluated)
-}
+} \ No newline at end of file
diff --git a/test/files/run/reify_varargs.scala b/test/files/run/reify_varargs.scala
index fe8f03b702..1cbc7c9473 100644
--- a/test/files/run/reify_varargs.scala
+++ b/test/files/run/reify_varargs.scala
@@ -1,4 +1,5 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
reify {
@@ -7,4 +8,4 @@ object Test extends App {
"Hoth", "the fifth of August", "a disturbance in the Force")
println("Message="+msg)
}.eval
-}
+} \ No newline at end of file
diff --git a/test/files/run/repl-colon-type.check b/test/files/run/repl-colon-type.check
index cb0b9a6c8b..35cd04ba87 100644
--- a/test/files/run/repl-colon-type.check
+++ b/test/files/run/repl-colon-type.check
@@ -82,8 +82,10 @@ TypeRef(
TypeRef(
TypeSymbol(abstract trait Function1[-T1, +R] extends Object)
args = List(
- TypeRef(TypeSymbol(final class Int extends AnyVal))
- TypeRef(TypeSymbol(final class Boolean extends AnyVal))
+ TypeRef(TypeSymbol(final abstract class Int extends AnyVal))
+ TypeRef(
+ TypeSymbol(final abstract class Boolean extends AnyVal)
+ )
)
)
TypeRef(
@@ -92,7 +94,7 @@ TypeRef(
)
args = List(
- TypeRef(TypeSymbol(final class Int extends AnyVal))
+ TypeRef(TypeSymbol(final abstract class Int extends AnyVal))
)
)
)
@@ -125,14 +127,14 @@ scala> :type -v def x = 1 ; def bar[T >: Null <: AnyRef](xyz: T) = 5
OverloadedType(
alts = List(
NullaryMethodType(
- TypeRef(TypeSymbol(final class Int extends AnyVal))
+ TypeRef(TypeSymbol(final abstract class Int extends AnyVal))
)
PolyType(
typeParams = List(TypeParam(T >: Null <: AnyRef))
resultType = MethodType(
params = List(TermSymbol(xyz: T))
resultType = TypeRef(
- TypeSymbol(final class Int extends AnyVal)
+ TypeSymbol(final abstract class Int extends AnyVal)
)
)
)
@@ -147,7 +149,7 @@ Int => Iterator[List[Nothing]]
TypeRef(
TypeSymbol(abstract trait Function1[-T1, +R] extends Object)
args = List(
- TypeRef(TypeSymbol(final class Int extends AnyVal))
+ TypeRef(TypeSymbol(final abstract class Int extends AnyVal))
TypeRef(
TypeSymbol(
abstract trait Iterator[+A] extends TraversableOnce[A]
@@ -180,7 +182,7 @@ PolyType(
TypeRef(
TypeSymbol(abstract trait Function1[-T1, +R] extends Object)
args = List(
- TypeRef(TypeSymbol(final class Int extends AnyVal))
+ TypeRef(TypeSymbol(final abstract class Int extends AnyVal))
TypeRef(
TypeSymbol(
abstract trait Iterator[+A] extends TraversableOnce[A]
diff --git a/test/files/run/repl-type-verbose.check b/test/files/run/repl-type-verbose.check
index 103ac3e64d..989c0735b0 100644
--- a/test/files/run/repl-type-verbose.check
+++ b/test/files/run/repl-type-verbose.check
@@ -11,7 +11,7 @@ scala> :type -v def f = 5
// Internal Type structure
NullaryMethodType(
- TypeRef(TypeSymbol(final class Int extends AnyVal))
+ TypeRef(TypeSymbol(final abstract class Int extends AnyVal))
)
scala> :type -v def f() = 5
@@ -20,7 +20,9 @@ scala> :type -v def f() = 5
// Internal Type structure
NullaryMethodType(
- resultType = TypeRef(TypeSymbol(final class Int extends AnyVal))
+ resultType = TypeRef(
+ TypeSymbol(final abstract class Int extends AnyVal)
+ )
)
scala> :type -v def f[T] = 5
@@ -31,7 +33,7 @@ scala> :type -v def f[T] = 5
PolyType(
typeParams = List(TypeParam(T))
resultType = NullaryMethodType(
- TypeRef(TypeSymbol(final class Int extends AnyVal))
+ TypeRef(TypeSymbol(final abstract class Int extends AnyVal))
)
)
@@ -43,7 +45,7 @@ scala> :type -v def f[T >: Null] = 5
PolyType(
typeParams = List(TypeParam(T >: Null))
resultType = NullaryMethodType(
- TypeRef(TypeSymbol(final class Int extends AnyVal))
+ TypeRef(TypeSymbol(final abstract class Int extends AnyVal))
)
)
@@ -55,7 +57,7 @@ scala> :type -v def f[T <: String] = 5
PolyType(
typeParams = List(TypeParam(T <: String))
resultType = NullaryMethodType(
- TypeRef(TypeSymbol(final class Int extends AnyVal))
+ TypeRef(TypeSymbol(final abstract class Int extends AnyVal))
)
)
@@ -67,7 +69,9 @@ scala> :type -v def f[T]() = 5
PolyType(
typeParams = List(TypeParam(T))
resultType = NullaryMethodType(
- resultType = TypeRef(TypeSymbol(final class Int extends AnyVal))
+ resultType = TypeRef(
+ TypeSymbol(final abstract class Int extends AnyVal)
+ )
)
)
@@ -79,7 +83,9 @@ scala> :type -v def f[T, U]() = 5
PolyType(
typeParams = List(TypeParam(T), TypeParam(U))
resultType = NullaryMethodType(
- resultType = TypeRef(TypeSymbol(final class Int extends AnyVal))
+ resultType = TypeRef(
+ TypeSymbol(final abstract class Int extends AnyVal)
+ )
)
)
@@ -93,7 +99,7 @@ PolyType(
resultType = NullaryMethodType(
resultType = NullaryMethodType(
resultType = TypeRef(
- TypeSymbol(final class Int extends AnyVal)
+ TypeSymbol(final abstract class Int extends AnyVal)
)
)
)
@@ -107,7 +113,7 @@ scala> :type -v def f[T, U <: T] = 5
PolyType(
typeParams = List(TypeParam(T), TypeParam(U <: T))
resultType = NullaryMethodType(
- TypeRef(TypeSymbol(final class Int extends AnyVal))
+ TypeRef(TypeSymbol(final abstract class Int extends AnyVal))
)
)
@@ -123,7 +129,7 @@ PolyType(
resultType = MethodType(
params = List(TermSymbol(y: U))
resultType = TypeRef(
- TypeSymbol(final class Int extends AnyVal)
+ TypeSymbol(final abstract class Int extends AnyVal)
)
)
)
@@ -138,7 +144,9 @@ PolyType(
typeParams = List(TypeParam(T))
resultType = MethodType(
params = List(TermSymbol(implicit evidence$1: Ordering[T]))
- resultType = TypeRef(TypeSymbol(final class Int extends AnyVal))
+ resultType = TypeRef(
+ TypeSymbol(final abstract class Int extends AnyVal)
+ )
)
)
@@ -177,7 +185,7 @@ PolyType(
)
)
resultType = NullaryMethodType(
- TypeRef(TypeSymbol(final class Int extends AnyVal))
+ TypeRef(TypeSymbol(final abstract class Int extends AnyVal))
)
)
diff --git a/test/files/run/richs-msil.check b/test/files/run/richs-msil.check
deleted file mode 100644
index e628ad3998..0000000000
--- a/test/files/run/richs-msil.check
+++ /dev/null
@@ -1,66 +0,0 @@
-
-RichCharTest1:
-True
-True
-True
-False
-
-RichIntTest:
-10
-11
-12
-13
-0
-0
-
-RichStringTest1:
-s1: abc
-s2: abc\txyz\n
-s3: abc
- xyz
-s4: abc
- |xyz
-s5: abc
- #xyz
-
-RichStringTest2:
-s1: abc
-s2: abc\txyz\n
-s3: abc
- xyz
-s4: abc
- |xyz
-s5: abc
- #xyz
-
-RichStringTest3:
-s1: abc
-s2: abc\txyz\n
-s3: abc
- xyz
-s4: abc
- |xyz
-s5: abc
- #xyz
-
-RichStringTest4:
-s1: abc
-s2: abc\txyz\n
-s3: abc
- xyz
-s4: abc
-xyz
-s5: abc
- #xyz
-
-RichStringTest5:
-s1: abc
- xyz
-s2: abc
- xyz
-s3: abc
- xyz
-s4: abc
- |xyz
-s5: abc
-xyz
diff --git a/test/files/run/runtime-msil.check b/test/files/run/runtime-msil.check
deleted file mode 100644
index 70e7608a11..0000000000
--- a/test/files/run/runtime-msil.check
+++ /dev/null
@@ -1,64 +0,0 @@
-<<< Test0
-[False,True]
-[0,1,2]
-[3,4,5]
-[a,b,c]
-[6,7,8]
-[9,10,11]
-[12,13]
-[14,15]
-[string]
->>> Test0
-
-<<< Test1
-10
-14
-15
-16
-20
-23
-24
-25
-26
->>> Test1
-
-<<< Test2
-A
-M0
-N0
-
-A
-N0
-M0
-
-A
-M0
-M1
-N0
-
-A
-N0
-N1
-M0
-
->>> Test2
-
-<<< Test3
-Ok
-Ok
-Ok
-Ok
-Ok
-Ok
-Ok
-Ok
-Ok
-Ok
-Ok
-Ok
-Ok
-Ok
-Ok
-Ok
->>> Test3
-
diff --git a/test/files/run/t5273_2a.check b/test/files/run/runtimeEval1.check
index d8263ee986..d8263ee986 100644
--- a/test/files/run/t5273_2a.check
+++ b/test/files/run/runtimeEval1.check
diff --git a/test/files/run/runtimeEval1.scala b/test/files/run/runtimeEval1.scala
new file mode 100644
index 0000000000..9497b52918
--- /dev/null
+++ b/test/files/run/runtimeEval1.scala
@@ -0,0 +1,9 @@
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
+
+object Test extends App {
+ reify {
+ val x = 2
+ println(x)
+ }.eval
+} \ No newline at end of file
diff --git a/test/files/run/runtimeEval2.check b/test/files/run/runtimeEval2.check
new file mode 100644
index 0000000000..78c6baefdd
--- /dev/null
+++ b/test/files/run/runtimeEval2.check
@@ -0,0 +1 @@
+2
diff --git a/test/files/run/runtimeEval2.scala b/test/files/run/runtimeEval2.scala
new file mode 100644
index 0000000000..513b820129
--- /dev/null
+++ b/test/files/run/runtimeEval2.scala
@@ -0,0 +1,11 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
+import scala.tools.reflect.Eval
+
+object Test extends App {
+ val x = 2
+ val outer = reify{reify{x}}
+ println(outer.eval.eval)
+} \ No newline at end of file
diff --git a/test/files/run/t0421-new.scala b/test/files/run/t0421-new.scala
index 7de6b7f2c4..8df5aa1992 100644
--- a/test/files/run/t0421-new.scala
+++ b/test/files/run/t0421-new.scala
@@ -1,7 +1,9 @@
+import scala.reflect.{ClassTag, classTag}
+
// ticket #421
object Test extends App {
- def transpose[A: ArrayTag](xss: Array[Array[A]]) = {
+ def transpose[A: ClassTag](xss: Array[Array[A]]) = {
for (i <- Array.range(0, xss(0).length)) yield
for (xs <- xss) yield xs(i)
}
@@ -27,4 +29,4 @@ object Test extends App {
println(matmul(Array(Array(2, 3)), Array(Array(5), Array(7))).deep.mkString("[", ",", "]"))
println(matmul(Array(Array(4)), Array(Array(6, 8))).deep.mkString("[", ",", "]"))
-}
+} \ No newline at end of file
diff --git a/test/files/run/t0677-new.scala b/test/files/run/t0677-new.scala
index bf7a3971dc..15c8b4aa19 100644
--- a/test/files/run/t0677-new.scala
+++ b/test/files/run/t0677-new.scala
@@ -1,8 +1,10 @@
+import scala.reflect.{ClassTag, classTag}
+
object Test extends App {
- class X[T: ArrayTag] {
+ class X[T: ClassTag] {
val a = Array.ofDim[T](3, 4)
}
val x = new X[String]
x.a(1)(2) = "hello"
assert(x.a(1)(2) == "hello")
-}
+} \ No newline at end of file
diff --git a/test/files/run/t1195-new.check b/test/files/run/t1195-new.check
index 554e3fd03d..4dd1661d1b 100644
--- a/test/files/run/t1195-new.check
+++ b/test/files/run/t1195-new.check
@@ -1,6 +1,6 @@
-ConcreteTypeTag[Bar.type], underlying = <: scala.runtime.AbstractFunction1[Int,Bar] with Serializable{case def unapply(x$0: Bar): Option[Int]} with Singleton
-ConcreteTypeTag[Bar], underlying = <: Product with Serializable{val x: Int; def copy(x: Int): Bar; def copy$default$1: Int; def _1: Int}
-ConcreteTypeTag[Product with Serializable], underlying = Product with Serializable
-ConcreteTypeTag[Bar.type], underlying = <: scala.runtime.AbstractFunction1[Int,Bar] with Serializable{case def unapply(x$0: Bar): Option[Int]} with Singleton
-ConcreteTypeTag[Bar], underlying = <: Product with Serializable{val x: Int; def copy(x: Int): Bar; def copy$default$1: Int; def _1: Int}
-ConcreteTypeTag[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-new.scala b/test/files/run/t1195-new.scala
index 6f28a4a167..4edfb5073f 100644
--- a/test/files/run/t1195-new.scala
+++ b/test/files/run/t1195-new.scala
@@ -1,3 +1,5 @@
+import scala.reflect.runtime.universe._
+
object Test {
def f() = { case class Bar(x: Int); Bar }
def g() = { case class Bar(x: Int); Bar(5) }
@@ -7,7 +9,7 @@ object Test {
val g1 = g()
val h1 = h()
- def m[T: TypeTag](x: T) = println(typeTag[T] + ", underlying = " + typeTag[T].sym.typeSignature)
+ def m[T: TypeTag](x: T) = println(typeOf[T] + ", underlying = " + typeOf[T].typeSymbol.typeSignature)
def main(args: Array[String]): Unit = {
m(f)
@@ -23,4 +25,4 @@ class A1[T] {
class B1[U] {
def f = { case class D(x: Int) extends A1[String] ; new D(5) }
}
-}
+} \ No newline at end of file
diff --git a/test/files/run/t2236-new.scala b/test/files/run/t2236-new.scala
index bbabe8e7d9..26d6945628 100644
--- a/test/files/run/t2236-new.scala
+++ b/test/files/run/t2236-new.scala
@@ -1,3 +1,5 @@
+import scala.reflect.runtime.universe._
+
class T[A](implicit val m:TypeTag[A])
class Foo
class Bar extends T[Foo]
@@ -14,4 +16,4 @@ object EvidenceTest {
implicit val e: E[T] = null
new B[T]{}
}
-}
+} \ No newline at end of file
diff --git a/test/files/run/t2886.scala b/test/files/run/t2886.scala
index e0835a0a44..b919f13770 100644
--- a/test/files/run/t2886.scala
+++ b/test/files/run/t2886.scala
@@ -1,4 +1,4 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
object Test {
def test(name: String, address: String) = null
@@ -6,4 +6,4 @@ object Test {
val tree = reify((x:String) => test(address=x,name=x)).tree
println(tree)
}
-}
+} \ No newline at end of file
diff --git a/test/files/run/t3507-new.check b/test/files/run/t3507-new.check
index 6e4fa4170e..b02c40fc26 100644
--- a/test/files/run/t3507-new.check
+++ b/test/files/run/t3507-new.check
@@ -1 +1 @@
-ConcreteTypeTag[_1.b.c.type]
+_1.b.c.type
diff --git a/test/files/run/t3507-new.scala b/test/files/run/t3507-new.scala
index c7a529e8b8..f045755b8f 100644
--- a/test/files/run/t3507-new.scala
+++ b/test/files/run/t3507-new.scala
@@ -1,3 +1,5 @@
+import scala.reflect.runtime.universe._
+
class A {
object b {
object c
@@ -9,7 +11,7 @@ object Test extends App {
var a: A = new A // mutable
val c /*: object _1.b.c forSome { val _1: A } */ = a.m // widening using existential
- def mani[T: TypeTag](x: T) = println(typeTag[T])
+ def mani[T: TypeTag](x: T) = println(typeOf[T])
mani/*[object _1.b.c]*/(c) // kaboom in manifestOfType / TreeGen.mkAttributedQualifier
// --> _1 is not in scope here
} \ No newline at end of file
diff --git a/test/files/run/t4110-new.check b/test/files/run/t4110-new.check
index 28f220e1fe..5cbfb27f3e 100644
--- a/test/files/run/t4110-new.check
+++ b/test/files/run/t4110-new.check
@@ -1,2 +1,2 @@
-ConcreteTypeTag[Test.A with Test.B]
-ConcreteTypeTag[Test.A with Test.B]
+Test.A with Test.B
+Test.A with Test.B
diff --git a/test/files/run/t4110-new.scala b/test/files/run/t4110-new.scala
index 3285b82c61..24ecd66cce 100644
--- a/test/files/run/t4110-new.scala
+++ b/test/files/run/t4110-new.scala
@@ -1,5 +1,7 @@
+import scala.reflect.runtime.universe._
+
object Test extends App {
- def inferredType[T : TypeTag](v : T) = println(typeTag[T])
+ def inferredType[T : TypeTag](v : T) = println(typeOf[T])
trait A
trait B
diff --git a/test/files/run/t4216.check b/test/files/run/t4216.check
index ac19a98315..6f2684f42d 100644
--- a/test/files/run/t4216.check
+++ b/test/files/run/t4216.check
@@ -1,34 +1,37 @@
-Type in expressions to have them evaluated.
-Type :help for more information.
-
-scala> def f[A: ArrayTag](a: A) = java.util.Arrays.asList(Array(a): _*)
-f: [A](a: A)(implicit evidence$1: ArrayTag[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/t4216.scala b/test/files/run/t4216.scala
index 4ada8f48aa..ecaae5bea2 100644
--- a/test/files/run/t4216.scala
+++ b/test/files/run/t4216.scala
@@ -4,7 +4,8 @@ import scala.tools.partest.ReplTest
object Test extends ReplTest {
def code =
"""
- |def f[A: ArrayTag](a: A) = java.util.Arrays.asList(Array(a): _*)
+ |import scala.reflect.ClassTag
+ |def f[A: ClassTag](a: A) = java.util.Arrays.asList(Array(a): _*)
|f(".")
|f(0)
|def i(a: Int) = java.util.Arrays.asList(Array(a): _*)
diff --git a/test/files/run/t5224.scala b/test/files/run/t5224.scala
index cf65f16457..600a4200bd 100644
--- a/test/files/run/t5224.scala
+++ b/test/files/run/t5224.scala
@@ -1,4 +1,4 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
class Foo(bar: String) extends annotation.ClassfileAnnotation
diff --git a/test/files/run/t5225_1.scala b/test/files/run/t5225_1.scala
index 5e1d3b1f17..917a239bdf 100644
--- a/test/files/run/t5225_1.scala
+++ b/test/files/run/t5225_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
object Test extends App {
val tree = reify{@transient @volatile var x = 2}.tree
diff --git a/test/files/run/t5225_2.scala b/test/files/run/t5225_2.scala
index 4cab640fe8..d1b607499c 100644
--- a/test/files/run/t5225_2.scala
+++ b/test/files/run/t5225_2.scala
@@ -1,4 +1,4 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
object Test extends App {
val tree = reify{def foo(@cloneable x: Int) = ""}.tree
diff --git a/test/files/run/t5229_1.scala b/test/files/run/t5229_1.scala
index 273079a89d..7e05b08348 100644
--- a/test/files/run/t5229_1.scala
+++ b/test/files/run/t5229_1.scala
@@ -1,7 +1,8 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
reify {
object C
}.eval
-}
+} \ No newline at end of file
diff --git a/test/files/run/t5229_2.scala b/test/files/run/t5229_2.scala
index 85bf78ba31..75d7204911 100644
--- a/test/files/run/t5229_2.scala
+++ b/test/files/run/t5229_2.scala
@@ -1,4 +1,7 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
object Test extends App {
val code = reify {
@@ -9,7 +12,7 @@ object Test extends App {
println(C.x)
};
- val toolbox = mkToolBox()
+ val toolbox = cm.mkToolBox()
val evaluated = toolbox.runExpr(code.tree)
println("evaluated = " + evaluated)
-}
+} \ No newline at end of file
diff --git a/test/files/run/t5230.scala b/test/files/run/t5230.scala
index e0632f591c..5cd67766b4 100644
--- a/test/files/run/t5230.scala
+++ b/test/files/run/t5230.scala
@@ -1,4 +1,7 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
object Test extends App {
val code = reify {
@@ -9,7 +12,7 @@ object Test extends App {
println(new C().x)
};
- val toolbox = mkToolBox()
+ val toolbox = cm.mkToolBox()
val evaluated = toolbox.runExpr(code.tree)
println("evaluated = " + evaluated)
-}
+} \ No newline at end of file
diff --git a/test/files/run/t5256a.check b/test/files/run/t5256a.check
index 304f4ddd79..518663b3da 100644
--- a/test/files/run/t5256a.check
+++ b/test/files/run/t5256a.check
@@ -1,2 +1,6 @@
-A
-true
+class A
+A
+Object {
+ def <init>: <?>
+ def foo: <?>
+}
diff --git a/test/files/run/t5256a.scala b/test/files/run/t5256a.scala
index 05a935c770..84ef97b0d2 100644
--- a/test/files/run/t5256a.scala
+++ b/test/files/run/t5256a.scala
@@ -1,9 +1,11 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{currentMirror => cm}
-class A
+class A { def foo = ??? }
object Test extends App {
- val c = classToType(classOf[A])
+ val c = cm.classSymbol(classOf[A])
println(c)
- println(c.typeSymbol == classToSymbol(classOf[A]))
-}
+ println(c.fullName)
+ println(c.typeSignature)
+} \ No newline at end of file
diff --git a/test/files/run/t5256b.check b/test/files/run/t5256b.check
index 64f4c01166..d6015f2743 100644
--- a/test/files/run/t5256b.check
+++ b/test/files/run/t5256b.check
@@ -1,2 +1,6 @@
+class A
Test.A
-true \ No newline at end of file
+Object {
+ def <init>: <?>
+ def foo: <?>
+}
diff --git a/test/files/run/t5256b.scala b/test/files/run/t5256b.scala
index 5575211641..0ffab8a668 100644
--- a/test/files/run/t5256b.scala
+++ b/test/files/run/t5256b.scala
@@ -1,8 +1,10 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{currentMirror => cm}
object Test extends App {
- class A
- val c = classToType(classOf[A])
+ class A { def foo = ??? }
+ val c = cm.classSymbol(classOf[A])
println(c)
- println(c.typeSymbol == classToSymbol(classOf[A]))
-}
+ println(c.fullName)
+ println(c.typeSignature)
+} \ No newline at end of file
diff --git a/test/files/run/t5256c.check b/test/files/run/t5256c.check
new file mode 100644
index 0000000000..16bfc6c9d0
--- /dev/null
+++ b/test/files/run/t5256c.check
@@ -0,0 +1,6 @@
+class A$1
+Test.A$1
+java.lang.Object {
+ def foo(): Nothing
+ def <init>(): A$1
+}
diff --git a/test/files/run/t5256c.scala b/test/files/run/t5256c.scala
new file mode 100644
index 0000000000..d56215f6eb
--- /dev/null
+++ b/test/files/run/t5256c.scala
@@ -0,0 +1,12 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{currentMirror => cm}
+
+object Test extends App {
+ {
+ class A { def foo = ??? }
+ val c = cm.classSymbol(classOf[A])
+ println(c)
+ println(c.fullName)
+ println(c.typeSignature)
+ }
+} \ No newline at end of file
diff --git a/test/files/run/t5256d.check b/test/files/run/t5256d.check
index 7924c15c5c..dd32c05a93 100644
--- a/test/files/run/t5256d.check
+++ b/test/files/run/t5256d.check
@@ -3,17 +3,29 @@ Type :help for more information.
scala>
-scala> import scala.reflect.mirror._
-import scala.reflect.mirror._
+scala> import scala.reflect.runtime.universe._
+import scala.reflect.runtime.universe._
-scala> class A
+scala> import scala.reflect.runtime.{currentMirror => cm}
+import scala.reflect.runtime.{currentMirror=>cm}
+
+scala> class A { def foo = ??? }
defined class A
-scala> val c = classToType(classOf[A])
-c: reflect.mirror.Type = A
+scala> val c = cm.classSymbol(classOf[A])
+c: reflect.runtime.universe.ClassSymbol = class A
+
+scala> println(c)
+class A
+
+scala> println(c.fullName)
+$line8.$read.$iw.$iw.$iw.$iw.A
-scala> println(c.typeSymbol == classToSymbol(classOf[A]))
-true
+scala> println(c.typeSignature)
+java.lang.Object {
+ def <init>: <?>
+ def foo: <?>
+}
scala>
diff --git a/test/files/run/t5256d.scala b/test/files/run/t5256d.scala
index 86404a9b63..24ac1eb316 100644
--- a/test/files/run/t5256d.scala
+++ b/test/files/run/t5256d.scala
@@ -2,9 +2,12 @@ import scala.tools.partest.ReplTest
object Test extends ReplTest {
def code = """
-import scala.reflect.mirror._
-class A
-val c = classToType(classOf[A])
-println(c.typeSymbol == classToSymbol(classOf[A]))
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{currentMirror => cm}
+class A { def foo = ??? }
+val c = cm.classSymbol(classOf[A])
+println(c)
+println(c.fullName)
+println(c.typeSignature)
"""
-}
+} \ No newline at end of file
diff --git a/test/files/run/t5256e.check b/test/files/run/t5256e.check
index e50f917e14..6c6de90acc 100644
--- a/test/files/run/t5256e.check
+++ b/test/files/run/t5256e.check
@@ -1,2 +1,6 @@
-C.this.A
-true \ No newline at end of file
+class A
+Test.C.A
+Object {
+ def <init>: <?>
+ def foo: <?>
+}
diff --git a/test/files/run/t5256e.scala b/test/files/run/t5256e.scala
index 9ed422ca44..f83546f2c0 100644
--- a/test/files/run/t5256e.scala
+++ b/test/files/run/t5256e.scala
@@ -1,9 +1,10 @@
-import scala.reflect.mirror._
-
-class C { class A }
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{currentMirror => cm}
object Test extends App {
- val c = classToType(classOf[C#A])
+ class C { class A { def foo = ??? } }
+ val c = cm.classSymbol(classOf[C#A])
println(c)
- println(c.typeSymbol == classToSymbol(classOf[C#A]))
-}
+ println(c.fullName)
+ println(c.typeSignature)
+} \ No newline at end of file
diff --git a/test/files/run/t5256f.check b/test/files/run/t5256f.check
index ad2f375d9a..c840793fd5 100644
--- a/test/files/run/t5256f.check
+++ b/test/files/run/t5256f.check
@@ -1,4 +1,12 @@
+class A1
Test.A1
-true
-Test.this.A2
-true
+Object {
+ def <init>: <?>
+ def foo: <?>
+}
+class A2
+Test.A2
+Object {
+ def <init>: <?>
+ def foo: <?>
+}
diff --git a/test/files/run/t5256f.scala b/test/files/run/t5256f.scala
index 45c80cbd63..80c7ad8018 100644
--- a/test/files/run/t5256f.scala
+++ b/test/files/run/t5256f.scala
@@ -1,19 +1,22 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{currentMirror => cm}
object Test extends App {
- class A1
+ class A1 { def foo = ??? }
- val c1 = classToType(classOf[A1])
+ val c1 = cm.classSymbol(classOf[A1])
println(c1)
- println(c1.typeSymbol == classToSymbol(classOf[A1]))
+ println(c1.fullName)
+ println(c1.typeSignature)
new Test
}
class Test {
- class A2
+ class A2 { def foo = ??? }
- val c2 = classToType(classOf[A2])
+ val c2 = cm.classSymbol(classOf[A2])
println(c2)
- println(c2.typeSymbol == classToSymbol(classOf[A2]))
+ println(c2.fullName)
+ println(c2.typeSignature)
}
diff --git a/test/files/run/t5256g.check b/test/files/run/t5256g.check
new file mode 100644
index 0000000000..5aac899694
--- /dev/null
+++ b/test/files/run/t5256g.check
@@ -0,0 +1,3 @@
+anonymous class $anon$1
+Test.$anon$1
+A with B{def <init>(): A with B}
diff --git a/test/files/run/t5256g.scala b/test/files/run/t5256g.scala
new file mode 100644
index 0000000000..358c18601a
--- /dev/null
+++ b/test/files/run/t5256g.scala
@@ -0,0 +1,13 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{currentMirror => cm}
+
+class A
+trait B
+
+object Test extends App {
+ val mutant = new A with B
+ val c = cm.classSymbol(mutant.getClass)
+ println(c)
+ println(c.fullName)
+ println(c.typeSignature)
+}
diff --git a/test/files/run/t5256h.check b/test/files/run/t5256h.check
new file mode 100644
index 0000000000..2a6b292486
--- /dev/null
+++ b/test/files/run/t5256h.check
@@ -0,0 +1,7 @@
+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/t5256h.scala b/test/files/run/t5256h.scala
new file mode 100644
index 0000000000..fd4ffd9b12
--- /dev/null
+++ b/test/files/run/t5256h.scala
@@ -0,0 +1,10 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{currentMirror => cm}
+
+object Test extends App {
+ val mutant = new { val x = 2 }
+ val c = cm.classSymbol(mutant.getClass)
+ println(c)
+ println(c.fullName)
+ println(c.typeSignature)
+}
diff --git a/test/files/run/t5258a.scala b/test/files/run/t5258a.scala
index 127829c724..1b98b5920a 100644
--- a/test/files/run/t5258a.scala
+++ b/test/files/run/t5258a.scala
@@ -1,4 +1,5 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
reify {
diff --git a/test/files/run/t5266_1.scala b/test/files/run/t5266_1.scala
index ebb432be71..ee7ea6d335 100644
--- a/test/files/run/t5266_1.scala
+++ b/test/files/run/t5266_1.scala
@@ -1,4 +1,7 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
object Test extends App {
val code = reify {
@@ -6,7 +9,7 @@ object Test extends App {
println(x)
};
- val toolbox = mkToolBox()
+ val toolbox = cm.mkToolBox()
val evaluated = toolbox.runExpr(code.tree)
println("evaluated = " + evaluated)
} \ No newline at end of file
diff --git a/test/files/run/t5266_2.scala b/test/files/run/t5266_2.scala
index 27c91c35a8..ca16f656ee 100644
--- a/test/files/run/t5266_2.scala
+++ b/test/files/run/t5266_2.scala
@@ -1,4 +1,7 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
object Test extends App {
val code = reify {
@@ -7,7 +10,7 @@ object Test extends App {
println(y)
};
- val toolbox = mkToolBox()
+ val toolbox = cm.mkToolBox()
val evaluated = toolbox.runExpr(code.tree)
println("evaluated = " + evaluated)
-}
+} \ No newline at end of file
diff --git a/test/files/run/t5269.scala b/test/files/run/t5269.scala
index 9026090b29..dfdabdd6cc 100644
--- a/test/files/run/t5269.scala
+++ b/test/files/run/t5269.scala
@@ -1,4 +1,5 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
reify {
@@ -12,4 +13,4 @@ object Test extends App {
new X().println()
}.eval
-}
+} \ No newline at end of file
diff --git a/test/files/run/t5270.scala b/test/files/run/t5270.scala
index 476b610148..afd45a0875 100644
--- a/test/files/run/t5270.scala
+++ b/test/files/run/t5270.scala
@@ -1,4 +1,5 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
reify {
@@ -16,4 +17,4 @@ object Test extends App {
new X().println()
}.eval
-}
+} \ No newline at end of file
diff --git a/test/files/run/t5271_1.scala b/test/files/run/t5271_1.scala
index 20cafa6a08..9e2c7602b5 100644
--- a/test/files/run/t5271_1.scala
+++ b/test/files/run/t5271_1.scala
@@ -1,11 +1,15 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
+import scala.tools.reflect.Eval
object Test extends App {
val code = reify {
case class C(foo: Int, bar: Int)
};
- val toolbox = mkToolBox()
+ val toolbox = cm.mkToolBox()
println(code.tree)
println(code.eval)
-}
+} \ No newline at end of file
diff --git a/test/files/run/t5271_2.scala b/test/files/run/t5271_2.scala
index af6491407c..430738f4fb 100644
--- a/test/files/run/t5271_2.scala
+++ b/test/files/run/t5271_2.scala
@@ -1,4 +1,8 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
+import scala.tools.reflect.Eval
object Test extends App {
val code = reify {
@@ -7,7 +11,7 @@ object Test extends App {
println(c.foo * c.bar)
};
- val toolbox = mkToolBox()
+ val toolbox = cm.mkToolBox()
println(code.tree)
println(code.eval)
-}
+} \ No newline at end of file
diff --git a/test/files/run/t5271_3.scala b/test/files/run/t5271_3.scala
index 646b10a8e5..f2ca2d496d 100644
--- a/test/files/run/t5271_3.scala
+++ b/test/files/run/t5271_3.scala
@@ -1,4 +1,8 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
+import scala.tools.reflect.Eval
object Test extends App {
val code = reify {
@@ -8,7 +12,7 @@ object Test extends App {
println(c.foo * c.bar == C.qwe)
};
- val toolbox = mkToolBox()
+ val toolbox = cm.mkToolBox()
println(code.tree)
println(code.eval)
-}
+} \ No newline at end of file
diff --git a/test/files/run/t5271_4.scala b/test/files/run/t5271_4.scala
index e13a331d9c..f63e82bdbe 100644
--- a/test/files/run/t5271_4.scala
+++ b/test/files/run/t5271_4.scala
@@ -1,7 +1,8 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
reify {
case object C
}.eval
-}
+} \ No newline at end of file
diff --git a/test/files/run/t5272_1.check b/test/files/run/t5272_1_newpatmat.check
index 9f8d6f24e7..9f8d6f24e7 100644
--- a/test/files/run/t5272_1.check
+++ b/test/files/run/t5272_1_newpatmat.check
diff --git a/test/files/run/t5272_1.scala b/test/files/run/t5272_1_newpatmat.scala
index 46472babf3..e8bb013248 100644
--- a/test/files/run/t5272_1.scala
+++ b/test/files/run/t5272_1_newpatmat.scala
@@ -1,4 +1,5 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
reify {
@@ -7,4 +8,4 @@ object Test extends App {
case _ => println("not okay")
}
}.eval
-}
+} \ No newline at end of file
diff --git a/test/files/run/t5272_1_oldpatmat.check b/test/files/run/t5272_1_oldpatmat.check
new file mode 100644
index 0000000000..9f8d6f24e7
--- /dev/null
+++ b/test/files/run/t5272_1_oldpatmat.check
@@ -0,0 +1 @@
+okay \ No newline at end of file
diff --git a/test/files/run/reify_maps.flags b/test/files/run/t5272_1_oldpatmat.flags
index e69de29bb2..e69de29bb2 100644
--- a/test/files/run/reify_maps.flags
+++ b/test/files/run/t5272_1_oldpatmat.flags
diff --git a/test/files/run/t5272_1_oldpatmat.scala b/test/files/run/t5272_1_oldpatmat.scala
new file mode 100644
index 0000000000..e8bb013248
--- /dev/null
+++ b/test/files/run/t5272_1_oldpatmat.scala
@@ -0,0 +1,11 @@
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
+
+object Test extends App {
+ reify {
+ 2 match {
+ case 2 => println("okay")
+ case _ => println("not okay")
+ }
+ }.eval
+} \ No newline at end of file
diff --git a/test/files/run/t5272_2.check b/test/files/run/t5272_2_newpatmat.check
index 549f3f3af8..549f3f3af8 100644
--- a/test/files/run/t5272_2.check
+++ b/test/files/run/t5272_2_newpatmat.check
diff --git a/test/files/run/t5272_2.scala b/test/files/run/t5272_2_newpatmat.scala
index f5bab44205..be79cde18f 100644
--- a/test/files/run/t5272_2.scala
+++ b/test/files/run/t5272_2_newpatmat.scala
@@ -1,4 +1,5 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
reify {
@@ -6,4 +7,4 @@ object Test extends App {
case x => println("okay" + x)
}
}.eval
-}
+} \ No newline at end of file
diff --git a/test/files/run/t5272_2_oldpatmat.check b/test/files/run/t5272_2_oldpatmat.check
new file mode 100644
index 0000000000..549f3f3af8
--- /dev/null
+++ b/test/files/run/t5272_2_oldpatmat.check
@@ -0,0 +1 @@
+okay2 \ No newline at end of file
diff --git a/test/files/run/t5272_1.flags b/test/files/run/t5272_2_oldpatmat.flags
index e69de29bb2..e69de29bb2 100644
--- a/test/files/run/t5272_1.flags
+++ b/test/files/run/t5272_2_oldpatmat.flags
diff --git a/test/files/run/t5272_2_oldpatmat.scala b/test/files/run/t5272_2_oldpatmat.scala
new file mode 100644
index 0000000000..be79cde18f
--- /dev/null
+++ b/test/files/run/t5272_2_oldpatmat.scala
@@ -0,0 +1,10 @@
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
+
+object Test extends App {
+ reify {
+ 2 match {
+ case x => println("okay" + x)
+ }
+ }.eval
+} \ No newline at end of file
diff --git a/test/files/run/t5273_1.check b/test/files/run/t5273_1_newpatmat.check
index 0cfbf08886..0cfbf08886 100644
--- a/test/files/run/t5273_1.check
+++ b/test/files/run/t5273_1_newpatmat.check
diff --git a/test/files/run/t5273_1.scala b/test/files/run/t5273_1_newpatmat.scala
index 1b491923b2..756f52e10b 100644
--- a/test/files/run/t5273_1.scala
+++ b/test/files/run/t5273_1_newpatmat.scala
@@ -1,4 +1,5 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
reify {
@@ -7,4 +8,4 @@ object Test extends App {
case _ => println("this is getting out of hand!")
}
}.eval
-}
+} \ No newline at end of file
diff --git a/test/files/run/t5273_1_oldpatmat.check b/test/files/run/t5273_1_oldpatmat.check
new file mode 100644
index 0000000000..0cfbf08886
--- /dev/null
+++ b/test/files/run/t5273_1_oldpatmat.check
@@ -0,0 +1 @@
+2
diff --git a/test/files/run/t5272_2.flags b/test/files/run/t5273_1_oldpatmat.flags
index e69de29bb2..e69de29bb2 100644
--- a/test/files/run/t5272_2.flags
+++ b/test/files/run/t5273_1_oldpatmat.flags
diff --git a/test/files/run/t5273_1_oldpatmat.scala b/test/files/run/t5273_1_oldpatmat.scala
new file mode 100644
index 0000000000..756f52e10b
--- /dev/null
+++ b/test/files/run/t5273_1_oldpatmat.scala
@@ -0,0 +1,11 @@
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
+
+object Test extends App {
+ reify {
+ List(1, 2, 3) match {
+ case foo :: bar :: _ => println(foo * bar)
+ case _ => println("this is getting out of hand!")
+ }
+ }.eval
+} \ No newline at end of file
diff --git a/test/files/run/t5273_2a_newpatmat.check b/test/files/run/t5273_2a_newpatmat.check
new file mode 100644
index 0000000000..d8263ee986
--- /dev/null
+++ b/test/files/run/t5273_2a_newpatmat.check
@@ -0,0 +1 @@
+2 \ No newline at end of file
diff --git a/test/files/run/t5273_2a.scala b/test/files/run/t5273_2a_newpatmat.scala
index 062ff79d11..c0d15496aa 100644
--- a/test/files/run/t5273_2a.scala
+++ b/test/files/run/t5273_2a_newpatmat.scala
@@ -1,8 +1,9 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
reify {
val foo :: bar :: _ = List(1, 2, 3)
println(foo * bar)
}.eval
-}
+} \ No newline at end of file
diff --git a/test/files/run/t5273_2a_oldpatmat.check b/test/files/run/t5273_2a_oldpatmat.check
new file mode 100644
index 0000000000..d8263ee986
--- /dev/null
+++ b/test/files/run/t5273_2a_oldpatmat.check
@@ -0,0 +1 @@
+2 \ No newline at end of file
diff --git a/test/files/run/t5273_1.flags b/test/files/run/t5273_2a_oldpatmat.flags
index e69de29bb2..e69de29bb2 100644
--- a/test/files/run/t5273_1.flags
+++ b/test/files/run/t5273_2a_oldpatmat.flags
diff --git a/test/files/run/t5273_2a_oldpatmat.scala b/test/files/run/t5273_2a_oldpatmat.scala
new file mode 100644
index 0000000000..c0d15496aa
--- /dev/null
+++ b/test/files/run/t5273_2a_oldpatmat.scala
@@ -0,0 +1,9 @@
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
+
+object Test extends App {
+ reify {
+ val foo :: bar :: _ = List(1, 2, 3)
+ println(foo * bar)
+ }.eval
+} \ No newline at end of file
diff --git a/test/files/run/t5273_2b.flags b/test/files/run/t5273_2b.flags
deleted file mode 100644
index e69de29bb2..0000000000
--- a/test/files/run/t5273_2b.flags
+++ /dev/null
diff --git a/test/files/run/t5273_2b.check b/test/files/run/t5273_2b_newpatmat.check
index c551774ca5..c551774ca5 100644
--- a/test/files/run/t5273_2b.check
+++ b/test/files/run/t5273_2b_newpatmat.check
diff --git a/test/files/run/t5273_2b.scala b/test/files/run/t5273_2b_newpatmat.scala
index 82f1de89f7..31afd7e2ba 100644
--- a/test/files/run/t5273_2b.scala
+++ b/test/files/run/t5273_2b_newpatmat.scala
@@ -1,4 +1,5 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
reify {
@@ -6,4 +7,4 @@ object Test extends App {
val RegexParser(name, shortname, value) = "American Dollar 1USD | 2,8567 | sometext"
println("name = %s, shortname = %s, value = %s".format(name, shortname, value))
}.eval
-}
+} \ No newline at end of file
diff --git a/test/files/run/t5273_2b_oldpatmat.check b/test/files/run/t5273_2b_oldpatmat.check
new file mode 100644
index 0000000000..c551774ca5
--- /dev/null
+++ b/test/files/run/t5273_2b_oldpatmat.check
@@ -0,0 +1 @@
+name = American Dollar, shortname = USD, value = 2,8567
diff --git a/test/files/run/t5273_2a.flags b/test/files/run/t5273_2b_oldpatmat.flags
index e69de29bb2..e69de29bb2 100644
--- a/test/files/run/t5273_2a.flags
+++ b/test/files/run/t5273_2b_oldpatmat.flags
diff --git a/test/files/run/t5273_2b_oldpatmat.scala b/test/files/run/t5273_2b_oldpatmat.scala
new file mode 100644
index 0000000000..31afd7e2ba
--- /dev/null
+++ b/test/files/run/t5273_2b_oldpatmat.scala
@@ -0,0 +1,10 @@
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
+
+object Test extends App {
+ reify {
+ val RegexParser = """(.*) \d+([A-Z]+) \| (.*) \|.*""".r
+ val RegexParser(name, shortname, value) = "American Dollar 1USD | 2,8567 | sometext"
+ println("name = %s, shortname = %s, value = %s".format(name, shortname, value))
+ }.eval
+} \ No newline at end of file
diff --git a/test/files/run/t5274_1.scala b/test/files/run/t5274_1.scala
index 7ef332aa05..c1b842fd7f 100644
--- a/test/files/run/t5274_1.scala
+++ b/test/files/run/t5274_1.scala
@@ -1,4 +1,5 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
reify {
@@ -10,4 +11,4 @@ object Test extends App {
println("49! = " + f49)
println("50!/49! = " + (f50 / f49))
}.eval
-}
+} \ No newline at end of file
diff --git a/test/files/run/t5274_2.scala b/test/files/run/t5274_2.scala
index 0b373b358f..17e3976c09 100644
--- a/test/files/run/t5274_2.scala
+++ b/test/files/run/t5274_2.scala
@@ -1,4 +1,5 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
reify {
@@ -47,4 +48,4 @@ object Test extends App {
sort(ar)
println(ar)
}.eval
-}
+} \ No newline at end of file
diff --git a/test/files/run/t5275.scala b/test/files/run/t5275.scala
index 534672be3c..5c84df499f 100644
--- a/test/files/run/t5275.scala
+++ b/test/files/run/t5275.scala
@@ -1,8 +1,9 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
reify {
class C(val foo: Int)
println(new C(2).foo)
}.eval
-}
+} \ No newline at end of file
diff --git a/test/files/run/t5276_1a.scala b/test/files/run/t5276_1a.scala
index a6e327c0e7..7f4b6ecb8d 100644
--- a/test/files/run/t5276_1a.scala
+++ b/test/files/run/t5276_1a.scala
@@ -1,8 +1,9 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
reify {
lazy val x = 2
println(x)
}.eval
-}
+} \ No newline at end of file
diff --git a/test/files/run/t5276_1b.scala b/test/files/run/t5276_1b.scala
index 1bc3e246c9..56e7dc1bf0 100644
--- a/test/files/run/t5276_1b.scala
+++ b/test/files/run/t5276_1b.scala
@@ -1,8 +1,9 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
reify {
implicit lazy val x = 2
println(implicitly[Int])
}.eval
-}
+} \ No newline at end of file
diff --git a/test/files/run/t5276_2a.scala b/test/files/run/t5276_2a.scala
index cdd87ddc9e..af9272c693 100644
--- a/test/files/run/t5276_2a.scala
+++ b/test/files/run/t5276_2a.scala
@@ -1,4 +1,5 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
reify {
@@ -8,4 +9,4 @@ object Test extends App {
println(new C().x)
}.eval
-}
+} \ No newline at end of file
diff --git a/test/files/run/t5276_2b.scala b/test/files/run/t5276_2b.scala
index 2fac951731..b211901abe 100644
--- a/test/files/run/t5276_2b.scala
+++ b/test/files/run/t5276_2b.scala
@@ -1,4 +1,5 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
reify {
@@ -9,4 +10,4 @@ object Test extends App {
println(new C().y)
}.eval
-}
+} \ No newline at end of file
diff --git a/test/files/run/t5277_1.scala b/test/files/run/t5277_1.scala
index f95e9ab6ec..a2d546579d 100644
--- a/test/files/run/t5277_1.scala
+++ b/test/files/run/t5277_1.scala
@@ -1,4 +1,5 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
reify {
@@ -11,4 +12,4 @@ object Test extends App {
println("10! = " + (10!))
}.eval
-}
+} \ No newline at end of file
diff --git a/test/files/run/t5277_2.scala b/test/files/run/t5277_2.scala
index 5f1737f503..dd72452a7c 100644
--- a/test/files/run/t5277_2.scala
+++ b/test/files/run/t5277_2.scala
@@ -1,4 +1,5 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
reify {
@@ -8,4 +9,4 @@ object Test extends App {
println(p)
println(p(1))
}.eval
-}
+} \ No newline at end of file
diff --git a/test/files/run/t5279.scala b/test/files/run/t5279.scala
index aab5588877..815c883732 100644
--- a/test/files/run/t5279.scala
+++ b/test/files/run/t5279.scala
@@ -1,7 +1,8 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
reify {
println(new Integer(10))
}.eval
-}
+} \ No newline at end of file
diff --git a/test/files/run/t5334_1.scala b/test/files/run/t5334_1.scala
index 49dbea6b68..2b6418990a 100644
--- a/test/files/run/t5334_1.scala
+++ b/test/files/run/t5334_1.scala
@@ -1,4 +1,7 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
object Test extends App {
val code = reify {
@@ -7,6 +10,6 @@ object Test extends App {
ret.asInstanceOf[Object]
};
- val toolbox = mkToolBox()
+ val toolbox = cm.mkToolBox()
println(toolbox.runExpr(code.tree))
-}
+} \ No newline at end of file
diff --git a/test/files/run/t5334_2.scala b/test/files/run/t5334_2.scala
index c6a77158dd..815f78f951 100644
--- a/test/files/run/t5334_2.scala
+++ b/test/files/run/t5334_2.scala
@@ -1,4 +1,7 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
object Test extends App {
val code = reify {
@@ -7,6 +10,6 @@ object Test extends App {
ret.asInstanceOf[List[Any]]
};
- val toolbox = mkToolBox()
+ val toolbox = cm.mkToolBox()
println(toolbox.runExpr(code.tree))
-}
+} \ No newline at end of file
diff --git a/test/files/run/t5335.scala b/test/files/run/t5335.scala
index a0fe6c5822..714846de21 100644
--- a/test/files/run/t5335.scala
+++ b/test/files/run/t5335.scala
@@ -1,7 +1,8 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
object Test extends App {
reify {
println(new {def x = 2}.x)
}.eval
-}
+} \ No newline at end of file
diff --git a/test/files/run/t5415.scala b/test/files/run/t5415.scala
index c6552f69b3..c12e209bb7 100644
--- a/test/files/run/t5415.scala
+++ b/test/files/run/t5415.scala
@@ -2,9 +2,11 @@ object Test extends App{
case class Queryable2[T]() { def filter(predicate: T => Boolean) = ??? }
trait CoffeesTable{ def sales : Int }
val q = Queryable2[CoffeesTable]()
- import scala.reflect.mirror._
+ import scala.reflect.runtime.universe._
+ import scala.reflect.runtime.{universe => ru}
val code = reify{q.filter(_.sales > 5)}
-
- val toolbox = mkToolBox()
+ import scala.reflect.runtime.{currentMirror => cm}
+ import scala.tools.reflect.ToolBox
+ val toolbox = cm.mkToolBox()
val ttree = toolbox.typeCheck(code.tree)
}
diff --git a/test/files/run/t5419.scala b/test/files/run/t5419.scala
index 5f11f5056c..686a79bafd 100644
--- a/test/files/run/t5419.scala
+++ b/test/files/run/t5419.scala
@@ -1,4 +1,4 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
class Foo extends annotation.StaticAnnotation
diff --git a/test/files/run/t5423.scala b/test/files/run/t5423.scala
index ed1faf0429..9b8ba090fa 100644
--- a/test/files/run/t5423.scala
+++ b/test/files/run/t5423.scala
@@ -1,9 +1,11 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
final class table extends annotation.StaticAnnotation
@table class A
object Test extends App {
- val s = classToSymbol(classOf[A])
- println(s.annotations)
-}
+ val s = cm.classSymbol(classOf[A])
+ println(s.getAnnotations)
+} \ No newline at end of file
diff --git a/test/files/run/t5428.check b/test/files/run/t5428.check
new file mode 100644
index 0000000000..7b4b1d6558
--- /dev/null
+++ b/test/files/run/t5428.check
@@ -0,0 +1 @@
+Stack(8, 7, 6, 5, 4, 3) \ No newline at end of file
diff --git a/test/files/run/t5428.scala b/test/files/run/t5428.scala
new file mode 100644
index 0000000000..106bb7fc31
--- /dev/null
+++ b/test/files/run/t5428.scala
@@ -0,0 +1,29 @@
+
+
+
+import collection.mutable.{Stack, StackProxy}
+
+
+
+class A extends StackProxy[Int] {
+ val self = Stack[Int]()
+}
+
+
+object Test {
+
+ def main(args: Array[String]) {
+ val a = new A
+
+ a push 3
+ a push 4
+ a push 5
+
+ a.push(6, 7, 8)
+
+ println(a)
+
+ a pop
+ }
+
+}
diff --git a/test/files/run/t5704.check b/test/files/run/t5704.check
index 7b56bf2bfd..74c4610988 100644
--- a/test/files/run/t5704.check
+++ b/test/files/run/t5704.check
@@ -1 +1 @@
-String \ No newline at end of file
+java.lang.String
diff --git a/test/files/run/t5704.scala b/test/files/run/t5704.scala
index 8fd721d4e7..ddcbcc27b3 100644
--- a/test/files/run/t5704.scala
+++ b/test/files/run/t5704.scala
@@ -1,10 +1,13 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
object Test extends App {
class MyQuerycollection{
def findUserByName( name:String ) = {
val tree = reify{ "test" == name }.tree
- val toolbox = mkToolBox()
+ val toolbox = cm.mkToolBox()
toolbox.typeCheck(tree) match{
case Apply(Select(lhs,op),rhs::Nil) =>
println(rhs.tpe)
@@ -13,4 +16,4 @@ object Test extends App {
}
val qc = new MyQuerycollection
qc.findUserByName("some value")
-}
+} \ No newline at end of file
diff --git a/test/files/run/t5713/Impls_Macros_1.scala b/test/files/run/t5713/Impls_Macros_1.scala
index b499bc7e4e..d16299a0c8 100644
--- a/test/files/run/t5713/Impls_Macros_1.scala
+++ b/test/files/run/t5713/Impls_Macros_1.scala
@@ -19,9 +19,10 @@ private object LoggerMacros {
log(c)(c.reify(Level.Error), message)
private def log(c: LoggerContext)(level: c.Expr[Level.Value], message: c.Expr[String]): c.Expr[Unit] =
- if (level.eval.id < 4) // TODO Remove hack!
+// was: if (level.splice.id < 4) // TODO Remove hack!
+ if (c.eval(level).id < 4) // TODO Remove hack!
c.reify(())
else {
- c.reify(println(message.eval))
+ c.reify(println(message.splice))
}
} \ No newline at end of file
diff --git a/test/files/run/t5843.check b/test/files/run/t5843.check
new file mode 100644
index 0000000000..2bf97f4cdb
--- /dev/null
+++ b/test/files/run/t5843.check
@@ -0,0 +1,9 @@
+ foo="1"
+ bar="2" foo="1"
+null
+ bar="2"
+ foo="1"
+ bar="2"
+ foo="1"
+ bar="2" foo="1"
+ bar="2" foo="1"
diff --git a/test/files/run/t5843.scala b/test/files/run/t5843.scala
new file mode 100644
index 0000000000..43d588c7b7
--- /dev/null
+++ b/test/files/run/t5843.scala
@@ -0,0 +1,15 @@
+object Test extends App {
+ val foo = scala.xml.Attribute(null, "foo", "1", scala.xml.Null)
+ val bar = scala.xml.Attribute(null, "bar", "2", foo)
+ println(foo)
+ println(bar)
+ println(scala.xml.TopScope.getURI(foo.pre))
+ println(bar remove "foo")
+ println(bar remove "bar")
+ println(bar remove (null, scala.xml.TopScope, "foo"))
+ println(bar remove (null, scala.xml.TopScope, "bar"))
+
+ val ns = scala.xml.NamespaceBinding(null, "uri", scala.xml.TopScope)
+ println(bar remove (null, ns, "foo"))
+ println(bar remove (null, ns, "bar"))
+}
diff --git a/test/files/run/t5857.scala b/test/files/run/t5857.scala
new file mode 100644
index 0000000000..bf67bedf54
--- /dev/null
+++ b/test/files/run/t5857.scala
@@ -0,0 +1,45 @@
+
+
+
+object Test {
+
+ def time[U](b: =>U): Long = {
+ val start = System.currentTimeMillis
+ b
+ val end = System.currentTimeMillis
+
+ end - start
+ }
+
+ def main(args: Array[String]) {
+ val sz = 1000000000
+
+ val range = 1 to sz
+ check { assert(range.min == 1, range.min) }
+ check { assert(range.max == sz, range.max) }
+
+ val descending = sz to 1 by -1
+ check { assert(descending.min == 1) }
+ check { assert(descending.max == sz) }
+
+ val numeric = 1.0 to sz.toDouble by 1
+ check { assert(numeric.min == 1.0) }
+ check { assert(numeric.max == sz.toDouble) }
+
+ val numdesc = sz.toDouble to 1.0 by -1
+ check { assert(numdesc.min == 1.0) }
+ check { assert(numdesc.max == sz.toDouble) }
+ }
+
+ def check[U](b: =>U) {
+ val exectime = time {
+ b
+ }
+
+ // whatever it is, it should be less than, say, 250ms
+ // if `max` involves traversal, it takes over 5 seconds on a 3.2GHz i7 CPU
+ //println(exectime)
+ assert(exectime < 250, exectime)
+ }
+
+}
diff --git a/test/files/run/t5867.check b/test/files/run/t5867.check
new file mode 100644
index 0000000000..e1811eeefa
--- /dev/null
+++ b/test/files/run/t5867.check
@@ -0,0 +1 @@
+UnrolledBuffer(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50) \ No newline at end of file
diff --git a/test/files/run/t5867.scala b/test/files/run/t5867.scala
new file mode 100644
index 0000000000..6a86ac3e6d
--- /dev/null
+++ b/test/files/run/t5867.scala
@@ -0,0 +1,14 @@
+import collection.mutable.UnrolledBuffer
+
+
+
+object Test {
+
+ def main(args: Array[String]) {
+ val buf = UnrolledBuffer(1 to 50: _*)
+ val dub = buf ++ buf
+
+ println(dub)
+ }
+
+}
diff --git a/test/files/run/t5879.check b/test/files/run/t5879.check
new file mode 100644
index 0000000000..b6cbda35a7
--- /dev/null
+++ b/test/files/run/t5879.check
@@ -0,0 +1,16 @@
+Map(1 -> 1)
+1
+Map(1 -> 1)
+1
+(1,1)
+Map(1 -> 1)
+1
+(1,1)
+Map(1 -> 1)
+1
+(1,2)
+Map(1 -> 2)
+2
+(1,2)
+Map(1 -> 2)
+2 \ No newline at end of file
diff --git a/test/files/run/t5879.scala b/test/files/run/t5879.scala
new file mode 100644
index 0000000000..e1c07fc4c2
--- /dev/null
+++ b/test/files/run/t5879.scala
@@ -0,0 +1,74 @@
+import collection.immutable.HashMap
+
+
+object Test {
+
+ def main(args: Array[String]) {
+ resolveDefault()
+ resolveFirst()
+ resolveSecond()
+ resolveMany()
+ }
+
+ def resolveDefault() {
+ val a = HashMap(1 -> "1")
+ val b = HashMap(1 -> "2")
+
+ val r = a.merged(b)(null)
+ println(r)
+ println(r(1))
+
+ val rold = a.merge(b)
+ println(rold)
+ println(rold(1))
+ }
+
+ def resolveFirst() {
+ val a = HashMap(1 -> "1")
+ val b = HashMap(1 -> "2")
+ def collision(a: (Int, String), b: (Int, String)) = {
+ println(a)
+ a
+ }
+
+ val r = a.merged(b) { collision }
+ println(r)
+ println(r(1))
+
+ val rold = a.merge(b, collision)
+ println(rold)
+ println(rold(1))
+ }
+
+ def resolveSecond() {
+ val a = HashMap(1 -> "1")
+ val b = HashMap(1 -> "2")
+ def collision(a: (Int, String), b: (Int, String)) = {
+ println(b)
+ b
+ }
+
+ val r = a.merged(b) { collision }
+ println(r)
+ println(r(1))
+
+ val rold = a.merge(b, collision)
+ println(rold)
+ println(rold(1))
+ }
+
+ def resolveMany() {
+ val a = HashMap((0 until 100) zip (0 until 100): _*)
+ val b = HashMap((0 until 100) zip (100 until 200): _*)
+ def collision(a: (Int, Int), b: (Int, Int)) = {
+ (a._1, a._2 + b._2)
+ }
+
+ val r = a.merged(b) { collision }
+ for ((k, v) <- r) assert(v == 100 + 2 * k, (k, v))
+
+ val rold = a.merge(b, collision)
+ for ((k, v) <- r) assert(v == 100 + 2 * k, (k, v))
+ }
+
+}
diff --git a/test/files/run/t5880.scala b/test/files/run/t5880.scala
new file mode 100644
index 0000000000..4cda599f79
--- /dev/null
+++ b/test/files/run/t5880.scala
@@ -0,0 +1,41 @@
+
+
+import scala.collection.JavaConversions._
+
+
+
+object Test {
+
+ def main(args:Array[String]) = {
+ val tests = 5000
+ val jm: java.util.Map[Int, Int] = scala.collection.mutable.Map((0 until tests) zip (0 until tests).reverse: _*)
+ val es = jm.entrySet()
+ val it = es.iterator
+
+ // chi square test
+ val groups = 10
+ val hits = new Array[Int](groups)
+ def hit(hc: Int) {
+ val bucket = math.abs(hc) / (Int.MaxValue / groups)
+ hits(bucket) += 1
+ }
+ def expected = tests / groups
+ def Dstat = {
+ val diffs = for (i <- 0 until groups) yield math.abs(hits(i) - expected)
+ diffs.sum.toDouble / expected
+ }
+ def ChiSquare = {
+ val diffs = for (i <- 0 until groups) yield (hits(i) - expected) * (hits(i) - expected)
+ diffs.sum.toDouble / expected
+ }
+
+ while (it.hasNext) {
+ val x = it.next()
+ hit(x.##)
+ }
+ // println(hits.toBuffer)
+ // println(ChiSquare)
+ assert(ChiSquare < 4.0, ChiSquare + " -> " + hits.mkString(", "))
+ }
+
+}
diff --git a/test/files/run/toolbox_console_reporter.scala b/test/files/run/toolbox_console_reporter.scala
index 1da9a6bc16..c5b788550e 100644
--- a/test/files/run/toolbox_console_reporter.scala
+++ b/test/files/run/toolbox_console_reporter.scala
@@ -1,4 +1,4 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
object Test extends App {
// todo. cannot test this unfortunately, because ConsoleFrontEnd grabs Console.out too early
@@ -13,4 +13,4 @@ object Test extends App {
//
// Utils.foo
//})
-}
+} \ No newline at end of file
diff --git a/test/files/run/toolbox_default_reporter_is_silent.scala b/test/files/run/toolbox_default_reporter_is_silent.scala
index 6908c001a3..5f3269b6fa 100644
--- a/test/files/run/toolbox_default_reporter_is_silent.scala
+++ b/test/files/run/toolbox_default_reporter_is_silent.scala
@@ -1,7 +1,10 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
object Test extends App {
- val toolbox = mkToolBox()
+ val toolbox = cm.mkToolBox()
toolbox.runExpr(reify{
object Utils {
@deprecated("test", "2.10.0")
@@ -10,4 +13,4 @@ object Test extends App {
Utils.foo
}.tree)
-}
+} \ No newline at end of file
diff --git a/test/files/run/toolbox_silent_reporter.scala b/test/files/run/toolbox_silent_reporter.scala
index 6f5687ba4f..915734e6ad 100644
--- a/test/files/run/toolbox_silent_reporter.scala
+++ b/test/files/run/toolbox_silent_reporter.scala
@@ -1,7 +1,10 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
object Test extends App {
- val toolbox = mkToolBox(options = "-deprecation")
+ val toolbox = cm.mkToolBox(options = "-deprecation")
toolbox.runExpr(reify{
object Utils {
@deprecated("test", "2.10.0")
diff --git a/test/files/run/toolbox_typecheck_implicitsdisabled.check b/test/files/run/toolbox_typecheck_implicitsdisabled.check
index 4bc64530ab..e2f2dbe4b9 100644
--- a/test/files/run/toolbox_typecheck_implicitsdisabled.check
+++ b/test/files/run/toolbox_typecheck_implicitsdisabled.check
@@ -2,4 +2,4 @@
import scala.Predef._;
scala.Predef.any2ArrowAssoc[Int](1).->[Int](2)
}
-scala.reflect.runtime.ToolBoxes$ToolBox$ToolBoxError: reflective typecheck has failed: value -> is not a member of Int
+scala.tools.reflect.ToolBoxError: reflective typecheck has failed: value -> is not a member of Int
diff --git a/test/files/run/toolbox_typecheck_implicitsdisabled.scala b/test/files/run/toolbox_typecheck_implicitsdisabled.scala
index 9d52e91f73..f11f0192f3 100644
--- a/test/files/run/toolbox_typecheck_implicitsdisabled.scala
+++ b/test/files/run/toolbox_typecheck_implicitsdisabled.scala
@@ -1,7 +1,10 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
object Test extends App {
- val toolbox = mkToolBox()
+ val toolbox = cm.mkToolBox()
val tree1 = Block(
Import(Select(Ident(newTermName("scala")), newTermName("Predef")), List(ImportSelector(nme.WILDCARD, -1, null, -1))),
diff --git a/test/files/run/toolbox_typecheck_macrosdisabled.check b/test/files/run/toolbox_typecheck_macrosdisabled.check
index c4af175812..f4a67e3054 100644
--- a/test/files/run/toolbox_typecheck_macrosdisabled.check
+++ b/test/files/run/toolbox_typecheck_macrosdisabled.check
@@ -1,5 +1,37 @@
{
- val $mr: mr.type = mr;
- $mr.Expr.apply[Int(2)]($mr.Literal.apply($mr.Constant.apply(2)))($mr.ConcreteTypeTag.apply[Int(2)]($mr.ConstantType.apply($mr.Constant.apply(2)), classOf[scala.Int]))
+ val $u: ru.type = ru;
+ val $m: $u.Mirror = ru.rootMirror;
+ $u.Expr.apply[Int(2)]($m, {
+ final class $treecreator1 extends TreeCreator {
+ def <init>(): $treecreator1 = {
+ $treecreator1.super.<init>();
+ ()
+ };
+ def apply[U <: scala.reflect.base.Universe with Singleton]($m$untyped: scala.reflect.base.MirrorOf[U]): U#Tree = {
+ val $u: scala.reflect.api.Universe = $m$untyped.universe.asInstanceOf[scala.reflect.api.Universe];
+ val $m: $u.Mirror = $m$untyped.asInstanceOf[$u.Mirror];
+ $treecreator1.this.applyImpl[$u.type]($m).asInstanceOf[U#Tree]
+ };
+ private def applyImpl[U <: scala.reflect.api.Universe with Singleton]($m$untyped: scala.reflect.base.MirrorOf[U]): scala.reflect.base.Universe#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.base.Universe with Singleton]($m$untyped: scala.reflect.base.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()
+ }))
}
-mr.reify[Int](2)
+ru.reify[Int](2)
diff --git a/test/files/run/toolbox_typecheck_macrosdisabled.scala b/test/files/run/toolbox_typecheck_macrosdisabled.scala
index afbbce1736..bcbd637e02 100644
--- a/test/files/run/toolbox_typecheck_macrosdisabled.scala
+++ b/test/files/run/toolbox_typecheck_macrosdisabled.scala
@@ -1,17 +1,20 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
object Test extends App {
- val toolbox = mkToolBox()
- val mrPkg = staticModule("scala.reflect.package")
- val mrSym = selectTerm(mrPkg, "mirror")
- val NullaryMethodType(mrTpe) = mrSym.typeSignature
- val mr = newFreeTerm("mr", mrTpe, scala.reflect.mirror)
+ val toolbox = cm.mkToolBox()
+ val rupkg = cm.staticModule("scala.reflect.runtime.package")
+ val rusym = build.selectTerm(rupkg, "universe")
+ val NullaryMethodType(rutpe) = rusym.typeSignature
+ val ru = build.newFreeTerm("ru", rutpe, scala.reflect.runtime.universe)
- val tree1 = Apply(Select(Ident(mr), newTermName("reify")), List(Literal(Constant(2))))
+ val tree1 = Apply(Select(Ident(ru), newTermName("reify")), List(Literal(Constant(2))))
val ttree1 = toolbox.typeCheck(tree1, withMacrosDisabled = false)
println(ttree1)
- val tree2 = Apply(Select(Ident(mr), newTermName("reify")), List(Literal(Constant(2))))
+ val tree2 = Apply(Select(Ident(ru), newTermName("reify")), List(Literal(Constant(2))))
val ttree2 = toolbox.typeCheck(tree2, withMacrosDisabled = true)
println(ttree2)
-}
+} \ No newline at end of file
diff --git a/test/files/run/toolbox_typecheck_macrosdisabled2.check b/test/files/run/toolbox_typecheck_macrosdisabled2.check
index 271139b031..2e1e2696ab 100644
--- a/test/files/run/toolbox_typecheck_macrosdisabled2.check
+++ b/test/files/run/toolbox_typecheck_macrosdisabled2.check
@@ -1,5 +1,37 @@
{
- val $mr: mr.type = mr;
- $mr.Expr.apply[Array[Int]]($mr.Apply.apply($mr.Select.apply($mr.Select.apply($mr.Ident($mr.staticModule("scala")), $mr.newTermName("Array")), $mr.newTermName("apply")), scala.collection.immutable.List.apply[$mr.Literal]($mr.Literal.apply($mr.Constant.apply(2)))))($mr.ConcreteTypeTag.apply[Array[Int]]($mr.TypeRef.apply($mr.thisModuleType("scala"), $mr.staticClass("scala.Array"), scala.collection.immutable.List.apply[$mr.Type]($mr.staticClass("scala.Int").asTypeConstructor)), ScalaRunTime.this.arrayClass(classOf[scala.Int])))
+ val $u: ru.type = ru;
+ val $m: $u.Mirror = ru.rootMirror;
+ $u.Expr.apply[Array[Int]]($m, {
+ final class $treecreator1 extends TreeCreator {
+ def <init>(): $treecreator1 = {
+ $treecreator1.super.<init>();
+ ()
+ };
+ def apply[U <: scala.reflect.base.Universe with Singleton]($m$untyped: scala.reflect.base.MirrorOf[U]): U#Tree = {
+ val $u: scala.reflect.api.Universe = $m$untyped.universe.asInstanceOf[scala.reflect.api.Universe];
+ val $m: $u.Mirror = $m$untyped.asInstanceOf[$u.Mirror];
+ $treecreator1.this.applyImpl[$u.type]($m).asInstanceOf[U#Tree]
+ };
+ private def applyImpl[U <: scala.reflect.api.Universe with Singleton]($m$untyped: scala.reflect.base.MirrorOf[U]): scala.reflect.base.Universe#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.staticModule("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.base.Universe with Singleton]($m$untyped: scala.reflect.base.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.staticModule("scala").asModuleSymbol.moduleClass), $m.staticClass("scala.Array"), scala.collection.immutable.List.apply[$u.Type]($m.staticClass("scala.Int").asTypeSymbol.asTypeConstructor))
+ }
+ };
+ new $typecreator2()
+ }))
}
-mr.reify[Array[Int]](scala.Array.apply(2))
+ru.reify[Array[Int]](scala.Array.apply(2))
diff --git a/test/files/run/toolbox_typecheck_macrosdisabled2.scala b/test/files/run/toolbox_typecheck_macrosdisabled2.scala
index b4c76d0600..51493ffc1c 100644
--- a/test/files/run/toolbox_typecheck_macrosdisabled2.scala
+++ b/test/files/run/toolbox_typecheck_macrosdisabled2.scala
@@ -1,17 +1,20 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{universe => ru}
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
object Test extends App {
- val toolbox = mkToolBox()
- val mrPkg = staticModule("scala.reflect.package")
- val mrSym = selectTerm(mrPkg, "mirror")
- val NullaryMethodType(mrTpe) = mrSym.typeSignature
- val mr = newFreeTerm("mr", mrTpe, scala.reflect.mirror)
+ val toolbox = cm.mkToolBox()
+ val rupkg = cm.staticModule("scala.reflect.runtime.package")
+ val rusym = build.selectTerm(rupkg, "universe")
+ val NullaryMethodType(rutpe) = rusym.typeSignature
+ val ru = build.newFreeTerm("ru", rutpe, scala.reflect.runtime.universe)
- val tree1 = Apply(Select(Ident(mr), newTermName("reify")), List(Apply(Select(Ident(newTermName("scala")), newTermName("Array")), List(Literal(Constant(2))))))
+ val tree1 = Apply(Select(Ident(ru), newTermName("reify")), List(Apply(Select(Ident(newTermName("scala")), newTermName("Array")), List(Literal(Constant(2))))))
val ttree1 = toolbox.typeCheck(tree1, withMacrosDisabled = false)
println(ttree1)
- val tree2 = Apply(Select(Ident(mr), newTermName("reify")), List(Apply(Select(Ident(newTermName("scala")), newTermName("Array")), List(Literal(Constant(2))))))
+ val tree2 = Apply(Select(Ident(ru), newTermName("reify")), List(Apply(Select(Ident(newTermName("scala")), newTermName("Array")), List(Literal(Constant(2))))))
val ttree2 = toolbox.typeCheck(tree2, withMacrosDisabled = true)
println(ttree2)
}
diff --git a/test/files/run/triemap-hash.scala b/test/files/run/triemap-hash.scala
new file mode 100644
index 0000000000..7f19997da0
--- /dev/null
+++ b/test/files/run/triemap-hash.scala
@@ -0,0 +1,46 @@
+
+
+
+import util.hashing.Hashing
+
+
+
+object Test {
+
+ def main(args: Array[String]) {
+ hashing()
+ equality()
+ }
+
+ def hashing() {
+ import collection._
+
+ val tm = new concurrent.TrieMap[String, String](Hashing.fromFunction(x => x.length + x(0).toInt), Equiv.universal)
+ tm.put("a", "b")
+ tm.put("c", "d")
+
+ assert(tm("a") == "b")
+ assert(tm("c") == "d")
+
+ for (i <- 0 until 1000) tm(i.toString) = i.toString
+ for (i <- 0 until 1000) assert(tm(i.toString) == i.toString)
+ }
+
+ def equality() {
+ import collection._
+
+ val tm = new concurrent.TrieMap[String, String](Hashing.fromFunction(x => x(0).toInt), Equiv.fromFunction(_(0) == _(0)))
+ tm.put("a", "b")
+ tm.put("a1", "d")
+ tm.put("b", "c")
+
+ assert(tm("a") == "d", tm)
+ assert(tm("b") == "c", tm)
+
+ for (i <- 0 until 1000) tm(i.toString) = i.toString
+ assert(tm.size == 12, tm)
+ assert(tm("0") == "0", tm)
+ for (i <- 1 to 9) assert(tm(i.toString) == i.toString + "99", tm)
+ }
+
+}
diff --git a/test/files/run/tuples-msil.check b/test/files/run/tuples-msil.check
deleted file mode 100644
index e56a796667..0000000000
--- a/test/files/run/tuples-msil.check
+++ /dev/null
@@ -1,2 +0,0 @@
-(1,abc,True)
-OK
diff --git a/test/files/run/typetags_core.check b/test/files/run/typetags_core.check
deleted file mode 100644
index f124aa6a35..0000000000
--- a/test/files/run/typetags_core.check
+++ /dev/null
@@ -1,32 +0,0 @@
-true
-ConcreteTypeTag[Byte]
-true
-ConcreteTypeTag[Short]
-true
-ConcreteTypeTag[Char]
-true
-ConcreteTypeTag[Int]
-true
-ConcreteTypeTag[Long]
-true
-ConcreteTypeTag[Float]
-true
-ConcreteTypeTag[Double]
-true
-ConcreteTypeTag[Boolean]
-true
-ConcreteTypeTag[Unit]
-true
-ConcreteTypeTag[Any]
-true
-ConcreteTypeTag[Object]
-true
-ConcreteTypeTag[AnyVal]
-true
-ConcreteTypeTag[AnyRef]
-true
-ConcreteTypeTag[Null]
-true
-ConcreteTypeTag[Nothing]
-true
-ConcreteTypeTag[String]
diff --git a/test/files/run/typetags_core.scala b/test/files/run/typetags_core.scala
deleted file mode 100644
index 7d6be16379..0000000000
--- a/test/files/run/typetags_core.scala
+++ /dev/null
@@ -1,34 +0,0 @@
-object Test extends App {
- println(implicitly[TypeTag[Byte]] eq TypeTag.Byte)
- println(implicitly[TypeTag[Byte]])
- println(implicitly[TypeTag[Short]] eq TypeTag.Short)
- println(implicitly[TypeTag[Short]])
- println(implicitly[TypeTag[Char]] eq TypeTag.Char)
- println(implicitly[TypeTag[Char]])
- println(implicitly[TypeTag[Int]] eq TypeTag.Int)
- println(implicitly[TypeTag[Int]])
- println(implicitly[TypeTag[Long]] eq TypeTag.Long)
- println(implicitly[TypeTag[Long]])
- println(implicitly[TypeTag[Float]] eq TypeTag.Float)
- println(implicitly[TypeTag[Float]])
- println(implicitly[TypeTag[Double]] eq TypeTag.Double)
- println(implicitly[TypeTag[Double]])
- println(implicitly[TypeTag[Boolean]] eq TypeTag.Boolean)
- println(implicitly[TypeTag[Boolean]])
- println(implicitly[TypeTag[Unit]] eq TypeTag.Unit)
- println(implicitly[TypeTag[Unit]])
- println(implicitly[TypeTag[Any]] eq TypeTag.Any)
- println(implicitly[TypeTag[Any]])
- println(implicitly[TypeTag[Object]] eq TypeTag.Object)
- println(implicitly[TypeTag[Object]])
- println(implicitly[TypeTag[AnyVal]] eq TypeTag.AnyVal)
- println(implicitly[TypeTag[AnyVal]])
- println(implicitly[TypeTag[AnyRef]] eq TypeTag.AnyRef)
- println(implicitly[TypeTag[AnyRef]])
- println(implicitly[TypeTag[Null]] eq TypeTag.Null)
- println(implicitly[TypeTag[Null]])
- println(implicitly[TypeTag[Nothing]] eq TypeTag.Nothing)
- println(implicitly[TypeTag[Nothing]])
- println(implicitly[TypeTag[String]] eq TypeTag.String)
- println(implicitly[TypeTag[String]])
-} \ No newline at end of file
diff --git a/test/files/run/typetags_multi.check b/test/files/run/typetags_multi.check
deleted file mode 100644
index 613106985c..0000000000
--- a/test/files/run/typetags_multi.check
+++ /dev/null
@@ -1,5 +0,0 @@
-ConcreteTypeTag[Int]
-ConcreteTypeTag[Array[Int]]
-ConcreteTypeTag[Array[Array[Int]]]
-ConcreteTypeTag[Array[Array[Array[Int]]]]
-ConcreteTypeTag[Array[Array[Array[Array[Int]]]]]
diff --git a/test/files/run/typetags_multi.scala b/test/files/run/typetags_multi.scala
deleted file mode 100644
index 868edc2b2a..0000000000
--- a/test/files/run/typetags_multi.scala
+++ /dev/null
@@ -1,7 +0,0 @@
-object Test extends App {
- println(typeTag[Int])
- println(typeTag[Array[Int]])
- println(typeTag[Array[Array[Int]]])
- println(typeTag[Array[Array[Array[Int]]]])
- println(typeTag[Array[Array[Array[Array[Int]]]]])
-} \ No newline at end of file
diff --git a/test/files/run/virtpatmat_typetag.check b/test/files/run/virtpatmat_typetag.check
new file mode 100644
index 0000000000..f9800b84d0
--- /dev/null
+++ b/test/files/run/virtpatmat_typetag.check
@@ -0,0 +1,10 @@
+1 is not a ClassTag[int]; it's a class java.lang.Integer
+1 is a ClassTag[class java.lang.Integer]
+1 is not a ClassTag[class java.lang.String]; it's a class java.lang.Integer
+true is a ClassTag[class java.lang.Object]
+woele is a ClassTag[class java.lang.String]
+1 is not a ClassTag[int]; it's a class java.lang.Integer
+1 is a ClassTag[class java.lang.Integer]
+1 is not a ClassTag[class java.lang.String]; it's a class java.lang.Integer
+true is a ClassTag[class java.lang.Object]
+woele is a ClassTag[class java.lang.String]
diff --git a/test/files/run/virtpatmat_typetag.flags b/test/files/run/virtpatmat_typetag.flags
new file mode 100644
index 0000000000..e8fb65d50c
--- /dev/null
+++ b/test/files/run/virtpatmat_typetag.flags
@@ -0,0 +1 @@
+-Xfatal-warnings \ No newline at end of file
diff --git a/test/files/run/virtpatmat_typetag.scala b/test/files/run/virtpatmat_typetag.scala
new file mode 100644
index 0000000000..c1b1fd813a
--- /dev/null
+++ b/test/files/run/virtpatmat_typetag.scala
@@ -0,0 +1,36 @@
+import reflect.{ClassTag, classTag}
+
+trait Extractors {
+ type T
+ implicit val tTag: ClassTag[T]
+ object ExtractT {
+ def unapply(x: T) = Some(x)
+ }
+ def apply(a: Any) = a match {
+ case ExtractT(x) => println(x +" is a "+ implicitly[ClassTag[T]])
+ case _ => println(a+ " is not a "+ implicitly[ClassTag[T]] +"; it's a "+ a.getClass)
+ }
+}
+
+object Test extends App {
+ def typeMatch[T: ClassTag](a: Any) = a match {
+ case x : T => println(x +" is a "+ implicitly[ClassTag[T]])
+ case _ => println(a+ " is not a "+ implicitly[ClassTag[T]] +"; it's a "+ a.getClass)
+ }
+
+ // the same match as typeMatch, but using an extractor
+ def extractorMatch[S: ClassTag](a: Any) =
+ (new Extractors { type T = S; val tTag = classTag[T] })(a)
+
+ typeMatch[Int](1)
+ typeMatch[Integer](1)
+ typeMatch[String](1)
+ typeMatch[Any](true)
+ typeMatch[String]("woele")
+
+ extractorMatch[Int](1)
+ extractorMatch[Integer](1)
+ extractorMatch[String](1)
+ extractorMatch[Any](true)
+ extractorMatch[String]("woele")
+} \ No newline at end of file