summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-08-02 18:05:55 -0700
committerPaul Phillips <paulp@improving.org>2012-08-02 18:05:55 -0700
commit9197ca4da4f8090f09912ea9f45497f85eee67ca (patch)
treead3ba06abd63f722b74bfea534bd2be04169f9a7 /test
parent8a2df611d2390caa4c2e1b56433408654dfc9d9a (diff)
parent57fcda5cc5407b33d638f3c4d7c4f41a92fceac4 (diff)
downloadscala-9197ca4da4f8090f09912ea9f45497f85eee67ca.tar.gz
scala-9197ca4da4f8090f09912ea9f45497f85eee67ca.tar.bz2
scala-9197ca4da4f8090f09912ea9f45497f85eee67ca.zip
Merge remote-tracking branch 'origin/2.10.x' into merge-2.10.x
* origin/2.10.x: first stab at serialization of exprs and tags deploys a new starr that knows reify is a macro moves Expr from api to base evicts last traces of makro from our codebase reflect.makro => reflect.macros (Step I) removes -Xmacro-(.*)-classpath compiler options prepares our macro defs for refactoring (Step II) prepares our macro defs for refactoring (Step I) more refinements of reflection API SI-5888 Mirrors now have sane toStrings renames asType to toType and asXXXSymbol to asXXX miscellaneous refinements of reflection API navigation between fields and accessors moves most of symbol tests in API to descendants simplifies flag API SI-5732 members and derivatives now return Scope SI-5751 cleans up toolboxes for the release I actually managed to hit the limit of Scala signature annotation not fitting into a single string (high five everyone) and entered the undisovered region of arrEncode in GenASM. arrEncode returns Array[String] so asm.AnnotationWriter is not going to like it. Added more variants to achieve getLinkPos Checkfile update. Fixed maddening "..." lately in printed types. Removed resolveOverloaded SI-5866 Support casting null to value classes ClassTag.Nothing now throws an exception Fixed SI-5031. Only consider classes when looking for companion class. sym.effectiveOwner revealed this piece of inconsistency. companionModule is fine because similar check is there already. Fixed SI-5603. Early definitions now get transparent positions. This includes a fix for a minor problem described in #594 - ensureNonOverlapping still focuses on default position when outside of early defs. Review by @dragos, @odersky. SI-5799 Secondary constructors in value classes not allowed Closes SI-5878 Closes SI-5882 Closed 6029 ... New Worksheet mixing scheme Raw string interpolator Adds method askForResponse Disable interrupts during code instrumentation New Executor. SI-6142: warn @inline-methods ending up not inlined (rightfully or not) Avoids loading scala.package and scala.reflect.package from source if a classfile exists. `ScriptSourceFile` should not hard-code `OffsetPosition`. Fix `Instrumentation.getStatistics` method in partest. Instrument all classes in `instrumented` package. SI-5958 This deserves a stable type SI-6140 Scaladoc infinite recursion in wiki parser SI-4560 - improved test Revert "tentative fix for RC5 lift build problem." Revert "Closes #4560. Review by dragos." (introduction of safeREF) Revert fix part of "Closes 4560. Review by dragos." Fix SI-4560, NoSuchMethodErrors involving self types. SI-2038 make pt fully-defined when typing Typed Conflicts: src/compiler/scala/tools/nsc/interpreter/Imports.scala src/compiler/scala/tools/nsc/interpreter/JLineCompletion.scala src/compiler/scala/tools/nsc/interpreter/MemberHandlers.scala
Diffstat (limited to 'test')
-rw-r--r--test/files/instrumented/InstrumentationTest.check4
-rw-r--r--test/files/instrumented/InstrumentationTest.scala16
-rw-r--r--test/files/neg/macro-basic-mamdmi.check1
-rw-r--r--test/files/neg/macro-basic-mamdmi/Impls_Macros_Test_1.scala2
-rw-r--r--test/files/neg/macro-cyclic/Impls_Macros_1.scala2
-rw-r--r--test/files/neg/macro-invalidimpl-a/Impls_1.scala2
-rw-r--r--test/files/neg/macro-invalidimpl-b/Impls_1.scala2
-rw-r--r--test/files/neg/macro-invalidimpl-c/Impls_Macros_1.scala2
-rw-r--r--test/files/neg/macro-invalidimpl-d/Impls_1.scala2
-rw-r--r--test/files/neg/macro-invalidimpl-e.check8
-rw-r--r--test/files/neg/macro-invalidimpl-e/Impls_1.scala2
-rw-r--r--test/files/neg/macro-invalidimpl-f.check14
-rw-r--r--test/files/neg/macro-invalidimpl-f/Impls_1.scala2
-rw-r--r--test/files/neg/macro-invalidimpl-g.check4
-rw-r--r--test/files/neg/macro-invalidimpl-g/Impls_1.scala2
-rw-r--r--test/files/neg/macro-invalidimpl-h/Impls_1.scala2
-rw-r--r--test/files/neg/macro-invalidret-nontree.check4
-rw-r--r--test/files/neg/macro-invalidret-nontree/Impls_1.scala2
-rw-r--r--test/files/neg/macro-invalidret-nonuniversetree.check4
-rw-r--r--test/files/neg/macro-invalidret-nonuniversetree/Impls_1.scala2
-rw-r--r--test/files/neg/macro-invalidshape-a/Impls_1.scala2
-rw-r--r--test/files/neg/macro-invalidshape-b/Impls_1.scala2
-rw-r--r--test/files/neg/macro-invalidshape-c/Impls_1.scala2
-rw-r--r--test/files/neg/macro-invalidshape-d/Impls_1.scala2
-rw-r--r--test/files/neg/macro-invalidsig-context-bounds/Impls_1.scala2
-rw-r--r--test/files/neg/macro-invalidsig-ctx-badargc.check14
-rw-r--r--test/files/neg/macro-invalidsig-ctx-badtype.check4
-rw-r--r--test/files/neg/macro-invalidsig-ctx-badvarargs.check14
-rw-r--r--test/files/neg/macro-invalidsig-ctx-badvarargs/Impls_1.scala2
-rw-r--r--test/files/neg/macro-invalidsig-ctx-noctx.check14
-rw-r--r--test/files/neg/macro-invalidsig-ctx-noctx/Impls_1.scala2
-rw-r--r--test/files/neg/macro-invalidsig-implicit-params/Impls_Macros_1.scala2
-rw-r--r--test/files/neg/macro-invalidsig-params-badargc.check14
-rw-r--r--test/files/neg/macro-invalidsig-params-badargc/Impls_Macros_1.scala2
-rw-r--r--test/files/neg/macro-invalidsig-params-badtype.check4
-rw-r--r--test/files/neg/macro-invalidsig-params-badtype/Impls_Macros_1.scala2
-rw-r--r--test/files/neg/macro-invalidsig-params-badvarargs.check14
-rw-r--r--test/files/neg/macro-invalidsig-params-badvarargs/Impls_Macros_1.scala2
-rw-r--r--test/files/neg/macro-invalidsig-params-namemismatch.check14
-rw-r--r--test/files/neg/macro-invalidsig-params-namemismatch/Impls_Macros_1.scala2
-rw-r--r--test/files/neg/macro-invalidsig-tparams-badtype.check4
-rw-r--r--test/files/neg/macro-invalidsig-tparams-badtype/Impls_1.scala2
-rw-r--r--test/files/neg/macro-invalidsig-tparams-bounds-a/Impls_1.scala2
-rw-r--r--test/files/neg/macro-invalidsig-tparams-bounds-b/Impls_1.scala2
-rw-r--r--test/files/neg/macro-invalidsig-tparams-notparams-a/Impls_1.scala2
-rw-r--r--test/files/neg/macro-invalidsig-tparams-notparams-b/Impls_1.scala2
-rw-r--r--test/files/neg/macro-invalidsig-tparams-notparams-c.check2
-rw-r--r--test/files/neg/macro-invalidsig-tparams-notparams-c/Impls_1.scala2
-rw-r--r--test/files/neg/macro-invalidusage-badargs/Impls_1.scala2
-rw-r--r--test/files/neg/macro-invalidusage-badbounds/Impls_1.scala2
-rw-r--r--test/files/neg/macro-invalidusage-badtargs/Impls_1.scala2
-rw-r--r--test/files/neg/macro-invalidusage-methodvaluesyntax/Impls_1.scala2
-rw-r--r--test/files/neg/macro-noexpand/Impls_1.scala2
-rw-r--r--test/files/neg/macro-nontypeablebody/Impls_1.scala2
-rw-r--r--test/files/neg/macro-override-macro-overrides-abstract-method-a/Impls_Macros_1.scala2
-rw-r--r--test/files/neg/macro-override-macro-overrides-abstract-method-b/Impls_Macros_1.scala2
-rw-r--r--test/files/neg/macro-override-method-overrides-macro/Impls_1.scala2
-rw-r--r--test/files/neg/macro-without-xmacros-a/Impls_1.scala2
-rw-r--r--test/files/neg/macro-without-xmacros-b/Impls_1.scala2
-rw-r--r--test/files/neg/t3234.check2
-rw-r--r--test/files/neg/t3234.flags (renamed from test/files/pos/t3234.flags)0
-rw-r--r--test/files/neg/t3234.scala (renamed from test/files/pos/t3234.scala)0
-rw-r--r--test/files/neg/t5031.check5
-rw-r--r--test/files/neg/t5031/Id.scala4
-rw-r--r--test/files/neg/t5031/package.scala3
-rw-r--r--test/files/neg/t5689.check4
-rw-r--r--test/files/neg/t5689.scala2
-rw-r--r--test/files/neg/t5799.check4
-rw-r--r--test/files/neg/t5799.scala8
-rw-r--r--test/files/neg/t5878.check13
-rw-r--r--test/files/neg/t5878.scala6
-rw-r--r--test/files/neg/t5882.check15
-rw-r--r--test/files/neg/t5882.scala5
-rw-r--r--test/files/pos/t2038.scala5
-rw-r--r--test/files/pos/t5031/Id.scala4
-rw-r--r--test/files/pos/t5031/package.scala3
-rw-r--r--test/files/pos/t5031_2.scala7
-rw-r--r--test/files/pos/t5706.scala2
-rw-r--r--test/files/pos/t5958.scala15
-rw-r--r--test/files/pos/t6029.scala3
-rw-r--r--test/files/pos/t6047.scala2
-rw-r--r--test/files/run/abstypetags_serialize.check2
-rw-r--r--test/files/run/abstypetags_serialize.scala32
-rw-r--r--test/files/run/classtags_core.check60
-rw-r--r--test/files/run/compiler-asSeenFrom.scala2
-rw-r--r--test/files/run/exprs_serialize.check2
-rw-r--r--test/files/run/exprs_serialize.scala28
-rw-r--r--test/files/run/macro-abort-fresh/Macros_1.scala2
-rw-r--r--test/files/run/macro-basic-ma-md-mi/Impls_1.scala2
-rw-r--r--test/files/run/macro-basic-ma-mdmi/Impls_Macros_1.scala2
-rw-r--r--test/files/run/macro-basic-mamd-mi/Impls_1.scala2
-rw-r--r--test/files/run/macro-bodyexpandstoimpl/Impls_1.scala2
-rw-r--r--test/files/run/macro-bodyexpandstoimpl/Macros_Test_2.scala2
-rw-r--r--test/files/run/macro-declared-in-annotation/Impls_1.scala2
-rw-r--r--test/files/run/macro-declared-in-anonymous/Impls_1.scala2
-rw-r--r--test/files/run/macro-declared-in-block/Impls_1.scala2
-rw-r--r--test/files/run/macro-declared-in-class-class/Impls_1.scala2
-rw-r--r--test/files/run/macro-declared-in-class-object/Impls_1.scala2
-rw-r--r--test/files/run/macro-declared-in-class/Impls_1.scala2
-rw-r--r--test/files/run/macro-declared-in-default-param/Impls_1.scala2
-rw-r--r--test/files/run/macro-declared-in-implicit-class/Impls_Macros_1.scala2
-rw-r--r--test/files/run/macro-declared-in-method/Impls_1.scala2
-rw-r--r--test/files/run/macro-declared-in-object-class/Impls_1.scala2
-rw-r--r--test/files/run/macro-declared-in-object-object/Impls_1.scala2
-rw-r--r--test/files/run/macro-declared-in-object/Impls_1.scala2
-rw-r--r--test/files/run/macro-declared-in-package-object/Impls_1.scala2
-rw-r--r--test/files/run/macro-declared-in-refinement/Impls_1.scala2
-rw-r--r--test/files/run/macro-declared-in-trait/Impls_1.scala2
-rw-r--r--test/files/run/macro-def-infer-return-type-a/Impls_1.scala2
-rw-r--r--test/files/run/macro-def-infer-return-type-b/Impls_Macros_1.scala2
-rw-r--r--test/files/run/macro-def-infer-return-type-c/Impls_1.scala2
-rw-r--r--test/files/run/macro-def-path-dependent-a/Impls_Macros_1.scala2
-rw-r--r--test/files/run/macro-def-path-dependent-b/Impls_Macros_1.scala2
-rw-r--r--test/files/run/macro-def-path-dependent-c/Impls_Macros_1.scala2
-rw-r--r--test/files/run/macro-def-path-dependent-d/Impls_Macros_1.scala2
-rw-r--r--test/files/run/macro-expand-implicit-macro-has-implicit/Impls_1.scala2
-rw-r--r--test/files/run/macro-expand-implicit-macro-is-implicit/Impls_1.scala2
-rw-r--r--test/files/run/macro-expand-implicit-macro-is-val/Impls_1.scala2
-rw-r--r--test/files/run/macro-expand-implicit-macro-is-view/Impls_1.scala2
-rw-r--r--test/files/run/macro-expand-multiple-arglists/Impls_1.scala2
-rw-r--r--test/files/run/macro-expand-nullary-generic/Impls_1.scala2
-rw-r--r--test/files/run/macro-expand-nullary-nongeneric/Impls_1.scala2
-rw-r--r--test/files/run/macro-expand-overload/Impls_1.scala2
-rw-r--r--test/files/run/macro-expand-override/Impls_1.scala2
-rw-r--r--test/files/run/macro-expand-recursive/Impls_1.scala2
-rw-r--r--test/files/run/macro-expand-tparams-bounds-a/Impls_1.scala2
-rw-r--r--test/files/run/macro-expand-tparams-bounds-b/Impls_1.scala2
-rw-r--r--test/files/run/macro-expand-tparams-explicit/Impls_1.scala2
-rw-r--r--test/files/run/macro-expand-tparams-implicit/Impls_1.scala2
-rw-r--r--test/files/run/macro-expand-tparams-only-in-impl/Impls_1.scala2
-rw-r--r--test/files/run/macro-expand-tparams-optional/Impls_1.scala2
-rw-r--r--test/files/run/macro-expand-tparams-prefix-a/Impls_1.scala2
-rw-r--r--test/files/run/macro-expand-tparams-prefix-b/Impls_1.scala2
-rw-r--r--test/files/run/macro-expand-tparams-prefix-c1/Impls_1.scala2
-rw-r--r--test/files/run/macro-expand-tparams-prefix-c2/Impls_Macros_1.scala2
-rw-r--r--test/files/run/macro-expand-tparams-prefix-d1/Impls_1.scala2
-rw-r--r--test/files/run/macro-expand-varargs-explicit-over-nonvarargs-bad/Impls_1.scala2
-rw-r--r--test/files/run/macro-expand-varargs-explicit-over-nonvarargs-good/Impls_1.scala2
-rw-r--r--test/files/run/macro-expand-varargs-explicit-over-varargs/Impls_1.scala2
-rw-r--r--test/files/run/macro-expand-varargs-implicit-over-nonvarargs/Impls_1.scala2
-rw-r--r--test/files/run/macro-expand-varargs-implicit-over-varargs/Impls_1.scala2
-rw-r--r--test/files/run/macro-impl-default-params/Impls_Macros_1.scala2
-rw-r--r--test/files/run/macro-impl-rename-context/Impls_Macros_1.scala2
-rw-r--r--test/files/run/macro-invalidret-doesnt-conform-to-def-rettype/Impls_Macros_1.scala2
-rw-r--r--test/files/run/macro-invalidret-nontypeable/Impls_Macros_1.scala2
-rw-r--r--test/files/run/macro-invalidusage-badret/Impls_Macros_1.scala2
-rw-r--r--test/files/run/macro-invalidusage-partialapplication-with-tparams/Impls_Macros_1.scala2
-rw-r--r--test/files/run/macro-invalidusage-partialapplication/Impls_Macros_1.scala2
-rw-r--r--test/files/run/macro-openmacros/Impls_Macros_1.scala2
-rw-r--r--test/files/run/macro-quasiinvalidbody-c/Impls_Macros_1.scala2
-rw-r--r--test/files/run/macro-range/Common_1.scala2
-rw-r--r--test/files/run/macro-range/Expansion_Impossible_2.scala2
-rw-r--r--test/files/run/macro-reflective-ma-normal-mdmi/Impls_Macros_1.scala2
-rw-r--r--test/files/run/macro-reflective-mamd-normal-mi/Impls_1.scala2
-rw-r--r--test/files/run/macro-reflective-mamd-normal-mi/Macros_Test_2.scala2
-rw-r--r--test/files/run/macro-reify-basic/Macros_1.scala2
-rw-r--r--test/files/run/macro-reify-freevars/Macros_1.scala2
-rw-r--r--test/files/run/macro-reify-nested-a/Impls_Macros_1.scala4
-rw-r--r--test/files/run/macro-reify-nested-b/Impls_Macros_1.scala4
-rw-r--r--test/files/run/macro-reify-ref-to-packageless/Impls_1.scala2
-rw-r--r--test/files/run/macro-reify-splice-outside-reify/Impls_Macros_1.scala2
-rw-r--r--test/files/run/macro-reify-splice-splice/Macros_1.scala2
-rw-r--r--test/files/run/macro-reify-staticXXX/Macros_1.scala2
-rw-r--r--test/files/run/macro-reify-tagful-a/Macros_1.scala2
-rw-r--r--test/files/run/macro-reify-tagless-a/Impls_Macros_1.scala2
-rw-r--r--test/files/run/macro-reify-unreify/Macros_1.scala2
-rw-r--r--test/files/run/macro-repl-basic.check4
-rw-r--r--test/files/run/macro-repl-basic.scala2
-rw-r--r--test/files/run/macro-repl-dontexpand.check4
-rw-r--r--test/files/run/macro-repl-dontexpand.scala2
-rw-r--r--test/files/run/macro-settings/Impls_Macros_1.scala2
-rw-r--r--test/files/run/macro-sip19-revised/Impls_Macros_1.scala4
-rw-r--r--test/files/run/macro-sip19/Impls_Macros_1.scala2
-rw-r--r--test/files/run/macro-typecheck-implicitsdisabled/Impls_Macros_1.scala2
-rw-r--r--test/files/run/macro-typecheck-macrosdisabled.check5
-rw-r--r--test/files/run/macro-typecheck-macrosdisabled/Impls_Macros_1.scala2
-rw-r--r--test/files/run/macro-typecheck-macrosdisabled2.check7
-rw-r--r--test/files/run/macro-typecheck-macrosdisabled2/Impls_Macros_1.scala2
-rw-r--r--test/files/run/macro-undetparams-consfromsls/Impls_Macros_1.scala2
-rw-r--r--test/files/run/macro-undetparams-macroitself/Impls_Macros_1.scala2
-rw-r--r--test/files/run/rawstrings.check1
-rw-r--r--test/files/run/rawstrings.scala3
-rw-r--r--test/files/run/reflect-resolveoverload-bynameparam.scala32
-rw-r--r--test/files/run/reflect-resolveoverload-expected.scala43
-rw-r--r--test/files/run/reflect-resolveoverload-invalid.scala43
-rw-r--r--test/files/run/reflect-resolveoverload-named.scala26
-rw-r--r--test/files/run/reflect-resolveoverload-targs.scala29
-rw-r--r--test/files/run/reflect-resolveoverload-tparm-substitute.scala77
-rw-r--r--test/files/run/reflect-resolveoverload-variadic.scala27
-rw-r--r--test/files/run/reflect-resolveoverload1.scala19
-rw-r--r--test/files/run/reflect-resolveoverload2.scala51
-rw-r--r--test/files/run/reflection-allmirrors-tostring.check14
-rw-r--r--test/files/run/reflection-allmirrors-tostring.scala43
-rw-r--r--test/files/run/reflection-constructormirror-inner-badpath.scala2
-rw-r--r--test/files/run/reflection-constructormirror-inner-good.scala2
-rw-r--r--test/files/run/reflection-constructormirror-nested-badpath.scala2
-rw-r--r--test/files/run/reflection-constructormirror-nested-good.scala2
-rw-r--r--test/files/run/reflection-constructormirror-toplevel-badpath.scala2
-rw-r--r--test/files/run/reflection-constructormirror-toplevel-good.scala2
-rw-r--r--test/files/run/reflection-equality.check2
-rw-r--r--test/files/run/reflection-equality.scala2
-rw-r--r--test/files/run/reflection-fieldmirror-accessorsareokay.scala6
-rw-r--r--test/files/run/reflection-fieldmirror-ctorparam.scala2
-rw-r--r--test/files/run/reflection-fieldmirror-getsetval.scala2
-rw-r--r--test/files/run/reflection-fieldmirror-getsetvar.scala2
-rw-r--r--test/files/run/reflection-fieldmirror-nmelocalsuffixstring.scala2
-rw-r--r--test/files/run/reflection-fieldmirror-privatethis.scala2
-rw-r--r--test/files/run/reflection-fieldsymbol-navigation.check6
-rw-r--r--test/files/run/reflection-fieldsymbol-navigation.scala15
-rw-r--r--test/files/run/reflection-methodsymbol-params.check8
-rw-r--r--test/files/run/reflection-methodsymbol-params.scala24
-rw-r--r--test/files/run/reflection-methodsymbol-returntype.check8
-rw-r--r--test/files/run/reflection-methodsymbol-returntype.scala24
-rw-r--r--test/files/run/reflection-methodsymbol-typeparams.check8
-rw-r--r--test/files/run/reflection-methodsymbol-typeparams.scala24
-rw-r--r--test/files/run/reflection-sanitychecks.scala8
-rw-r--r--test/files/run/reflection-simple.scala12
-rw-r--r--test/files/run/reflection-sorted-decls.check7
-rw-r--r--test/files/run/reflection-sorted-decls.scala8
-rw-r--r--test/files/run/reflection-sorted-members.check (renamed from test/files/run/reflection-simple.check)79
-rw-r--r--test/files/run/reflection-sorted-members.scala11
-rw-r--r--test/files/run/reify_newimpl_45.scala3
-rw-r--r--test/files/run/t4560.check8
-rw-r--r--test/files/run/t4560.scala65
-rw-r--r--test/files/run/t4560b.check2
-rw-r--r--test/files/run/t4560b.scala28
-rw-r--r--test/files/run/t5603.check29
-rw-r--r--test/files/run/t5603.scala42
-rw-r--r--test/files/run/t5713/Impls_Macros_1.scala2
-rw-r--r--test/files/run/t5866.check2
-rw-r--r--test/files/run/t5866.scala11
-rw-r--r--test/files/run/t6028.check20
-rw-r--r--test/files/run/toolbox_typecheck_inferimplicitvalue.check1
-rw-r--r--test/files/run/toolbox_typecheck_inferimplicitvalue.scala13
-rw-r--r--test/files/run/toolbox_typecheck_macrosdisabled.check5
-rw-r--r--test/files/run/toolbox_typecheck_macrosdisabled2.check7
-rw-r--r--test/files/run/typetags_serialize.check2
-rw-r--r--test/files/run/typetags_serialize.scala28
-rw-r--r--test/pending/run/macro-expand-default/Impls_1.scala2
-rw-r--r--test/pending/run/macro-expand-implicit-macro-defeats-type-inference/Impls_1.scala2
-rw-r--r--test/pending/run/macro-expand-macro-has-context-bound/Impls_1.scala2
-rw-r--r--test/pending/run/macro-expand-named/Impls_1.scala2
-rw-r--r--test/pending/run/macro-expand-tparams-prefix-e1/Impls_1.scala2
-rw-r--r--test/pending/run/macro-expand-tparams-prefix-f1/Impls_1.scala2
-rw-r--r--test/pending/run/macro-quasiinvalidbody-a/Impls_1.scala2
-rw-r--r--test/pending/run/macro-quasiinvalidbody-a/Macros_Test_2.scala2
-rw-r--r--test/pending/run/macro-quasiinvalidbody-b/Impls_1.scala2
-rw-r--r--test/pending/run/macro-quasiinvalidbody-b/Macros_Test_2.scala2
-rw-r--r--test/pending/run/macro-reify-array/Macros_1.scala2
-rw-r--r--test/pending/run/macro-reify-tagful-b/Macros_1.scala2
-rw-r--r--test/pending/run/macro-reify-tagless-b/Impls_Macros_1.scala2
-rw-r--r--test/pending/run/t4560.scala9
-rw-r--r--test/pending/run/t5692/Impls_Macros_1.scala4
-rw-r--r--test/scaladoc/run/SI-6140.check1
-rw-r--r--test/scaladoc/run/SI-6140.scala18
255 files changed, 942 insertions, 743 deletions
diff --git a/test/files/instrumented/InstrumentationTest.check b/test/files/instrumented/InstrumentationTest.check
index 3652df270a..f0f447560a 100644
--- a/test/files/instrumented/InstrumentationTest.check
+++ b/test/files/instrumented/InstrumentationTest.check
@@ -1,4 +1,8 @@
true
Method call statistics:
+ 1 Foo1.<init>()V
+ 1 Foo1.someMethod()I
+ 1 instrumented/Foo2.<init>()V
+ 1 instrumented/Foo2.someMethod()I
1 scala/Predef$.println(Ljava/lang/Object;)V
1 scala/runtime/BoxesRunTime.boxToBoolean(Z)Ljava/lang/Boolean;
diff --git a/test/files/instrumented/InstrumentationTest.scala b/test/files/instrumented/InstrumentationTest.scala
index ec5314c624..0e53f80857 100644
--- a/test/files/instrumented/InstrumentationTest.scala
+++ b/test/files/instrumented/InstrumentationTest.scala
@@ -1,11 +1,27 @@
import scala.tools.partest.instrumented.Instrumentation._
+/** We check if classes put in empty package are properly instrumented */
+class Foo1 {
+ def someMethod = 0
+}
+
+/** We check if classes put in `instrumented` package are properly instrumented */
+package instrumented {
+ class Foo2 {
+ def someMethod = 0
+ }
+}
+
/** Tests if instrumentation itself works correctly */
object Test {
def main(args: Array[String]) {
// force predef initialization before profiling
Predef
startProfiling()
+ val foo1 = new Foo1
+ foo1.someMethod
+ val foo2 = new instrumented.Foo2
+ foo2.someMethod
// should box the boolean
println(true)
stopProfiling()
diff --git a/test/files/neg/macro-basic-mamdmi.check b/test/files/neg/macro-basic-mamdmi.check
index eef444f7b3..67b00c0ec5 100644
--- a/test/files/neg/macro-basic-mamdmi.check
+++ b/test/files/neg/macro-basic-mamdmi.check
@@ -1,5 +1,4 @@
Impls_Macros_Test_1.scala:36: error: macro implementation not found: foo (the most common reason for that is that you cannot use macro implementations in the same compilation run that defines them)
-if you do need to define macro implementations along with the rest of your program, consider two-phase compilation with -Xmacro-fallback-classpath in the second phase pointing to the output of the first phase
println(foo(2) + Macros.bar(2) * new Macros().quux(4))
^
one error found
diff --git a/test/files/neg/macro-basic-mamdmi/Impls_Macros_Test_1.scala b/test/files/neg/macro-basic-mamdmi/Impls_Macros_Test_1.scala
index 8abde907bb..908438cf65 100644
--- a/test/files/neg/macro-basic-mamdmi/Impls_Macros_Test_1.scala
+++ b/test/files/neg/macro-basic-mamdmi/Impls_Macros_Test_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx)(x: c.Expr[Int]): c.Expr[Int] = {
diff --git a/test/files/neg/macro-cyclic/Impls_Macros_1.scala b/test/files/neg/macro-cyclic/Impls_Macros_1.scala
index 2ecdc3416e..ac9b7938db 100644
--- a/test/files/neg/macro-cyclic/Impls_Macros_1.scala
+++ b/test/files/neg/macro-cyclic/Impls_Macros_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.Context
+import scala.reflect.macros.Context
object Macros {
def impl(c: Context) = {
diff --git a/test/files/neg/macro-invalidimpl-a/Impls_1.scala b/test/files/neg/macro-invalidimpl-a/Impls_1.scala
index c2f1843b8b..cfa1218038 100644
--- a/test/files/neg/macro-invalidimpl-a/Impls_1.scala
+++ b/test/files/neg/macro-invalidimpl-a/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
class Impls {
def foo(c: Ctx)(x: c.Expr[Any]) = ???
diff --git a/test/files/neg/macro-invalidimpl-b/Impls_1.scala b/test/files/neg/macro-invalidimpl-b/Impls_1.scala
index 7b1620d117..4467021545 100644
--- a/test/files/neg/macro-invalidimpl-b/Impls_1.scala
+++ b/test/files/neg/macro-invalidimpl-b/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx)(x: c.Expr[Any]) = ???
diff --git a/test/files/neg/macro-invalidimpl-c/Impls_Macros_1.scala b/test/files/neg/macro-invalidimpl-c/Impls_Macros_1.scala
index 657e2d4260..67a0eb348b 100644
--- a/test/files/neg/macro-invalidimpl-c/Impls_Macros_1.scala
+++ b/test/files/neg/macro-invalidimpl-c/Impls_Macros_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
class Macros {
object Impls {
diff --git a/test/files/neg/macro-invalidimpl-d/Impls_1.scala b/test/files/neg/macro-invalidimpl-d/Impls_1.scala
index f18e699a1e..e0819c938c 100644
--- a/test/files/neg/macro-invalidimpl-d/Impls_1.scala
+++ b/test/files/neg/macro-invalidimpl-d/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
trait MacroHelpers {
object Impls {
diff --git a/test/files/neg/macro-invalidimpl-e.check b/test/files/neg/macro-invalidimpl-e.check
index 61d1e05b87..5cfcf85625 100644
--- a/test/files/neg/macro-invalidimpl-e.check
+++ b/test/files/neg/macro-invalidimpl-e.check
@@ -1,12 +1,12 @@
Macros_Test_2.scala:2: error: ambiguous reference to overloaded definition,
-both method foo in object Impls of type (c: scala.reflect.makro.Context)(x: c.Expr[Any], y: c.Expr[Any])Nothing
-and method foo in object Impls of type (c: scala.reflect.makro.Context)(x: c.Expr[Any])Nothing
+both method foo in object Impls of type (c: scala.reflect.macros.Context)(x: c.Expr[Any], y: c.Expr[Any])Nothing
+and method foo in object Impls of type (c: scala.reflect.macros.Context)(x: c.Expr[Any])Nothing
match expected type ?
def foo(x: Any) = macro Impls.foo
^
Macros_Test_2.scala:3: error: ambiguous reference to overloaded definition,
-both method foo in object Impls of type (c: scala.reflect.makro.Context)(x: c.Expr[Any], y: c.Expr[Any])Nothing
-and method foo in object Impls of type (c: scala.reflect.makro.Context)(x: c.Expr[Any])Nothing
+both method foo in object Impls of type (c: scala.reflect.macros.Context)(x: c.Expr[Any], y: c.Expr[Any])Nothing
+and method foo in object Impls of type (c: scala.reflect.macros.Context)(x: c.Expr[Any])Nothing
match expected type ?
def foo(x: Any, y: Any) = macro Impls.foo
^
diff --git a/test/files/neg/macro-invalidimpl-e/Impls_1.scala b/test/files/neg/macro-invalidimpl-e/Impls_1.scala
index ad3eed5cd5..fd40119c31 100644
--- a/test/files/neg/macro-invalidimpl-e/Impls_1.scala
+++ b/test/files/neg/macro-invalidimpl-e/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx)(x: c.Expr[Any]) = ???
diff --git a/test/files/neg/macro-invalidimpl-f.check b/test/files/neg/macro-invalidimpl-f.check
index ec82faa58c..14f1e25287 100644
--- a/test/files/neg/macro-invalidimpl-f.check
+++ b/test/files/neg/macro-invalidimpl-f.check
@@ -1,7 +1,7 @@
-Macros_Test_2.scala:2: error: macro implementation has wrong shape:
- required: (c: scala.reflect.makro.Context)(): c.Expr[Unit]
- found : (c: scala.reflect.makro.Context): c.Expr[Unit]
-number of parameter sections differ
- def bar1() = macro Impls.fooNullary
- ^
-one error found
+Macros_Test_2.scala:2: error: macro implementation has wrong shape:
+ required: (c: scala.reflect.macros.Context)(): c.Expr[Unit]
+ found : (c: scala.reflect.macros.Context): c.Expr[Unit]
+number of parameter sections differ
+ def bar1() = macro Impls.fooNullary
+ ^
+one error found
diff --git a/test/files/neg/macro-invalidimpl-f/Impls_1.scala b/test/files/neg/macro-invalidimpl-f/Impls_1.scala
index 3b8f15b90c..334ee714be 100644
--- a/test/files/neg/macro-invalidimpl-f/Impls_1.scala
+++ b/test/files/neg/macro-invalidimpl-f/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def fooNullary(c: Ctx) = {
diff --git a/test/files/neg/macro-invalidimpl-g.check b/test/files/neg/macro-invalidimpl-g.check
index 9c01f01dc8..a886436d35 100644
--- a/test/files/neg/macro-invalidimpl-g.check
+++ b/test/files/neg/macro-invalidimpl-g.check
@@ -1,6 +1,6 @@
Macros_Test_2.scala:2: error: macro implementation has wrong shape:
- required: (c: scala.reflect.makro.Context): c.Expr[Unit]
- found : (c: scala.reflect.makro.Context)(): c.Expr[Unit]
+ required: (c: scala.reflect.macros.Context): c.Expr[Unit]
+ found : (c: scala.reflect.macros.Context)(): c.Expr[Unit]
number of parameter sections differ
def foo1 = macro Impls.fooEmpty
^
diff --git a/test/files/neg/macro-invalidimpl-g/Impls_1.scala b/test/files/neg/macro-invalidimpl-g/Impls_1.scala
index 3b8f15b90c..334ee714be 100644
--- a/test/files/neg/macro-invalidimpl-g/Impls_1.scala
+++ b/test/files/neg/macro-invalidimpl-g/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def fooNullary(c: Ctx) = {
diff --git a/test/files/neg/macro-invalidimpl-h/Impls_1.scala b/test/files/neg/macro-invalidimpl-h/Impls_1.scala
index 7db8bcd324..427fd3d5c0 100644
--- a/test/files/neg/macro-invalidimpl-h/Impls_1.scala
+++ b/test/files/neg/macro-invalidimpl-h/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo[U <: Int](c: Ctx) = ???
diff --git a/test/files/neg/macro-invalidret-nontree.check b/test/files/neg/macro-invalidret-nontree.check
index 0b793cf421..78ab08df3e 100644
--- a/test/files/neg/macro-invalidret-nontree.check
+++ b/test/files/neg/macro-invalidret-nontree.check
@@ -1,6 +1,6 @@
Macros_Test_2.scala:2: error: macro implementation has wrong shape:
- required: (c: scala.reflect.makro.Context): c.Expr[Any]
- found : (c: scala.reflect.makro.Context): Int
+ required: (c: scala.reflect.macros.Context): c.Expr[Any]
+ found : (c: scala.reflect.macros.Context): Int
type mismatch for return type: Int does not conform to c.Expr[Any]
def foo = macro Impls.foo
^
diff --git a/test/files/neg/macro-invalidret-nontree/Impls_1.scala b/test/files/neg/macro-invalidret-nontree/Impls_1.scala
index efc8d4bfec..ef19b1b405 100644
--- a/test/files/neg/macro-invalidret-nontree/Impls_1.scala
+++ b/test/files/neg/macro-invalidret-nontree/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx) = 2
diff --git a/test/files/neg/macro-invalidret-nonuniversetree.check b/test/files/neg/macro-invalidret-nonuniversetree.check
index 1b9487982f..09df2c0a92 100644
--- a/test/files/neg/macro-invalidret-nonuniversetree.check
+++ b/test/files/neg/macro-invalidret-nonuniversetree.check
@@ -1,6 +1,6 @@
Macros_Test_2.scala:2: error: macro implementation has wrong shape:
- required: (c: scala.reflect.makro.Context): c.Expr[Any]
- found : (c: scala.reflect.makro.Context): reflect.basis.Literal
+ required: (c: scala.reflect.macros.Context): c.Expr[Any]
+ found : (c: scala.reflect.macros.Context): reflect.basis.Literal
type mismatch for return type: reflect.basis.Literal does not conform to c.Expr[Any]
def foo = macro Impls.foo
^
diff --git a/test/files/neg/macro-invalidret-nonuniversetree/Impls_1.scala b/test/files/neg/macro-invalidret-nonuniversetree/Impls_1.scala
index da0eb0ac83..8311d474c2 100644
--- a/test/files/neg/macro-invalidret-nonuniversetree/Impls_1.scala
+++ b/test/files/neg/macro-invalidret-nonuniversetree/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx) = scala.reflect.basis.Literal(scala.reflect.basis.Constant(42))
diff --git a/test/files/neg/macro-invalidshape-a/Impls_1.scala b/test/files/neg/macro-invalidshape-a/Impls_1.scala
index 7b1620d117..4467021545 100644
--- a/test/files/neg/macro-invalidshape-a/Impls_1.scala
+++ b/test/files/neg/macro-invalidshape-a/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx)(x: c.Expr[Any]) = ???
diff --git a/test/files/neg/macro-invalidshape-b/Impls_1.scala b/test/files/neg/macro-invalidshape-b/Impls_1.scala
index 7b1620d117..4467021545 100644
--- a/test/files/neg/macro-invalidshape-b/Impls_1.scala
+++ b/test/files/neg/macro-invalidshape-b/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx)(x: c.Expr[Any]) = ???
diff --git a/test/files/neg/macro-invalidshape-c/Impls_1.scala b/test/files/neg/macro-invalidshape-c/Impls_1.scala
index 7b1620d117..4467021545 100644
--- a/test/files/neg/macro-invalidshape-c/Impls_1.scala
+++ b/test/files/neg/macro-invalidshape-c/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx)(x: c.Expr[Any]) = ???
diff --git a/test/files/neg/macro-invalidshape-d/Impls_1.scala b/test/files/neg/macro-invalidshape-d/Impls_1.scala
index 7b1620d117..4467021545 100644
--- a/test/files/neg/macro-invalidshape-d/Impls_1.scala
+++ b/test/files/neg/macro-invalidshape-d/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx)(x: c.Expr[Any]) = ???
diff --git a/test/files/neg/macro-invalidsig-context-bounds/Impls_1.scala b/test/files/neg/macro-invalidsig-context-bounds/Impls_1.scala
index 2eef7aac8b..633981ce19 100644
--- a/test/files/neg/macro-invalidsig-context-bounds/Impls_1.scala
+++ b/test/files/neg/macro-invalidsig-context-bounds/Impls_1.scala
@@ -1,5 +1,5 @@
import scala.reflect.runtime.universe._
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo[U: c.TypeTag: Numeric](c: Ctx) = {
diff --git a/test/files/neg/macro-invalidsig-ctx-badargc.check b/test/files/neg/macro-invalidsig-ctx-badargc.check
index 1e1621ab61..8a1ca6a8b1 100644
--- a/test/files/neg/macro-invalidsig-ctx-badargc.check
+++ b/test/files/neg/macro-invalidsig-ctx-badargc.check
@@ -1,7 +1,7 @@
-Macros_Test_2.scala:2: error: macro implementation has wrong shape:
- required: (c: scala.reflect.makro.Context): c.Expr[Any]
- found : : Nothing
-number of parameter sections differ
- def foo = macro Impls.foo
- ^
-one error found
+Macros_Test_2.scala:2: error: macro implementation has wrong shape:
+ required: (c: scala.reflect.macros.Context): c.Expr[Any]
+ found : : Nothing
+number of parameter sections differ
+ def foo = macro Impls.foo
+ ^
+one error found
diff --git a/test/files/neg/macro-invalidsig-ctx-badtype.check b/test/files/neg/macro-invalidsig-ctx-badtype.check
index b1702bbca6..9e57ab8631 100644
--- a/test/files/neg/macro-invalidsig-ctx-badtype.check
+++ b/test/files/neg/macro-invalidsig-ctx-badtype.check
@@ -1,7 +1,7 @@
Macros_Test_2.scala:2: error: macro implementation has wrong shape:
- required: (c: scala.reflect.makro.Context): c.Expr[Any]
+ required: (c: scala.reflect.macros.Context): c.Expr[Any]
found : (c: scala.reflect.api.Universe): Nothing
-type mismatch for parameter c: scala.reflect.makro.Context does not conform to scala.reflect.api.Universe
+type mismatch for parameter c: scala.reflect.macros.Context does not conform to scala.reflect.api.Universe
def foo = macro Impls.foo
^
one error found
diff --git a/test/files/neg/macro-invalidsig-ctx-badvarargs.check b/test/files/neg/macro-invalidsig-ctx-badvarargs.check
index 18e3d6201f..37941a7dc9 100644
--- a/test/files/neg/macro-invalidsig-ctx-badvarargs.check
+++ b/test/files/neg/macro-invalidsig-ctx-badvarargs.check
@@ -1,7 +1,7 @@
-Macros_Test_2.scala:2: error: macro implementation has wrong shape:
- required: (c: scala.reflect.makro.Context): c.Expr[Any]
- found : (cs: scala.reflect.makro.Context*): Nothing
-types incompatible for parameter cs: corresponding is not a vararg parameter
- def foo = macro Impls.foo
- ^
-one error found
+Macros_Test_2.scala:2: error: macro implementation has wrong shape:
+ required: (c: scala.reflect.macros.Context): c.Expr[Any]
+ found : (cs: scala.reflect.macros.Context*): Nothing
+types incompatible for parameter cs: corresponding is not a vararg parameter
+ def foo = macro Impls.foo
+ ^
+one error found
diff --git a/test/files/neg/macro-invalidsig-ctx-badvarargs/Impls_1.scala b/test/files/neg/macro-invalidsig-ctx-badvarargs/Impls_1.scala
index b2fb2539ec..c4ed8be91e 100644
--- a/test/files/neg/macro-invalidsig-ctx-badvarargs/Impls_1.scala
+++ b/test/files/neg/macro-invalidsig-ctx-badvarargs/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(cs: Ctx*) = ???
diff --git a/test/files/neg/macro-invalidsig-ctx-noctx.check b/test/files/neg/macro-invalidsig-ctx-noctx.check
index 66fa7c3514..722fe9dfb6 100644
--- a/test/files/neg/macro-invalidsig-ctx-noctx.check
+++ b/test/files/neg/macro-invalidsig-ctx-noctx.check
@@ -1,7 +1,7 @@
-Macros_Test_2.scala:2: error: macro implementation has wrong shape:
- required: (c: scala.reflect.makro.Context)(x: c.Expr[Any]): c.Expr[Any]
- found : (c: scala.reflect.makro.Context): Nothing
-number of parameter sections differ
- def foo(x: Any) = macro Impls.foo
- ^
-one error found
+Macros_Test_2.scala:2: error: macro implementation has wrong shape:
+ required: (c: scala.reflect.macros.Context)(x: c.Expr[Any]): c.Expr[Any]
+ found : (c: scala.reflect.macros.Context): Nothing
+number of parameter sections differ
+ def foo(x: Any) = macro Impls.foo
+ ^
+one error found
diff --git a/test/files/neg/macro-invalidsig-ctx-noctx/Impls_1.scala b/test/files/neg/macro-invalidsig-ctx-noctx/Impls_1.scala
index 1e0ed755af..6904cfb1dc 100644
--- a/test/files/neg/macro-invalidsig-ctx-noctx/Impls_1.scala
+++ b/test/files/neg/macro-invalidsig-ctx-noctx/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx) = ???
diff --git a/test/files/neg/macro-invalidsig-implicit-params/Impls_Macros_1.scala b/test/files/neg/macro-invalidsig-implicit-params/Impls_Macros_1.scala
index 5bfe73ec59..b32a20ba06 100644
--- a/test/files/neg/macro-invalidsig-implicit-params/Impls_Macros_1.scala
+++ b/test/files/neg/macro-invalidsig-implicit-params/Impls_Macros_1.scala
@@ -1,5 +1,5 @@
import scala.reflect.runtime.universe._
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo_targs[T, U: c.TypeTag](c: Ctx)(implicit x: c.Expr[Int]) = {
diff --git a/test/files/neg/macro-invalidsig-params-badargc.check b/test/files/neg/macro-invalidsig-params-badargc.check
index 6de8c5e95a..ab4fb535c5 100644
--- a/test/files/neg/macro-invalidsig-params-badargc.check
+++ b/test/files/neg/macro-invalidsig-params-badargc.check
@@ -1,7 +1,7 @@
-Impls_Macros_1.scala:8: error: macro implementation has wrong shape:
- required: (c: scala.reflect.makro.Context)(x: c.Expr[Int]): c.Expr[Any]
- found : (c: scala.reflect.makro.Context)(x: c.Expr[Int], y: c.Expr[Int]): Nothing
-parameter lists have different length, found extra parameter y: c.Expr[Int]
- def foo(x: Int) = macro Impls.foo
- ^
-one error found
+Impls_Macros_1.scala:8: error: macro implementation has wrong shape:
+ required: (c: scala.reflect.macros.Context)(x: c.Expr[Int]): c.Expr[Any]
+ found : (c: scala.reflect.macros.Context)(x: c.Expr[Int], y: c.Expr[Int]): Nothing
+parameter lists have different length, found extra parameter y: c.Expr[Int]
+ def foo(x: Int) = macro Impls.foo
+ ^
+one error found
diff --git a/test/files/neg/macro-invalidsig-params-badargc/Impls_Macros_1.scala b/test/files/neg/macro-invalidsig-params-badargc/Impls_Macros_1.scala
index 4b449f35ed..ae16612b93 100644
--- a/test/files/neg/macro-invalidsig-params-badargc/Impls_Macros_1.scala
+++ b/test/files/neg/macro-invalidsig-params-badargc/Impls_Macros_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx)(x: c.Expr[Int], y: c.Expr[Int]) = ???
diff --git a/test/files/neg/macro-invalidsig-params-badtype.check b/test/files/neg/macro-invalidsig-params-badtype.check
index e4f67e650a..007620a366 100644
--- a/test/files/neg/macro-invalidsig-params-badtype.check
+++ b/test/files/neg/macro-invalidsig-params-badtype.check
@@ -1,6 +1,6 @@
Impls_Macros_1.scala:8: error: macro implementation has wrong shape:
- required: (c: scala.reflect.makro.Context)(x: c.Expr[Int]): c.Expr[Any]
- found : (c: scala.reflect.makro.Context)(x: c.universe.Tree): Nothing
+ required: (c: scala.reflect.macros.Context)(x: c.Expr[Int]): c.Expr[Any]
+ found : (c: scala.reflect.macros.Context)(x: c.universe.Tree): Nothing
type mismatch for parameter x: c.Expr[Int] does not conform to c.universe.Tree
def foo(x: Int) = macro Impls.foo
^
diff --git a/test/files/neg/macro-invalidsig-params-badtype/Impls_Macros_1.scala b/test/files/neg/macro-invalidsig-params-badtype/Impls_Macros_1.scala
index 6393e6d395..ab90b85881 100644
--- a/test/files/neg/macro-invalidsig-params-badtype/Impls_Macros_1.scala
+++ b/test/files/neg/macro-invalidsig-params-badtype/Impls_Macros_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx)(x: c.universe.Tree) = ???
diff --git a/test/files/neg/macro-invalidsig-params-badvarargs.check b/test/files/neg/macro-invalidsig-params-badvarargs.check
index 0827680299..f0dcc24d03 100644
--- a/test/files/neg/macro-invalidsig-params-badvarargs.check
+++ b/test/files/neg/macro-invalidsig-params-badvarargs.check
@@ -1,7 +1,7 @@
-Impls_Macros_1.scala:8: error: macro implementation has wrong shape:
- required: (c: scala.reflect.makro.Context)(x: c.Expr[Int], y: c.Expr[Int]): c.Expr[Any]
- found : (c: scala.reflect.makro.Context)(xs: c.Expr[Int]*): Nothing
-parameter lists have different length, required extra parameter y: c.Expr[Int]
- def foo(x: Int, y: Int) = macro Impls.foo
- ^
-one error found
+Impls_Macros_1.scala:8: error: macro implementation has wrong shape:
+ required: (c: scala.reflect.macros.Context)(x: c.Expr[Int], y: c.Expr[Int]): c.Expr[Any]
+ found : (c: scala.reflect.macros.Context)(xs: c.Expr[Int]*): Nothing
+parameter lists have different length, required extra parameter y: c.Expr[Int]
+ def foo(x: Int, y: Int) = macro Impls.foo
+ ^
+one error found
diff --git a/test/files/neg/macro-invalidsig-params-badvarargs/Impls_Macros_1.scala b/test/files/neg/macro-invalidsig-params-badvarargs/Impls_Macros_1.scala
index 2ee1c2767c..b4c75ad0ba 100644
--- a/test/files/neg/macro-invalidsig-params-badvarargs/Impls_Macros_1.scala
+++ b/test/files/neg/macro-invalidsig-params-badvarargs/Impls_Macros_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx)(xs: c.Expr[Int]*) = ???
diff --git a/test/files/neg/macro-invalidsig-params-namemismatch.check b/test/files/neg/macro-invalidsig-params-namemismatch.check
index ca7270cca8..00d781a2ac 100644
--- a/test/files/neg/macro-invalidsig-params-namemismatch.check
+++ b/test/files/neg/macro-invalidsig-params-namemismatch.check
@@ -1,7 +1,7 @@
-Impls_Macros_1.scala:8: error: macro implementation has wrong shape:
- required: (c: scala.reflect.makro.Context)(x: c.Expr[Int], y: c.Expr[Int]): c.Expr[Any]
- found : (c: scala.reflect.makro.Context)(y: c.Expr[Int], x: c.Expr[Int]): Nothing
-parameter names differ: x != y
- def foo(x: Int, y: Int) = macro Impls.foo
- ^
-one error found
+Impls_Macros_1.scala:8: error: macro implementation has wrong shape:
+ required: (c: scala.reflect.macros.Context)(x: c.Expr[Int], y: c.Expr[Int]): c.Expr[Any]
+ found : (c: scala.reflect.macros.Context)(y: c.Expr[Int], x: c.Expr[Int]): Nothing
+parameter names differ: x != y
+ def foo(x: Int, y: Int) = macro Impls.foo
+ ^
+one error found
diff --git a/test/files/neg/macro-invalidsig-params-namemismatch/Impls_Macros_1.scala b/test/files/neg/macro-invalidsig-params-namemismatch/Impls_Macros_1.scala
index 89c5347647..c7cf0b06c4 100644
--- a/test/files/neg/macro-invalidsig-params-namemismatch/Impls_Macros_1.scala
+++ b/test/files/neg/macro-invalidsig-params-namemismatch/Impls_Macros_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx)(y: c.Expr[Int], x: c.Expr[Int]) = ???
diff --git a/test/files/neg/macro-invalidsig-tparams-badtype.check b/test/files/neg/macro-invalidsig-tparams-badtype.check
index 9166db3574..e5e8366ba4 100644
--- a/test/files/neg/macro-invalidsig-tparams-badtype.check
+++ b/test/files/neg/macro-invalidsig-tparams-badtype.check
@@ -1,6 +1,6 @@
Macros_Test_2.scala:2: error: macro implementation has wrong shape:
- required: (c: scala.reflect.makro.Context): c.Expr[Any]
- found : (c: scala.reflect.makro.Context)(U: c.universe.Type): Nothing
+ required: (c: scala.reflect.macros.Context): c.Expr[Any]
+ found : (c: scala.reflect.macros.Context)(U: c.universe.Type): Nothing
number of parameter sections differ
def foo[U] = macro Impls.foo[U]
^
diff --git a/test/files/neg/macro-invalidsig-tparams-badtype/Impls_1.scala b/test/files/neg/macro-invalidsig-tparams-badtype/Impls_1.scala
index 9886331502..dbeca178a7 100644
--- a/test/files/neg/macro-invalidsig-tparams-badtype/Impls_1.scala
+++ b/test/files/neg/macro-invalidsig-tparams-badtype/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo[U](c: Ctx)(U: c.universe.Type) = ???
diff --git a/test/files/neg/macro-invalidsig-tparams-bounds-a/Impls_1.scala b/test/files/neg/macro-invalidsig-tparams-bounds-a/Impls_1.scala
index 88b85d48f4..89020de7dd 100644
--- a/test/files/neg/macro-invalidsig-tparams-bounds-a/Impls_1.scala
+++ b/test/files/neg/macro-invalidsig-tparams-bounds-a/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo[U <: String](c: Ctx) = ???
diff --git a/test/files/neg/macro-invalidsig-tparams-bounds-b/Impls_1.scala b/test/files/neg/macro-invalidsig-tparams-bounds-b/Impls_1.scala
index 88b85d48f4..89020de7dd 100644
--- a/test/files/neg/macro-invalidsig-tparams-bounds-b/Impls_1.scala
+++ b/test/files/neg/macro-invalidsig-tparams-bounds-b/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo[U <: String](c: Ctx) = ???
diff --git a/test/files/neg/macro-invalidsig-tparams-notparams-a/Impls_1.scala b/test/files/neg/macro-invalidsig-tparams-notparams-a/Impls_1.scala
index ea472e6f91..98a3a6db7c 100644
--- a/test/files/neg/macro-invalidsig-tparams-notparams-a/Impls_1.scala
+++ b/test/files/neg/macro-invalidsig-tparams-notparams-a/Impls_1.scala
@@ -1,5 +1,5 @@
import scala.reflect.runtime.universe._
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo[U: c.TypeTag](c: Ctx) = ???
diff --git a/test/files/neg/macro-invalidsig-tparams-notparams-b/Impls_1.scala b/test/files/neg/macro-invalidsig-tparams-notparams-b/Impls_1.scala
index c4eb3d9b4a..dbc7000485 100644
--- a/test/files/neg/macro-invalidsig-tparams-notparams-b/Impls_1.scala
+++ b/test/files/neg/macro-invalidsig-tparams-notparams-b/Impls_1.scala
@@ -1,5 +1,5 @@
import scala.reflect.runtime.universe._
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo[T: c.TypeTag, U: c.TypeTag, V](c: Ctx)(implicit V: c.TypeTag[V]): c.Expr[Unit] = {
diff --git a/test/files/neg/macro-invalidsig-tparams-notparams-c.check b/test/files/neg/macro-invalidsig-tparams-notparams-c.check
index b64a469cc3..e3e17c7506 100644
--- a/test/files/neg/macro-invalidsig-tparams-notparams-c.check
+++ b/test/files/neg/macro-invalidsig-tparams-notparams-c.check
@@ -1,4 +1,4 @@
-Macros_Test_2.scala:3: error: wrong number of type parameters for method foo: [T, U, V](c: scala.reflect.makro.Context)(implicit evidence$1: c.TypeTag[T], implicit evidence$2: c.TypeTag[U], implicit V: c.TypeTag[V])c.Expr[Unit]
+Macros_Test_2.scala:3: error: wrong number of type parameters for method foo: [T, U, V](c: scala.reflect.macros.Context)(implicit evidence$1: c.TypeTag[T], implicit evidence$2: c.TypeTag[U], implicit V: c.TypeTag[V])c.Expr[Unit]
def foo[V] = macro Impls.foo[V]
^
one error found
diff --git a/test/files/neg/macro-invalidsig-tparams-notparams-c/Impls_1.scala b/test/files/neg/macro-invalidsig-tparams-notparams-c/Impls_1.scala
index 41facc881e..3edadb115d 100644
--- a/test/files/neg/macro-invalidsig-tparams-notparams-c/Impls_1.scala
+++ b/test/files/neg/macro-invalidsig-tparams-notparams-c/Impls_1.scala
@@ -1,5 +1,5 @@
import scala.reflect.runtime.universe._
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo[T: c.TypeTag, U: c.TypeTag, V](c: Ctx)(implicit V: c.TypeTag[V]): c.Expr[Unit] = {
diff --git a/test/files/neg/macro-invalidusage-badargs/Impls_1.scala b/test/files/neg/macro-invalidusage-badargs/Impls_1.scala
index 2346a6106d..52c9f9c3e9 100644
--- a/test/files/neg/macro-invalidusage-badargs/Impls_1.scala
+++ b/test/files/neg/macro-invalidusage-badargs/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx)(x: c.Expr[Int]) = x
diff --git a/test/files/neg/macro-invalidusage-badbounds/Impls_1.scala b/test/files/neg/macro-invalidusage-badbounds/Impls_1.scala
index 88b85d48f4..89020de7dd 100644
--- a/test/files/neg/macro-invalidusage-badbounds/Impls_1.scala
+++ b/test/files/neg/macro-invalidusage-badbounds/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo[U <: String](c: Ctx) = ???
diff --git a/test/files/neg/macro-invalidusage-badtargs/Impls_1.scala b/test/files/neg/macro-invalidusage-badtargs/Impls_1.scala
index 2346a6106d..52c9f9c3e9 100644
--- a/test/files/neg/macro-invalidusage-badtargs/Impls_1.scala
+++ b/test/files/neg/macro-invalidusage-badtargs/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx)(x: c.Expr[Int]) = x
diff --git a/test/files/neg/macro-invalidusage-methodvaluesyntax/Impls_1.scala b/test/files/neg/macro-invalidusage-methodvaluesyntax/Impls_1.scala
index 31e758e9a0..8d7fdf3e8a 100644
--- a/test/files/neg/macro-invalidusage-methodvaluesyntax/Impls_1.scala
+++ b/test/files/neg/macro-invalidusage-methodvaluesyntax/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx) = {
diff --git a/test/files/neg/macro-noexpand/Impls_1.scala b/test/files/neg/macro-noexpand/Impls_1.scala
index 7b1620d117..4467021545 100644
--- a/test/files/neg/macro-noexpand/Impls_1.scala
+++ b/test/files/neg/macro-noexpand/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx)(x: c.Expr[Any]) = ???
diff --git a/test/files/neg/macro-nontypeablebody/Impls_1.scala b/test/files/neg/macro-nontypeablebody/Impls_1.scala
index 7b1620d117..4467021545 100644
--- a/test/files/neg/macro-nontypeablebody/Impls_1.scala
+++ b/test/files/neg/macro-nontypeablebody/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx)(x: c.Expr[Any]) = ???
diff --git a/test/files/neg/macro-override-macro-overrides-abstract-method-a/Impls_Macros_1.scala b/test/files/neg/macro-override-macro-overrides-abstract-method-a/Impls_Macros_1.scala
index cb0b152852..e43264f52f 100644
--- a/test/files/neg/macro-override-macro-overrides-abstract-method-a/Impls_Macros_1.scala
+++ b/test/files/neg/macro-override-macro-overrides-abstract-method-a/Impls_Macros_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def impl(c: Ctx)(x: c.Expr[Int]) = x
diff --git a/test/files/neg/macro-override-macro-overrides-abstract-method-b/Impls_Macros_1.scala b/test/files/neg/macro-override-macro-overrides-abstract-method-b/Impls_Macros_1.scala
index cb0b152852..e43264f52f 100644
--- a/test/files/neg/macro-override-macro-overrides-abstract-method-b/Impls_Macros_1.scala
+++ b/test/files/neg/macro-override-macro-overrides-abstract-method-b/Impls_Macros_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def impl(c: Ctx)(x: c.Expr[Int]) = x
diff --git a/test/files/neg/macro-override-method-overrides-macro/Impls_1.scala b/test/files/neg/macro-override-method-overrides-macro/Impls_1.scala
index d6493caad9..ec93dd4111 100644
--- a/test/files/neg/macro-override-method-overrides-macro/Impls_1.scala
+++ b/test/files/neg/macro-override-method-overrides-macro/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def impl(c: Ctx)(tag: String, x: c.Expr[_]) = {
diff --git a/test/files/neg/macro-without-xmacros-a/Impls_1.scala b/test/files/neg/macro-without-xmacros-a/Impls_1.scala
index 0b6fbe240e..8976f8e28d 100644
--- a/test/files/neg/macro-without-xmacros-a/Impls_1.scala
+++ b/test/files/neg/macro-without-xmacros-a/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo_impl(c: Ctx)(x: c.Expr[Int]): c.Expr[Int] = {
diff --git a/test/files/neg/macro-without-xmacros-b/Impls_1.scala b/test/files/neg/macro-without-xmacros-b/Impls_1.scala
index 0b6fbe240e..8976f8e28d 100644
--- a/test/files/neg/macro-without-xmacros-b/Impls_1.scala
+++ b/test/files/neg/macro-without-xmacros-b/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo_impl(c: Ctx)(x: c.Expr[Int]): c.Expr[Int] = {
diff --git a/test/files/neg/t3234.check b/test/files/neg/t3234.check
new file mode 100644
index 0000000000..477b021e5e
--- /dev/null
+++ b/test/files/neg/t3234.check
@@ -0,0 +1,2 @@
+error: there were 1 inliner warnings; re-run with -Yinline-warnings for details
+one error found
diff --git a/test/files/pos/t3234.flags b/test/files/neg/t3234.flags
index c9cefdc4b9..c9cefdc4b9 100644
--- a/test/files/pos/t3234.flags
+++ b/test/files/neg/t3234.flags
diff --git a/test/files/pos/t3234.scala b/test/files/neg/t3234.scala
index 443d0467f0..443d0467f0 100644
--- a/test/files/pos/t3234.scala
+++ b/test/files/neg/t3234.scala
diff --git a/test/files/neg/t5031.check b/test/files/neg/t5031.check
new file mode 100644
index 0000000000..8983d8daf9
--- /dev/null
+++ b/test/files/neg/t5031.check
@@ -0,0 +1,5 @@
+Id.scala:3: error: Companions 'class Test' and 'object Test' must be defined in same file:
+ Found in t5031/package.scala and t5031/Id.scala
+object Test
+ ^
+one error found
diff --git a/test/files/neg/t5031/Id.scala b/test/files/neg/t5031/Id.scala
new file mode 100644
index 0000000000..2f0db002d2
--- /dev/null
+++ b/test/files/neg/t5031/Id.scala
@@ -0,0 +1,4 @@
+package t5031
+
+object Test
+
diff --git a/test/files/neg/t5031/package.scala b/test/files/neg/t5031/package.scala
new file mode 100644
index 0000000000..17b63220be
--- /dev/null
+++ b/test/files/neg/t5031/package.scala
@@ -0,0 +1,3 @@
+package object t5031 {
+ class Test
+}
diff --git a/test/files/neg/t5689.check b/test/files/neg/t5689.check
index 6abc4c13f6..3b25dd612e 100644
--- a/test/files/neg/t5689.check
+++ b/test/files/neg/t5689.check
@@ -1,6 +1,6 @@
t5689.scala:4: error: macro implementation has wrong shape:
- required: (c: scala.reflect.makro.Context)(i: c.Expr[Double]): c.Expr[String]
- found : (c: scala.reflect.makro.Context)(i: c.Expr[Double]): c.Expr[Int]
+ required: (c: scala.reflect.macros.Context)(i: c.Expr[Double]): c.Expr[String]
+ found : (c: scala.reflect.macros.Context)(i: c.Expr[Double]): c.Expr[Int]
type mismatch for return type: c.Expr[Int] does not conform to c.Expr[String]
def returnsString(i: Double): String = macro returnsIntImpl
^
diff --git a/test/files/neg/t5689.scala b/test/files/neg/t5689.scala
index ef7a45b364..3266039c35 100644
--- a/test/files/neg/t5689.scala
+++ b/test/files/neg/t5689.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.Context
+import scala.reflect.macros.Context
object Macros {
def returnsString(i: Double): String = macro returnsIntImpl
diff --git a/test/files/neg/t5799.check b/test/files/neg/t5799.check
new file mode 100644
index 0000000000..10e2658d56
--- /dev/null
+++ b/test/files/neg/t5799.check
@@ -0,0 +1,4 @@
+t5799.scala:2: error: value class may not have secondary constructors
+ def this(s: String) = this(s.toDouble)
+ ^
+one error found
diff --git a/test/files/neg/t5799.scala b/test/files/neg/t5799.scala
new file mode 100644
index 0000000000..9bd6ab7dd1
--- /dev/null
+++ b/test/files/neg/t5799.scala
@@ -0,0 +1,8 @@
+class Foo(val bar: Double) extends AnyVal {
+ def this(s: String) = this(s.toDouble)
+}
+object Test {
+ def main(args: Array[String]): Unit =
+ new Foo("")
+ }
+
diff --git a/test/files/neg/t5878.check b/test/files/neg/t5878.check
new file mode 100644
index 0000000000..50dba0d272
--- /dev/null
+++ b/test/files/neg/t5878.check
@@ -0,0 +1,13 @@
+t5878.scala:1: error: value class may not unbox to itself
+case class Foo(x: Bar) extends AnyVal
+ ^
+t5878.scala:2: error: value class may not unbox to itself
+case class Bar(x: Foo) extends AnyVal
+ ^
+t5878.scala:4: error: value class may not unbox to itself
+class Foo1(val x: Bar1) extends AnyVal
+ ^
+t5878.scala:5: error: value class may not unbox to itself
+class Bar1(val x: Foo1) extends AnyVal
+ ^
+four errors found
diff --git a/test/files/neg/t5878.scala b/test/files/neg/t5878.scala
new file mode 100644
index 0000000000..b4e33627ef
--- /dev/null
+++ b/test/files/neg/t5878.scala
@@ -0,0 +1,6 @@
+case class Foo(x: Bar) extends AnyVal
+case class Bar(x: Foo) extends AnyVal
+
+class Foo1(val x: Bar1) extends AnyVal
+class Bar1(val x: Foo1) extends AnyVal
+
diff --git a/test/files/neg/t5882.check b/test/files/neg/t5882.check
new file mode 100644
index 0000000000..df01c7bc0a
--- /dev/null
+++ b/test/files/neg/t5882.check
@@ -0,0 +1,15 @@
+t5882.scala:2: warning: case classes without a parameter list have been deprecated;
+use either case objects or case classes with `()' as parameter list.
+ case class Scope
+ ^
+t5882.scala:2: error: value class may not have nested class definitions
+ case class Scope
+ ^
+t5882.scala:3: error: value class may not have nested class definitions
+ class Foo
+ ^
+t5882.scala:4: error: value class may not have nested module definitions
+ object Bar
+ ^
+one warning found
+three errors found
diff --git a/test/files/neg/t5882.scala b/test/files/neg/t5882.scala
new file mode 100644
index 0000000000..1233eb636f
--- /dev/null
+++ b/test/files/neg/t5882.scala
@@ -0,0 +1,5 @@
+class NodeOps(val n: Any) extends AnyVal {
+ case class Scope
+ class Foo
+ object Bar
+}
diff --git a/test/files/pos/t2038.scala b/test/files/pos/t2038.scala
new file mode 100644
index 0000000000..17b1a702dd
--- /dev/null
+++ b/test/files/pos/t2038.scala
@@ -0,0 +1,5 @@
+class Test {
+ List(Some(classOf[java.lang.Integer]), Some(classOf[Int])).map {
+ case Some(f: Class[_]) => f.cast(???)
+ }
+} \ No newline at end of file
diff --git a/test/files/pos/t5031/Id.scala b/test/files/pos/t5031/Id.scala
new file mode 100644
index 0000000000..7bc3ebd348
--- /dev/null
+++ b/test/files/pos/t5031/Id.scala
@@ -0,0 +1,4 @@
+package t5031
+
+object ID
+
diff --git a/test/files/pos/t5031/package.scala b/test/files/pos/t5031/package.scala
new file mode 100644
index 0000000000..c02e69db8e
--- /dev/null
+++ b/test/files/pos/t5031/package.scala
@@ -0,0 +1,3 @@
+package object t5031 {
+ type ID = Int
+}
diff --git a/test/files/pos/t5031_2.scala b/test/files/pos/t5031_2.scala
new file mode 100644
index 0000000000..ded3e82301
--- /dev/null
+++ b/test/files/pos/t5031_2.scala
@@ -0,0 +1,7 @@
+package object t5031 {
+ class ID
+}
+
+package t5031 {
+ object ID
+}
diff --git a/test/files/pos/t5706.scala b/test/files/pos/t5706.scala
index 847acb693f..20a8b255cc 100644
--- a/test/files/pos/t5706.scala
+++ b/test/files/pos/t5706.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.Context
+import scala.reflect.macros.Context
class Logger {
def error(message: String) = macro Impls.error
diff --git a/test/files/pos/t5958.scala b/test/files/pos/t5958.scala
new file mode 100644
index 0000000000..3b910f3633
--- /dev/null
+++ b/test/files/pos/t5958.scala
@@ -0,0 +1,15 @@
+class Test {
+ def newComponent(u: Universe): u.Component = ???
+
+ class Universe { self =>
+ class Component
+
+ newComponent(this): this.Component // error, but should be fine since this is a stable reference
+ newComponent(self): self.Component // error, but should be fine since this is a stable reference
+ newComponent(self): this.Component // error, but should be fine since this is a stable reference
+ newComponent(this): self.Component // error, but should be fine since this is a stable reference
+
+ val u = this
+ newComponent(u): u.Component // ok
+ }
+} \ No newline at end of file
diff --git a/test/files/pos/t6029.scala b/test/files/pos/t6029.scala
new file mode 100644
index 0000000000..8f1bbb4ebf
--- /dev/null
+++ b/test/files/pos/t6029.scala
@@ -0,0 +1,3 @@
+final case class V[A](x: A) extends AnyVal {
+ def flatMap[B](f: A => V[B]) = if (true) this else f(x)
+}
diff --git a/test/files/pos/t6047.scala b/test/files/pos/t6047.scala
index 66b52b285f..edabb95ee3 100644
--- a/test/files/pos/t6047.scala
+++ b/test/files/pos/t6047.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.Context
+import scala.reflect.macros.Context
import java.io.InputStream
object Macros {
diff --git a/test/files/run/abstypetags_serialize.check b/test/files/run/abstypetags_serialize.check
new file mode 100644
index 0000000000..aafb4761ad
--- /dev/null
+++ b/test/files/run/abstypetags_serialize.check
@@ -0,0 +1,2 @@
+java.io.NotSerializableException: Test$$typecreator1$1
+java.io.NotSerializableException: Test$$typecreator2$1
diff --git a/test/files/run/abstypetags_serialize.scala b/test/files/run/abstypetags_serialize.scala
new file mode 100644
index 0000000000..5b9142f6d5
--- /dev/null
+++ b/test/files/run/abstypetags_serialize.scala
@@ -0,0 +1,32 @@
+import java.io._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{currentMirror => cm}
+
+object Test extends App {
+ def test(tag: AbsTypeTag[_]) =
+ try {
+ val fout = new ByteArrayOutputStream()
+ val out = new ObjectOutputStream(fout)
+ out.writeObject(tag)
+ out.close()
+ fout.close()
+
+ val fin = new ByteArrayInputStream(fout.toByteArray)
+ val in = new ObjectInputStream(fin)
+ val retag = in.readObject().asInstanceOf[scala.reflect.basis.AbsTypeTag[_]].in(cm)
+ in.close()
+ fin.close()
+
+ println(retag)
+ } catch {
+ case ex: Exception =>
+ println(ex)
+ }
+
+ def qwe[T, U[_]] = {
+ test(implicitly[AbsTypeTag[T]])
+ test(implicitly[AbsTypeTag[U[String]]])
+ }
+
+ qwe
+} \ No newline at end of file
diff --git a/test/files/run/classtags_core.check b/test/files/run/classtags_core.check
index 6519db2178..2241108ba0 100644
--- a/test/files/run/classtags_core.check
+++ b/test/files/run/classtags_core.check
@@ -1,30 +1,30 @@
-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[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[Nothing]
diff --git a/test/files/run/compiler-asSeenFrom.scala b/test/files/run/compiler-asSeenFrom.scala
index 411a8df592..0d4b504d3c 100644
--- a/test/files/run/compiler-asSeenFrom.scala
+++ b/test/files/run/compiler-asSeenFrom.scala
@@ -99,7 +99,7 @@ package ll {
def pretty(xs: List[_]) = if (xs.isEmpty) "" else xs.mkString("\n ", "\n ", "\n")
def signaturesIn(info: Type): List[String] = (
- info.members
+ info.members.toList
filterNot (s => s.isType || s.owner == ObjectClass || s.owner == AnyClass || s.isConstructor)
map (_.defString)
)
diff --git a/test/files/run/exprs_serialize.check b/test/files/run/exprs_serialize.check
new file mode 100644
index 0000000000..a3bf9ccdc4
--- /dev/null
+++ b/test/files/run/exprs_serialize.check
@@ -0,0 +1,2 @@
+java.io.NotSerializableException: Test$$treecreator1$1
+java.io.NotSerializableException: Test$$treecreator2$1
diff --git a/test/files/run/exprs_serialize.scala b/test/files/run/exprs_serialize.scala
new file mode 100644
index 0000000000..075c902a34
--- /dev/null
+++ b/test/files/run/exprs_serialize.scala
@@ -0,0 +1,28 @@
+import java.io._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{currentMirror => cm}
+
+object Test extends App {
+ def test(expr: Expr[_]) =
+ try {
+ val fout = new ByteArrayOutputStream()
+ val out = new ObjectOutputStream(fout)
+ out.writeObject(expr)
+ out.close()
+ fout.close()
+
+ val fin = new ByteArrayInputStream(fout.toByteArray)
+ val in = new ObjectInputStream(fin)
+ val reexpr = in.readObject().asInstanceOf[scala.reflect.basis.Expr[_]].in(cm)
+ in.close()
+ fin.close()
+
+ println(reexpr)
+ } catch {
+ case ex: Exception =>
+ println(ex)
+ }
+
+ test(reify(2))
+ test(reify{def foo = "hello"; foo + "world!"})
+} \ No newline at end of file
diff --git a/test/files/run/macro-abort-fresh/Macros_1.scala b/test/files/run/macro-abort-fresh/Macros_1.scala
index 440d1e2915..af1e292588 100644
--- a/test/files/run/macro-abort-fresh/Macros_1.scala
+++ b/test/files/run/macro-abort-fresh/Macros_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.Context
+import scala.reflect.macros.Context
object Impls {
def impl(c: Context) = {
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 039488ba3e..646634c972 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
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx)(x: c.Expr[Int]): c.Expr[Int] = {
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 6e1e37a485..aa1e52e4aa 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
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx)(x: c.Expr[Int]): c.Expr[Int] = {
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 96d26741f7..061aa2d4a3 100644
--- a/test/files/run/macro-basic-mamd-mi/Impls_1.scala
+++ b/test/files/run/macro-basic-mamd-mi/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx)(x: c.Expr[Int]): c.Expr[Int] = {
diff --git a/test/files/run/macro-bodyexpandstoimpl/Impls_1.scala b/test/files/run/macro-bodyexpandstoimpl/Impls_1.scala
index 7de1e59cc7..0ca0be5a48 100644
--- a/test/files/run/macro-bodyexpandstoimpl/Impls_1.scala
+++ b/test/files/run/macro-bodyexpandstoimpl/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx)(x: c.Expr[Int]) = x
diff --git a/test/files/run/macro-bodyexpandstoimpl/Macros_Test_2.scala b/test/files/run/macro-bodyexpandstoimpl/Macros_Test_2.scala
index 2934201a16..b589d4be03 100644
--- a/test/files/run/macro-bodyexpandstoimpl/Macros_Test_2.scala
+++ b/test/files/run/macro-bodyexpandstoimpl/Macros_Test_2.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Macros {
def foo(x: Int) = macro Impls.refToFoo(42)
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 2b309e1cc8..a11ee2907a 100644
--- a/test/files/run/macro-declared-in-annotation/Impls_1.scala
+++ b/test/files/run/macro-declared-in-annotation/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx) = {
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 d95dbd42c6..6f06f6d3f0 100644
--- a/test/files/run/macro-declared-in-anonymous/Impls_1.scala
+++ b/test/files/run/macro-declared-in-anonymous/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx) = {
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 d95dbd42c6..6f06f6d3f0 100644
--- a/test/files/run/macro-declared-in-block/Impls_1.scala
+++ b/test/files/run/macro-declared-in-block/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx) = {
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 5c61086a40..1f8f3cbd5a 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
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx) = {
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 5c61086a40..1f8f3cbd5a 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
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx) = {
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 5c61086a40..1f8f3cbd5a 100644
--- a/test/files/run/macro-declared-in-class/Impls_1.scala
+++ b/test/files/run/macro-declared-in-class/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx) = {
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 5e7351e954..db1e5c7435 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
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx) = {
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 e5fb4bcdf3..d506de4252 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
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def toOptionOfInt(c: Ctx) = {
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 5c61086a40..1f8f3cbd5a 100644
--- a/test/files/run/macro-declared-in-method/Impls_1.scala
+++ b/test/files/run/macro-declared-in-method/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx) = {
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 5c61086a40..1f8f3cbd5a 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
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx) = {
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 5c61086a40..1f8f3cbd5a 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
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx) = {
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 5c61086a40..1f8f3cbd5a 100644
--- a/test/files/run/macro-declared-in-object/Impls_1.scala
+++ b/test/files/run/macro-declared-in-object/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx) = {
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 5c61086a40..1f8f3cbd5a 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
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx) = {
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 5c61086a40..1f8f3cbd5a 100644
--- a/test/files/run/macro-declared-in-refinement/Impls_1.scala
+++ b/test/files/run/macro-declared-in-refinement/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx) = {
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 5c61086a40..1f8f3cbd5a 100644
--- a/test/files/run/macro-declared-in-trait/Impls_1.scala
+++ b/test/files/run/macro-declared-in-trait/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx) = {
diff --git a/test/files/run/macro-def-infer-return-type-a/Impls_1.scala b/test/files/run/macro-def-infer-return-type-a/Impls_1.scala
index 2346a6106d..52c9f9c3e9 100644
--- a/test/files/run/macro-def-infer-return-type-a/Impls_1.scala
+++ b/test/files/run/macro-def-infer-return-type-a/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx)(x: c.Expr[Int]) = x
diff --git a/test/files/run/macro-def-infer-return-type-b/Impls_Macros_1.scala b/test/files/run/macro-def-infer-return-type-b/Impls_Macros_1.scala
index 8640713846..8a0f18c01b 100644
--- a/test/files/run/macro-def-infer-return-type-b/Impls_Macros_1.scala
+++ b/test/files/run/macro-def-infer-return-type-b/Impls_Macros_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo[T](c: Ctx)(x: c.Expr[T]) =
diff --git a/test/files/run/macro-def-infer-return-type-c/Impls_1.scala b/test/files/run/macro-def-infer-return-type-c/Impls_1.scala
index f3e53bbea7..78db67eebf 100644
--- a/test/files/run/macro-def-infer-return-type-c/Impls_1.scala
+++ b/test/files/run/macro-def-infer-return-type-c/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo[T](c: Ctx)(x: c.Expr[T]): c.Expr[T] = x
diff --git a/test/files/run/macro-def-path-dependent-a/Impls_Macros_1.scala b/test/files/run/macro-def-path-dependent-a/Impls_Macros_1.scala
index d7167e671c..3a91e41ff9 100644
--- a/test/files/run/macro-def-path-dependent-a/Impls_Macros_1.scala
+++ b/test/files/run/macro-def-path-dependent-a/Impls_Macros_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
trait Exprs {
self: Universe =>
diff --git a/test/files/run/macro-def-path-dependent-b/Impls_Macros_1.scala b/test/files/run/macro-def-path-dependent-b/Impls_Macros_1.scala
index 44af6949a7..cf9f9ebd0e 100644
--- a/test/files/run/macro-def-path-dependent-b/Impls_Macros_1.scala
+++ b/test/files/run/macro-def-path-dependent-b/Impls_Macros_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
trait Exprs {
self: Universe =>
diff --git a/test/files/run/macro-def-path-dependent-c/Impls_Macros_1.scala b/test/files/run/macro-def-path-dependent-c/Impls_Macros_1.scala
index 305146c48b..6cb374d9ba 100644
--- a/test/files/run/macro-def-path-dependent-c/Impls_Macros_1.scala
+++ b/test/files/run/macro-def-path-dependent-c/Impls_Macros_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
trait Exprs {
self: Universe =>
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 aca7f999d5..8ba687327a 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,5 +1,5 @@
import scala.reflect.runtime.universe._
-import scala.reflect.makro.Context
+import scala.reflect.macros.Context
import scala.reflect.api.Universe
object Test {
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 b59555539c..082e6b2efe 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
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx)(x: c.Expr[Int]) = {
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 68ead9b9a5..cceb038f05 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
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx)(x: c.Expr[String]): c.Expr[Option[Int]] = {
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 a1dd5aa801..fa717b2327 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
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx) = {
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 68ead9b9a5..cceb038f05 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
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx)(x: c.Expr[String]): c.Expr[Option[Int]] = {
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 2c1748bc29..11e07932c3 100644
--- a/test/files/run/macro-expand-multiple-arglists/Impls_1.scala
+++ b/test/files/run/macro-expand-multiple-arglists/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx)(x: c.Expr[Int])(y: c.Expr[Int]) = {
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 edbe6d504a..9a0e97c8e0 100644
--- a/test/files/run/macro-expand-nullary-generic/Impls_1.scala
+++ b/test/files/run/macro-expand-nullary-generic/Impls_1.scala
@@ -1,5 +1,5 @@
import scala.reflect.runtime.universe._
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def impl[T: c.TypeTag](c: Ctx) = {
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 0d849a085d..c6bd1cdbf1 100644
--- a/test/files/run/macro-expand-nullary-nongeneric/Impls_1.scala
+++ b/test/files/run/macro-expand-nullary-nongeneric/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def impl(c: Ctx) = {
diff --git a/test/files/run/macro-expand-overload/Impls_1.scala b/test/files/run/macro-expand-overload/Impls_1.scala
index f4646d43df..f7c240d9ca 100644
--- a/test/files/run/macro-expand-overload/Impls_1.scala
+++ b/test/files/run/macro-expand-overload/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def impl(c: Ctx)(tag: String, x: c.Expr[_]) = {
diff --git a/test/files/run/macro-expand-override/Impls_1.scala b/test/files/run/macro-expand-override/Impls_1.scala
index d6493caad9..ec93dd4111 100644
--- a/test/files/run/macro-expand-override/Impls_1.scala
+++ b/test/files/run/macro-expand-override/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def impl(c: Ctx)(tag: String, x: c.Expr[_]) = {
diff --git a/test/files/run/macro-expand-recursive/Impls_1.scala b/test/files/run/macro-expand-recursive/Impls_1.scala
index 26833ca0b9..61db5c4a9b 100644
--- a/test/files/run/macro-expand-recursive/Impls_1.scala
+++ b/test/files/run/macro-expand-recursive/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx) = {
diff --git a/test/files/run/macro-expand-tparams-bounds-a/Impls_1.scala b/test/files/run/macro-expand-tparams-bounds-a/Impls_1.scala
index 5019d5d4a7..9b8dafaa97 100644
--- a/test/files/run/macro-expand-tparams-bounds-a/Impls_1.scala
+++ b/test/files/run/macro-expand-tparams-bounds-a/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo[U <: String](c: Ctx): c.Expr[Unit] = c.literalUnit
diff --git a/test/files/run/macro-expand-tparams-bounds-b/Impls_1.scala b/test/files/run/macro-expand-tparams-bounds-b/Impls_1.scala
index abd68696b6..c11c89151c 100644
--- a/test/files/run/macro-expand-tparams-bounds-b/Impls_1.scala
+++ b/test/files/run/macro-expand-tparams-bounds-b/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
class C
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 d1843275d0..9baea020f9 100644
--- a/test/files/run/macro-expand-tparams-explicit/Impls_1.scala
+++ b/test/files/run/macro-expand-tparams-explicit/Impls_1.scala
@@ -1,5 +1,5 @@
import scala.reflect.runtime.universe._
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo[U: c.TypeTag](c: Ctx) = {
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 cbc5460720..c707e5e3c0 100644
--- a/test/files/run/macro-expand-tparams-implicit/Impls_1.scala
+++ b/test/files/run/macro-expand-tparams-implicit/Impls_1.scala
@@ -1,5 +1,5 @@
import scala.reflect.runtime.universe._
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo[U: c.TypeTag](c: Ctx)(x: c.Expr[U]) = {
diff --git a/test/files/run/macro-expand-tparams-only-in-impl/Impls_1.scala b/test/files/run/macro-expand-tparams-only-in-impl/Impls_1.scala
index 5019d5d4a7..9b8dafaa97 100644
--- a/test/files/run/macro-expand-tparams-only-in-impl/Impls_1.scala
+++ b/test/files/run/macro-expand-tparams-only-in-impl/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo[U <: String](c: Ctx): c.Expr[Unit] = c.literalUnit
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 97363edd9a..3b829e2e09 100644
--- a/test/files/run/macro-expand-tparams-optional/Impls_1.scala
+++ b/test/files/run/macro-expand-tparams-optional/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo[U](c: Ctx) = {
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 cbc5460720..c707e5e3c0 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,5 +1,5 @@
import scala.reflect.runtime.universe._
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo[U: c.TypeTag](c: Ctx)(x: c.Expr[U]) = {
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 3d29fa467d..4d58467638 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,5 +1,5 @@
import scala.reflect.runtime.universe._
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo[T: c.TypeTag, U: c.TypeTag](c: Ctx)(x: c.Expr[U]) = {
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 a834d809da..961d5b658d 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,5 +1,5 @@
import scala.reflect.runtime.universe._
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{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] = {
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 e0de1f3f83..ab92c54d2c 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,5 +1,5 @@
import scala.reflect.runtime.universe._
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{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] = {
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 f497e5f7a9..ca515be627 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,5 +1,5 @@
import scala.reflect.runtime.universe._
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo[T, U: c.AbsTypeTag, V](c: Ctx)(implicit T: c.AbsTypeTag[T], V: c.AbsTypeTag[V]): c.Expr[Unit] = {
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 b83fa046e5..2ef8f04be9 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
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx)(xs: c.Expr[Int]*) = {
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 5f550064e1..3c7f94f605 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
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx)(xs: c.Expr[Int]*) = {
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 8c75a7e0ea..2066893bdc 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
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def myprintln(xs: Int*) = {
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 b83fa046e5..2ef8f04be9 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
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx)(xs: c.Expr[Int]*) = {
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 8c75a7e0ea..2066893bdc 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
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def myprintln(xs: Int*) = {
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 8154ab0341..b57af2ede4 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,5 +1,5 @@
import scala.reflect.runtime.universe._
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo_targs[T, U: c.TypeTag](c: Ctx = null)(x: c.Expr[Int] = null) = {
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 367a45a2c3..537f1db8c6 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
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(unconventionalName: Ctx)(x: unconventionalName.Expr[Int]) = {
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 5a7d1a6b9a..b3babd8848 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
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx): c.Expr[Int] = {
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 04eef976c5..405ae7024f 100644
--- a/test/files/run/macro-invalidret-nontypeable/Impls_Macros_1.scala
+++ b/test/files/run/macro-invalidret-nontypeable/Impls_Macros_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx) = {
diff --git a/test/files/run/macro-invalidusage-badret/Impls_Macros_1.scala b/test/files/run/macro-invalidusage-badret/Impls_Macros_1.scala
index c63ad01677..0d840eed3f 100644
--- a/test/files/run/macro-invalidusage-badret/Impls_Macros_1.scala
+++ b/test/files/run/macro-invalidusage-badret/Impls_Macros_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx)(x: c.Expr[Int]) = x
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
index 67a19a6d62..5ce9e42b57 100644
--- 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
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo[T: c.TypeTag](c: Ctx)(x: c.Expr[T]) = {
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 e5bdca008e..5866469499 100644
--- a/test/files/run/macro-invalidusage-partialapplication/Impls_Macros_1.scala
+++ b/test/files/run/macro-invalidusage-partialapplication/Impls_Macros_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx)(x: c.Expr[Int])(y: c.Expr[Int]) = {
diff --git a/test/files/run/macro-openmacros/Impls_Macros_1.scala b/test/files/run/macro-openmacros/Impls_Macros_1.scala
index 6b92834b81..38d46c5185 100644
--- a/test/files/run/macro-openmacros/Impls_Macros_1.scala
+++ b/test/files/run/macro-openmacros/Impls_Macros_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.Context
+import scala.reflect.macros.Context
object Macros {
def impl(c: Context): c.Expr[Unit] = {
diff --git a/test/files/run/macro-quasiinvalidbody-c/Impls_Macros_1.scala b/test/files/run/macro-quasiinvalidbody-c/Impls_Macros_1.scala
index 7cb810c86b..6c14428437 100644
--- a/test/files/run/macro-quasiinvalidbody-c/Impls_Macros_1.scala
+++ b/test/files/run/macro-quasiinvalidbody-c/Impls_Macros_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Macros {
object Impls {
diff --git a/test/files/run/macro-range/Common_1.scala b/test/files/run/macro-range/Common_1.scala
index 650257ae16..5c4bc211fc 100644
--- a/test/files/run/macro-range/Common_1.scala
+++ b/test/files/run/macro-range/Common_1.scala
@@ -1,4 +1,4 @@
-import reflect.makro.Context
+import reflect.macros.Context
abstract class RangeDefault {
val from, to: Int
diff --git a/test/files/run/macro-range/Expansion_Impossible_2.scala b/test/files/run/macro-range/Expansion_Impossible_2.scala
index fecce6bc48..57e0cee97f 100644
--- a/test/files/run/macro-range/Expansion_Impossible_2.scala
+++ b/test/files/run/macro-range/Expansion_Impossible_2.scala
@@ -1,4 +1,4 @@
-import reflect.makro.Context
+import reflect.macros.Context
object Impls {
def foreach(c: Context)(f: c.Expr[Int => Unit]): c.Expr[Unit] = {
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 b10f4121a6..fa559334d4 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
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx)(x: c.Expr[Int]) = {
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 dd8fcd4d9e..5d7e077731 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
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx)(x: c.Expr[Int]) = {
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 32a8958577..7a2c0a6fa9 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
@@ -9,7 +9,7 @@ object Test extends App {
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 macroparam = ValDef(NoMods, newTermName("x"), TypeTree(definitions.IntClass.toType), EmptyTree)
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)))
diff --git a/test/files/run/macro-reify-basic/Macros_1.scala b/test/files/run/macro-reify-basic/Macros_1.scala
index 8f8598e248..3f6720f10a 100644
--- a/test/files/run/macro-reify-basic/Macros_1.scala
+++ b/test/files/run/macro-reify-basic/Macros_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Macros {
def foo(s: String) = macro Impls.foo
diff --git a/test/files/run/macro-reify-freevars/Macros_1.scala b/test/files/run/macro-reify-freevars/Macros_1.scala
index df1473511d..c72a7ab54f 100644
--- a/test/files/run/macro-reify-freevars/Macros_1.scala
+++ b/test/files/run/macro-reify-freevars/Macros_1.scala
@@ -2,7 +2,7 @@ package scala.collection.slick
object QueryableMacros{
def map[T:c.TypeTag, S:c.TypeTag]
- (c: scala.reflect.makro.Context)
+ (c: scala.reflect.macros.Context)
(projection: c.Expr[T => S])
: c.Expr[scala.collection.slick.Queryable[S]] = {
import c.universe._
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 b52b962e31..4dda80a117 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,6 +1,6 @@
import scala.reflect.runtime.universe._
import scala.reflect.runtime.{universe => ru}
-import scala.reflect.makro.Context
+import scala.reflect.macros.Context
case class Utils[C <: Context]( c:C ) {
import c.universe._
@@ -33,7 +33,7 @@ object QueryableMacros{
c.universe.reify{ Queryable.factory[S]( foo.splice )}
}
def map[T:c.TypeTag, S:c.TypeTag]
- (c: scala.reflect.makro.Context)
+ (c: scala.reflect.macros.Context)
(projection: c.Expr[T => S]): c.Expr[Queryable[S]] = _helper[c.type,S]( c )( "_map", projection )
}
class Queryable[T]{
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 b52b962e31..4dda80a117 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,6 +1,6 @@
import scala.reflect.runtime.universe._
import scala.reflect.runtime.{universe => ru}
-import scala.reflect.makro.Context
+import scala.reflect.macros.Context
case class Utils[C <: Context]( c:C ) {
import c.universe._
@@ -33,7 +33,7 @@ object QueryableMacros{
c.universe.reify{ Queryable.factory[S]( foo.splice )}
}
def map[T:c.TypeTag, S:c.TypeTag]
- (c: scala.reflect.makro.Context)
+ (c: scala.reflect.macros.Context)
(projection: c.Expr[T => S]): c.Expr[Queryable[S]] = _helper[c.type,S]( c )( "_map", projection )
}
class Queryable[T]{
diff --git a/test/files/run/macro-reify-ref-to-packageless/Impls_1.scala b/test/files/run/macro-reify-ref-to-packageless/Impls_1.scala
index 66c0ee1e9b..f19fd239f9 100644
--- a/test/files/run/macro-reify-ref-to-packageless/Impls_1.scala
+++ b/test/files/run/macro-reify-ref-to-packageless/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
val `Answer to the Ultimate Question of Life, the Universe, and Everything` = 42
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
index 3ddfe6a737..f3e1c9ae95 100644
--- 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
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx)(x: c.Expr[Int]) = {
diff --git a/test/files/run/macro-reify-splice-splice/Macros_1.scala b/test/files/run/macro-reify-splice-splice/Macros_1.scala
index 0de780b5a2..efdd5dbaa2 100644
--- a/test/files/run/macro-reify-splice-splice/Macros_1.scala
+++ b/test/files/run/macro-reify-splice-splice/Macros_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Macros {
def foo = macro Impls.foo
diff --git a/test/files/run/macro-reify-staticXXX/Macros_1.scala b/test/files/run/macro-reify-staticXXX/Macros_1.scala
index b0ce6507f8..f12c8f7dcc 100644
--- a/test/files/run/macro-reify-staticXXX/Macros_1.scala
+++ b/test/files/run/macro-reify-staticXXX/Macros_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.Context
+import scala.reflect.macros.Context
object B { override def toString = "object" }
class C { override def toString = "class" }
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 32b09bdcdf..acca4921dc 100644
--- a/test/files/run/macro-reify-tagful-a/Macros_1.scala
+++ b/test/files/run/macro-reify-tagful-a/Macros_1.scala
@@ -1,5 +1,5 @@
import scala.reflect.runtime.universe._
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Macros {
def foo[T](s: T) = macro Impls.foo[T]
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 77e4b729d3..96cfb75852 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
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Macros {
def foo[T](s: T) = macro Impls.foo[T]
diff --git a/test/files/run/macro-reify-unreify/Macros_1.scala b/test/files/run/macro-reify-unreify/Macros_1.scala
index 3e9033966d..620a929210 100644
--- a/test/files/run/macro-reify-unreify/Macros_1.scala
+++ b/test/files/run/macro-reify-unreify/Macros_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Macros {
def foo(s: String) = macro Impls.foo
diff --git a/test/files/run/macro-repl-basic.check b/test/files/run/macro-repl-basic.check
index dc65e5c55b..4a50c60469 100644
--- a/test/files/run/macro-repl-basic.check
+++ b/test/files/run/macro-repl-basic.check
@@ -6,8 +6,8 @@ scala>
scala> import language.experimental.macros
import language.experimental.macros
-scala> import scala.reflect.makro.{Context => Ctx}
-import scala.reflect.makro.{Context=>Ctx}
+scala> import scala.reflect.macros.{Context => Ctx}
+import scala.reflect.macros.{Context=>Ctx}
scala>
diff --git a/test/files/run/macro-repl-basic.scala b/test/files/run/macro-repl-basic.scala
index fba0aab116..eae1febb3a 100644
--- a/test/files/run/macro-repl-basic.scala
+++ b/test/files/run/macro-repl-basic.scala
@@ -3,7 +3,7 @@ import scala.tools.partest.ReplTest
object Test extends ReplTest {
def code = """
|import language.experimental.macros
- |import scala.reflect.makro.{Context => Ctx}
+ |import scala.reflect.macros.{Context => Ctx}
|
|object Impls {
| def foo(c: Ctx)(x: c.Expr[Int]) = {
diff --git a/test/files/run/macro-repl-dontexpand.check b/test/files/run/macro-repl-dontexpand.check
index 35845f0cff..3c378cdf09 100644
--- a/test/files/run/macro-repl-dontexpand.check
+++ b/test/files/run/macro-repl-dontexpand.check
@@ -3,8 +3,8 @@ Type :help for more information.
scala>
-scala> def bar(c: scala.reflect.makro.Context) = ???
-bar: (c: scala.reflect.makro.Context)Nothing
+scala> def bar(c: scala.reflect.macros.Context) = ???
+bar: (c: scala.reflect.macros.Context)Nothing
scala> def foo = macro bar
foo: Any
diff --git a/test/files/run/macro-repl-dontexpand.scala b/test/files/run/macro-repl-dontexpand.scala
index cd1b2e1969..f3422d88de 100644
--- a/test/files/run/macro-repl-dontexpand.scala
+++ b/test/files/run/macro-repl-dontexpand.scala
@@ -3,7 +3,7 @@ import scala.tools.partest.ReplTest
object Test extends ReplTest {
override def extraSettings = "-language:experimental.macros"
def code = """
- |def bar(c: scala.reflect.makro.Context) = ???
+ |def bar(c: scala.reflect.macros.Context) = ???
|def foo = macro bar
|""".stripMargin
}
diff --git a/test/files/run/macro-settings/Impls_Macros_1.scala b/test/files/run/macro-settings/Impls_Macros_1.scala
index 20dcdc1bd1..83d80a5bff 100644
--- a/test/files/run/macro-settings/Impls_Macros_1.scala
+++ b/test/files/run/macro-settings/Impls_Macros_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.Context
+import scala.reflect.macros.Context
object Impls {
def impl(c: Context) = c.universe.reify {
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 013130d181..0793696fd4 100644
--- a/test/files/run/macro-sip19-revised/Impls_Macros_1.scala
+++ b/test/files/run/macro-sip19-revised/Impls_Macros_1.scala
@@ -1,10 +1,10 @@
-import scala.reflect.makro.Context
+import scala.reflect.macros.Context
object Macros {
def impl(c: Context) = {
import c.universe._
- val inscope = c.inferImplicitValue(c.mirror.staticClass("SourceLocation").asType)
+ val inscope = c.inferImplicitValue(c.mirror.staticClass("SourceLocation").toType)
val outer = c.Expr[SourceLocation](if (!inscope.isEmpty) inscope else Literal(Constant(null)))
val Apply(fun, args) = c.enclosingImplicits(0)._2
diff --git a/test/files/run/macro-sip19/Impls_Macros_1.scala b/test/files/run/macro-sip19/Impls_Macros_1.scala
index f6636c298c..f89e51f560 100644
--- a/test/files/run/macro-sip19/Impls_Macros_1.scala
+++ b/test/files/run/macro-sip19/Impls_Macros_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.Context
+import scala.reflect.macros.Context
object Macros {
def impl(c: Context) = {
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 8ed435d629..633cb930fc 100644
--- a/test/files/run/macro-typecheck-implicitsdisabled/Impls_Macros_1.scala
+++ b/test/files/run/macro-typecheck-implicitsdisabled/Impls_Macros_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.Context
+import scala.reflect.macros.Context
object Macros {
def impl_with_implicits_enabled(c: Context) = {
diff --git a/test/files/run/macro-typecheck-macrosdisabled.check b/test/files/run/macro-typecheck-macrosdisabled.check
index da1a28bc24..c560b0e4b5 100644
--- a/test/files/run/macro-typecheck-macrosdisabled.check
+++ b/test/files/run/macro-typecheck-macrosdisabled.check
@@ -8,11 +8,6 @@
()
};
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))
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 2c9bce92a5..b2f6f7d50e 100644
--- a/test/files/run/macro-typecheck-macrosdisabled/Impls_Macros_1.scala
+++ b/test/files/run/macro-typecheck-macrosdisabled/Impls_Macros_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.Context
+import scala.reflect.macros.Context
object Macros {
def impl_with_macros_enabled(c: Context) = {
diff --git a/test/files/run/macro-typecheck-macrosdisabled2.check b/test/files/run/macro-typecheck-macrosdisabled2.check
index 2160d3800a..55e7913250 100644
--- a/test/files/run/macro-typecheck-macrosdisabled2.check
+++ b/test/files/run/macro-typecheck-macrosdisabled2.check
@@ -8,11 +8,6 @@
()
};
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.staticPackage("scala")), $u.newTermName("Array")), $u.newTermName("apply")), scala.collection.immutable.List.apply[$u.Literal]($u.Literal.apply($u.Constant.apply(2))))
@@ -28,7 +23,7 @@
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.staticPackage("scala").asModuleSymbol.moduleClass), $m.staticClass("scala.Array"), scala.collection.immutable.List.apply[$u.Type]($m.staticClass("scala.Int").asTypeSymbol.asTypeConstructor))
+ $u.TypeRef.apply($u.ThisType.apply($m.staticPackage("scala").asModule.moduleClass), $m.staticClass("scala.Array"), scala.collection.immutable.List.apply[$u.Type]($m.staticClass("scala.Int").asType.toTypeConstructor))
}
};
new $typecreator2()
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 0aca9781f4..948c047351 100644
--- a/test/files/run/macro-typecheck-macrosdisabled2/Impls_Macros_1.scala
+++ b/test/files/run/macro-typecheck-macrosdisabled2/Impls_Macros_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.Context
+import scala.reflect.macros.Context
object Macros {
def impl_with_macros_enabled(c: Context) = {
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 7b921c0e57..3d350a50fa 100644
--- a/test/files/run/macro-undetparams-consfromsls/Impls_Macros_1.scala
+++ b/test/files/run/macro-undetparams-consfromsls/Impls_Macros_1.scala
@@ -1,5 +1,5 @@
import scala.reflect.runtime.universe._
-import scala.reflect.makro.Context
+import scala.reflect.macros.Context
object Macros {
def cons_impl[A: c.AbsTypeTag](c: Context)(x: c.Expr[A], xs: c.Expr[List[A]]): c.Expr[List[A]] = c.universe.reify {
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 fdba40623b..4bcc610b1d 100644
--- a/test/files/run/macro-undetparams-macroitself/Impls_Macros_1.scala
+++ b/test/files/run/macro-undetparams-macroitself/Impls_Macros_1.scala
@@ -1,5 +1,5 @@
import scala.reflect.runtime.universe._
-import scala.reflect.makro.Context
+import scala.reflect.macros.Context
object Macros {
def impl[T: c.TypeTag](c: Context)(foo: c.Expr[T]): c.Expr[Unit] = c.universe.reify { println(c.literal(implicitly[c.TypeTag[T]].toString).splice) }
diff --git a/test/files/run/rawstrings.check b/test/files/run/rawstrings.check
new file mode 100644
index 0000000000..36e63594df
--- /dev/null
+++ b/test/files/run/rawstrings.check
@@ -0,0 +1 @@
+[\n\t'"$]
diff --git a/test/files/run/rawstrings.scala b/test/files/run/rawstrings.scala
new file mode 100644
index 0000000000..9df64f6625
--- /dev/null
+++ b/test/files/run/rawstrings.scala
@@ -0,0 +1,3 @@
+object Test extends App {
+ println(raw"[\n\t'${'"'}$$]")
+}
diff --git a/test/files/run/reflect-resolveoverload-bynameparam.scala b/test/files/run/reflect-resolveoverload-bynameparam.scala
deleted file mode 100644
index 7fb8c82ab8..0000000000
--- a/test/files/run/reflect-resolveoverload-bynameparam.scala
+++ /dev/null
@@ -1,32 +0,0 @@
-
-class A
-class B extends A
-
-class C {
- def foo(x: => Int)(y: String) = x
- def foo(x: String)(y: List[_]) = x
- def foo(x: => A)(y: Array[_]) = 1
- def foo(x: A)(y: Seq[_]) = 2
- def foo(x: B)(y: Map[_, _]) = 4
-}
-
-object Test extends App {
- val cm = reflect.runtime.currentMirror
- val u = cm.universe
- val c = new C
- val im = cm.reflect(c)
- val t = u.typeOf[C] member u.newTermName("foo") asTermSymbol
- val f1 = t.resolveOverloaded(posVargs = List(u.typeOf[Int])) asMethodSymbol
- val f2 = t.resolveOverloaded(posVargs = List(u.typeOf[String])) asMethodSymbol
- val f3 = t.resolveOverloaded(posVargs = List(u.typeOf[A])) asMethodSymbol
- val f4 = t.resolveOverloaded(posVargs = List(u.typeOf[B])) asMethodSymbol
- val m1 = im.reflectMethod(f1)
- val m2 = im.reflectMethod(f2)
- val m3 = im.reflectMethod(f3)
- val m4 = im.reflectMethod(f4)
- assert(m1(() => 1, null) == c.foo(1)(null))
- assert(m2("a", null) == c.foo("a")(null))
- assert(m3(new A, null) == c.foo(new A)(null))
- assert(m4(new B, null) == c.foo(new B)(null))
-}
-
diff --git a/test/files/run/reflect-resolveoverload-expected.scala b/test/files/run/reflect-resolveoverload-expected.scala
deleted file mode 100644
index 1378090309..0000000000
--- a/test/files/run/reflect-resolveoverload-expected.scala
+++ /dev/null
@@ -1,43 +0,0 @@
-
-class A {
- override def equals(x: Any) = {
- x.isInstanceOf[A] && !x.isInstanceOf[B]
- }
-}
-class B extends A {
- override def equals(x: Any) = {
- x.isInstanceOf[B]
- }
-}
-
-class C {
- def a(x: String) = 1
- def a(x: Array[_]) = "a"
- def b(x: String) = new A
- def b(x: Array[_]) = new B
- def c(x: String) = new B
- def c(x: Array[_]) = "a"
-}
-
-object Test extends App {
- val cm = reflect.runtime.currentMirror
- val u = cm.universe
- val c = new C
- val im = cm.reflect(c)
- def invoke(s: String, expectedType: u.Type, expectedResult: Any) {
- val ol = (u.typeOf[C] member u.newTermName(s)).asTermSymbol
- val methodSym = ol.resolveOverloaded(posVargs = List(u.typeOf[Null]), expected = expectedType).asMethodSymbol
- val sig = methodSym.typeSignature.asInstanceOf[u.MethodType]
- val method = im.reflectMethod(methodSym)
- assert(method(null) == expectedResult)
- }
-
- invoke("a", u.typeOf[Int], c.a(null): Int)
- invoke("a", u.typeOf[String], c.a(null): String)
- invoke("b", u.typeOf[B], c.b(null): B)
- invoke("c", u.typeOf[A], c.c(null): A)
- invoke("c", u.typeOf[A], c.c(null): A)
- invoke("c", u.typeOf[B], c.c(null): B)
- invoke("c", u.typeOf[String], c.c(null): String)
-
-}
diff --git a/test/files/run/reflect-resolveoverload-invalid.scala b/test/files/run/reflect-resolveoverload-invalid.scala
deleted file mode 100644
index 8c5dc9f94b..0000000000
--- a/test/files/run/reflect-resolveoverload-invalid.scala
+++ /dev/null
@@ -1,43 +0,0 @@
-
-class A
-class B extends A
-
-class C {
- def a(x: Int) = 1
- def a(x: String) = 2
- def b(x: B) = 3
- def c(x: A, y: B) = 4
- def c(x: B, y: A) = 5
- def d[T](x: Int) = 6
- def d(x: String) = 7
- def e(x: A) = 8
- def e(x: =>B) = 9
-}
-
-object Test extends App {
- val cm = reflect.runtime.currentMirror
- val u = cm.universe
-
- val x = new C
- val t = u.typeOf[C]
-
- val a = t member u.newTermName("a") asTermSymbol
- val b = t member u.newTermName("b") asTermSymbol
- val c = t member u.newTermName("c") asTermSymbol
- val d = t member u.newTermName("d") asTermSymbol
- val e = t member u.newTermName("e") asTermSymbol
-
- val n1 = a.resolveOverloaded(posVargs = List(u.typeOf[Long]))
- val n2 = b.resolveOverloaded(posVargs = List(u.typeOf[A]))
- val n3 = c.resolveOverloaded(posVargs = List(u.typeOf[B], u.typeOf[B]))
- val n4 = d.resolveOverloaded(targs = List(u.typeOf[Int]))
- val n5 = d.resolveOverloaded()
- val n6 = e.resolveOverloaded(posVargs = List(u.typeOf[B]))
-
- assert(n1 == u.NoSymbol)
- assert(n2 == u.NoSymbol)
- assert(n3 == u.NoSymbol)
- assert(n4 == u.NoSymbol)
- assert(n5 == u.NoSymbol)
- assert(n6 == u.NoSymbol)
-}
diff --git a/test/files/run/reflect-resolveoverload-named.scala b/test/files/run/reflect-resolveoverload-named.scala
deleted file mode 100644
index 017ec85c0d..0000000000
--- a/test/files/run/reflect-resolveoverload-named.scala
+++ /dev/null
@@ -1,26 +0,0 @@
-
-class A {
- def foo(x: String, y: Int) = 1
- def foo(x: Int, y: String) = 2
-}
-
-object Test extends App {
- val cm = reflect.runtime.currentMirror
- val u = cm.universe
- val a = new A
- val im = cm.reflect(a)
- val tpe = u.typeOf[A]
- val overloaded = tpe member u.newTermName("foo") asTermSymbol
- val ms1 =
- overloaded resolveOverloaded(nameVargs = Seq((u.newTermName("x"), u.typeOf[String]), (u.newTermName("y"), u.typeOf[Int])))
- val ms2 =
- overloaded resolveOverloaded(nameVargs = Seq((u.newTermName("y"), u.typeOf[Int]), (u.newTermName("x"), u.typeOf[String])))
- val ms3 =
- overloaded resolveOverloaded(nameVargs = Seq((u.newTermName("x"), u.typeOf[Int]), (u.newTermName("y"), u.typeOf[String])))
- val ms4 =
- overloaded resolveOverloaded(nameVargs = Seq((u.newTermName("y"), u.typeOf[String]), (u.newTermName("x"), u.typeOf[Int])))
- assert(im.reflectMethod(ms1 asMethodSymbol)("A", 1) == 1)
- assert(im.reflectMethod(ms2 asMethodSymbol)("A", 1) == 1)
- assert(im.reflectMethod(ms3 asMethodSymbol)(1, "A") == 2)
- assert(im.reflectMethod(ms4 asMethodSymbol)(1, "A") == 2)
-}
diff --git a/test/files/run/reflect-resolveoverload-targs.scala b/test/files/run/reflect-resolveoverload-targs.scala
deleted file mode 100644
index 888b2f0c15..0000000000
--- a/test/files/run/reflect-resolveoverload-targs.scala
+++ /dev/null
@@ -1,29 +0,0 @@
-
-import reflect.runtime.{universe=>u}
-import scala.reflect.runtime.{currentMirror => cm}
-
-class C {
- def foo[T: u.TypeTag](x: String) = 1
- def foo[T: u.TypeTag, S: u.TypeTag](x: String) = 2
-}
-
-object Test extends App {
- val c = new C
- val im = cm.reflect(c)
- val foo = u.typeOf[C] member u.newTermName("foo") asTermSymbol
- val f1 = foo.resolveOverloaded(
- targs = Seq(u.typeOf[Int]),
- posVargs = Seq(u.typeOf[String])
- )
-
- val f2 = foo.resolveOverloaded(
- targs = Seq(u.typeOf[Int],
- u.typeOf[Int]), posVargs = Seq(u.typeOf[String])
- )
-
- val m1 = im.reflectMethod(f1 asMethodSymbol)
- val m2 = im.reflectMethod(f2 asMethodSymbol)
-
- assert(m1("a", u.typeTag[Int]) == c.foo[Int]("a"))
- assert(m2("a", u.typeTag[Int], u.typeTag[Int]) == c.foo[Int, Int]("a"))
-}
diff --git a/test/files/run/reflect-resolveoverload-tparm-substitute.scala b/test/files/run/reflect-resolveoverload-tparm-substitute.scala
deleted file mode 100644
index 22e7bcd40a..0000000000
--- a/test/files/run/reflect-resolveoverload-tparm-substitute.scala
+++ /dev/null
@@ -1,77 +0,0 @@
-
-class A
-class B extends A
-
-class C {
- def foo[T](x: T) = x
- def foo(x: Int) = "a"
- def foo(x: A) = x
-}
-
-object Test extends App {
- val cm = reflect.runtime.currentMirror
- val u = cm.universe
- val c = new C
- val im = cm.reflect(c)
- val term = u.typeOf[C] member u.newTermName("foo") asTermSymbol
-
- val f1 = term.resolveOverloaded(
- posVargs = List(u.typeOf[Int]),
- expected = u.typeOf[String]
- )
-
- val f2 = term.resolveOverloaded(
- targs = List(u.typeOf[String]),
- posVargs = List(u.typeOf[String]),
- expected = u.typeOf[String]
- )
-
- val f3 = term.resolveOverloaded(
- posVargs = List(u.typeOf[A]),
- expected = u.typeOf[A]
- )
-
- val f4 = term.resolveOverloaded(
- targs = List(u.typeOf[A]),
- posVargs = List(u.typeOf[A]),
- expected = u.typeOf[A]
- )
-
- val f5 = term.resolveOverloaded(
- targs = List(u.typeOf[B]),
- posVargs = List(u.typeOf[B]),
- expected = u.typeOf[B]
- )
-
- val f6 = term.resolveOverloaded(
- targs = List(u.typeOf[B]),
- posVargs = List(u.typeOf[B]),
- expected = u.typeOf[A]
- )
-
- val f7 = term.resolveOverloaded(
- targs = List(u.typeOf[A]),
- posVargs = List(u.typeOf[B]),
- expected = u.typeOf[A]
- )
-
- val m1 = im.reflectMethod(f1 asMethodSymbol)
- val m2 = im.reflectMethod(f2 asMethodSymbol)
- val m3 = im.reflectMethod(f3 asMethodSymbol)
- val m4 = im.reflectMethod(f4 asMethodSymbol)
- val m5 = im.reflectMethod(f5 asMethodSymbol)
- val m6 = im.reflectMethod(f6 asMethodSymbol)
- val m7 = im.reflectMethod(f7 asMethodSymbol)
-
- val a = new A
- val b = new B
- assert(m1(2) == (c.foo(2): String))
- assert(m2("xyz") == (c.foo[String]("xyz"): String))
- assert(m3(a) == (c.foo(a): A))
- assert(m4(a) == (c.foo[A](a): A))
- assert(m5(b) == (c.foo[B](b): B))
- assert(m6(b) == (c.foo[B](b): A))
- assert(m7(b) == (c.foo[A](b): A))
-
-
-}
diff --git a/test/files/run/reflect-resolveoverload-variadic.scala b/test/files/run/reflect-resolveoverload-variadic.scala
deleted file mode 100644
index 8e2e15600f..0000000000
--- a/test/files/run/reflect-resolveoverload-variadic.scala
+++ /dev/null
@@ -1,27 +0,0 @@
-
-class C {
- def foo(x: Int*) = 1 + x.sum
- def foo(x: String) = 2
-}
-
-object Test extends App {
- val cm = reflect.runtime.currentMirror
- val u = cm.universe
- val c = new C
- val im = cm.reflect(c)
- val foo = u.typeOf[C] member u.newTermName("foo") asTermSymbol
- val f0 = foo.resolveOverloaded()
- val f1 = foo.resolveOverloaded(posVargs = Seq(u.typeOf[Int]))
- val f2 = foo.resolveOverloaded(posVargs = Seq(u.typeOf[Int], u.typeOf[Int]))
- val f3 = foo.resolveOverloaded(posVargs = Seq(u.typeOf[String]))
-
- val m0 = im.reflectMethod(f0 asMethodSymbol)
- val m1 = im.reflectMethod(f1 asMethodSymbol)
- val m2 = im.reflectMethod(f2 asMethodSymbol)
- val m3 = im.reflectMethod(f3 asMethodSymbol)
-
- assert(m0(Seq()) == c.foo())
- assert(m1(Seq(1)) == c.foo(1))
- assert(m2(Seq(4, 9)) == c.foo(4, 9))
- assert(m3("abc") == c.foo("abc"))
-}
diff --git a/test/files/run/reflect-resolveoverload1.scala b/test/files/run/reflect-resolveoverload1.scala
deleted file mode 100644
index a859a0ec4e..0000000000
--- a/test/files/run/reflect-resolveoverload1.scala
+++ /dev/null
@@ -1,19 +0,0 @@
-import scala.reflect.runtime.universe._
-import scala.reflect.runtime.{currentMirror => cm}
-
-object Test extends App {
-
- val s = "hello world"
- val m = cm.reflect(s)
- val sc = m.symbol
- val st = sc.asType
- val meth = (st member newTermName("indexOf")).asTermSymbol
- val IntType = definitions.IntClass.asType
- val indexOf = (meth resolveOverloaded(posVargs = List(IntType))).asMethodSymbol
- assert(m.reflectMethod(indexOf)('w') == 6)
- assert((m.reflectMethod(indexOf)('w') match { case x: Int => x }) == 6)
-
- val meth2 = (st member newTermName("substring")).asTermSymbol
- val substring = (meth2 resolveOverloaded(posVargs = List(IntType, IntType))).asMethodSymbol
- assert(m.reflectMethod(substring)(2, 6) == "llo ")
-}
diff --git a/test/files/run/reflect-resolveoverload2.scala b/test/files/run/reflect-resolveoverload2.scala
deleted file mode 100644
index a800a3e92c..0000000000
--- a/test/files/run/reflect-resolveoverload2.scala
+++ /dev/null
@@ -1,51 +0,0 @@
-class A
-class B extends A
-
-class C {
- def a(x: Int) = 1
- def a(x: String) = 2
- //def b(x: => Int)(s: String) = 1
- //def b(x: => String)(a: Array[_]) = 2
- def c(x: A) = 1
- def c(x: B) = 2
- //def d(x: => A)(s: String) = 1
- //def d(x: => B)(a: Array[_]) = 2
- def e(x: A) = 1
- def e(x: B = new B) = 2
- def f(x: Int) = 1
- def f(x: String) = 2
- def f(x: Long) = 3
- def f(x: Double) = 4
-}
-
-object Test extends App {
- val cm = reflect.runtime.currentMirror
- val u = cm.universe
- val c = new C
- val im = cm.reflect(c)
- def invoke(s: String, arg: Any, argType: u.Type): Int = {
- val ol = u.typeOf[C] member u.newTermName(s) asTermSymbol
- val methodSym = ol.resolveOverloaded(posVargs = List(argType)) asMethodSymbol
- val sig = methodSym.typeSignature.asInstanceOf[u.MethodType]
- val method = im.reflectMethod(methodSym)
- if (sig.resultType.kind == "MethodType") method(arg, null).asInstanceOf[Int]
- else method(arg).asInstanceOf[Int]
- }
- assert(c.a(1) == invoke("a", 1, u.typeOf[Int]))
- assert(c.a("a") == invoke("a", "a", u.typeOf[String]))
- assert(c.a('a') == invoke("a", 'a', u.typeOf[Char]))
- assert(c.a(3: Byte) == invoke("a", 3: Byte, u.typeOf[Byte]))
- //assert(c.b(1)(null) == invoke("b", 1, u.typeOf[Int]))
- //assert(c.b("a")(null) == invoke("b", "a", u.typeOf[String]))
- assert(c.c(new A) == invoke("c", new A, u.typeOf[A]))
- assert(c.c(new B) == invoke("c", new B, u.typeOf[B]))
- //assert(c.d(new A)(null) == invoke("d", new A, u.typeOf[A]))
- //assert(c.d(new B)(null) == invoke("d", new B, u.typeOf[B]))
- assert(c.e(new A) == invoke("e", new A, u.typeOf[A]))
- assert(c.e(new B) == invoke("e", new B, u.typeOf[B]))
- assert(c.f(1: Short) == invoke("f", 1: Short, u.typeOf[Short]))
- assert(c.f(2) == invoke("f", 2, u.typeOf[Int]))
- assert(c.f(3L) == invoke("f", 3L, u.typeOf[Long]))
- assert(c.f(4f) == invoke("f", 4f, u.typeOf[Float]))
- assert(c.f(5d) == invoke("f", 5d, u.typeOf[Double]))
-}
diff --git a/test/files/run/reflection-allmirrors-tostring.check b/test/files/run/reflection-allmirrors-tostring.check
new file mode 100644
index 0000000000..b5fe6c33bb
--- /dev/null
+++ b/test/files/run/reflection-allmirrors-tostring.check
@@ -0,0 +1,14 @@
+class mirror for C (bound to null)
+module mirror for M (bound to null)
+instance mirror for an instance of C
+field mirror for C.f1 (bound to an instance of C)
+field mirror for C.f2 (bound to an instance of C)
+method mirror for C.m1: Int (bound to an instance of C)
+method mirror for C.m2(): Int (bound to an instance of C)
+method mirror for C.m3[T >: String <: Int]: T (bound to an instance of C)
+method mirror for C.m4[A, B <: A[Int]](x: A[B])(implicit y: Int): Nothing (bound to an instance of C)
+method mirror for C.m5(x: => Int, y: Int*): String (bound to an instance of C)
+class mirror for C.C (bound to an instance of C)
+module mirror for C.M (bound to an instance of C)
+constructor mirror for C.<init>(): C (bound to null)
+constructor mirror for C.C.<init>(): C.this.C (bound to an instance of C)
diff --git a/test/files/run/reflection-allmirrors-tostring.scala b/test/files/run/reflection-allmirrors-tostring.scala
new file mode 100644
index 0000000000..73afff291c
--- /dev/null
+++ b/test/files/run/reflection-allmirrors-tostring.scala
@@ -0,0 +1,43 @@
+import scala.reflect.runtime.universe._
+
+class C {
+ val f1 = 2
+ var f2 = 3
+
+ def m1 = 4
+ def m2() = 5
+ def m3[T >: String <: Int]: T = ???
+ def m4[A[_], B <: A[Int]](x: A[B])(implicit y: Int) = ???
+ def m5(x: => Int, y: Int*): String = ???
+
+ class C
+ object M
+
+ override def toString = "an instance of C"
+}
+object M
+
+object Test extends App {
+ val cm = scala.reflect.runtime.currentMirror
+// println(cm)
+
+ println(cm.reflectClass(cm.staticClass("C")))
+ println(cm.reflectModule(cm.staticModule("M")))
+ println(cm.reflect(new C))
+
+ val im = cm.reflect(new C)
+ println(im.reflectField(typeOf[C].member(newTermName("f1")).asTerm))
+ println(im.reflectField(typeOf[C].member(newTermName("f2")).asTerm))
+ println(im.reflectMethod(typeOf[C].member(newTermName("m1")).asMethod))
+ println(im.reflectMethod(typeOf[C].member(newTermName("m2")).asMethod))
+ println(im.reflectMethod(typeOf[C].member(newTermName("m3")).asMethod))
+ println(im.reflectMethod(typeOf[C].member(newTermName("m4")).asMethod))
+ println(im.reflectMethod(typeOf[C].member(newTermName("m5")).asMethod))
+ println(im.reflectClass(typeOf[C].member(newTypeName("C")).asClass))
+ println(im.reflectModule(typeOf[C].member(newTermName("M")).asModule))
+
+ val c = cm.staticClass("C")
+ val cc = typeOf[C].member(newTypeName("C")).asClass
+ println(cm.reflectClass(c).reflectConstructor(c.typeSignature.member(nme.CONSTRUCTOR).asMethod))
+ println(im.reflectClass(cc).reflectConstructor(cc.typeSignature.member(nme.CONSTRUCTOR).asMethod))
+} \ No newline at end of file
diff --git a/test/files/run/reflection-constructormirror-inner-badpath.scala b/test/files/run/reflection-constructormirror-inner-badpath.scala
index a42bedea83..4bccff21fe 100644
--- a/test/files/run/reflection-constructormirror-inner-badpath.scala
+++ b/test/files/run/reflection-constructormirror-inner-badpath.scala
@@ -12,7 +12,7 @@ class Foo{
val classTag = implicitly[ClassTag[R]]
val cl = classTag.runtimeClass.getClassLoader
val cm = runtimeMirror(cl)
- val constructor = expectedType.tpe.member( nme.CONSTRUCTOR ).asMethodSymbol
+ val constructor = expectedType.tpe.member( nme.CONSTRUCTOR ).asMethod
val sig = constructor.typeSignature
val sym = cm.classSymbol( classTag.runtimeClass )
try {
diff --git a/test/files/run/reflection-constructormirror-inner-good.scala b/test/files/run/reflection-constructormirror-inner-good.scala
index c09f464b24..861332161f 100644
--- a/test/files/run/reflection-constructormirror-inner-good.scala
+++ b/test/files/run/reflection-constructormirror-inner-good.scala
@@ -12,7 +12,7 @@ class Foo{
val classTag = implicitly[ClassTag[R]]
val cl = classTag.runtimeClass.getClassLoader
val cm = runtimeMirror(cl)
- val constructor = expectedType.tpe.member( nme.CONSTRUCTOR ).asMethodSymbol
+ val constructor = expectedType.tpe.member( nme.CONSTRUCTOR ).asMethod
val sig = constructor.typeSignature
val sym = cm.classSymbol( classTag.runtimeClass )
val cls = cm.reflect( this ).reflectClass( sym )
diff --git a/test/files/run/reflection-constructormirror-nested-badpath.scala b/test/files/run/reflection-constructormirror-nested-badpath.scala
index ece0044c61..2983f185de 100644
--- a/test/files/run/reflection-constructormirror-nested-badpath.scala
+++ b/test/files/run/reflection-constructormirror-nested-badpath.scala
@@ -8,7 +8,7 @@ class Foo{
val classTag = implicitly[ClassTag[R]]
val cl = classTag.runtimeClass.getClassLoader
val cm = runtimeMirror(cl)
- val constructor = expectedType.tpe.member( nme.CONSTRUCTOR ).asMethodSymbol
+ val constructor = expectedType.tpe.member( nme.CONSTRUCTOR ).asMethod
val sig = constructor.typeSignature
val sym = cm.classSymbol( classTag.runtimeClass )
try {
diff --git a/test/files/run/reflection-constructormirror-nested-good.scala b/test/files/run/reflection-constructormirror-nested-good.scala
index 432e9d3707..0b7c413975 100644
--- a/test/files/run/reflection-constructormirror-nested-good.scala
+++ b/test/files/run/reflection-constructormirror-nested-good.scala
@@ -8,7 +8,7 @@ class Foo{
val classTag = implicitly[ClassTag[R]]
val cl = classTag.runtimeClass.getClassLoader
val cm = runtimeMirror(cl)
- val constructor = expectedType.tpe.member( nme.CONSTRUCTOR ).asMethodSymbol
+ val constructor = expectedType.tpe.member( nme.CONSTRUCTOR ).asMethod
val sig = constructor.typeSignature
val sym = cm.classSymbol( classTag.runtimeClass )
val cls = cm.reflectClass( sym )
diff --git a/test/files/run/reflection-constructormirror-toplevel-badpath.scala b/test/files/run/reflection-constructormirror-toplevel-badpath.scala
index 7a7adbd603..cf92929119 100644
--- a/test/files/run/reflection-constructormirror-toplevel-badpath.scala
+++ b/test/files/run/reflection-constructormirror-toplevel-badpath.scala
@@ -13,7 +13,7 @@ class Foo{
val classTag = implicitly[ClassTag[R]]
val cl = classTag.runtimeClass.getClassLoader
val cm = runtimeMirror(cl)
- val constructor = expectedType.tpe.member( nme.CONSTRUCTOR ).asMethodSymbol
+ val constructor = expectedType.tpe.member( nme.CONSTRUCTOR ).asMethod
val sig = constructor.typeSignature
val sym = cm.classSymbol( classTag.runtimeClass )
try {
diff --git a/test/files/run/reflection-constructormirror-toplevel-good.scala b/test/files/run/reflection-constructormirror-toplevel-good.scala
index 96713a11cb..b68134b2cb 100644
--- a/test/files/run/reflection-constructormirror-toplevel-good.scala
+++ b/test/files/run/reflection-constructormirror-toplevel-good.scala
@@ -13,7 +13,7 @@ class Foo{
val classTag = implicitly[ClassTag[R]]
val cl = classTag.runtimeClass.getClassLoader
val cm = runtimeMirror(cl)
- val constructor = expectedType.tpe.member( nme.CONSTRUCTOR ).asMethodSymbol
+ val constructor = expectedType.tpe.member( nme.CONSTRUCTOR ).asMethod
val sig = constructor.typeSignature
val sym = cm.classSymbol( classTag.runtimeClass )
val cls = cm.reflectClass( sym )
diff --git a/test/files/run/reflection-equality.check b/test/files/run/reflection-equality.check
index feafb58d3b..be531fbbd3 100644
--- a/test/files/run/reflection-equality.check
+++ b/test/files/run/reflection-equality.check
@@ -29,7 +29,7 @@ java.lang.Object {
def methodIntIntInt: <?>
}
-scala> val ms: MethodSymbol = ts.declaration(newTermName("methodIntIntInt")).asMethodSymbol
+scala> val ms: MethodSymbol = ts.declaration(newTermName("methodIntIntInt")).asMethod
ms: reflect.runtime.universe.MethodSymbol = method methodIntIntInt
scala> val MethodType( _, t1 ) = ms.typeSignature
diff --git a/test/files/run/reflection-equality.scala b/test/files/run/reflection-equality.scala
index 35dc47a59f..8fc82721e7 100644
--- a/test/files/run/reflection-equality.scala
+++ b/test/files/run/reflection-equality.scala
@@ -11,7 +11,7 @@ object Test extends ReplTest {
|def im: InstanceMirror = cm.reflect(new X)
|val cs: ClassSymbol = im.symbol
|val ts: Type = cs.typeSignature
- |val ms: MethodSymbol = ts.declaration(newTermName("methodIntIntInt")).asMethodSymbol
+ |val ms: MethodSymbol = ts.declaration(newTermName("methodIntIntInt")).asMethod
|val MethodType( _, t1 ) = ms.typeSignature
|val t2 = typeOf[scala.Int]
|t1 == t2
diff --git a/test/files/run/reflection-fieldmirror-accessorsareokay.scala b/test/files/run/reflection-fieldmirror-accessorsareokay.scala
index c586ce9bdd..9590cbe811 100644
--- a/test/files/run/reflection-fieldmirror-accessorsareokay.scala
+++ b/test/files/run/reflection-fieldmirror-accessorsareokay.scala
@@ -13,7 +13,7 @@ object Test extends App {
def test(f: Symbol) = {
try {
- val fm: FieldMirror = im.reflectField(f.asTermSymbol)
+ val fm: FieldMirror = im.reflectField(f.asTerm)
println(fm.symbol.isVariable)
println(fm.get)
fm.set(2)
@@ -24,6 +24,6 @@ object Test extends App {
}
}
- test(cs.typeSignature.declaration(newTermName("x")).asTermSymbol)
- test(cs.typeSignature.declaration(newTermName("x_$eq")).asTermSymbol)
+ test(cs.typeSignature.declaration(newTermName("x")).asTerm)
+ test(cs.typeSignature.declaration(newTermName("x_$eq")).asTerm)
}
diff --git a/test/files/run/reflection-fieldmirror-ctorparam.scala b/test/files/run/reflection-fieldmirror-ctorparam.scala
index fa9dd81d7f..b9d50fe97b 100644
--- a/test/files/run/reflection-fieldmirror-ctorparam.scala
+++ b/test/files/run/reflection-fieldmirror-ctorparam.scala
@@ -10,7 +10,7 @@ object Test extends App {
val im: InstanceMirror = cm.reflect(a)
val cs = im.symbol
- val f = cs.typeSignature.declaration(newTermName("x")).asTermSymbol
+ val f = cs.typeSignature.declaration(newTermName("x")).asTerm
try {
val fm: FieldMirror = im.reflectField(f)
println(fm.get)
diff --git a/test/files/run/reflection-fieldmirror-getsetval.scala b/test/files/run/reflection-fieldmirror-getsetval.scala
index af9a6e4c56..67c54d9708 100644
--- a/test/files/run/reflection-fieldmirror-getsetval.scala
+++ b/test/files/run/reflection-fieldmirror-getsetval.scala
@@ -10,7 +10,7 @@ object Test extends App {
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" + nme.LOCAL_SUFFIX_STRING)).asTerm
val fm: FieldMirror = im.reflectField(f)
try {
println(fm.get)
diff --git a/test/files/run/reflection-fieldmirror-getsetvar.scala b/test/files/run/reflection-fieldmirror-getsetvar.scala
index d9fbdaade0..abcf396dd1 100644
--- a/test/files/run/reflection-fieldmirror-getsetvar.scala
+++ b/test/files/run/reflection-fieldmirror-getsetvar.scala
@@ -10,7 +10,7 @@ object Test extends App {
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" + nme.LOCAL_SUFFIX_STRING)).asTerm
val fm: FieldMirror = im.reflectField(f)
println(fm.get)
fm.set(2)
diff --git a/test/files/run/reflection-fieldmirror-nmelocalsuffixstring.scala b/test/files/run/reflection-fieldmirror-nmelocalsuffixstring.scala
index d89e6a90ef..5cfe583ed5 100644
--- a/test/files/run/reflection-fieldmirror-nmelocalsuffixstring.scala
+++ b/test/files/run/reflection-fieldmirror-nmelocalsuffixstring.scala
@@ -10,7 +10,7 @@ object Test extends App {
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" + nme.LOCAL_SUFFIX_STRING)).asTerm
val fm: FieldMirror = im.reflectField(f)
println(fm.symbol.isVariable)
}
diff --git a/test/files/run/reflection-fieldmirror-privatethis.scala b/test/files/run/reflection-fieldmirror-privatethis.scala
index 0c415e09e4..7aa179958d 100644
--- a/test/files/run/reflection-fieldmirror-privatethis.scala
+++ b/test/files/run/reflection-fieldmirror-privatethis.scala
@@ -10,7 +10,7 @@ object Test extends App {
val im: InstanceMirror = cm.reflect(a)
val cs = im.symbol
- val f = cs.typeSignature.declaration(newTermName("x")).asTermSymbol
+ val f = cs.typeSignature.declaration(newTermName("x")).asTerm
val fm: FieldMirror = im.reflectField(f)
println(fm.symbol.isVariable)
println(fm.get)
diff --git a/test/files/run/reflection-fieldsymbol-navigation.check b/test/files/run/reflection-fieldsymbol-navigation.check
new file mode 100644
index 0000000000..79f0928ea5
--- /dev/null
+++ b/test/files/run/reflection-fieldsymbol-navigation.check
@@ -0,0 +1,6 @@
+method x
+false
+variable x
+true
+method x
+method x_=
diff --git a/test/files/run/reflection-fieldsymbol-navigation.scala b/test/files/run/reflection-fieldsymbol-navigation.scala
new file mode 100644
index 0000000000..da4612a564
--- /dev/null
+++ b/test/files/run/reflection-fieldsymbol-navigation.scala
@@ -0,0 +1,15 @@
+import scala.reflect.runtime.universe._
+
+class C {
+ var x = 2
+}
+
+object Test extends App {
+ val x = typeOf[C].member(newTermName("x")).asTerm
+ println(x)
+ println(x.isVariable)
+ println(x.accessed)
+ println(x.accessed.asTerm.isVariable)
+ println(x.getter)
+ println(x.setter)
+} \ No newline at end of file
diff --git a/test/files/run/reflection-methodsymbol-params.check b/test/files/run/reflection-methodsymbol-params.check
new file mode 100644
index 0000000000..11f349d52b
--- /dev/null
+++ b/test/files/run/reflection-methodsymbol-params.check
@@ -0,0 +1,8 @@
+List()
+List(List())
+List(List(value x))
+List(List(value x), List(value y))
+List()
+List(List())
+List(List(value x))
+List(List(value x), List(value y))
diff --git a/test/files/run/reflection-methodsymbol-params.scala b/test/files/run/reflection-methodsymbol-params.scala
new file mode 100644
index 0000000000..7174c6f49b
--- /dev/null
+++ b/test/files/run/reflection-methodsymbol-params.scala
@@ -0,0 +1,24 @@
+import scala.reflect.runtime.universe._
+
+class C {
+ def x1: Int = ???
+ def x2(): Int = ???
+ def x3(x: Int): Int = ???
+ def x4(x: Int)(y: Int): Int = ???
+
+ def y1[T]: Int = ???
+ def y2[T](): Int = ???
+ def y3[T](x: Int): Int = ???
+ def y4[T](x: Int)(y: Int): Int = ???
+}
+
+object Test extends App {
+ println(typeOf[C].member(newTermName("x1")).asMethod.params)
+ println(typeOf[C].member(newTermName("x2")).asMethod.params)
+ println(typeOf[C].member(newTermName("x3")).asMethod.params)
+ println(typeOf[C].member(newTermName("x4")).asMethod.params)
+ println(typeOf[C].member(newTermName("y1")).asMethod.params)
+ println(typeOf[C].member(newTermName("y2")).asMethod.params)
+ println(typeOf[C].member(newTermName("y3")).asMethod.params)
+ println(typeOf[C].member(newTermName("y4")).asMethod.params)
+} \ No newline at end of file
diff --git a/test/files/run/reflection-methodsymbol-returntype.check b/test/files/run/reflection-methodsymbol-returntype.check
new file mode 100644
index 0000000000..0f30d1beaf
--- /dev/null
+++ b/test/files/run/reflection-methodsymbol-returntype.check
@@ -0,0 +1,8 @@
+Int
+Int
+Int
+Int
+Int
+Int
+Int
+Int
diff --git a/test/files/run/reflection-methodsymbol-returntype.scala b/test/files/run/reflection-methodsymbol-returntype.scala
new file mode 100644
index 0000000000..392754dbe4
--- /dev/null
+++ b/test/files/run/reflection-methodsymbol-returntype.scala
@@ -0,0 +1,24 @@
+import scala.reflect.runtime.universe._
+
+class C {
+ def x1: Int = ???
+ def x2(): Int = ???
+ def x3(x: Int): Int = ???
+ def x4(x: Int)(y: Int): Int = ???
+
+ def y1[T]: Int = ???
+ def y2[T](): Int = ???
+ def y3[T](x: Int): Int = ???
+ def y4[T](x: Int)(y: Int): Int = ???
+}
+
+object Test extends App {
+ println(typeOf[C].member(newTermName("x1")).asMethod.returnType)
+ println(typeOf[C].member(newTermName("x2")).asMethod.returnType)
+ println(typeOf[C].member(newTermName("x3")).asMethod.returnType)
+ println(typeOf[C].member(newTermName("x4")).asMethod.returnType)
+ println(typeOf[C].member(newTermName("y1")).asMethod.returnType)
+ println(typeOf[C].member(newTermName("y2")).asMethod.returnType)
+ println(typeOf[C].member(newTermName("y3")).asMethod.returnType)
+ println(typeOf[C].member(newTermName("y4")).asMethod.returnType)
+} \ No newline at end of file
diff --git a/test/files/run/reflection-methodsymbol-typeparams.check b/test/files/run/reflection-methodsymbol-typeparams.check
new file mode 100644
index 0000000000..c888e09a17
--- /dev/null
+++ b/test/files/run/reflection-methodsymbol-typeparams.check
@@ -0,0 +1,8 @@
+List()
+List()
+List()
+List()
+List(type T)
+List(type T)
+List(type T)
+List(type T)
diff --git a/test/files/run/reflection-methodsymbol-typeparams.scala b/test/files/run/reflection-methodsymbol-typeparams.scala
new file mode 100644
index 0000000000..bb0a3c3aec
--- /dev/null
+++ b/test/files/run/reflection-methodsymbol-typeparams.scala
@@ -0,0 +1,24 @@
+import scala.reflect.runtime.universe._
+
+class C {
+ def x1: Int = ???
+ def x2(): Int = ???
+ def x3(x: Int): Int = ???
+ def x4(x: Int)(y: Int): Int = ???
+
+ def y1[T]: Int = ???
+ def y2[T](): Int = ???
+ def y3[T](x: Int): Int = ???
+ def y4[T](x: Int)(y: Int): Int = ???
+}
+
+object Test extends App {
+ println(typeOf[C].member(newTermName("x1")).asMethod.typeParams)
+ println(typeOf[C].member(newTermName("x2")).asMethod.typeParams)
+ println(typeOf[C].member(newTermName("x3")).asMethod.typeParams)
+ println(typeOf[C].member(newTermName("x4")).asMethod.typeParams)
+ println(typeOf[C].member(newTermName("y1")).asMethod.typeParams)
+ println(typeOf[C].member(newTermName("y2")).asMethod.typeParams)
+ println(typeOf[C].member(newTermName("y3")).asMethod.typeParams)
+ println(typeOf[C].member(newTermName("y4")).asMethod.typeParams)
+} \ No newline at end of file
diff --git a/test/files/run/reflection-sanitychecks.scala b/test/files/run/reflection-sanitychecks.scala
index a6a24088a4..e95d130460 100644
--- a/test/files/run/reflection-sanitychecks.scala
+++ b/test/files/run/reflection-sanitychecks.scala
@@ -19,10 +19,10 @@ object Test extends App {
def test(tpe: Type): Unit = {
def failsafe(action: => Any): Any = try action catch { case ex: Throwable => ex.toString }
- println("field: " + failsafe(im.reflectField(tpe.member(newTermName("foo")).asTermSymbol).get))
- println("method: " + failsafe(im.reflectMethod(tpe.member(newTermName("bar")).asMethodSymbol)()))
- println("class: " + failsafe(im.reflectClass(tpe.member(newTypeName("C")).asClassSymbol).reflectConstructor(typeOf[C].member(newTypeName("C")).asClassSymbol.typeSignature.member(newTermName("<init>")).asMethodSymbol)()))
- println("object: " + failsafe(im.reflectModule(tpe.member(newTermName("O")).asModuleSymbol).instance))
+ println("field: " + failsafe(im.reflectField(tpe.member(newTermName("foo")).asTerm).get))
+ println("method: " + failsafe(im.reflectMethod(tpe.member(newTermName("bar")).asMethod)()))
+ println("class: " + failsafe(im.reflectClass(tpe.member(newTypeName("C")).asClass).reflectConstructor(typeOf[C].member(newTypeName("C")).asClass.typeSignature.member(newTermName("<init>")).asMethod)()))
+ println("object: " + failsafe(im.reflectModule(tpe.member(newTermName("O")).asModule).instance))
}
test(typeOf[C])
diff --git a/test/files/run/reflection-simple.scala b/test/files/run/reflection-simple.scala
deleted file mode 100644
index ec34b71cec..0000000000
--- a/test/files/run/reflection-simple.scala
+++ /dev/null
@@ -1,12 +0,0 @@
-// a.scala
-// Wed May 2 01:01:22 PDT 2012
-
-object Test {
- def main(args: Array[String]) {
- System.out.println("Running")
- case class Foo(a: Int, b: Int, c: Int)
- 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/reflection-sorted-decls.check b/test/files/run/reflection-sorted-decls.check
new file mode 100644
index 0000000000..9a9832a683
--- /dev/null
+++ b/test/files/run/reflection-sorted-decls.check
@@ -0,0 +1,7 @@
+value a
+value b
+value c
+method c
+method b
+method a
+constructor Foo$1
diff --git a/test/files/run/reflection-sorted-decls.scala b/test/files/run/reflection-sorted-decls.scala
new file mode 100644
index 0000000000..242f17d9bb
--- /dev/null
+++ b/test/files/run/reflection-sorted-decls.scala
@@ -0,0 +1,8 @@
+object Test {
+ def main(args: Array[String]) {
+ class Foo(val a: Int, val b: Int, val c: Int)
+ import scala.reflect.runtime.{currentMirror => cm}
+ val decls = cm.classSymbol(classOf[Foo]).typeSignature.declarations
+ decls.sorted.toList foreach System.out.println
+ }
+}
diff --git a/test/files/run/reflection-simple.check b/test/files/run/reflection-sorted-members.check
index 671d9d2716..d58b691c42 100644
--- a/test/files/run/reflection-simple.check
+++ b/test/files/run/reflection-sorted-members.check
@@ -1,45 +1,34 @@
-Running
-constructor Foo$3
-constructor Object
-method !=
-method !=
-method ##
-method $asInstanceOf
-method $init$
-method $isInstanceOf
-method ==
-method ==
-method _1
-method _2
-method _3
-method a
-method asInstanceOf
-method b
-method c
-method canEqual
-method clone
-method copy
-method copy$default$1
-method copy$default$2
-method copy$default$3
-method eq
-method equals
-method finalize
-method getClass
-method hashCode
-method isInstanceOf
-method ne
-method notify
-method notifyAll
-method productArity
-method productElement
-method productIterator
-method productPrefix
-method synchronized
-method toString
-method wait
-method wait
-method wait
-value a
-value b
-value c
+value a
+value b
+value c
+method c
+method b
+method a
+constructor Foo$1
+value x
+method x
+constructor Bar$1
+method finalize
+method wait
+method wait
+method wait
+method equals
+method toString
+method hashCode
+method getClass
+method clone
+method notify
+method notifyAll
+constructor Object
+method eq
+method ne
+method ==
+method !=
+method ##
+method synchronized
+method $isInstanceOf
+method $asInstanceOf
+method ==
+method !=
+method isInstanceOf
+method asInstanceOf
diff --git a/test/files/run/reflection-sorted-members.scala b/test/files/run/reflection-sorted-members.scala
new file mode 100644
index 0000000000..9980d79999
--- /dev/null
+++ b/test/files/run/reflection-sorted-members.scala
@@ -0,0 +1,11 @@
+object Test {
+ def main(args: Array[String]) {
+ trait T1 { def a: Int; def c: Int }
+ trait T2 { def a: Int; def b: Int }
+ class Bar(val x: Int)
+ class Foo(val a: Int, val b: Int, val c: Int) extends Bar(a + b + c) with T1 with T2
+ import scala.reflect.runtime.{currentMirror => cm}
+ val members = cm.classSymbol(classOf[Foo]).typeSignature.members
+ members.sorted.toList foreach System.out.println
+ }
+}
diff --git a/test/files/run/reify_newimpl_45.scala b/test/files/run/reify_newimpl_45.scala
index d2254d6dde..cbae0839b2 100644
--- a/test/files/run/reify_newimpl_45.scala
+++ b/test/files/run/reify_newimpl_45.scala
@@ -8,7 +8,8 @@ object Test extends App {
val code = reify{val x: T = "2".asInstanceOf[T]; println("ima worx: %s".format(x)); x}
println(code.tree.freeTypes)
val T = code.tree.freeTypes(0)
- cm.mkToolBox().runExpr(code.tree, Map(T -> definitions.StringClass.asType))
+ val tree = code.tree.substituteSymbols(List(T), List(definitions.StringClass))
+ cm.mkToolBox().runExpr(tree)
}
new C[String]
diff --git a/test/files/run/t4560.check b/test/files/run/t4560.check
index fd3c81a4d7..f8cb0833ae 100644
--- a/test/files/run/t4560.check
+++ b/test/files/run/t4560.check
@@ -1,2 +1,6 @@
-5
-5
+'Test
+Success 1
+'Test
+Success 2
+'Test
+Success 3
diff --git a/test/files/run/t4560.scala b/test/files/run/t4560.scala
index 1392077e46..9979199067 100644
--- a/test/files/run/t4560.scala
+++ b/test/files/run/t4560.scala
@@ -1,39 +1,66 @@
-object Pimper {
- implicit def pimp(i: Int) = new {
- def test: String = i.toString
- }
-}
+// SI-4560 (and SI-4601): Reflection caches are expected in the wrong classfiles
+// with various differing constellations of self-types. This leads to runtime exceptions
+// when the reflection caches are accessed. This tests both reflection cache accesses
+// for structural type method invocations (`y.f()`) (SI-4560) and accesses to symbols which are
+// handled similarly (SI-4601)
-trait A
+// TEST 1
+// self-type is other trait
-trait B {
- self: A =>
+trait Aa
+trait Ab
- def test {
- import Pimper.pimp
+trait B {
+ self: Aa with Ab =>
- println(5.test)
+ def y = new { def f() = println("Success 1") }
+ def fail() = {
+ println('Test)
+ y.f()
}
}
+object Test1 extends Aa with Ab with B
+
+// TEST 2
+// self-type is class
+
class A2
trait B2 {
self: A2 =>
- def test {
- import Pimper.pimp
+ def y = new { def f() = println("Success 2") }
+ def fail() = {
+ println('Test)
+ y.f()
+ }
+}
+
+object Test2 extends A2 with B2
+
+// TEST 3
+// self-type is singleton type
+
+trait B3 {
+ this: Test3.type =>
- println(5.test)
+ def y = new { def f() = println("Success 3") }
+ def fail() = {
+ println('Test)
+ y.f()
}
}
-object Test extends A with B {
+object Test3 extends B3 {
+ def test { fail() }
+}
+
+object Test {
def main(args: Array[String]) {
- test
- Test2.test
+ Test1.fail()
+ Test2.fail()
+ Test3.fail()
}
}
-object Test2 extends A2 with B2
-
diff --git a/test/files/run/t4560b.check b/test/files/run/t4560b.check
new file mode 100644
index 0000000000..7ee6e19b28
--- /dev/null
+++ b/test/files/run/t4560b.check
@@ -0,0 +1,2 @@
+23
+SUCCESS
diff --git a/test/files/run/t4560b.scala b/test/files/run/t4560b.scala
new file mode 100644
index 0000000000..97fe00ce37
--- /dev/null
+++ b/test/files/run/t4560b.scala
@@ -0,0 +1,28 @@
+object Outer {
+ class Tester
+ private[Outer] trait B4 { _: Tester =>
+ protected val FREQ = 23
+ def fail() = {
+ println(FREQ)
+ }
+ }
+ object C4 extends Tester with B4
+}
+
+object Outer2 {
+ abstract class A5
+ private[Outer2] trait C5 {
+ def impl() { println("SUCCESS") }
+ }
+ trait B5 extends C5 { self: A5 =>
+ def fail() { impl() }
+ }
+ object Test5 extends A5 with B5 with C5
+}
+
+object Test {
+ def main(args: Array[String]): Unit = {
+ Outer.C4.fail()
+ Outer2.Test5.fail()
+ }
+}
diff --git a/test/files/run/t5603.check b/test/files/run/t5603.check
new file mode 100644
index 0000000000..5127d3c1c7
--- /dev/null
+++ b/test/files/run/t5603.check
@@ -0,0 +1,29 @@
+[[syntax trees at end of parser]] // newSource1
+[0:241]package [0:0]<empty> {
+ [0:82]abstract trait Greeting extends [15:82][83]scala.AnyRef {
+ [15]def $init$() = [15]{
+ [15]()
+ };
+ [23:39]val name: [33:39]String;
+ [46:76]val msg = [56:76][56:72][56:71]"How are you, ".$plus([72:76]name)
+ };
+ [87:209]class C extends [94:209][151:159]Greeting {
+ [119:139]val nameElse = _;
+ [95:101]<paramaccessor> private[this] val i: [98:101]Int = _;
+ <119:139>def <init>([95]i: [98]Int) = <119:139>{
+ <119:139>val nameElse = <134:139>"Bob";
+ [94][94][94]super.<init>();
+ [94]()
+ };
+ [168:184]val name = [179:184]"avc";
+ [191:203][191:198]println([199:202]msg)
+ };
+ [215:241]object Test extends [227:241][235:238]App {
+ [227]def <init>() = [227]{
+ [227][227][227]super.<init>();
+ [227]()
+ };
+ [NoPosition]<empty>
+ }
+}
+
diff --git a/test/files/run/t5603.scala b/test/files/run/t5603.scala
new file mode 100644
index 0000000000..60dfd01fee
--- /dev/null
+++ b/test/files/run/t5603.scala
@@ -0,0 +1,42 @@
+import scala.tools.partest._
+import java.io._
+import scala.tools.nsc._
+import scala.tools.nsc.util.CommandLineParser
+import scala.tools.nsc.{Global, Settings, CompilerCommand}
+import scala.tools.nsc.reporters.ConsoleReporter
+
+object Test extends DirectTest {
+
+ override def extraSettings: String = "-usejavacp -Xprint:parser -Ystop-after:parser -d " + testOutput.path
+
+ override def code = """
+ trait Greeting {
+ val name: String
+ val msg = "How are you, "+name
+ }
+ class C(i: Int) extends {
+ val nameElse = "Bob"
+ } with Greeting {
+ val name = "avc"
+ println(msg)
+ }
+
+ object Test extends App {}
+ """.trim
+
+ override def show(): Unit = {
+ // redirect err to out, for logging
+ val prevErr = System.err
+ System.setErr(System.out)
+ compile()
+ System.setErr(prevErr)
+ }
+
+ override def newCompiler(args: String*): Global = {
+
+ val settings = new Settings()
+ settings.Xprintpos.value = true
+ val command = new CompilerCommand((CommandLineParser tokenize extraSettings) ++ args.toList, settings)
+ new Global(command.settings, new ConsoleReporter(settings)) with interactive.RangePositions
+ }
+}
diff --git a/test/files/run/t5713/Impls_Macros_1.scala b/test/files/run/t5713/Impls_Macros_1.scala
index c041d36523..12c3da2ff0 100644
--- a/test/files/run/t5713/Impls_Macros_1.scala
+++ b/test/files/run/t5713/Impls_Macros_1.scala
@@ -1,7 +1,7 @@
package m
import language.experimental.macros
-import scala.reflect.makro.Context
+import scala.reflect.macros.Context
object Level extends Enumeration {
val Error = Value(5)
diff --git a/test/files/run/t5866.check b/test/files/run/t5866.check
new file mode 100644
index 0000000000..9f4ec729a7
--- /dev/null
+++ b/test/files/run/t5866.check
@@ -0,0 +1,2 @@
+0.0
+Foo(0.0)
diff --git a/test/files/run/t5866.scala b/test/files/run/t5866.scala
new file mode 100644
index 0000000000..120773effa
--- /dev/null
+++ b/test/files/run/t5866.scala
@@ -0,0 +1,11 @@
+class Foo(val d: Double) extends AnyVal {
+ override def toString = s"Foo($d)"
+}
+object Test {
+ def main(args: Array[String]): Unit = {
+ val d: Double = null.asInstanceOf[Double]
+ println(d)
+ val f: Foo = null.asInstanceOf[Foo]
+ println(f)
+ }
+}
diff --git a/test/files/run/t6028.check b/test/files/run/t6028.check
index 9dffcbadd4..c10bd76500 100644
--- a/test/files/run/t6028.check
+++ b/test/files/run/t6028.check
@@ -15,16 +15,16 @@ package <empty> {
}
};
def bar(barParam: Int): Object = {
- @volatile var MethodLocalObject$module: scala.runtime.VolatileObjectRef = new scala.runtime.VolatileObjectRef(<empty>);
+ @volatile var MethodLocalObject$module: runtime.VolatileObjectRef = new runtime.VolatileObjectRef(<empty>);
T.this.MethodLocalObject$1(barParam, MethodLocalObject$module)
};
def tryy(tryyParam: Int): Function0 = {
- var tryyLocal: scala.runtime.IntRef = new scala.runtime.IntRef(0);
+ var tryyLocal: runtime.IntRef = new runtime.IntRef(0);
{
(new anonymous class $anonfun$tryy$1(T.this, tryyParam, tryyLocal): Function0)
}
};
- @SerialVersionUID(0) final <synthetic> class $anonfun$foo$1 extends scala.runtime.AbstractFunction0$mcI$sp with Serializable {
+ @SerialVersionUID(0) final <synthetic> class $anonfun$foo$1 extends runtime.AbstractFunction0$mcI$sp with Serializable {
def <init>($outer: T, methodParam$1: Int, methodLocal$1: Int): anonymous class $anonfun$foo$1 = {
$anonfun$foo$1.super.<init>();
()
@@ -41,7 +41,7 @@ package <empty> {
<synthetic> <stable> <hidden> def T$MethodLocalTrait$$$outer(): T
};
object MethodLocalObject$2 extends Object with T#MethodLocalTrait$1 {
- def <init>($outer: T, barParam$1: Int): ... = {
+ def <init>($outer: T, barParam$1: Int): T#MethodLocalObject$2.type = {
MethodLocalObject$2.super.<init>();
MethodLocalObject$2.this.$asInstanceOf[T#MethodLocalTrait$1$class]()./*MethodLocalTrait$1$class*/$init$(barParam$1);
()
@@ -50,9 +50,9 @@ package <empty> {
<synthetic> <stable> <hidden> def T$MethodLocalObject$$$outer(): T = MethodLocalObject$2.this.$outer;
<synthetic> <stable> <hidden> def T$MethodLocalTrait$$$outer(): T = MethodLocalObject$2.this.$outer
};
- final <stable> private[this] def MethodLocalObject$1(barParam$1: Int, MethodLocalObject$module$1: scala.runtime.VolatileObjectRef): ... = {
- MethodLocalObject$module$1.elem = new ...(T.this, barParam$1);
- MethodLocalObject$module$1.elem.$asInstanceOf[...]()
+ final <stable> private[this] def MethodLocalObject$1(barParam$1: Int, MethodLocalObject$module$1: runtime.VolatileObjectRef): T#MethodLocalObject$2.type = {
+ MethodLocalObject$module$1.elem = new T#MethodLocalObject$2.type(T.this, barParam$1);
+ MethodLocalObject$module$1.elem.$asInstanceOf[T#MethodLocalObject$2.type]()
};
abstract trait MethodLocalTrait$1$class extends Object with T#MethodLocalTrait$1 {
def /*MethodLocalTrait$1$class*/$init$(barParam$1: Int): Unit = {
@@ -60,8 +60,8 @@ package <empty> {
};
scala.this.Predef.print(scala.Int.box(barParam$1))
};
- @SerialVersionUID(0) final <synthetic> class $anonfun$tryy$1 extends scala.runtime.AbstractFunction0$mcV$sp with Serializable {
- def <init>($outer: T, tryyParam$1: Int, tryyLocal$1: scala.runtime.IntRef): anonymous class $anonfun$tryy$1 = {
+ @SerialVersionUID(0) final <synthetic> class $anonfun$tryy$1 extends runtime.AbstractFunction0$mcV$sp with Serializable {
+ def <init>($outer: T, tryyParam$1: Int, tryyLocal$1: runtime.IntRef): anonymous class $anonfun$tryy$1 = {
$anonfun$tryy$1.super.<init>();
()
};
@@ -76,7 +76,7 @@ package <empty> {
scala.runtime.BoxedUnit.UNIT
};
<synthetic> <paramaccessor> private[this] val tryyParam$1: Int = _;
- <synthetic> <paramaccessor> private[this] val tryyLocal$1: scala.runtime.IntRef = _
+ <synthetic> <paramaccessor> private[this] val tryyLocal$1: runtime.IntRef = _
}
}
}
diff --git a/test/files/run/toolbox_typecheck_inferimplicitvalue.check b/test/files/run/toolbox_typecheck_inferimplicitvalue.check
new file mode 100644
index 0000000000..23ba536aff
--- /dev/null
+++ b/test/files/run/toolbox_typecheck_inferimplicitvalue.check
@@ -0,0 +1 @@
+C.MC
diff --git a/test/files/run/toolbox_typecheck_inferimplicitvalue.scala b/test/files/run/toolbox_typecheck_inferimplicitvalue.scala
new file mode 100644
index 0000000000..3c5c994ac9
--- /dev/null
+++ b/test/files/run/toolbox_typecheck_inferimplicitvalue.scala
@@ -0,0 +1,13 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
+
+class C
+object C {
+ implicit object MC extends C
+}
+
+object Test extends App {
+ val tb = cm.mkToolBox()
+ println(tb.inferImplicitValue(typeOf[C]))
+} \ No newline at end of file
diff --git a/test/files/run/toolbox_typecheck_macrosdisabled.check b/test/files/run/toolbox_typecheck_macrosdisabled.check
index f4a67e3054..9cf101c69d 100644
--- a/test/files/run/toolbox_typecheck_macrosdisabled.check
+++ b/test/files/run/toolbox_typecheck_macrosdisabled.check
@@ -8,11 +8,6 @@
()
};
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))
diff --git a/test/files/run/toolbox_typecheck_macrosdisabled2.check b/test/files/run/toolbox_typecheck_macrosdisabled2.check
index 53041e328d..d344e33180 100644
--- a/test/files/run/toolbox_typecheck_macrosdisabled2.check
+++ b/test/files/run/toolbox_typecheck_macrosdisabled2.check
@@ -8,11 +8,6 @@
()
};
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.staticPackage("scala")), $u.newTermName("Array")), $u.newTermName("apply")), scala.collection.immutable.List.apply[$u.Literal]($u.Literal.apply($u.Constant.apply(2))))
@@ -28,7 +23,7 @@
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.staticPackage("scala").asModuleSymbol.moduleClass), $m.staticClass("scala.Array"), scala.collection.immutable.List.apply[$u.Type]($m.staticClass("scala.Int").asTypeSymbol.asTypeConstructor))
+ $u.TypeRef.apply($u.ThisType.apply($m.staticPackage("scala").asModule.moduleClass), $m.staticClass("scala.Array"), scala.collection.immutable.List.apply[$u.Type]($m.staticClass("scala.Int").asType.toTypeConstructor))
}
};
new $typecreator2()
diff --git a/test/files/run/typetags_serialize.check b/test/files/run/typetags_serialize.check
new file mode 100644
index 0000000000..1b898250fb
--- /dev/null
+++ b/test/files/run/typetags_serialize.check
@@ -0,0 +1,2 @@
+java.io.NotSerializableException: scala.reflect.base.TypeTags$PredefTypeCreator
+java.io.NotSerializableException: Test$$typecreator1$1
diff --git a/test/files/run/typetags_serialize.scala b/test/files/run/typetags_serialize.scala
new file mode 100644
index 0000000000..3917b69a93
--- /dev/null
+++ b/test/files/run/typetags_serialize.scala
@@ -0,0 +1,28 @@
+import java.io._
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{currentMirror => cm}
+
+object Test extends App {
+ def test(tag: TypeTag[_]) =
+ try {
+ val fout = new ByteArrayOutputStream()
+ val out = new ObjectOutputStream(fout)
+ out.writeObject(tag)
+ out.close()
+ fout.close()
+
+ val fin = new ByteArrayInputStream(fout.toByteArray)
+ val in = new ObjectInputStream(fin)
+ val retag = in.readObject().asInstanceOf[scala.reflect.basis.TypeTag[_]].in(cm)
+ in.close()
+ fin.close()
+
+ println(retag)
+ } catch {
+ case ex: Exception =>
+ println(ex)
+ }
+
+ test(implicitly[TypeTag[Int]])
+ test(implicitly[TypeTag[String]])
+} \ No newline at end of file
diff --git a/test/pending/run/macro-expand-default/Impls_1.scala b/test/pending/run/macro-expand-default/Impls_1.scala
index a539982b45..7cf8d59c75 100644
--- a/test/pending/run/macro-expand-default/Impls_1.scala
+++ b/test/pending/run/macro-expand-default/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx)(x: c.Expr[Int], y: c.Expr[Int]) = {
diff --git a/test/pending/run/macro-expand-implicit-macro-defeats-type-inference/Impls_1.scala b/test/pending/run/macro-expand-implicit-macro-defeats-type-inference/Impls_1.scala
index 599ddf5ed9..0dac664d38 100644
--- a/test/pending/run/macro-expand-implicit-macro-defeats-type-inference/Impls_1.scala
+++ b/test/pending/run/macro-expand-implicit-macro-defeats-type-inference/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.Context
+import scala.reflect.macros.Context
object Impls {
def foo[T: c.TypeTag](c: Context): c.Expr[List[T]] = c.universe.reify {
diff --git a/test/pending/run/macro-expand-macro-has-context-bound/Impls_1.scala b/test/pending/run/macro-expand-macro-has-context-bound/Impls_1.scala
index 3cee65ce72..be00fd0d8a 100644
--- a/test/pending/run/macro-expand-macro-has-context-bound/Impls_1.scala
+++ b/test/pending/run/macro-expand-macro-has-context-bound/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo[U](c: Ctx)(x: c.Expr[U])(evidence: c.Expr[Numeric[U]]) = {
diff --git a/test/pending/run/macro-expand-named/Impls_1.scala b/test/pending/run/macro-expand-named/Impls_1.scala
index a539982b45..7cf8d59c75 100644
--- a/test/pending/run/macro-expand-named/Impls_1.scala
+++ b/test/pending/run/macro-expand-named/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx)(x: c.Expr[Int], y: c.Expr[Int]) = {
diff --git a/test/pending/run/macro-expand-tparams-prefix-e1/Impls_1.scala b/test/pending/run/macro-expand-tparams-prefix-e1/Impls_1.scala
index d7df919552..eff11d4a20 100644
--- a/test/pending/run/macro-expand-tparams-prefix-e1/Impls_1.scala
+++ b/test/pending/run/macro-expand-tparams-prefix-e1/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{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] = {
diff --git a/test/pending/run/macro-expand-tparams-prefix-f1/Impls_1.scala b/test/pending/run/macro-expand-tparams-prefix-f1/Impls_1.scala
index d7df919552..eff11d4a20 100644
--- a/test/pending/run/macro-expand-tparams-prefix-f1/Impls_1.scala
+++ b/test/pending/run/macro-expand-tparams-prefix-f1/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{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] = {
diff --git a/test/pending/run/macro-quasiinvalidbody-a/Impls_1.scala b/test/pending/run/macro-quasiinvalidbody-a/Impls_1.scala
index 0da37cd5c0..daedde4021 100644
--- a/test/pending/run/macro-quasiinvalidbody-a/Impls_1.scala
+++ b/test/pending/run/macro-quasiinvalidbody-a/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
trait Impls {
def impl(c: Ctx)(x: c.Expr[Any]) = x
diff --git a/test/pending/run/macro-quasiinvalidbody-a/Macros_Test_2.scala b/test/pending/run/macro-quasiinvalidbody-a/Macros_Test_2.scala
index 04a43080bd..27140a77ad 100644
--- a/test/pending/run/macro-quasiinvalidbody-a/Macros_Test_2.scala
+++ b/test/pending/run/macro-quasiinvalidbody-a/Macros_Test_2.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Macros extends Impls {
def foo(x: Any) = macro impl
diff --git a/test/pending/run/macro-quasiinvalidbody-b/Impls_1.scala b/test/pending/run/macro-quasiinvalidbody-b/Impls_1.scala
index d84d04974f..246fc9f904 100644
--- a/test/pending/run/macro-quasiinvalidbody-b/Impls_1.scala
+++ b/test/pending/run/macro-quasiinvalidbody-b/Impls_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
trait ImplContainer {
object Impls {
diff --git a/test/pending/run/macro-quasiinvalidbody-b/Macros_Test_2.scala b/test/pending/run/macro-quasiinvalidbody-b/Macros_Test_2.scala
index 82f88b62e4..da9445ac52 100644
--- a/test/pending/run/macro-quasiinvalidbody-b/Macros_Test_2.scala
+++ b/test/pending/run/macro-quasiinvalidbody-b/Macros_Test_2.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Macros extends ImplContainer {
def foo(x: Any) = macro Impls.foo
diff --git a/test/pending/run/macro-reify-array/Macros_1.scala b/test/pending/run/macro-reify-array/Macros_1.scala
index 4b4cb05884..8fa945b9c6 100644
--- a/test/pending/run/macro-reify-array/Macros_1.scala
+++ b/test/pending/run/macro-reify-array/Macros_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Macros {
def foo[T](s: String) = macro Impls.foo[T]
diff --git a/test/pending/run/macro-reify-tagful-b/Macros_1.scala b/test/pending/run/macro-reify-tagful-b/Macros_1.scala
index f730bb51f1..af078d93b4 100644
--- a/test/pending/run/macro-reify-tagful-b/Macros_1.scala
+++ b/test/pending/run/macro-reify-tagful-b/Macros_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Macros {
def foo[T](s: T) = macro Impls.foo[List[T]]
diff --git a/test/pending/run/macro-reify-tagless-b/Impls_Macros_1.scala b/test/pending/run/macro-reify-tagless-b/Impls_Macros_1.scala
index 2c5079ea54..a581c47026 100644
--- a/test/pending/run/macro-reify-tagless-b/Impls_Macros_1.scala
+++ b/test/pending/run/macro-reify-tagless-b/Impls_Macros_1.scala
@@ -1,4 +1,4 @@
-import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.macros.{Context => Ctx}
object Macros {
def foo[T](s: T) = macro Impls.foo[List[T]]
diff --git a/test/pending/run/t4560.scala b/test/pending/run/t4560.scala
deleted file mode 100644
index fe62136319..0000000000
--- a/test/pending/run/t4560.scala
+++ /dev/null
@@ -1,9 +0,0 @@
-trait B {
- this: Test.type =>
-
- def y = new { def f() = () }
- def fail() = y.f()
-}
-object Test extends B {
- def main(args: Array[String]): Unit = fail()
-} \ No newline at end of file
diff --git a/test/pending/run/t5692/Impls_Macros_1.scala b/test/pending/run/t5692/Impls_Macros_1.scala
index 7d0e788bd6..94bcffbcaf 100644
--- a/test/pending/run/t5692/Impls_Macros_1.scala
+++ b/test/pending/run/t5692/Impls_Macros_1.scala
@@ -1,7 +1,7 @@
-import scala.reflect.makro.Context
+import scala.reflect.macros.Context
object Impls {
- def impl[A](c: reflect.makro.Context) = c.universe.reify(())
+ def impl[A](c: reflect.macros.Context) = c.universe.reify(())
}
object Macros {
diff --git a/test/scaladoc/run/SI-6140.check b/test/scaladoc/run/SI-6140.check
new file mode 100644
index 0000000000..619c56180b
--- /dev/null
+++ b/test/scaladoc/run/SI-6140.check
@@ -0,0 +1 @@
+Done.
diff --git a/test/scaladoc/run/SI-6140.scala b/test/scaladoc/run/SI-6140.scala
new file mode 100644
index 0000000000..4bb9a4dc85
--- /dev/null
+++ b/test/scaladoc/run/SI-6140.scala
@@ -0,0 +1,18 @@
+import scala.tools.nsc.doc.model._
+import scala.tools.partest.ScaladocModelTest
+
+object Test extends ScaladocModelTest {
+
+ // This caused an infinite recursion in method inline() in CommentFactory.scala
+ override def code = """
+ /** {{ code? }} */
+ class C
+ """
+
+ // no need for special settings
+ def scaladocSettings = ""
+
+ def testModel(rootPackage: Package) = {
+ // if it doesn't hang, the test is passed
+ }
+}