summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/disabled/neg/macro-deprecate-dont-touch-backquotedidents.check (renamed from test/files/neg/macro-deprecate-dont-touch-backquotedidents.check)0
-rw-r--r--test/disabled/neg/macro-deprecate-dont-touch-backquotedidents.flags (renamed from test/files/neg/macro-deprecate-dont-touch-backquotedidents.flags)0
-rw-r--r--test/disabled/neg/macro-deprecate-dont-touch-backquotedidents.scala (renamed from test/files/neg/macro-deprecate-dont-touch-backquotedidents.scala)0
-rw-r--r--test/disabled/neg/macro-invalidshape-d.check (renamed from test/files/neg/macro-invalidshape-d.check)0
-rw-r--r--test/disabled/neg/macro-invalidshape-d.flags1
-rw-r--r--test/disabled/neg/macro-invalidshape-d/Impls_1.scala (renamed from test/files/neg/macro-invalidshape-d/Impls_1.scala)0
-rw-r--r--test/disabled/neg/macro-invalidshape-d/Macros_Test_2.scala (renamed from test/files/neg/macro-invalidshape-d/Macros_Test_2.scala)0
-rw-r--r--test/disabled/neg/macro-keyword-bind.check (renamed from test/files/neg/macro-keyword-bind.check)0
-rw-r--r--test/disabled/neg/macro-keyword-bind.flags (renamed from test/files/neg/macro-keyword-bind.flags)0
-rw-r--r--test/disabled/neg/macro-keyword-bind.scala (renamed from test/files/neg/macro-keyword-bind.scala)0
-rw-r--r--test/disabled/neg/macro-keyword-class1.check (renamed from test/files/neg/macro-keyword-class1.check)0
-rw-r--r--test/disabled/neg/macro-keyword-class1.flags (renamed from test/files/neg/macro-keyword-class1.flags)0
-rw-r--r--test/disabled/neg/macro-keyword-class1.scala (renamed from test/files/neg/macro-keyword-class1.scala)0
-rw-r--r--test/disabled/neg/macro-keyword-class2.check (renamed from test/files/neg/macro-keyword-class2.check)0
-rw-r--r--test/disabled/neg/macro-keyword-class2.flags (renamed from test/files/neg/macro-keyword-class2.flags)0
-rw-r--r--test/disabled/neg/macro-keyword-class2.scala (renamed from test/files/neg/macro-keyword-class2.scala)0
-rw-r--r--test/disabled/neg/macro-keyword-object1.check (renamed from test/files/neg/macro-keyword-object1.check)0
-rw-r--r--test/disabled/neg/macro-keyword-object1.flags (renamed from test/files/neg/macro-keyword-object1.flags)0
-rw-r--r--test/disabled/neg/macro-keyword-object1.scala (renamed from test/files/neg/macro-keyword-object1.scala)0
-rw-r--r--test/disabled/neg/macro-keyword-object2.check (renamed from test/files/neg/macro-keyword-object2.check)0
-rw-r--r--test/disabled/neg/macro-keyword-object2.flags (renamed from test/files/neg/macro-keyword-object2.flags)0
-rw-r--r--test/disabled/neg/macro-keyword-object2.scala (renamed from test/files/neg/macro-keyword-object2.scala)0
-rw-r--r--test/disabled/neg/macro-keyword-package1.check (renamed from test/files/neg/macro-keyword-package1.check)0
-rw-r--r--test/disabled/neg/macro-keyword-package1.flags (renamed from test/files/neg/macro-keyword-package1.flags)0
-rw-r--r--test/disabled/neg/macro-keyword-package1.scala (renamed from test/files/neg/macro-keyword-package1.scala)0
-rw-r--r--test/disabled/neg/macro-keyword-package2.check (renamed from test/files/neg/macro-keyword-package2.check)0
-rw-r--r--test/disabled/neg/macro-keyword-package2.flags (renamed from test/files/neg/macro-keyword-package2.flags)0
-rw-r--r--test/disabled/neg/macro-keyword-package2.scala (renamed from test/files/neg/macro-keyword-package2.scala)0
-rw-r--r--test/disabled/neg/macro-keyword-trait1.check (renamed from test/files/neg/macro-keyword-trait1.check)0
-rw-r--r--test/disabled/neg/macro-keyword-trait1.flags (renamed from test/files/neg/macro-keyword-trait1.flags)0
-rw-r--r--test/disabled/neg/macro-keyword-trait1.scala (renamed from test/files/neg/macro-keyword-trait1.scala)0
-rw-r--r--test/disabled/neg/macro-keyword-trait2.check (renamed from test/files/neg/macro-keyword-trait2.check)0
-rw-r--r--test/disabled/neg/macro-keyword-trait2.flags (renamed from test/files/neg/macro-keyword-trait2.flags)0
-rw-r--r--test/disabled/neg/macro-keyword-trait2.scala (renamed from test/files/neg/macro-keyword-trait2.scala)0
-rw-r--r--test/disabled/neg/macro-keyword-type.check (renamed from test/files/neg/macro-keyword-type.check)0
-rw-r--r--test/disabled/neg/macro-keyword-type.flags (renamed from test/files/neg/macro-keyword-type.flags)0
-rw-r--r--test/disabled/neg/macro-keyword-type.scala (renamed from test/files/neg/macro-keyword-type.scala)0
-rw-r--r--test/disabled/neg/macro-keyword-val.check (renamed from test/files/neg/macro-keyword-val.check)0
-rw-r--r--test/disabled/neg/macro-keyword-val.flags (renamed from test/files/neg/macro-keyword-val.flags)0
-rw-r--r--test/disabled/neg/macro-keyword-val.scala (renamed from test/files/neg/macro-keyword-val.scala)0
-rw-r--r--test/disabled/neg/macro-keyword-var.check (renamed from test/files/neg/macro-keyword-var.check)0
-rw-r--r--test/disabled/neg/macro-keyword-var.flags1
-rw-r--r--test/disabled/neg/macro-keyword-var.scala (renamed from test/files/neg/macro-keyword-var.scala)0
-rw-r--r--test/disabled/neg/macro-without-xmacros-a.check (renamed from test/files/neg/macro-without-xmacros-a.check)0
-rw-r--r--test/disabled/neg/macro-without-xmacros-a/Impls_1.scala (renamed from test/files/neg/macro-without-xmacros-a/Impls_1.scala)0
-rw-r--r--test/disabled/neg/macro-without-xmacros-a/Macros_2.scala (renamed from test/files/neg/macro-without-xmacros-a/Macros_2.scala)0
-rw-r--r--test/disabled/neg/macro-without-xmacros-a/Test_3.scala (renamed from test/files/neg/macro-without-xmacros-a/Test_3.scala)0
-rw-r--r--test/disabled/neg/macro-without-xmacros-b.check (renamed from test/files/neg/macro-without-xmacros-b.check)0
-rw-r--r--test/disabled/neg/macro-without-xmacros-b/Impls_1.scala (renamed from test/files/neg/macro-without-xmacros-b/Impls_1.scala)0
-rw-r--r--test/disabled/neg/macro-without-xmacros-b/Macros_2.scala (renamed from test/files/neg/macro-without-xmacros-b/Macros_2.scala)0
-rw-r--r--test/disabled/neg/macro-without-xmacros-b/Test_3.scala (renamed from test/files/neg/macro-without-xmacros-b/Test_3.scala)0
-rw-r--r--test/disabled/run/macro-reflective-mamd-normal-mi.check (renamed from test/files/run/macro-reflective-mamd-normal-mi.flags)0
-rw-r--r--test/disabled/run/macro-reflective-mamd-normal-mi.flags0
-rw-r--r--test/disabled/run/macro-reflective-mamd-normal-mi/Impls_1.scala (renamed from test/files/run/macro-reflective-mamd-normal-mi/Impls_1.scala)0
-rw-r--r--test/disabled/run/macro-reflective-mamd-normal-mi/Macros_Test_2.scala (renamed from test/files/run/macro-reflective-mamd-normal-mi/Macros_Test_2.scala)0
-rw-r--r--test/files/buildmanager/t2650_1/t2650_1.check1
-rw-r--r--test/files/buildmanager/t2657/t2657.check1
-rw-r--r--[-rwxr-xr-x]test/files/jvm/interpreter.check741
-rw-r--r--test/files/neg/macro-argtype-mismatch.flags2
-rw-r--r--test/files/neg/macro-basic-mamdmi.flags2
-rw-r--r--test/files/neg/macro-cyclic.flags2
-rw-r--r--test/files/neg/macro-invalidimpl-a.flags2
-rw-r--r--test/files/neg/macro-invalidimpl-b.flags2
-rw-r--r--test/files/neg/macro-invalidimpl-c.flags2
-rw-r--r--test/files/neg/macro-invalidimpl-d.flags2
-rw-r--r--test/files/neg/macro-invalidimpl-e.flags2
-rw-r--r--test/files/neg/macro-invalidimpl-f.flags2
-rw-r--r--test/files/neg/macro-invalidimpl-g.flags2
-rw-r--r--test/files/neg/macro-invalidimpl-h.flags2
-rw-r--r--test/files/neg/macro-invalidret-nontree.flags2
-rw-r--r--test/files/neg/macro-invalidret-nonuniversetree.flags2
-rw-r--r--test/files/neg/macro-invalidshape-a.flags2
-rw-r--r--test/files/neg/macro-invalidshape-b.flags2
-rw-r--r--test/files/neg/macro-invalidshape-c.flags2
-rw-r--r--test/files/neg/macro-invalidshape-d.flags1
-rw-r--r--test/files/neg/macro-invalidsig-context-bounds.flags2
-rw-r--r--test/files/neg/macro-invalidsig-ctx-badargc.flags2
-rw-r--r--test/files/neg/macro-invalidsig-ctx-badtype.flags2
-rw-r--r--test/files/neg/macro-invalidsig-ctx-badvarargs.flags2
-rw-r--r--test/files/neg/macro-invalidsig-ctx-noctx.flags2
-rw-r--r--test/files/neg/macro-invalidsig-implicit-params.flags2
-rw-r--r--test/files/neg/macro-invalidsig-params-badargc.flags2
-rw-r--r--test/files/neg/macro-invalidsig-params-badtype.flags2
-rw-r--r--test/files/neg/macro-invalidsig-params-badvarargs.flags2
-rw-r--r--test/files/neg/macro-invalidsig-params-namemismatch.flags2
-rw-r--r--test/files/neg/macro-invalidsig-tparams-badtype.flags2
-rw-r--r--test/files/neg/macro-invalidsig-tparams-bounds-a.flags2
-rw-r--r--test/files/neg/macro-invalidsig-tparams-bounds-b.flags2
-rw-r--r--test/files/neg/macro-invalidsig-tparams-notparams-a.flags2
-rw-r--r--test/files/neg/macro-invalidsig-tparams-notparams-b.flags2
-rw-r--r--test/files/neg/macro-invalidsig-tparams-notparams-c.flags2
-rw-r--r--test/files/neg/macro-invalidusage-badargs.flags2
-rw-r--r--test/files/neg/macro-invalidusage-badbounds.flags2
-rw-r--r--test/files/neg/macro-invalidusage-badtargs.flags2
-rw-r--r--test/files/neg/macro-invalidusage-methodvaluesyntax.flags2
-rw-r--r--test/files/neg/macro-keyword-var.flags1
-rw-r--r--test/files/neg/macro-noexpand.flags2
-rw-r--r--test/files/neg/macro-noncompilertree.flags2
-rw-r--r--test/files/neg/macro-nontree.flags2
-rw-r--r--test/files/neg/macro-nontypeablebody.flags2
-rw-r--r--test/files/neg/macro-override-macro-overrides-abstract-method-a.flags2
-rw-r--r--test/files/neg/macro-override-macro-overrides-abstract-method-b.flags2
-rw-r--r--test/files/neg/macro-override-method-overrides-macro.flags2
-rw-r--r--test/files/pos/generic-sigs.scala4
-rw-r--r--test/files/pos/hkarray.flags2
-rw-r--r--test/files/pos/t1439.flags2
-rw-r--r--test/files/run/constrained-types.check7
-rw-r--r--test/files/run/dynamic-proxy.check20
-rw-r--r--test/files/run/dynamic-proxy.flags1
-rw-r--r--test/files/run/dynamic-proxy.scala72
-rw-r--r--test/files/run/existentials-in-compiler.check16
-rw-r--r--test/files/run/macro-abort-fresh.flags2
-rw-r--r--test/files/run/macro-basic-ma-md-mi.flags2
-rw-r--r--test/files/run/macro-basic-ma-mdmi.flags2
-rw-r--r--test/files/run/macro-basic-mamd-mi.flags2
-rw-r--r--test/files/run/macro-bodyexpandstoimpl.flags2
-rw-r--r--test/files/run/macro-declared-in-annotation.flags2
-rw-r--r--test/files/run/macro-declared-in-anonymous.flags2
-rw-r--r--test/files/run/macro-declared-in-block.flags2
-rw-r--r--test/files/run/macro-declared-in-class-class.flags2
-rw-r--r--test/files/run/macro-declared-in-class-object.flags2
-rw-r--r--test/files/run/macro-declared-in-class.flags2
-rw-r--r--test/files/run/macro-declared-in-default-param.flags2
-rw-r--r--test/files/run/macro-declared-in-implicit-class.flags2
-rw-r--r--test/files/run/macro-declared-in-method.flags2
-rw-r--r--test/files/run/macro-declared-in-object-class.flags2
-rw-r--r--test/files/run/macro-declared-in-object-object.flags2
-rw-r--r--test/files/run/macro-declared-in-object.flags2
-rw-r--r--test/files/run/macro-declared-in-package-object.flags2
-rw-r--r--test/files/run/macro-declared-in-refinement.flags2
-rw-r--r--test/files/run/macro-declared-in-trait.flags2
-rw-r--r--test/files/run/macro-def-infer-return-type-a.flags2
-rw-r--r--test/files/run/macro-def-infer-return-type-b.flags2
-rw-r--r--test/files/run/macro-def-infer-return-type-c.flags2
-rw-r--r--test/files/run/macro-def-path-dependent-a.flags2
-rw-r--r--test/files/run/macro-def-path-dependent-b.flags2
-rw-r--r--test/files/run/macro-def-path-dependent-c.flags2
-rw-r--r--test/files/run/macro-def-path-dependent-d.flags2
-rw-r--r--test/files/run/macro-expand-implicit-macro-has-implicit.flags2
-rw-r--r--test/files/run/macro-expand-implicit-macro-is-implicit.flags2
-rw-r--r--test/files/run/macro-expand-implicit-macro-is-val.flags2
-rw-r--r--test/files/run/macro-expand-implicit-macro-is-view.flags2
-rw-r--r--test/files/run/macro-expand-multiple-arglists.flags2
-rw-r--r--test/files/run/macro-expand-nullary-generic.flags2
-rw-r--r--test/files/run/macro-expand-nullary-nongeneric.flags2
-rw-r--r--test/files/run/macro-expand-overload.flags2
-rw-r--r--test/files/run/macro-expand-override.flags2
-rw-r--r--test/files/run/macro-expand-recursive.flags2
-rw-r--r--test/files/run/macro-expand-tparams-bounds-a.flags2
-rw-r--r--test/files/run/macro-expand-tparams-bounds-b.flags2
-rw-r--r--test/files/run/macro-expand-tparams-explicit.flags2
-rw-r--r--test/files/run/macro-expand-tparams-implicit.flags2
-rw-r--r--test/files/run/macro-expand-tparams-only-in-impl.flags2
-rw-r--r--test/files/run/macro-expand-tparams-optional.flags2
-rw-r--r--test/files/run/macro-expand-tparams-prefix-a.flags2
-rw-r--r--test/files/run/macro-expand-tparams-prefix-b.flags2
-rw-r--r--test/files/run/macro-expand-tparams-prefix-c1.flags2
-rw-r--r--test/files/run/macro-expand-tparams-prefix-c2.flags2
-rw-r--r--test/files/run/macro-expand-tparams-prefix-d1.flags2
-rw-r--r--test/files/run/macro-expand-varargs-explicit-over-nonvarargs-bad.flags2
-rw-r--r--test/files/run/macro-expand-varargs-explicit-over-nonvarargs-good.flags2
-rw-r--r--test/files/run/macro-expand-varargs-explicit-over-varargs.flags2
-rw-r--r--test/files/run/macro-expand-varargs-implicit-over-nonvarargs.flags2
-rw-r--r--test/files/run/macro-expand-varargs-implicit-over-varargs.flags2
-rw-r--r--test/files/run/macro-impl-default-params.flags2
-rw-r--r--test/files/run/macro-impl-rename-context.flags2
-rw-r--r--test/files/run/macro-invalidret-doesnt-conform-to-def-rettype.flags2
-rw-r--r--test/files/run/macro-invalidret-doesnt-conform-to-impl-rettype.flags2
-rw-r--r--test/files/run/macro-invalidret-nontypeable.flags2
-rw-r--r--test/files/run/macro-invalidusage-badret.flags2
-rw-r--r--test/files/run/macro-invalidusage-partialapplication.flags2
-rw-r--r--test/files/run/macro-openmacros.flags2
-rw-r--r--test/files/run/macro-quasiinvalidbody-c.flags2
-rw-r--r--test/files/run/macro-range.flags2
-rw-r--r--test/files/run/macro-reflective-ma-normal-mdmi.flags2
-rw-r--r--test/files/run/macro-reflective-mamd-normal-mi.check1
-rw-r--r--test/files/run/macro-reify-basic.flags2
-rw-r--r--test/files/run/macro-reify-eval-eval.flags2
-rw-r--r--test/files/run/macro-reify-eval-outside-reify.flags2
-rw-r--r--test/files/run/macro-reify-freevars.flags2
-rw-r--r--test/files/run/macro-reify-nested-a.flags2
-rw-r--r--test/files/run/macro-reify-nested-b.flags2
-rw-r--r--test/files/run/macro-reify-ref-to-packageless.flags2
-rw-r--r--test/files/run/macro-reify-tagful-a.flags2
-rw-r--r--test/files/run/macro-reify-tagless-a.flags2
-rw-r--r--test/files/run/macro-reify-unreify.flags2
-rw-r--r--test/files/run/macro-reify-value-outside-reify.flags2
-rw-r--r--test/files/run/macro-repl-basic.check105
-rw-r--r--test/files/run/macro-repl-basic.scala4
-rw-r--r--test/files/run/macro-repl-dontexpand.scala4
-rw-r--r--test/files/run/macro-rettype-mismatch.flags2
-rw-r--r--test/files/run/macro-settings.flags2
-rw-r--r--test/files/run/macro-sip19-revised.flags2
-rw-r--r--test/files/run/macro-sip19.flags2
-rw-r--r--test/files/run/macro-typecheck-implicitsdisabled.flags2
-rw-r--r--test/files/run/macro-typecheck-macrosdisabled.flags2
-rw-r--r--test/files/run/macro-undetparams-consfromsls.flags2
-rw-r--r--test/files/run/macro-undetparams-implicitval.flags2
-rw-r--r--test/files/run/macro-undetparams-macroitself.flags2
-rw-r--r--test/files/run/repl-parens.check2
-rw-r--r--test/files/run/repl-parens.scala4
-rw-r--r--test/files/run/repl-power.check65
-rw-r--r--test/files/run/t4172.check2
-rw-r--r--test/files/run/t4317/S_1.scala2
-rw-r--r--test/files/run/t4710.check1
-rw-r--r--test/scaladoc/resources/implicits-base-res.scala143
-rw-r--r--test/scaladoc/resources/implicits-chaining-res.scala48
-rw-r--r--test/scaladoc/resources/implicits-elimination-res.scala9
-rw-r--r--test/scaladoc/resources/implicits-scopes-res.scala51
-rw-r--r--test/scaladoc/run/SI-5373.check2
-rw-r--r--test/scaladoc/run/SI-5373.scala6
-rw-r--r--test/scaladoc/run/implicits-base.check1
-rw-r--r--test/scaladoc/run/implicits-base.scala179
-rw-r--r--test/scaladoc/run/implicits-chaining.check1
-rw-r--r--test/scaladoc/run/implicits-chaining.scala64
-rw-r--r--test/scaladoc/run/implicits-elimination.check1
-rw-r--r--test/scaladoc/run/implicits-elimination.scala22
-rw-r--r--test/scaladoc/run/implicits-scopes.check1
-rw-r--r--test/scaladoc/run/implicits-scopes.scala76
-rw-r--r--test/scaladoc/scalacheck/CommentFactoryTest.scala5
220 files changed, 1318 insertions, 606 deletions
diff --git a/test/files/neg/macro-deprecate-dont-touch-backquotedidents.check b/test/disabled/neg/macro-deprecate-dont-touch-backquotedidents.check
index 25df9a6a4a..25df9a6a4a 100644
--- a/test/files/neg/macro-deprecate-dont-touch-backquotedidents.check
+++ b/test/disabled/neg/macro-deprecate-dont-touch-backquotedidents.check
diff --git a/test/files/neg/macro-deprecate-dont-touch-backquotedidents.flags b/test/disabled/neg/macro-deprecate-dont-touch-backquotedidents.flags
index e8fb65d50c..e8fb65d50c 100644
--- a/test/files/neg/macro-deprecate-dont-touch-backquotedidents.flags
+++ b/test/disabled/neg/macro-deprecate-dont-touch-backquotedidents.flags
diff --git a/test/files/neg/macro-deprecate-dont-touch-backquotedidents.scala b/test/disabled/neg/macro-deprecate-dont-touch-backquotedidents.scala
index dee2f1de3b..dee2f1de3b 100644
--- a/test/files/neg/macro-deprecate-dont-touch-backquotedidents.scala
+++ b/test/disabled/neg/macro-deprecate-dont-touch-backquotedidents.scala
diff --git a/test/files/neg/macro-invalidshape-d.check b/test/disabled/neg/macro-invalidshape-d.check
index 031aa653ab..031aa653ab 100644
--- a/test/files/neg/macro-invalidshape-d.check
+++ b/test/disabled/neg/macro-invalidshape-d.check
diff --git a/test/disabled/neg/macro-invalidshape-d.flags b/test/disabled/neg/macro-invalidshape-d.flags
new file mode 100644
index 0000000000..cd66464f2f
--- /dev/null
+++ b/test/disabled/neg/macro-invalidshape-d.flags
@@ -0,0 +1 @@
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidshape-d/Impls_1.scala b/test/disabled/neg/macro-invalidshape-d/Impls_1.scala
index 7b1620d117..7b1620d117 100644
--- a/test/files/neg/macro-invalidshape-d/Impls_1.scala
+++ b/test/disabled/neg/macro-invalidshape-d/Impls_1.scala
diff --git a/test/files/neg/macro-invalidshape-d/Macros_Test_2.scala b/test/disabled/neg/macro-invalidshape-d/Macros_Test_2.scala
index bacd9a6e7c..bacd9a6e7c 100644
--- a/test/files/neg/macro-invalidshape-d/Macros_Test_2.scala
+++ b/test/disabled/neg/macro-invalidshape-d/Macros_Test_2.scala
diff --git a/test/files/neg/macro-keyword-bind.check b/test/disabled/neg/macro-keyword-bind.check
index 1f74cfe5cd..1f74cfe5cd 100644
--- a/test/files/neg/macro-keyword-bind.check
+++ b/test/disabled/neg/macro-keyword-bind.check
diff --git a/test/files/neg/macro-keyword-bind.flags b/test/disabled/neg/macro-keyword-bind.flags
index 7fea2ff901..7fea2ff901 100644
--- a/test/files/neg/macro-keyword-bind.flags
+++ b/test/disabled/neg/macro-keyword-bind.flags
diff --git a/test/files/neg/macro-keyword-bind.scala b/test/disabled/neg/macro-keyword-bind.scala
index a3b1553348..a3b1553348 100644
--- a/test/files/neg/macro-keyword-bind.scala
+++ b/test/disabled/neg/macro-keyword-bind.scala
diff --git a/test/files/neg/macro-keyword-class1.check b/test/disabled/neg/macro-keyword-class1.check
index d8983180ef..d8983180ef 100644
--- a/test/files/neg/macro-keyword-class1.check
+++ b/test/disabled/neg/macro-keyword-class1.check
diff --git a/test/files/neg/macro-keyword-class1.flags b/test/disabled/neg/macro-keyword-class1.flags
index 7fea2ff901..7fea2ff901 100644
--- a/test/files/neg/macro-keyword-class1.flags
+++ b/test/disabled/neg/macro-keyword-class1.flags
diff --git a/test/files/neg/macro-keyword-class1.scala b/test/disabled/neg/macro-keyword-class1.scala
index 8635d1f4f6..8635d1f4f6 100644
--- a/test/files/neg/macro-keyword-class1.scala
+++ b/test/disabled/neg/macro-keyword-class1.scala
diff --git a/test/files/neg/macro-keyword-class2.check b/test/disabled/neg/macro-keyword-class2.check
index 0e4d11bcc4..0e4d11bcc4 100644
--- a/test/files/neg/macro-keyword-class2.check
+++ b/test/disabled/neg/macro-keyword-class2.check
diff --git a/test/files/neg/macro-keyword-class2.flags b/test/disabled/neg/macro-keyword-class2.flags
index 7fea2ff901..7fea2ff901 100644
--- a/test/files/neg/macro-keyword-class2.flags
+++ b/test/disabled/neg/macro-keyword-class2.flags
diff --git a/test/files/neg/macro-keyword-class2.scala b/test/disabled/neg/macro-keyword-class2.scala
index af24a489d0..af24a489d0 100644
--- a/test/files/neg/macro-keyword-class2.scala
+++ b/test/disabled/neg/macro-keyword-class2.scala
diff --git a/test/files/neg/macro-keyword-object1.check b/test/disabled/neg/macro-keyword-object1.check
index cfbd06ffd6..cfbd06ffd6 100644
--- a/test/files/neg/macro-keyword-object1.check
+++ b/test/disabled/neg/macro-keyword-object1.check
diff --git a/test/files/neg/macro-keyword-object1.flags b/test/disabled/neg/macro-keyword-object1.flags
index 7fea2ff901..7fea2ff901 100644
--- a/test/files/neg/macro-keyword-object1.flags
+++ b/test/disabled/neg/macro-keyword-object1.flags
diff --git a/test/files/neg/macro-keyword-object1.scala b/test/disabled/neg/macro-keyword-object1.scala
index 66eb494e6b..66eb494e6b 100644
--- a/test/files/neg/macro-keyword-object1.scala
+++ b/test/disabled/neg/macro-keyword-object1.scala
diff --git a/test/files/neg/macro-keyword-object2.check b/test/disabled/neg/macro-keyword-object2.check
index ede31f13e5..ede31f13e5 100644
--- a/test/files/neg/macro-keyword-object2.check
+++ b/test/disabled/neg/macro-keyword-object2.check
diff --git a/test/files/neg/macro-keyword-object2.flags b/test/disabled/neg/macro-keyword-object2.flags
index 7fea2ff901..7fea2ff901 100644
--- a/test/files/neg/macro-keyword-object2.flags
+++ b/test/disabled/neg/macro-keyword-object2.flags
diff --git a/test/files/neg/macro-keyword-object2.scala b/test/disabled/neg/macro-keyword-object2.scala
index 6f5b9ceacd..6f5b9ceacd 100644
--- a/test/files/neg/macro-keyword-object2.scala
+++ b/test/disabled/neg/macro-keyword-object2.scala
diff --git a/test/files/neg/macro-keyword-package1.check b/test/disabled/neg/macro-keyword-package1.check
index 22c1e11ded..22c1e11ded 100644
--- a/test/files/neg/macro-keyword-package1.check
+++ b/test/disabled/neg/macro-keyword-package1.check
diff --git a/test/files/neg/macro-keyword-package1.flags b/test/disabled/neg/macro-keyword-package1.flags
index 7fea2ff901..7fea2ff901 100644
--- a/test/files/neg/macro-keyword-package1.flags
+++ b/test/disabled/neg/macro-keyword-package1.flags
diff --git a/test/files/neg/macro-keyword-package1.scala b/test/disabled/neg/macro-keyword-package1.scala
index 52d3fbabf6..52d3fbabf6 100644
--- a/test/files/neg/macro-keyword-package1.scala
+++ b/test/disabled/neg/macro-keyword-package1.scala
diff --git a/test/files/neg/macro-keyword-package2.check b/test/disabled/neg/macro-keyword-package2.check
index 0cb542a85d..0cb542a85d 100644
--- a/test/files/neg/macro-keyword-package2.check
+++ b/test/disabled/neg/macro-keyword-package2.check
diff --git a/test/files/neg/macro-keyword-package2.flags b/test/disabled/neg/macro-keyword-package2.flags
index 7fea2ff901..7fea2ff901 100644
--- a/test/files/neg/macro-keyword-package2.flags
+++ b/test/disabled/neg/macro-keyword-package2.flags
diff --git a/test/files/neg/macro-keyword-package2.scala b/test/disabled/neg/macro-keyword-package2.scala
index a68ebd935f..a68ebd935f 100644
--- a/test/files/neg/macro-keyword-package2.scala
+++ b/test/disabled/neg/macro-keyword-package2.scala
diff --git a/test/files/neg/macro-keyword-trait1.check b/test/disabled/neg/macro-keyword-trait1.check
index 9586a62e08..9586a62e08 100644
--- a/test/files/neg/macro-keyword-trait1.check
+++ b/test/disabled/neg/macro-keyword-trait1.check
diff --git a/test/files/neg/macro-keyword-trait1.flags b/test/disabled/neg/macro-keyword-trait1.flags
index 7fea2ff901..7fea2ff901 100644
--- a/test/files/neg/macro-keyword-trait1.flags
+++ b/test/disabled/neg/macro-keyword-trait1.flags
diff --git a/test/files/neg/macro-keyword-trait1.scala b/test/disabled/neg/macro-keyword-trait1.scala
index e32d4c1385..e32d4c1385 100644
--- a/test/files/neg/macro-keyword-trait1.scala
+++ b/test/disabled/neg/macro-keyword-trait1.scala
diff --git a/test/files/neg/macro-keyword-trait2.check b/test/disabled/neg/macro-keyword-trait2.check
index 40aa764378..40aa764378 100644
--- a/test/files/neg/macro-keyword-trait2.check
+++ b/test/disabled/neg/macro-keyword-trait2.check
diff --git a/test/files/neg/macro-keyword-trait2.flags b/test/disabled/neg/macro-keyword-trait2.flags
index 7fea2ff901..7fea2ff901 100644
--- a/test/files/neg/macro-keyword-trait2.flags
+++ b/test/disabled/neg/macro-keyword-trait2.flags
diff --git a/test/files/neg/macro-keyword-trait2.scala b/test/disabled/neg/macro-keyword-trait2.scala
index 243a54abe6..243a54abe6 100644
--- a/test/files/neg/macro-keyword-trait2.scala
+++ b/test/disabled/neg/macro-keyword-trait2.scala
diff --git a/test/files/neg/macro-keyword-type.check b/test/disabled/neg/macro-keyword-type.check
index 4a7481114c..4a7481114c 100644
--- a/test/files/neg/macro-keyword-type.check
+++ b/test/disabled/neg/macro-keyword-type.check
diff --git a/test/files/neg/macro-keyword-type.flags b/test/disabled/neg/macro-keyword-type.flags
index 7fea2ff901..7fea2ff901 100644
--- a/test/files/neg/macro-keyword-type.flags
+++ b/test/disabled/neg/macro-keyword-type.flags
diff --git a/test/files/neg/macro-keyword-type.scala b/test/disabled/neg/macro-keyword-type.scala
index 30e523bcaf..30e523bcaf 100644
--- a/test/files/neg/macro-keyword-type.scala
+++ b/test/disabled/neg/macro-keyword-type.scala
diff --git a/test/files/neg/macro-keyword-val.check b/test/disabled/neg/macro-keyword-val.check
index 0dc4c030a9..0dc4c030a9 100644
--- a/test/files/neg/macro-keyword-val.check
+++ b/test/disabled/neg/macro-keyword-val.check
diff --git a/test/files/neg/macro-keyword-val.flags b/test/disabled/neg/macro-keyword-val.flags
index 7fea2ff901..7fea2ff901 100644
--- a/test/files/neg/macro-keyword-val.flags
+++ b/test/disabled/neg/macro-keyword-val.flags
diff --git a/test/files/neg/macro-keyword-val.scala b/test/disabled/neg/macro-keyword-val.scala
index 96f57acb30..96f57acb30 100644
--- a/test/files/neg/macro-keyword-val.scala
+++ b/test/disabled/neg/macro-keyword-val.scala
diff --git a/test/files/neg/macro-keyword-var.check b/test/disabled/neg/macro-keyword-var.check
index 96d02e0052..96d02e0052 100644
--- a/test/files/neg/macro-keyword-var.check
+++ b/test/disabled/neg/macro-keyword-var.check
diff --git a/test/disabled/neg/macro-keyword-var.flags b/test/disabled/neg/macro-keyword-var.flags
new file mode 100644
index 0000000000..cd66464f2f
--- /dev/null
+++ b/test/disabled/neg/macro-keyword-var.flags
@@ -0,0 +1 @@
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-keyword-var.scala b/test/disabled/neg/macro-keyword-var.scala
index a79dda6dc2..a79dda6dc2 100644
--- a/test/files/neg/macro-keyword-var.scala
+++ b/test/disabled/neg/macro-keyword-var.scala
diff --git a/test/files/neg/macro-without-xmacros-a.check b/test/disabled/neg/macro-without-xmacros-a.check
index a3ca081f04..a3ca081f04 100644
--- a/test/files/neg/macro-without-xmacros-a.check
+++ b/test/disabled/neg/macro-without-xmacros-a.check
diff --git a/test/files/neg/macro-without-xmacros-a/Impls_1.scala b/test/disabled/neg/macro-without-xmacros-a/Impls_1.scala
index 2493c81c95..2493c81c95 100644
--- a/test/files/neg/macro-without-xmacros-a/Impls_1.scala
+++ b/test/disabled/neg/macro-without-xmacros-a/Impls_1.scala
diff --git a/test/files/neg/macro-without-xmacros-a/Macros_2.scala b/test/disabled/neg/macro-without-xmacros-a/Macros_2.scala
index 62f9dcf505..62f9dcf505 100644
--- a/test/files/neg/macro-without-xmacros-a/Macros_2.scala
+++ b/test/disabled/neg/macro-without-xmacros-a/Macros_2.scala
diff --git a/test/files/neg/macro-without-xmacros-a/Test_3.scala b/test/disabled/neg/macro-without-xmacros-a/Test_3.scala
index e9a10e20c9..e9a10e20c9 100644
--- a/test/files/neg/macro-without-xmacros-a/Test_3.scala
+++ b/test/disabled/neg/macro-without-xmacros-a/Test_3.scala
diff --git a/test/files/neg/macro-without-xmacros-b.check b/test/disabled/neg/macro-without-xmacros-b.check
index dce4a084c9..dce4a084c9 100644
--- a/test/files/neg/macro-without-xmacros-b.check
+++ b/test/disabled/neg/macro-without-xmacros-b.check
diff --git a/test/files/neg/macro-without-xmacros-b/Impls_1.scala b/test/disabled/neg/macro-without-xmacros-b/Impls_1.scala
index 2493c81c95..2493c81c95 100644
--- a/test/files/neg/macro-without-xmacros-b/Impls_1.scala
+++ b/test/disabled/neg/macro-without-xmacros-b/Impls_1.scala
diff --git a/test/files/neg/macro-without-xmacros-b/Macros_2.scala b/test/disabled/neg/macro-without-xmacros-b/Macros_2.scala
index de7080c7e8..de7080c7e8 100644
--- a/test/files/neg/macro-without-xmacros-b/Macros_2.scala
+++ b/test/disabled/neg/macro-without-xmacros-b/Macros_2.scala
diff --git a/test/files/neg/macro-without-xmacros-b/Test_3.scala b/test/disabled/neg/macro-without-xmacros-b/Test_3.scala
index e9a10e20c9..e9a10e20c9 100644
--- a/test/files/neg/macro-without-xmacros-b/Test_3.scala
+++ b/test/disabled/neg/macro-without-xmacros-b/Test_3.scala
diff --git a/test/files/run/macro-reflective-mamd-normal-mi.flags b/test/disabled/run/macro-reflective-mamd-normal-mi.check
index e69de29bb2..e69de29bb2 100644
--- a/test/files/run/macro-reflective-mamd-normal-mi.flags
+++ b/test/disabled/run/macro-reflective-mamd-normal-mi.check
diff --git a/test/disabled/run/macro-reflective-mamd-normal-mi.flags b/test/disabled/run/macro-reflective-mamd-normal-mi.flags
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/test/disabled/run/macro-reflective-mamd-normal-mi.flags
diff --git a/test/files/run/macro-reflective-mamd-normal-mi/Impls_1.scala b/test/disabled/run/macro-reflective-mamd-normal-mi/Impls_1.scala
index dc7d42d23e..dc7d42d23e 100644
--- a/test/files/run/macro-reflective-mamd-normal-mi/Impls_1.scala
+++ b/test/disabled/run/macro-reflective-mamd-normal-mi/Impls_1.scala
diff --git a/test/files/run/macro-reflective-mamd-normal-mi/Macros_Test_2.scala b/test/disabled/run/macro-reflective-mamd-normal-mi/Macros_Test_2.scala
index 7cbe425fc8..7cbe425fc8 100644
--- a/test/files/run/macro-reflective-mamd-normal-mi/Macros_Test_2.scala
+++ b/test/disabled/run/macro-reflective-mamd-normal-mi/Macros_Test_2.scala
diff --git a/test/files/buildmanager/t2650_1/t2650_1.check b/test/files/buildmanager/t2650_1/t2650_1.check
index ecddb33620..f1e4b1b8bc 100644
--- a/test/files/buildmanager/t2650_1/t2650_1.check
+++ b/test/files/buildmanager/t2650_1/t2650_1.check
@@ -1,5 +1,6 @@
builder > A.scala B.scala
compiling Set(A.scala, B.scala)
+warning: there were 1 feature warnings; re-run with -feature for details
Changes: Map()
builder > A.scala
compiling Set(A.scala)
diff --git a/test/files/buildmanager/t2657/t2657.check b/test/files/buildmanager/t2657/t2657.check
index 74ba87a21d..cd0357599c 100644
--- a/test/files/buildmanager/t2657/t2657.check
+++ b/test/files/buildmanager/t2657/t2657.check
@@ -1,5 +1,6 @@
builder > A.scala B.scala
compiling Set(A.scala, B.scala)
+warning: there were 1 feature warnings; re-run with -feature for details
Changes: Map()
builder > A.scala
compiling Set(A.scala)
diff --git a/test/files/jvm/interpreter.check b/test/files/jvm/interpreter.check
index d93e314d8e..b9ff6afa2b 100755..100644
--- a/test/files/jvm/interpreter.check
+++ b/test/files/jvm/interpreter.check
@@ -1,372 +1,375 @@
-Type in expressions to have them evaluated.
-Type :help for more information.
-
-scala>
-
-scala> // basics
-
-scala> 3+4
-res0: Int = 7
-
-scala> def gcd(x: Int, y: Int): Int = {
- if (x == 0) y
- else if (y == 0) x
- else gcd(y%x, x)
-}
-gcd: (x: Int, y: Int)Int
-
-scala> val five = gcd(15,35)
-five: Int = 5
-
-scala> var x = 1
-x: Int = 1
-
-scala> x = 2
-x: Int = 2
-
-scala> val three = x+1
-three: Int = 3
-
-scala> type anotherint = Int
-defined type alias anotherint
-
-scala> val four: anotherint = 4
-four: anotherint = 4
-
-scala> val bogus: anotherint = "hello"
-<console>:8: error: type mismatch;
- found : String("hello")
- required: anotherint
- (which expands to) Int
- val bogus: anotherint = "hello"
- ^
-
-scala> trait PointlessTrait
-defined trait PointlessTrait
-
-scala> val (x,y) = (2,3)
-x: Int = 2
-y: Int = 3
-
-scala> println("hello")
-hello
-
-scala>
-
-scala> // ticket #1513
-
-scala> val t1513 = Array(null)
-t1513: Array[Null] = Array(null)
-
-scala> // ambiguous toString problem from #547
-
-scala> val atom = new scala.xml.Atom()
-atom: scala.xml.Atom[Unit] = ()
-
-scala> // overriding toString problem from #1404
-
-scala> class S(override val toString : String)
-defined class S
-
-scala> val fish = new S("fish")
-fish: S = fish
-
-scala> // Test that arrays pretty print nicely.
-
-scala> val arr = Array("What's", "up", "doc?")
-arr: Array[String] = Array(What's, up, doc?)
-
-scala> // Test that arrays pretty print nicely, even when we give them type Any
-
-scala> val arrInt : Any = Array(1,2,3)
-arrInt: Any = Array(1, 2, 3)
-
-scala> // Test that nested arrays are pretty-printed correctly
-
-scala> val arrArrInt : Any = Array(Array(1, 2), Array(3, 4))
-arrArrInt: Any = Array(Array(1, 2), Array(3, 4))
-
-scala>
-
-scala> // implicit conversions
-
-scala> case class Foo(n: Int)
-defined class Foo
-
-scala> case class Bar(n: Int)
-defined class Bar
-
-scala> implicit def foo2bar(foo: Foo) = Bar(foo.n)
-foo2bar: (foo: Foo)Bar
-
-scala> val bar: Bar = Foo(3)
-bar: Bar = Bar(3)
-
-scala>
-
-scala> // importing from a previous result
-
-scala> import bar._
-import bar._
-
-scala> val m = n
-m: Int = 3
-
-scala>
-
-scala> // stressing the imports mechanism
-
-scala> val one = 1
-one: Int = 1
-
-scala> val one = 1
-one: Int = 1
-
-scala> val one = 1
-one: Int = 1
-
-scala> val one = 1
-one: Int = 1
-
-scala> val one = 1
-one: Int = 1
-
-scala> val one = 1
-one: Int = 1
-
-scala> val one = 1
-one: Int = 1
-
-scala> val one = 1
-one: Int = 1
-
-scala> val one = 1
-one: Int = 1
-
-scala> val one = 1
-one: Int = 1
-
-scala> val one = 1
-one: Int = 1
-
-scala> val one = 1
-one: Int = 1
-
-scala> val one = 1
-one: Int = 1
-
-scala> val one = 1
-one: Int = 1
-
-scala> val one = 1
-one: Int = 1
-
-scala> val one = 1
-one: Int = 1
-
-scala> val one = 1
-one: Int = 1
-
-scala> val one = 1
-one: Int = 1
-
-scala> val one = 1
-one: Int = 1
-
-scala> val one = 1
-one: Int = 1
-
-scala>
-
-scala>
-
-scala> val x1 = 1
-x1: Int = 1
-
-scala> val x2 = 1
-x2: Int = 1
-
-scala> val x3 = 1
-x3: Int = 1
-
-scala> val x4 = 1
-x4: Int = 1
-
-scala> val x5 = 1
-x5: Int = 1
-
-scala> val x6 = 1
-x6: Int = 1
-
-scala> val x7 = 1
-x7: Int = 1
-
-scala> val x8 = 1
-x8: Int = 1
-
-scala> val x9 = 1
-x9: Int = 1
-
-scala> val x10 = 1
-x10: Int = 1
-
-scala> val x11 = 1
-x11: Int = 1
-
-scala> val x12 = 1
-x12: Int = 1
-
-scala> val x13 = 1
-x13: Int = 1
-
-scala> val x14 = 1
-x14: Int = 1
-
-scala> val x15 = 1
-x15: Int = 1
-
-scala> val x16 = 1
-x16: Int = 1
-
-scala> val x17 = 1
-x17: Int = 1
-
-scala> val x18 = 1
-x18: Int = 1
-
-scala> val x19 = 1
-x19: Int = 1
-
-scala> val x20 = 1
-x20: Int = 1
-
-scala>
-
-scala> val two = one + x5
-two: Int = 2
-
-scala>
-
-scala> // handling generic wildcard arrays (#2386)
-
-scala> // It's put here because type feedback is an important part of it.
-
-scala> val xs: Array[_] = Array(1, 2)
-xs: Array[_] = Array(1, 2)
-
-scala> xs.size
-res2: Int = 2
-
-scala> xs.head
-res3: Any = 1
-
-scala> xs filter (_ == 2)
-res4: Array[_] = Array(2)
-
-scala> xs map (_ => "abc")
-res5: Array[String] = Array(abc, abc)
-
-scala> xs map (x => x)
-res6: scala.collection.mutable.ArraySeq[_] = ArraySeq(1, 2)
-
-scala> xs map (x => (x, x))
-res7: Array[(_$1, _$1)] forSome { type _$1 } = Array((1,1), (2,2))
-
-scala>
-
-scala> // interior syntax errors should *not* go into multi-line input mode.
-
-scala> // both of the following should abort immediately:
-
-scala> def x => y => z
-<console>:1: error: '=' expected but '=>' found.
- def x => y => z
- ^
-
-scala> [1,2,3]
-<console>:1: error: illegal start of definition
- [1,2,3]
- ^
-
-scala>
-
-scala>
-
-scala> // multi-line XML
-
-scala> <a>
-<b
- c="c"
- d="dd"
-/></a>
-res8: scala.xml.Elem =
-<a>
-<b c="c" d="dd"/></a>
-
-scala>
-
-scala>
-
-scala> /*
- /*
- multi-line comment
- */
-*/
-
-scala>
-
-scala>
-
-scala> // multi-line string
-
-scala> """
-hello
-there
-"""
-res9: String =
-"
-hello
-there
-"
-
-scala>
-
-scala> (1 + // give up early by typing two blank lines
-
-
-You typed two blank lines. Starting a new command.
-
-scala> // defining and using quoted names should work (ticket #323)
-
-scala> def `match` = 1
-match: Int
-
-scala> val x = `match`
-x: Int = 1
-
-scala>
-
-scala> // multiple classes defined on one line
-
-scala> sealed class Exp; class Fact extends Exp; class Term extends Exp
-defined class Exp
-defined class Fact
-defined class Term
-
-scala> def f(e: Exp) = e match { // non-exhaustive warning here
- case _:Fact => 3
-}
-<console>:18: warning: match is not exhaustive!
-missing combination Exp
-missing combination Term
-
- def f(e: Exp) = e match { // non-exhaustive warning here
- ^
-f: (e: Exp)Int
-
-scala>
-
-scala>
+Type in expressions to have them evaluated.
+Type :help for more information.
+
+scala>
+
+scala> // basics
+
+scala> 3+4
+res0: Int = 7
+
+scala> def gcd(x: Int, y: Int): Int = {
+ if (x == 0) y
+ else if (y == 0) x
+ else gcd(y%x, x)
+}
+gcd: (x: Int, y: Int)Int
+
+scala> val five = gcd(15,35)
+five: Int = 5
+
+scala> var x = 1
+x: Int = 1
+
+scala> x = 2
+x: Int = 2
+
+scala> val three = x+1
+three: Int = 3
+
+scala> type anotherint = Int
+defined type alias anotherint
+
+scala> val four: anotherint = 4
+four: anotherint = 4
+
+scala> val bogus: anotherint = "hello"
+<console>:8: error: type mismatch;
+ found : String("hello")
+ required: anotherint
+ (which expands to) Int
+ val bogus: anotherint = "hello"
+ ^
+
+scala> trait PointlessTrait
+defined trait PointlessTrait
+
+scala> val (x,y) = (2,3)
+x: Int = 2
+y: Int = 3
+
+scala> println("hello")
+hello
+
+scala>
+
+scala> // ticket #1513
+
+scala> val t1513 = Array(null)
+t1513: Array[Null] = Array(null)
+
+scala> // ambiguous toString problem from #547
+
+scala> val atom = new scala.xml.Atom()
+atom: scala.xml.Atom[Unit] = ()
+
+scala> // overriding toString problem from #1404
+
+scala> class S(override val toString : String)
+defined class S
+
+scala> val fish = new S("fish")
+fish: S = fish
+
+scala> // Test that arrays pretty print nicely.
+
+scala> val arr = Array("What's", "up", "doc?")
+arr: Array[String] = Array(What's, up, doc?)
+
+scala> // Test that arrays pretty print nicely, even when we give them type Any
+
+scala> val arrInt : Any = Array(1,2,3)
+arrInt: Any = Array(1, 2, 3)
+
+scala> // Test that nested arrays are pretty-printed correctly
+
+scala> val arrArrInt : Any = Array(Array(1, 2), Array(3, 4))
+arrArrInt: Any = Array(Array(1, 2), Array(3, 4))
+
+scala>
+
+scala> // implicit conversions
+
+scala> case class Foo(n: Int)
+defined class Foo
+
+scala> case class Bar(n: Int)
+defined class Bar
+
+scala> implicit def foo2bar(foo: Foo) = Bar(foo.n)
+warning: there were 1 feature warnings; re-run with -feature for details
+foo2bar: (foo: Foo)Bar
+
+scala> val bar: Bar = Foo(3)
+bar: Bar = Bar(3)
+
+scala>
+
+scala> // importing from a previous result
+
+scala> import bar._
+import bar._
+
+scala> val m = n
+m: Int = 3
+
+scala>
+
+scala> // stressing the imports mechanism
+
+scala> val one = 1
+one: Int = 1
+
+scala> val one = 1
+one: Int = 1
+
+scala> val one = 1
+one: Int = 1
+
+scala> val one = 1
+one: Int = 1
+
+scala> val one = 1
+one: Int = 1
+
+scala> val one = 1
+one: Int = 1
+
+scala> val one = 1
+one: Int = 1
+
+scala> val one = 1
+one: Int = 1
+
+scala> val one = 1
+one: Int = 1
+
+scala> val one = 1
+one: Int = 1
+
+scala> val one = 1
+one: Int = 1
+
+scala> val one = 1
+one: Int = 1
+
+scala> val one = 1
+one: Int = 1
+
+scala> val one = 1
+one: Int = 1
+
+scala> val one = 1
+one: Int = 1
+
+scala> val one = 1
+one: Int = 1
+
+scala> val one = 1
+one: Int = 1
+
+scala> val one = 1
+one: Int = 1
+
+scala> val one = 1
+one: Int = 1
+
+scala> val one = 1
+one: Int = 1
+
+scala>
+
+scala>
+
+scala> val x1 = 1
+x1: Int = 1
+
+scala> val x2 = 1
+x2: Int = 1
+
+scala> val x3 = 1
+x3: Int = 1
+
+scala> val x4 = 1
+x4: Int = 1
+
+scala> val x5 = 1
+x5: Int = 1
+
+scala> val x6 = 1
+x6: Int = 1
+
+scala> val x7 = 1
+x7: Int = 1
+
+scala> val x8 = 1
+x8: Int = 1
+
+scala> val x9 = 1
+x9: Int = 1
+
+scala> val x10 = 1
+x10: Int = 1
+
+scala> val x11 = 1
+x11: Int = 1
+
+scala> val x12 = 1
+x12: Int = 1
+
+scala> val x13 = 1
+x13: Int = 1
+
+scala> val x14 = 1
+x14: Int = 1
+
+scala> val x15 = 1
+x15: Int = 1
+
+scala> val x16 = 1
+x16: Int = 1
+
+scala> val x17 = 1
+x17: Int = 1
+
+scala> val x18 = 1
+x18: Int = 1
+
+scala> val x19 = 1
+x19: Int = 1
+
+scala> val x20 = 1
+x20: Int = 1
+
+scala>
+
+scala> val two = one + x5
+two: Int = 2
+
+scala>
+
+scala> // handling generic wildcard arrays (#2386)
+
+scala> // It's put here because type feedback is an important part of it.
+
+scala> val xs: Array[_] = Array(1, 2)
+xs: Array[_] = Array(1, 2)
+
+scala> xs.size
+res2: Int = 2
+
+scala> xs.head
+res3: Any = 1
+
+scala> xs filter (_ == 2)
+res4: Array[_] = Array(2)
+
+scala> xs map (_ => "abc")
+res5: Array[String] = Array(abc, abc)
+
+scala> xs map (x => x)
+res6: scala.collection.mutable.ArraySeq[_] = ArraySeq(1, 2)
+
+scala> xs map (x => (x, x))
+warning: there were 1 feature warnings; re-run with -feature for details
+warning: there were 1 feature warnings; re-run with -feature for details
+res7: Array[(_$1, _$1)] forSome { type _$1 } = Array((1,1), (2,2))
+
+scala>
+
+scala> // interior syntax errors should *not* go into multi-line input mode.
+
+scala> // both of the following should abort immediately:
+
+scala> def x => y => z
+<console>:1: error: '=' expected but '=>' found.
+ def x => y => z
+ ^
+
+scala> [1,2,3]
+<console>:1: error: illegal start of definition
+ [1,2,3]
+ ^
+
+scala>
+
+scala>
+
+scala> // multi-line XML
+
+scala> <a>
+<b
+ c="c"
+ d="dd"
+/></a>
+res8: scala.xml.Elem =
+<a>
+<b c="c" d="dd"/></a>
+
+scala>
+
+scala>
+
+scala> /*
+ /*
+ multi-line comment
+ */
+*/
+
+scala>
+
+scala>
+
+scala> // multi-line string
+
+scala> """
+hello
+there
+"""
+res9: String =
+"
+hello
+there
+"
+
+scala>
+
+scala> (1 + // give up early by typing two blank lines
+
+
+You typed two blank lines. Starting a new command.
+
+scala> // defining and using quoted names should work (ticket #323)
+
+scala> def `match` = 1
+match: Int
+
+scala> val x = `match`
+x: Int = 1
+
+scala>
+
+scala> // multiple classes defined on one line
+
+scala> sealed class Exp; class Fact extends Exp; class Term extends Exp
+defined class Exp
+defined class Fact
+defined class Term
+
+scala> def f(e: Exp) = e match { // non-exhaustive warning here
+ case _:Fact => 3
+}
+<console>:18: warning: match is not exhaustive!
+missing combination Exp
+missing combination Term
+
+ def f(e: Exp) = e match { // non-exhaustive warning here
+ ^
+f: (e: Exp)Int
+
+scala>
+
+scala>
plusOne: (x: Int)Int
res0: Int = 6
res0: String = after reset
diff --git a/test/files/neg/macro-argtype-mismatch.flags b/test/files/neg/macro-argtype-mismatch.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-argtype-mismatch.flags
+++ b/test/files/neg/macro-argtype-mismatch.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-basic-mamdmi.flags b/test/files/neg/macro-basic-mamdmi.flags
index 06a7b31f11..5e5dd6ce79 100644
--- a/test/files/neg/macro-basic-mamdmi.flags
+++ b/test/files/neg/macro-basic-mamdmi.flags
@@ -1 +1 @@
--Xmacros
+-language:experimental.macros
diff --git a/test/files/neg/macro-cyclic.flags b/test/files/neg/macro-cyclic.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-cyclic.flags
+++ b/test/files/neg/macro-cyclic.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidimpl-a.flags b/test/files/neg/macro-invalidimpl-a.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidimpl-a.flags
+++ b/test/files/neg/macro-invalidimpl-a.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidimpl-b.flags b/test/files/neg/macro-invalidimpl-b.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidimpl-b.flags
+++ b/test/files/neg/macro-invalidimpl-b.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidimpl-c.flags b/test/files/neg/macro-invalidimpl-c.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidimpl-c.flags
+++ b/test/files/neg/macro-invalidimpl-c.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidimpl-d.flags b/test/files/neg/macro-invalidimpl-d.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidimpl-d.flags
+++ b/test/files/neg/macro-invalidimpl-d.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidimpl-e.flags b/test/files/neg/macro-invalidimpl-e.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidimpl-e.flags
+++ b/test/files/neg/macro-invalidimpl-e.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidimpl-f.flags b/test/files/neg/macro-invalidimpl-f.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidimpl-f.flags
+++ b/test/files/neg/macro-invalidimpl-f.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidimpl-g.flags b/test/files/neg/macro-invalidimpl-g.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidimpl-g.flags
+++ b/test/files/neg/macro-invalidimpl-g.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidimpl-h.flags b/test/files/neg/macro-invalidimpl-h.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidimpl-h.flags
+++ b/test/files/neg/macro-invalidimpl-h.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidret-nontree.flags b/test/files/neg/macro-invalidret-nontree.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidret-nontree.flags
+++ b/test/files/neg/macro-invalidret-nontree.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidret-nonuniversetree.flags b/test/files/neg/macro-invalidret-nonuniversetree.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidret-nonuniversetree.flags
+++ b/test/files/neg/macro-invalidret-nonuniversetree.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidshape-a.flags b/test/files/neg/macro-invalidshape-a.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidshape-a.flags
+++ b/test/files/neg/macro-invalidshape-a.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidshape-b.flags b/test/files/neg/macro-invalidshape-b.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidshape-b.flags
+++ b/test/files/neg/macro-invalidshape-b.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidshape-c.flags b/test/files/neg/macro-invalidshape-c.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidshape-c.flags
+++ b/test/files/neg/macro-invalidshape-c.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidshape-d.flags b/test/files/neg/macro-invalidshape-d.flags
deleted file mode 100644
index 7fea2ff901..0000000000
--- a/test/files/neg/macro-invalidshape-d.flags
+++ /dev/null
@@ -1 +0,0 @@
--Xmacros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidsig-context-bounds.flags b/test/files/neg/macro-invalidsig-context-bounds.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidsig-context-bounds.flags
+++ b/test/files/neg/macro-invalidsig-context-bounds.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidsig-ctx-badargc.flags b/test/files/neg/macro-invalidsig-ctx-badargc.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidsig-ctx-badargc.flags
+++ b/test/files/neg/macro-invalidsig-ctx-badargc.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidsig-ctx-badtype.flags b/test/files/neg/macro-invalidsig-ctx-badtype.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidsig-ctx-badtype.flags
+++ b/test/files/neg/macro-invalidsig-ctx-badtype.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidsig-ctx-badvarargs.flags b/test/files/neg/macro-invalidsig-ctx-badvarargs.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidsig-ctx-badvarargs.flags
+++ b/test/files/neg/macro-invalidsig-ctx-badvarargs.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidsig-ctx-noctx.flags b/test/files/neg/macro-invalidsig-ctx-noctx.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidsig-ctx-noctx.flags
+++ b/test/files/neg/macro-invalidsig-ctx-noctx.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidsig-implicit-params.flags b/test/files/neg/macro-invalidsig-implicit-params.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidsig-implicit-params.flags
+++ b/test/files/neg/macro-invalidsig-implicit-params.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidsig-params-badargc.flags b/test/files/neg/macro-invalidsig-params-badargc.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidsig-params-badargc.flags
+++ b/test/files/neg/macro-invalidsig-params-badargc.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidsig-params-badtype.flags b/test/files/neg/macro-invalidsig-params-badtype.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidsig-params-badtype.flags
+++ b/test/files/neg/macro-invalidsig-params-badtype.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidsig-params-badvarargs.flags b/test/files/neg/macro-invalidsig-params-badvarargs.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidsig-params-badvarargs.flags
+++ b/test/files/neg/macro-invalidsig-params-badvarargs.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidsig-params-namemismatch.flags b/test/files/neg/macro-invalidsig-params-namemismatch.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidsig-params-namemismatch.flags
+++ b/test/files/neg/macro-invalidsig-params-namemismatch.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidsig-tparams-badtype.flags b/test/files/neg/macro-invalidsig-tparams-badtype.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidsig-tparams-badtype.flags
+++ b/test/files/neg/macro-invalidsig-tparams-badtype.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidsig-tparams-bounds-a.flags b/test/files/neg/macro-invalidsig-tparams-bounds-a.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidsig-tparams-bounds-a.flags
+++ b/test/files/neg/macro-invalidsig-tparams-bounds-a.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidsig-tparams-bounds-b.flags b/test/files/neg/macro-invalidsig-tparams-bounds-b.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidsig-tparams-bounds-b.flags
+++ b/test/files/neg/macro-invalidsig-tparams-bounds-b.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidsig-tparams-notparams-a.flags b/test/files/neg/macro-invalidsig-tparams-notparams-a.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidsig-tparams-notparams-a.flags
+++ b/test/files/neg/macro-invalidsig-tparams-notparams-a.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidsig-tparams-notparams-b.flags b/test/files/neg/macro-invalidsig-tparams-notparams-b.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidsig-tparams-notparams-b.flags
+++ b/test/files/neg/macro-invalidsig-tparams-notparams-b.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidsig-tparams-notparams-c.flags b/test/files/neg/macro-invalidsig-tparams-notparams-c.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidsig-tparams-notparams-c.flags
+++ b/test/files/neg/macro-invalidsig-tparams-notparams-c.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidusage-badargs.flags b/test/files/neg/macro-invalidusage-badargs.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidusage-badargs.flags
+++ b/test/files/neg/macro-invalidusage-badargs.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidusage-badbounds.flags b/test/files/neg/macro-invalidusage-badbounds.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidusage-badbounds.flags
+++ b/test/files/neg/macro-invalidusage-badbounds.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidusage-badtargs.flags b/test/files/neg/macro-invalidusage-badtargs.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidusage-badtargs.flags
+++ b/test/files/neg/macro-invalidusage-badtargs.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-invalidusage-methodvaluesyntax.flags b/test/files/neg/macro-invalidusage-methodvaluesyntax.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-invalidusage-methodvaluesyntax.flags
+++ b/test/files/neg/macro-invalidusage-methodvaluesyntax.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-keyword-var.flags b/test/files/neg/macro-keyword-var.flags
deleted file mode 100644
index 7fea2ff901..0000000000
--- a/test/files/neg/macro-keyword-var.flags
+++ /dev/null
@@ -1 +0,0 @@
--Xmacros \ No newline at end of file
diff --git a/test/files/neg/macro-noexpand.flags b/test/files/neg/macro-noexpand.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-noexpand.flags
+++ b/test/files/neg/macro-noexpand.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-noncompilertree.flags b/test/files/neg/macro-noncompilertree.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-noncompilertree.flags
+++ b/test/files/neg/macro-noncompilertree.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-nontree.flags b/test/files/neg/macro-nontree.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-nontree.flags
+++ b/test/files/neg/macro-nontree.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-nontypeablebody.flags b/test/files/neg/macro-nontypeablebody.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-nontypeablebody.flags
+++ b/test/files/neg/macro-nontypeablebody.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-override-macro-overrides-abstract-method-a.flags b/test/files/neg/macro-override-macro-overrides-abstract-method-a.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-override-macro-overrides-abstract-method-a.flags
+++ b/test/files/neg/macro-override-macro-overrides-abstract-method-a.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-override-macro-overrides-abstract-method-b.flags b/test/files/neg/macro-override-macro-overrides-abstract-method-b.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-override-macro-overrides-abstract-method-b.flags
+++ b/test/files/neg/macro-override-macro-overrides-abstract-method-b.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/neg/macro-override-method-overrides-macro.flags b/test/files/neg/macro-override-method-overrides-macro.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/neg/macro-override-method-overrides-macro.flags
+++ b/test/files/neg/macro-override-method-overrides-macro.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/pos/generic-sigs.scala b/test/files/pos/generic-sigs.scala
index 40ec044656..b112766056 100644
--- a/test/files/pos/generic-sigs.scala
+++ b/test/files/pos/generic-sigs.scala
@@ -1,3 +1,5 @@
+import language.existentials
+
object A {
def f1 = List(classOf[Int], classOf[String])
def f2 = List(classOf[String], classOf[Int])
@@ -15,4 +17,4 @@ object A {
class Boppy[+T1,-T2]
def g1 = new Boppy[t forSome { type t <: Int }, u forSome { type u <: String }]
-} \ No newline at end of file
+}
diff --git a/test/files/pos/hkarray.flags b/test/files/pos/hkarray.flags
index e8fb65d50c..e745d8bbe3 100644
--- a/test/files/pos/hkarray.flags
+++ b/test/files/pos/hkarray.flags
@@ -1 +1 @@
--Xfatal-warnings \ No newline at end of file
+-Xfatal-warnings -language:higherKinds \ No newline at end of file
diff --git a/test/files/pos/t1439.flags b/test/files/pos/t1439.flags
index 779916d58f..d86a0144e8 100644
--- a/test/files/pos/t1439.flags
+++ b/test/files/pos/t1439.flags
@@ -1 +1 @@
--unchecked -Xfatal-warnings \ No newline at end of file
+-unchecked -Xfatal-warnings -language:higherKinds \ No newline at end of file
diff --git a/test/files/run/constrained-types.check b/test/files/run/constrained-types.check
index ac8817cb08..37784a20ca 100644
--- a/test/files/run/constrained-types.check
+++ b/test/files/run/constrained-types.check
@@ -75,9 +75,13 @@ scala> var four = "four"
four: String = four
scala> val four2 = m(four) // should have an existential bound
+warning: there were 1 feature warnings; re-run with -feature for details
+warning: there were 1 feature warnings; re-run with -feature for details
four2: String @Annot(x) forSome { val x: String } = four
scala> val four3 = four2 // should have the same type as four2
+warning: there were 1 feature warnings; re-run with -feature for details
+warning: there were 1 feature warnings; re-run with -feature for details
four3: String @Annot(x) forSome { val x: String } = four
scala> val stuff = m("stuff") // should not crash
@@ -100,6 +104,8 @@ scala> def m = {
val y : String @Annot(x) = x
y
} // x should not escape the local scope with a narrow type
+warning: there were 1 feature warnings; re-run with -feature for details
+warning: there were 1 feature warnings; re-run with -feature for details
m: String @Annot(x) forSome { val x: String }
scala>
@@ -113,6 +119,7 @@ scala> def n(y: String) = {
}
m("stuff".stripMargin)
} // x should be existentially bound
+warning: there were 1 feature warnings; re-run with -feature for details
n: (y: String)String @Annot(x) forSome { val x: String }
scala>
diff --git a/test/files/run/dynamic-proxy.check b/test/files/run/dynamic-proxy.check
new file mode 100644
index 0000000000..d1b85daff4
--- /dev/null
+++ b/test/files/run/dynamic-proxy.check
@@ -0,0 +1,20 @@
+noargs
+noargs
+nullary
+value
+symbolic
+symbolic with args
+non-existent method
+before mutation
+mutation 1
+after mutation 1
+mutation 2
+after mutation 2
+overloaded with object
+overloaded with primitive
+overloaded with object in var
+overloaded with object in var 2
+typeArgs: I am a car
+default: 4
+default: 3
+named: 6
diff --git a/test/files/run/dynamic-proxy.flags b/test/files/run/dynamic-proxy.flags
new file mode 100644
index 0000000000..48fd867160
--- /dev/null
+++ b/test/files/run/dynamic-proxy.flags
@@ -0,0 +1 @@
+-Xexperimental
diff --git a/test/files/run/dynamic-proxy.scala b/test/files/run/dynamic-proxy.scala
new file mode 100644
index 0000000000..ab5a8b1d66
--- /dev/null
+++ b/test/files/run/dynamic-proxy.scala
@@ -0,0 +1,72 @@
+import scala.reflect._
+
+class Car{ override def toString = "I am a car" }
+object x{
+ def nullary = "nullary"
+ def noargs() = "noargs"
+ def - = "symbolic"
+ def $(s:String) = "symbolic with args"
+ val value = "value"
+ def overloaded(i:Int) = "overloaded with primitive"
+ def overloaded(s:String) = s
+ def default( a:Int, b:Int = 2 ) = "default: "+(a+b)
+ def named( a:Int, b:Int, c:Int ) = "named: "+(a+b+c)
+ def typeArgs[T]( v:T ) = "typeArgs: "+v
+ var mutable = "before mutation"
+ def multiArgLists( a:String )( b:String ) = "multiArgList " + a + b
+ def bar( s:String )(implicit car:Car) = s + car.toString
+}
+
+object Test extends App{
+ val d = new DynamicProxy{ val dynamicProxyTarget = x }
+
+ println( d.noargs )
+ println( d.noargs() )
+ println( d.nullary )
+ println( d.value )
+ println( d.- )
+ println( d.$("x") )
+
+ try{
+ println( d.test )
+ } catch {
+ case _ => println("non-existent method")
+ }
+
+ println( d.mutable )
+
+ println("mutation 1")
+ d.mutable_=("after mutation 1")
+ println( d.mutable )
+
+ println("mutation 2")
+ d.mutable = "after mutation 2"
+ println( d.mutable )
+
+ println( d.overloaded("overloaded with object") )
+ println( d.overloaded(1) )
+
+ // test some non-constant arguments
+ def s = "overloaded with object in var"
+ println( d.overloaded(s) )
+ println( d.overloaded(s + " 2") )
+
+ val car = new Car
+ println( d.typeArgs(car) ) // inferred
+ // println( d.typeArgs[Car](car) ) // explicit not working (yet)
+
+ println( d.default( 1,3 ) )
+ println( d.default( 1 ) )
+
+ println( d.named(1,c=3,b=2) ) // applyDynamicNamed seems to be broken
+
+ // println( d.multiArgLists("a")("b") ) // not working yet
+
+ /*
+ // may never work
+ // testing implicit parameters (first test works when moving x into TestDynamicReflect)
+ implicit val car2 = new Car
+ println( d.bar( "Yeah, ") ); // FAILS: could not find implicit value for parameter car
+ {println( d.bar( "Yeah, ") )} // FAILS: could not find implicit value for parameter car
+ */
+}
diff --git a/test/files/run/existentials-in-compiler.check b/test/files/run/existentials-in-compiler.check
index 83e3cdf435..4df4b0ca96 100644
--- a/test/files/run/existentials-in-compiler.check
+++ b/test/files/run/existentials-in-compiler.check
@@ -100,8 +100,8 @@ abstract trait Cov31[+A, +B, C <: (A, B)] extends Object
abstract trait Cov32[+A, B, C <: (A, B)] extends Object
extest.Cov32[A,B,C] forSome { +A; B; C <: (A, B) }
-abstract trait Cov33[+A, -B, C <: (A, _$10) forSome { type _$10 }] extends Object
- extest.Cov33[A,B,C] forSome { +A; -B; C <: (A, _$10) forSome { type _$10 } }
+abstract trait Cov33[+A, -B, C <: Tuple2[A, _]] extends Object
+ extest.Cov33[A,B,C] forSome { +A; -B; C <: Tuple2[A, _] }
abstract trait Cov34[A, +B, C <: (A, B)] extends Object
extest.Cov34[A,B,C] forSome { A; +B; C <: (A, B) }
@@ -109,14 +109,14 @@ abstract trait Cov34[A, +B, C <: (A, B)] extends Object
abstract trait Cov35[A, B, C <: (A, B)] extends Object
extest.Cov35[A,B,C] forSome { A; B; C <: (A, B) }
-abstract trait Cov36[A, -B, C <: (A, _$11) forSome { type _$11 }] extends Object
- extest.Cov36[A,B,C] forSome { A; -B; C <: (A, _$11) forSome { type _$11 } }
+abstract trait Cov36[A, -B, C <: Tuple2[A, _]] extends Object
+ extest.Cov36[A,B,C] forSome { A; -B; C <: Tuple2[A, _] }
-abstract trait Cov37[-A, +B, C <: (_$12, B) forSome { type _$12 }] extends Object
- extest.Cov37[A,B,C] forSome { -A; +B; C <: (_$12, B) forSome { type _$12 } }
+abstract trait Cov37[-A, +B, C <: Tuple2[_, B]] extends Object
+ extest.Cov37[A,B,C] forSome { -A; +B; C <: Tuple2[_, B] }
-abstract trait Cov38[-A, B, C <: (_$13, B) forSome { type _$13 }] extends Object
- extest.Cov38[A,B,C] forSome { -A; B; C <: (_$13, B) forSome { type _$13 } }
+abstract trait Cov38[-A, B, C <: Tuple2[_, B]] extends Object
+ extest.Cov38[A,B,C] forSome { -A; B; C <: Tuple2[_, B] }
abstract trait Cov39[-A, -B, C <: Tuple2[_, _]] extends Object
extest.Cov39[_, _, _ <: Tuple2[_, _]]
diff --git a/test/files/run/macro-abort-fresh.flags b/test/files/run/macro-abort-fresh.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-abort-fresh.flags
+++ b/test/files/run/macro-abort-fresh.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-basic-ma-md-mi.flags b/test/files/run/macro-basic-ma-md-mi.flags
index 06a7b31f11..5e5dd6ce79 100644
--- a/test/files/run/macro-basic-ma-md-mi.flags
+++ b/test/files/run/macro-basic-ma-md-mi.flags
@@ -1 +1 @@
--Xmacros
+-language:experimental.macros
diff --git a/test/files/run/macro-basic-ma-mdmi.flags b/test/files/run/macro-basic-ma-mdmi.flags
index 06a7b31f11..5e5dd6ce79 100644
--- a/test/files/run/macro-basic-ma-mdmi.flags
+++ b/test/files/run/macro-basic-ma-mdmi.flags
@@ -1 +1 @@
--Xmacros
+-language:experimental.macros
diff --git a/test/files/run/macro-basic-mamd-mi.flags b/test/files/run/macro-basic-mamd-mi.flags
index 06a7b31f11..5e5dd6ce79 100644
--- a/test/files/run/macro-basic-mamd-mi.flags
+++ b/test/files/run/macro-basic-mamd-mi.flags
@@ -1 +1 @@
--Xmacros
+-language:experimental.macros
diff --git a/test/files/run/macro-bodyexpandstoimpl.flags b/test/files/run/macro-bodyexpandstoimpl.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-bodyexpandstoimpl.flags
+++ b/test/files/run/macro-bodyexpandstoimpl.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-declared-in-annotation.flags b/test/files/run/macro-declared-in-annotation.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-declared-in-annotation.flags
+++ b/test/files/run/macro-declared-in-annotation.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-declared-in-anonymous.flags b/test/files/run/macro-declared-in-anonymous.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-declared-in-anonymous.flags
+++ b/test/files/run/macro-declared-in-anonymous.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-declared-in-block.flags b/test/files/run/macro-declared-in-block.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-declared-in-block.flags
+++ b/test/files/run/macro-declared-in-block.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-declared-in-class-class.flags b/test/files/run/macro-declared-in-class-class.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-declared-in-class-class.flags
+++ b/test/files/run/macro-declared-in-class-class.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-declared-in-class-object.flags b/test/files/run/macro-declared-in-class-object.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-declared-in-class-object.flags
+++ b/test/files/run/macro-declared-in-class-object.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-declared-in-class.flags b/test/files/run/macro-declared-in-class.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-declared-in-class.flags
+++ b/test/files/run/macro-declared-in-class.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-declared-in-default-param.flags b/test/files/run/macro-declared-in-default-param.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-declared-in-default-param.flags
+++ b/test/files/run/macro-declared-in-default-param.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-declared-in-implicit-class.flags b/test/files/run/macro-declared-in-implicit-class.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-declared-in-implicit-class.flags
+++ b/test/files/run/macro-declared-in-implicit-class.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-declared-in-method.flags b/test/files/run/macro-declared-in-method.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-declared-in-method.flags
+++ b/test/files/run/macro-declared-in-method.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-declared-in-object-class.flags b/test/files/run/macro-declared-in-object-class.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-declared-in-object-class.flags
+++ b/test/files/run/macro-declared-in-object-class.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-declared-in-object-object.flags b/test/files/run/macro-declared-in-object-object.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-declared-in-object-object.flags
+++ b/test/files/run/macro-declared-in-object-object.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-declared-in-object.flags b/test/files/run/macro-declared-in-object.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-declared-in-object.flags
+++ b/test/files/run/macro-declared-in-object.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-declared-in-package-object.flags b/test/files/run/macro-declared-in-package-object.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-declared-in-package-object.flags
+++ b/test/files/run/macro-declared-in-package-object.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-declared-in-refinement.flags b/test/files/run/macro-declared-in-refinement.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-declared-in-refinement.flags
+++ b/test/files/run/macro-declared-in-refinement.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-declared-in-trait.flags b/test/files/run/macro-declared-in-trait.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-declared-in-trait.flags
+++ b/test/files/run/macro-declared-in-trait.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-def-infer-return-type-a.flags b/test/files/run/macro-def-infer-return-type-a.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-def-infer-return-type-a.flags
+++ b/test/files/run/macro-def-infer-return-type-a.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-def-infer-return-type-b.flags b/test/files/run/macro-def-infer-return-type-b.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-def-infer-return-type-b.flags
+++ b/test/files/run/macro-def-infer-return-type-b.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-def-infer-return-type-c.flags b/test/files/run/macro-def-infer-return-type-c.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-def-infer-return-type-c.flags
+++ b/test/files/run/macro-def-infer-return-type-c.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-def-path-dependent-a.flags b/test/files/run/macro-def-path-dependent-a.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-def-path-dependent-a.flags
+++ b/test/files/run/macro-def-path-dependent-a.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-def-path-dependent-b.flags b/test/files/run/macro-def-path-dependent-b.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-def-path-dependent-b.flags
+++ b/test/files/run/macro-def-path-dependent-b.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-def-path-dependent-c.flags b/test/files/run/macro-def-path-dependent-c.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-def-path-dependent-c.flags
+++ b/test/files/run/macro-def-path-dependent-c.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-def-path-dependent-d.flags b/test/files/run/macro-def-path-dependent-d.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-def-path-dependent-d.flags
+++ b/test/files/run/macro-def-path-dependent-d.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-expand-implicit-macro-has-implicit.flags b/test/files/run/macro-expand-implicit-macro-has-implicit.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-expand-implicit-macro-has-implicit.flags
+++ b/test/files/run/macro-expand-implicit-macro-has-implicit.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-expand-implicit-macro-is-implicit.flags b/test/files/run/macro-expand-implicit-macro-is-implicit.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-expand-implicit-macro-is-implicit.flags
+++ b/test/files/run/macro-expand-implicit-macro-is-implicit.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-expand-implicit-macro-is-val.flags b/test/files/run/macro-expand-implicit-macro-is-val.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-expand-implicit-macro-is-val.flags
+++ b/test/files/run/macro-expand-implicit-macro-is-val.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-expand-implicit-macro-is-view.flags b/test/files/run/macro-expand-implicit-macro-is-view.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-expand-implicit-macro-is-view.flags
+++ b/test/files/run/macro-expand-implicit-macro-is-view.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-expand-multiple-arglists.flags b/test/files/run/macro-expand-multiple-arglists.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-expand-multiple-arglists.flags
+++ b/test/files/run/macro-expand-multiple-arglists.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-expand-nullary-generic.flags b/test/files/run/macro-expand-nullary-generic.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-expand-nullary-generic.flags
+++ b/test/files/run/macro-expand-nullary-generic.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-expand-nullary-nongeneric.flags b/test/files/run/macro-expand-nullary-nongeneric.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-expand-nullary-nongeneric.flags
+++ b/test/files/run/macro-expand-nullary-nongeneric.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-expand-overload.flags b/test/files/run/macro-expand-overload.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-expand-overload.flags
+++ b/test/files/run/macro-expand-overload.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-expand-override.flags b/test/files/run/macro-expand-override.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-expand-override.flags
+++ b/test/files/run/macro-expand-override.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-expand-recursive.flags b/test/files/run/macro-expand-recursive.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-expand-recursive.flags
+++ b/test/files/run/macro-expand-recursive.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-expand-tparams-bounds-a.flags b/test/files/run/macro-expand-tparams-bounds-a.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-expand-tparams-bounds-a.flags
+++ b/test/files/run/macro-expand-tparams-bounds-a.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-expand-tparams-bounds-b.flags b/test/files/run/macro-expand-tparams-bounds-b.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-expand-tparams-bounds-b.flags
+++ b/test/files/run/macro-expand-tparams-bounds-b.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-expand-tparams-explicit.flags b/test/files/run/macro-expand-tparams-explicit.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-expand-tparams-explicit.flags
+++ b/test/files/run/macro-expand-tparams-explicit.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-expand-tparams-implicit.flags b/test/files/run/macro-expand-tparams-implicit.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-expand-tparams-implicit.flags
+++ b/test/files/run/macro-expand-tparams-implicit.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-expand-tparams-only-in-impl.flags b/test/files/run/macro-expand-tparams-only-in-impl.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-expand-tparams-only-in-impl.flags
+++ b/test/files/run/macro-expand-tparams-only-in-impl.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-expand-tparams-optional.flags b/test/files/run/macro-expand-tparams-optional.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-expand-tparams-optional.flags
+++ b/test/files/run/macro-expand-tparams-optional.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-expand-tparams-prefix-a.flags b/test/files/run/macro-expand-tparams-prefix-a.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-expand-tparams-prefix-a.flags
+++ b/test/files/run/macro-expand-tparams-prefix-a.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-expand-tparams-prefix-b.flags b/test/files/run/macro-expand-tparams-prefix-b.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-expand-tparams-prefix-b.flags
+++ b/test/files/run/macro-expand-tparams-prefix-b.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-expand-tparams-prefix-c1.flags b/test/files/run/macro-expand-tparams-prefix-c1.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-expand-tparams-prefix-c1.flags
+++ b/test/files/run/macro-expand-tparams-prefix-c1.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-expand-tparams-prefix-c2.flags b/test/files/run/macro-expand-tparams-prefix-c2.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-expand-tparams-prefix-c2.flags
+++ b/test/files/run/macro-expand-tparams-prefix-c2.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-expand-tparams-prefix-d1.flags b/test/files/run/macro-expand-tparams-prefix-d1.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-expand-tparams-prefix-d1.flags
+++ b/test/files/run/macro-expand-tparams-prefix-d1.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-expand-varargs-explicit-over-nonvarargs-bad.flags b/test/files/run/macro-expand-varargs-explicit-over-nonvarargs-bad.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-expand-varargs-explicit-over-nonvarargs-bad.flags
+++ b/test/files/run/macro-expand-varargs-explicit-over-nonvarargs-bad.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-expand-varargs-explicit-over-nonvarargs-good.flags b/test/files/run/macro-expand-varargs-explicit-over-nonvarargs-good.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-expand-varargs-explicit-over-nonvarargs-good.flags
+++ b/test/files/run/macro-expand-varargs-explicit-over-nonvarargs-good.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-expand-varargs-explicit-over-varargs.flags b/test/files/run/macro-expand-varargs-explicit-over-varargs.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-expand-varargs-explicit-over-varargs.flags
+++ b/test/files/run/macro-expand-varargs-explicit-over-varargs.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-expand-varargs-implicit-over-nonvarargs.flags b/test/files/run/macro-expand-varargs-implicit-over-nonvarargs.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-expand-varargs-implicit-over-nonvarargs.flags
+++ b/test/files/run/macro-expand-varargs-implicit-over-nonvarargs.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-expand-varargs-implicit-over-varargs.flags b/test/files/run/macro-expand-varargs-implicit-over-varargs.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-expand-varargs-implicit-over-varargs.flags
+++ b/test/files/run/macro-expand-varargs-implicit-over-varargs.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-impl-default-params.flags b/test/files/run/macro-impl-default-params.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-impl-default-params.flags
+++ b/test/files/run/macro-impl-default-params.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-impl-rename-context.flags b/test/files/run/macro-impl-rename-context.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-impl-rename-context.flags
+++ b/test/files/run/macro-impl-rename-context.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-invalidret-doesnt-conform-to-def-rettype.flags b/test/files/run/macro-invalidret-doesnt-conform-to-def-rettype.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-invalidret-doesnt-conform-to-def-rettype.flags
+++ b/test/files/run/macro-invalidret-doesnt-conform-to-def-rettype.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-invalidret-doesnt-conform-to-impl-rettype.flags b/test/files/run/macro-invalidret-doesnt-conform-to-impl-rettype.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-invalidret-doesnt-conform-to-impl-rettype.flags
+++ b/test/files/run/macro-invalidret-doesnt-conform-to-impl-rettype.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-invalidret-nontypeable.flags b/test/files/run/macro-invalidret-nontypeable.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-invalidret-nontypeable.flags
+++ b/test/files/run/macro-invalidret-nontypeable.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-invalidusage-badret.flags b/test/files/run/macro-invalidusage-badret.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-invalidusage-badret.flags
+++ b/test/files/run/macro-invalidusage-badret.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-invalidusage-partialapplication.flags b/test/files/run/macro-invalidusage-partialapplication.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-invalidusage-partialapplication.flags
+++ b/test/files/run/macro-invalidusage-partialapplication.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-openmacros.flags b/test/files/run/macro-openmacros.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-openmacros.flags
+++ b/test/files/run/macro-openmacros.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-quasiinvalidbody-c.flags b/test/files/run/macro-quasiinvalidbody-c.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-quasiinvalidbody-c.flags
+++ b/test/files/run/macro-quasiinvalidbody-c.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-range.flags b/test/files/run/macro-range.flags
index 06a7b31f11..5e5dd6ce79 100644
--- a/test/files/run/macro-range.flags
+++ b/test/files/run/macro-range.flags
@@ -1 +1 @@
--Xmacros
+-language:experimental.macros
diff --git a/test/files/run/macro-reflective-ma-normal-mdmi.flags b/test/files/run/macro-reflective-ma-normal-mdmi.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-reflective-ma-normal-mdmi.flags
+++ b/test/files/run/macro-reflective-ma-normal-mdmi.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-reflective-mamd-normal-mi.check b/test/files/run/macro-reflective-mamd-normal-mi.check
deleted file mode 100644
index ac4213d6e9..0000000000
--- a/test/files/run/macro-reflective-mamd-normal-mi.check
+++ /dev/null
@@ -1 +0,0 @@
-43 \ No newline at end of file
diff --git a/test/files/run/macro-reify-basic.flags b/test/files/run/macro-reify-basic.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-reify-basic.flags
+++ b/test/files/run/macro-reify-basic.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-reify-eval-eval.flags b/test/files/run/macro-reify-eval-eval.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-reify-eval-eval.flags
+++ b/test/files/run/macro-reify-eval-eval.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-reify-eval-outside-reify.flags b/test/files/run/macro-reify-eval-outside-reify.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-reify-eval-outside-reify.flags
+++ b/test/files/run/macro-reify-eval-outside-reify.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-reify-freevars.flags b/test/files/run/macro-reify-freevars.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-reify-freevars.flags
+++ b/test/files/run/macro-reify-freevars.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-reify-nested-a.flags b/test/files/run/macro-reify-nested-a.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-reify-nested-a.flags
+++ b/test/files/run/macro-reify-nested-a.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-reify-nested-b.flags b/test/files/run/macro-reify-nested-b.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-reify-nested-b.flags
+++ b/test/files/run/macro-reify-nested-b.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-reify-ref-to-packageless.flags b/test/files/run/macro-reify-ref-to-packageless.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-reify-ref-to-packageless.flags
+++ b/test/files/run/macro-reify-ref-to-packageless.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-reify-tagful-a.flags b/test/files/run/macro-reify-tagful-a.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-reify-tagful-a.flags
+++ b/test/files/run/macro-reify-tagful-a.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-reify-tagless-a.flags b/test/files/run/macro-reify-tagless-a.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-reify-tagless-a.flags
+++ b/test/files/run/macro-reify-tagless-a.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-reify-unreify.flags b/test/files/run/macro-reify-unreify.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-reify-unreify.flags
+++ b/test/files/run/macro-reify-unreify.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-reify-value-outside-reify.flags b/test/files/run/macro-reify-value-outside-reify.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-reify-value-outside-reify.flags
+++ b/test/files/run/macro-reify-value-outside-reify.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-repl-basic.check b/test/files/run/macro-repl-basic.check
index 3bc899f49b..9e0f9aa1a2 100644
--- a/test/files/run/macro-repl-basic.check
+++ b/test/files/run/macro-repl-basic.check
@@ -1,51 +1,54 @@
-Type in expressions to have them evaluated.
-Type :help for more information.
-
-scala>
-
-scala> import scala.reflect.makro.{Context => Ctx}
-import scala.reflect.makro.{Context=>Ctx}
-
-scala>
-
-scala> object Impls {
- def foo(c: Ctx)(x: c.Expr[Int]) = {
- import c.mirror._
- val body = Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(1))))
- Expr[Int](body)
- }
-
- def bar(c: Ctx)(x: c.Expr[Int]) = {
- import c.mirror._
- val body = Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(2))))
- Expr[Int](body)
- }
-
- def quux(c: Ctx)(x: c.Expr[Int]) = {
- import c.mirror._
- val body = Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(3))))
- Expr[Int](body)
- }
-}
-defined module Impls
-
-scala> object Macros {
- object Shmacros {
- def foo(x: Int): Int = macro Impls.foo
- }
- def bar(x: Int): Int = macro Impls.bar
-}; class Macros {
- def quux(x: Int): Int = macro Impls.quux
-}
-defined module Macros
-defined class Macros
-
-scala>
-
-scala> import Macros.Shmacros._
-import Macros.Shmacros._
-
-scala> println(foo(2) + Macros.bar(2) * new Macros().quux(4))
-31
-
-scala>
+Type in expressions to have them evaluated.
+Type :help for more information.
+
+scala>
+
+scala> import language.experimental.macros
+import language.experimental.macros
+
+scala> import scala.reflect.makro.{Context => Ctx}
+import scala.reflect.makro.{Context=>Ctx}
+
+scala>
+
+scala> object Impls {
+ def foo(c: Ctx)(x: c.Expr[Int]) = {
+ import c.mirror._
+ val body = Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(1))))
+ Expr[Int](body)
+ }
+
+ def bar(c: Ctx)(x: c.Expr[Int]) = {
+ import c.mirror._
+ val body = Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(2))))
+ Expr[Int](body)
+ }
+
+ def quux(c: Ctx)(x: c.Expr[Int]) = {
+ import c.mirror._
+ val body = Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(3))))
+ Expr[Int](body)
+ }
+}
+defined module Impls
+
+scala> object Macros {
+ object Shmacros {
+ def foo(x: Int): Int = macro Impls.foo
+ }
+ def bar(x: Int): Int = macro Impls.bar
+}; class Macros {
+ def quux(x: Int): Int = macro Impls.quux
+}
+defined module Macros
+defined class Macros
+
+scala>
+
+scala> import Macros.Shmacros._
+import Macros.Shmacros._
+
+scala> println(foo(2) + Macros.bar(2) * new Macros().quux(4))
+31
+
+scala>
diff --git a/test/files/run/macro-repl-basic.scala b/test/files/run/macro-repl-basic.scala
index a21eb7815f..e8849b4b56 100644
--- a/test/files/run/macro-repl-basic.scala
+++ b/test/files/run/macro-repl-basic.scala
@@ -1,8 +1,8 @@
import scala.tools.partest.ReplTest
object Test extends ReplTest {
- override def extraSettings = "-Xmacros"
def code = """
+ |import language.experimental.macros
|import scala.reflect.makro.{Context => Ctx}
|
|object Impls {
@@ -36,4 +36,4 @@ object Test extends ReplTest {
|import Macros.Shmacros._
|println(foo(2) + Macros.bar(2) * new Macros().quux(4))
|""".stripMargin
-} \ No newline at end of file
+}
diff --git a/test/files/run/macro-repl-dontexpand.scala b/test/files/run/macro-repl-dontexpand.scala
index 9889a8ffdf..cd1b2e1969 100644
--- a/test/files/run/macro-repl-dontexpand.scala
+++ b/test/files/run/macro-repl-dontexpand.scala
@@ -1,9 +1,9 @@
import scala.tools.partest.ReplTest
object Test extends ReplTest {
- override def extraSettings = "-Xmacros"
+ override def extraSettings = "-language:experimental.macros"
def code = """
|def bar(c: scala.reflect.makro.Context) = ???
|def foo = macro bar
|""".stripMargin
-} \ No newline at end of file
+}
diff --git a/test/files/run/macro-rettype-mismatch.flags b/test/files/run/macro-rettype-mismatch.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-rettype-mismatch.flags
+++ b/test/files/run/macro-rettype-mismatch.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-settings.flags b/test/files/run/macro-settings.flags
index cdc7512197..15479e30b8 100644
--- a/test/files/run/macro-settings.flags
+++ b/test/files/run/macro-settings.flags
@@ -1 +1 @@
--Xmacros -Xmacro-settings:hello=1 \ No newline at end of file
+-language:experimental.macros -Xmacro-settings:hello=1 \ No newline at end of file
diff --git a/test/files/run/macro-sip19-revised.flags b/test/files/run/macro-sip19-revised.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-sip19-revised.flags
+++ b/test/files/run/macro-sip19-revised.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-sip19.flags b/test/files/run/macro-sip19.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-sip19.flags
+++ b/test/files/run/macro-sip19.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-typecheck-implicitsdisabled.flags b/test/files/run/macro-typecheck-implicitsdisabled.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-typecheck-implicitsdisabled.flags
+++ b/test/files/run/macro-typecheck-implicitsdisabled.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-typecheck-macrosdisabled.flags b/test/files/run/macro-typecheck-macrosdisabled.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-typecheck-macrosdisabled.flags
+++ b/test/files/run/macro-typecheck-macrosdisabled.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-undetparams-consfromsls.flags b/test/files/run/macro-undetparams-consfromsls.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-undetparams-consfromsls.flags
+++ b/test/files/run/macro-undetparams-consfromsls.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-undetparams-implicitval.flags b/test/files/run/macro-undetparams-implicitval.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-undetparams-implicitval.flags
+++ b/test/files/run/macro-undetparams-implicitval.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/macro-undetparams-macroitself.flags b/test/files/run/macro-undetparams-macroitself.flags
index 7fea2ff901..cd66464f2f 100644
--- a/test/files/run/macro-undetparams-macroitself.flags
+++ b/test/files/run/macro-undetparams-macroitself.flags
@@ -1 +1 @@
--Xmacros \ No newline at end of file
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/run/repl-parens.check b/test/files/run/repl-parens.check
index 69f0a9ce30..4b7ce6b059 100644
--- a/test/files/run/repl-parens.check
+++ b/test/files/run/repl-parens.check
@@ -34,7 +34,7 @@ res7: (Int, Int) = (4,4)
scala> (((2 + 2)), ((2 + 2)), 2)
res8: (Int, Int, Int) = (4,4,2)
-scala> ((((2 + 2)), ((2 + 2)), 2).productIterator ++ Iterator(3) mkString)
+scala> (((((2 + 2)), ((2 + 2)), 2).productIterator ++ Iterator(3)).mkString)
res9: String = 4423
scala>
diff --git a/test/files/run/repl-parens.scala b/test/files/run/repl-parens.scala
index c1cf9b50e1..e25933b1a2 100644
--- a/test/files/run/repl-parens.scala
+++ b/test/files/run/repl-parens.scala
@@ -11,7 +11,7 @@ object Test extends ReplTest {
5 ; ( (2 + 2 ) ) ; ((5))
(((2 + 2)), ((2 + 2)))
(((2 + 2)), ((2 + 2)), 2)
-((((2 + 2)), ((2 + 2)), 2).productIterator ++ Iterator(3) mkString)
+(((((2 + 2)), ((2 + 2)), 2).productIterator ++ Iterator(3)).mkString)
55 ; ((2 + 2)) ; (1, 2, 3)
55 ; (x: Int) => x + 1 ; () => ((5))
@@ -26,4 +26,4 @@ foo(5)(10)(15)+foo(5)(10)(15)
List(1) ++ List('a')
""".trim
-} \ No newline at end of file
+}
diff --git a/test/files/run/repl-power.check b/test/files/run/repl-power.check
index b811a4a8c5..e439a2a7f4 100644
--- a/test/files/run/repl-power.check
+++ b/test/files/run/repl-power.check
@@ -1,32 +1,33 @@
-Type in expressions to have them evaluated.
-Type :help for more information.
-
-scala> :power
-** Power User mode enabled - BEEP WHIR GYVE **
-** :phase has been set to 'typer'. **
-** scala.tools.nsc._ has been imported **
-** global._, definitions._ also imported **
-** Try :help, :vals, power.<tab> **
-
-scala> // guarding against "error: reference to global is ambiguous"
-
-scala> global.emptyValDef // "it is imported twice in the same scope by ..."
-res0: $r.global.emptyValDef.type = private val _ = _
-
-scala> val tp = ArrayClass[scala.util.Random] // magic with manifests
-tp: $r.global.Type = Array[scala.util.Random]
-
-scala> tp.memberType(Array_apply) // evidence
-res1: $r.global.Type = (i: Int)scala.util.Random
-
-scala> val m = LIT(10) MATCH (CASE(LIT(5)) ==> FALSE, DEFAULT ==> TRUE) // treedsl
-m: $r.treedsl.global.Match =
-10 match {
- case 5 => false
- case _ => true
-}
-
-scala> typed(m).tpe // typed is in scope
-res2: $r.treedsl.global.Type = Boolean
-
-scala>
+Type in expressions to have them evaluated.
+Type :help for more information.
+
+scala> :power
+** Power User mode enabled - BEEP WHIR GYVE **
+** :phase has been set to 'typer'. **
+** scala.tools.nsc._ has been imported **
+** global._, definitions._ also imported **
+** Try :help, :vals, power.<tab> **
+
+scala> // guarding against "error: reference to global is ambiguous"
+
+scala> global.emptyValDef // "it is imported twice in the same scope by ..."
+res0: $r.global.emptyValDef.type = private val _ = _
+
+scala> val tp = ArrayClass[scala.util.Random] // magic with manifests
+warning: there were 2 feature warnings; re-run with -feature for details
+tp: $r.global.Type = Array[scala.util.Random]
+
+scala> tp.memberType(Array_apply) // evidence
+res1: $r.global.Type = (i: Int)scala.util.Random
+
+scala> val m = LIT(10) MATCH (CASE(LIT(5)) ==> FALSE, DEFAULT ==> TRUE) // treedsl
+m: $r.treedsl.global.Match =
+10 match {
+ case 5 => false
+ case _ => true
+}
+
+scala> typed(m).tpe // typed is in scope
+res2: $r.treedsl.global.Type = Boolean
+
+scala>
diff --git a/test/files/run/t4172.check b/test/files/run/t4172.check
index da467e27ea..4598e02d1f 100644
--- a/test/files/run/t4172.check
+++ b/test/files/run/t4172.check
@@ -4,6 +4,8 @@ Type :help for more information.
scala>
scala> val c = { class C { override def toString = "C" }; ((new C, new C { def f = 2 })) }
+warning: there were 1 feature warnings; re-run with -feature for details
+warning: there were 1 feature warnings; re-run with -feature for details
c: (C, C{def f: Int}) forSome { type C <: Object } = (C,C)
scala>
diff --git a/test/files/run/t4317/S_1.scala b/test/files/run/t4317/S_1.scala
index 2de408268c..2756c879eb 100644
--- a/test/files/run/t4317/S_1.scala
+++ b/test/files/run/t4317/S_1.scala
@@ -1,3 +1,5 @@
+import language.existentials
+
object S_1 {
def foo1(x: Class[_ <: AnyRef]) = 0
def foo2(x: Class[_ <: AnyRef], y: Int) = 99
diff --git a/test/files/run/t4710.check b/test/files/run/t4710.check
index aa2f08d452..7c2b10b098 100644
--- a/test/files/run/t4710.check
+++ b/test/files/run/t4710.check
@@ -2,6 +2,7 @@ Type in expressions to have them evaluated.
Type :help for more information.
scala> def method : String = { implicit def f(s: Symbol) = "" ; 'symbol }
+warning: there were 1 feature warnings; re-run with -feature for details
method: String
scala>
diff --git a/test/scaladoc/resources/implicits-base-res.scala b/test/scaladoc/resources/implicits-base-res.scala
new file mode 100644
index 0000000000..db7ca4fa51
--- /dev/null
+++ b/test/scaladoc/resources/implicits-base-res.scala
@@ -0,0 +1,143 @@
+/**
+ * Test scaladoc implicits - the bread and butter of the testsuite :)
+ */
+package scala.test.scaladoc.implicits.base
+
+class Foo[T]
+class Bar[T]
+trait MyNumeric[R]
+
+/** Class A
+ * - tests the complete type inference
+ * - the following inherited methods should appear:
+ * {{{
+ * def convToGtColonDoubleA: Double // pimpA3: with a constraint that T <: Double
+ * def convToIntA: Int // pimpA2: with a constraint that T = Int
+ * def convToManifestA: T // pimpA7: with 2 constraints: T: Manifest and T <: Double
+ * def convToMyNumericA: T // pimpA6: with a constraint that there is x: MyNumeric[T] implicit in scope
+ * def convToNumericA: T // pimpA1: with a constraint that there is x: Numeric[T] implicit in scope
+ * def convToPimpedA: Bar[Foo[T]] // pimpA5: no constraints
+ * def convToPimpedA: S // pimpA4: with 3 constraints: T = Foo[Bar[S]], S: Foo and S: Bar
+ * def convToTraversableOps: T // pimpA7: with 2 constraints: T: Manifest and T <: Double
+ * // should not be abstract!
+ * }}}
+ */
+class A[T] {
+ /** This should prevent the implicitly inherited `def convToPimpedA: T` from `pimpA0` from showing up */
+ def convToPimpedA: T = sys.error("Let's check it out!")
+}
+/** Companion object with implicit transformations */
+object A {
+ implicit def pimpA0[V](a: A[V]) = new PimpedA(a)
+ implicit def pimpA1[ZBUR: Numeric](a: A[ZBUR]) = new NumericA[ZBUR](a)
+ implicit def pimpA2(a: A[Int]) = new IntA(a)
+ implicit def pimpA3(a: A[T] forSome { type T <: Double }) = new GtColonDoubleA(a)
+ implicit def pimpA4[S](a: A[Foo[Bar[S]]])(implicit foo: Foo[S], bar: Bar[S]): PimpedA[S] = sys.error("not implemented")
+ implicit def pimpA5[Z](a: A[Z]): PimpedA[Bar[Foo[Z]]] = sys.error("not implemented")
+ implicit def pimpA6[Z: MyNumeric](a: A[Z]) = new MyNumericA[Z](a)
+ // TODO: Add H <: Double and see why it crashes for C and D -- context bounds, need to check!
+ implicit def pimpA7[H <: Double : Manifest](a: A[H]) = new ManifestA[H](a) with MyTraversableOps[H] { def convToTraversableOps: H = sys.error("no") }
+}
+
+
+/** Class B
+ * - tests the existential type solving
+ * - the following inherited methods should appear:
+ * {{{
+ * def convToGtColonDoubleA: Double // pimpA3: no constraints
+ * def convToManifestA: Double // pimpA7: no constraints
+ * def convToMyNumericA: Double // pimpA6: (if showAll is set) with a constraint that there is x: MyNumeric[Double] implicit in scope
+ * def convToNumericA: Double // pimpA1: no constraintsd
+ * def convToPimpedA: Bar[Foo[Double]] // pimpA5: no constraints
+ * def convToTraversableOps: Double // pimpA7: no constraints
+ * // should not be abstract!
+ * }}}
+ */
+class B extends A[Double]
+object B extends A
+
+
+/** Class C
+ * - tests asSeenFrom
+ * - the following inherited methods should appear:
+ * {{{
+ * def convToIntA: Int // pimpA2: no constraints
+ * def convToMyNumericA: Int // pimpA6: (if showAll is set) with a constraint that there is x: MyNumeric[Int] implicit in scope
+ * def convToNumericA: Int // pimpA1: no constraints
+ * def convToPimpedA: Bar[Foo[Int]] // pimpA5: no constraints
+ * }}}
+ */
+class C extends A[Int]
+object C extends A
+
+
+/** Class D
+ * - tests implicit elimination
+ * - the following inherited methods should appear:
+ * {{{
+ * def convToMyNumericA: String // pimpA6: (if showAll is set) with a constraint that there is x: MyNumeric[String] implicit in scope
+ * def convToNumericA: String // pimpA1: (if showAll is set) with a constraint that there is x: Numeric[String] implicit in scope
+ * def convToPimpedA: Bar[Foo[String]] // pimpA5: no constraints
+ * }}}
+ */
+class D extends A[String]
+/** Companion object with implicit transformations */
+object D extends A
+
+
+/** PimpedA class <br/>
+ * - tests simple inheritance and asSeenFrom
+ * - A, B and C should be implicitly converted to this */
+class PimpedA[V](a: A[V]) {
+ /** The convToPimpedA: V documentation... */
+ def convToPimpedA: V = sys.error("Not implemented")
+}
+
+/** NumericA class <br/>
+ * - tests the implicit conversion between parametric and fixed types
+ * - A, B and C should be implicitly converted to this */
+class NumericA[U: Numeric](a: A[U]) {
+ /** The convToNumericA: U documentation... */
+ def convToNumericA: U = implicitly[Numeric[U]].zero
+}
+
+/** IntA class <br/>
+ * - tests the interaction between implicit conversion and specific types
+ * - A and C should be implicitly converted to this */
+class IntA(a: A[Int]) {
+ /** The convToIntA: Int documentation... */
+ def convToIntA: Int = 0
+}
+
+/** GtColonDoubleA class <br/>
+ * - tests the interaction between implicit conversion and existential types
+ * - A and B should be implicitly converted to this */
+class GtColonDoubleA(a: A[T] forSome { type T <: Double }) {
+ /** The convToGtColonDoubleA: Double documentation... */
+ def convToGtColonDoubleA: Double = 0
+}
+
+/** MyNumericA class <br/>
+ * - tests the implicit conversion between parametric and fixed types
+ * - A should be implicitly converted to this */
+class MyNumericA[U: MyNumeric](a: A[U]) {
+ /** The convToMyNumericA: U documentation... */
+ def convToMyNumericA: U = sys.error("dunno")
+}
+
+/** ManifestA class <br/>
+ * - tests the manifest recognition
+ * - A, B, C, D should be implicitly converted to this */
+class ManifestA[W: Manifest](a: A[W]) {
+ /** The convToManifestA: W documentation... */
+ def convToManifestA: W = sys.error("dunno")
+}
+
+/** MyTraversableOps class <br/>
+ * - checks if any abstract members are added - should not happen!
+ */
+trait MyTraversableOps[S] {
+ /** The convToTraversableOps: S documentation... */
+ def convToTraversableOps: S
+}
+
diff --git a/test/scaladoc/resources/implicits-chaining-res.scala b/test/scaladoc/resources/implicits-chaining-res.scala
new file mode 100644
index 0000000000..b20c8f846c
--- /dev/null
+++ b/test/scaladoc/resources/implicits-chaining-res.scala
@@ -0,0 +1,48 @@
+/**
+ * Testing scaladoc implicits chaining
+ */
+package scala.test.scaladoc.implicits {
+
+ // the classes involved
+ case class Z[U](a: U)
+ case class Intermediate[T, U](t: T, u: U)
+ class Implicit1[T](b: Implicit2[T])
+ class Implicit2[T](c: Implicit3[T])
+ class Implicit3[T](/* and so on */)
+
+ object chaining {
+
+ // the base conversion
+ implicit def convertToZ[T](a: A[T])(implicit b: Implicit1[T]): Z[A[T]] = Z(a)
+
+ // and the implicit chaining, don't you just love it? :D
+ // implicit1, with one alternative
+ implicit def implicit1[T <: Intermediate[_, _]](implicit b: Implicit2[T]) = new Implicit1[T](b)
+ // implicit2, with two alternatives
+ implicit def implicit2alt1[T <: Intermediate[_ <: String, _]](implicit c: Implicit3[T]) = new Implicit2[T](c)
+ implicit def implicit2alt2[T <: Intermediate[_ <: Double, _]](implicit c: Implicit3[T]) = new Implicit2[T](c)
+ // implicit3, with two alternatives
+ implicit def implicit3alt1[T <: Intermediate[_, _ <: Int]] = new Implicit3[T]()
+ implicit def implicit3alt2[T <: Intermediate[_ <: Double, _ <: AnyRef],X] = new Implicit3[T]()
+
+ // and our targets
+ /** conversion here, with constraints */
+ class A[T]()
+ /** conversion here, no constraints */
+ class B extends A[Intermediate[String, Int]]
+ /** no conversion */
+ class C extends A[Intermediate[String, String]]
+ /** conversion here, no constraints */
+ class D extends A[Intermediate[Double, Int]]
+ /** conversion here, no constraints */
+ class E extends A[Intermediate[Double, String]]
+ /** no conversion */
+ class F extends A[Intermediate[String, Double]]
+
+ object scalacTest {
+ (new B).a
+ (new D).a
+ (new E).a
+ }
+ }
+}
diff --git a/test/scaladoc/resources/implicits-elimination-res.scala b/test/scaladoc/resources/implicits-elimination-res.scala
new file mode 100644
index 0000000000..68743aee06
--- /dev/null
+++ b/test/scaladoc/resources/implicits-elimination-res.scala
@@ -0,0 +1,9 @@
+/**
+ * Testing scaladoc implicits elimination
+ */
+package scala.test.scaladoc.implicits.elimination {
+ /** No conversion, as B doesn't bring any member */
+ class A
+ class B { class C; trait V; type T; }
+ object A { implicit def toB(a: A): B = null }
+}
diff --git a/test/scaladoc/resources/implicits-scopes-res.scala b/test/scaladoc/resources/implicits-scopes-res.scala
new file mode 100644
index 0000000000..4e55c3e388
--- /dev/null
+++ b/test/scaladoc/resources/implicits-scopes-res.scala
@@ -0,0 +1,51 @@
+/**
+ * Testing scaladoc implicit scopes - looking for implicits in the right places
+ */
+package scala.test.scaladoc.implicits.scopes
+
+// TEST1 - In package object
+package object test1 {
+ implicit def toB(a: A): B = null
+}
+package test1 {
+ class A
+ class B { def b = "" }
+}
+
+// TEST2 - In enclosing package - doesn't seem to work even in scalac
+package object test2 {
+ import classes._
+ implicit def toB(a: A): B = null
+}
+package test2 {
+ package classes {
+ class A
+ class B { def b = "" }
+ object test { /* (new A).b won't compile */ }
+ }
+}
+
+// TEST3 - In companion object
+package test3 {
+ class A
+ object A { implicit def toB(a: A): B = null }
+ class B { def b = "" }
+}
+
+// TEST4 - Nested type's companion object
+package test4 {
+ class U[V]
+ class S
+ object S { implicit def toB(a: A): B = null }
+ class A extends U[S]
+ class B { def b = "" }
+}
+
+// TEST5 - In scope
+package test5 {
+ object scope {
+ class A
+ class B { def b = "" }
+ implicit def toB(a: A): B = null
+ }
+}
diff --git a/test/scaladoc/run/SI-5373.check b/test/scaladoc/run/SI-5373.check
index c55eb001cf..619c56180b 100644
--- a/test/scaladoc/run/SI-5373.check
+++ b/test/scaladoc/run/SI-5373.check
@@ -1 +1 @@
-model contains 6 documentable templates
+Done.
diff --git a/test/scaladoc/run/SI-5373.scala b/test/scaladoc/run/SI-5373.scala
index af433a1844..0062abbb2a 100644
--- a/test/scaladoc/run/SI-5373.scala
+++ b/test/scaladoc/run/SI-5373.scala
@@ -1,9 +1,9 @@
import scala.tools.nsc.doc.model._
import scala.tools.partest.ScaladocModelTest
-object Test extends ScaladocModelTest {
+object Test extends ScaladocModelTest {
- def code = """
+ override def code = """
import scala.annotation.bridge
package scala.test {
@@ -23,7 +23,7 @@ object Test extends ScaladocModelTest {
// no need for special settings
def scaladocSettings = ""
-
+
def testModel(rootPackage: Package) = {
// get the quick access implicit defs in scope (_package(s), _class(es), _trait(s), object(s) _method(s), _value(s))
import access._
diff --git a/test/scaladoc/run/implicits-base.check b/test/scaladoc/run/implicits-base.check
new file mode 100644
index 0000000000..619c56180b
--- /dev/null
+++ b/test/scaladoc/run/implicits-base.check
@@ -0,0 +1 @@
+Done.
diff --git a/test/scaladoc/run/implicits-base.scala b/test/scaladoc/run/implicits-base.scala
new file mode 100644
index 0000000000..a0dd2071d7
--- /dev/null
+++ b/test/scaladoc/run/implicits-base.scala
@@ -0,0 +1,179 @@
+import scala.tools.nsc.doc.model._
+import scala.tools.partest.ScaladocModelTest
+
+object Test extends ScaladocModelTest {
+
+ // test a file instead of a piece of code
+ override def resourceFile = "implicits-base-res.scala"
+
+ // start implicits
+ def scaladocSettings = "-implicits -implicits-show-all"
+
+ def testModel(root: Package) = {
+ // get the quick access implicit defs in scope (_package(s), _class(es), _trait(s), object(s) _method(s), _value(s))
+ import access._
+
+ // SEE THE test/resources/implicits-base-res.scala FOR THE EXPLANATION OF WHAT'S CHECKED HERE:
+ val base = root._package("scala")._package("test")._package("scaladoc")._package("implicits")._package("base")
+ var conv: ImplicitConversion = null
+
+//// class A ///////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+ val A = base._class("A")
+
+ // the method pimped on by pimpA0 should be shadowed by the method in class A
+ assert(A._conversions(A.qualifiedName + ".pimpA0").isEmpty)
+
+ // def convToNumericA: T // pimpA1: with a constraint that there is x: Numeric[T] implicit in scope
+ conv = A._conversion(A.qualifiedName + ".pimpA1")
+ assert(conv.members.length == 1)
+ assert(conv.constraints.length == 1)
+ assert(conv._member("convToNumericA").resultType.name == "T")
+
+ // def convToIntA: Int // pimpA2: with a constraint that T = Int
+ conv = A._conversion(A.qualifiedName + ".pimpA2")
+ assert(conv.members.length == 1)
+ assert(conv.constraints.length == 1)
+ assert(conv._member("convToIntA").resultType.name == "Int")
+
+ // def convToGtColonDoubleA: Double // pimpA3: with a constraint that T <: Double
+ conv = A._conversion(A.qualifiedName + ".pimpA3")
+ assert(conv.members.length == 1)
+ assert(conv.constraints.length == 1)
+ assert(conv._member("convToGtColonDoubleA").resultType.name == "Double")
+
+ // def convToPimpedA: S // pimpA4: with 3 constraints: T = Foo[Bar[S]], S: Foo and S: Bar
+ conv = A._conversion(A.qualifiedName + ".pimpA4")
+ assert(conv.members.length == 1)
+ assert(conv.constraints.length == 3)
+ assert(conv._member("convToPimpedA").resultType.name == "S")
+
+ // def convToPimpedA: Bar[Foo[T]] // pimpA5: no constraints
+ conv = A._conversion(A.qualifiedName + ".pimpA5")
+ assert(conv.members.length == 1)
+ assert(conv.constraints.length == 0)
+ assert(conv._member("convToPimpedA").resultType.name == "Bar[Foo[T]]")
+
+ // def convToMyNumericA: T // pimpA6: with a constraint that there is x: MyNumeric[T] implicit in scope
+ conv = A._conversion(A.qualifiedName + ".pimpA6")
+ assert(conv.members.length == 1)
+ assert(conv.constraints.length == 1)
+ assert(conv._member("convToMyNumericA").resultType.name == "T")
+
+ // def convToManifestA: T // pimpA7: with 2 constraints: T: Manifest and T <: Double
+ // def convToTraversableOps: T // pimpA7: with 2 constraints: T: Manifest and T <: Double
+ // should not be abstract!
+ conv = A._conversion(A.qualifiedName + ".pimpA7")
+ assert(conv.members.length == 2)
+ assert(conv.constraints.length == 2)
+ assert(conv._member("convToManifestA").resultType.name == "T")
+ assert(conv._member("convToTraversableOps").resultType.name == "T")
+ assert(conv._member("convToTraversableOps").flags.toString.indexOf("abstract") == -1)
+
+//// class B ///////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+ val B = base._class("B")
+
+ // these conversions should not affect B
+ assert(B._conversions(A.qualifiedName + ".pimpA0").isEmpty)
+ assert(B._conversions(A.qualifiedName + ".pimpA2").isEmpty)
+ assert(B._conversions(A.qualifiedName + ".pimpA4").isEmpty)
+
+ // def convToNumericA: Double // pimpA1: no constraintsd
+ conv = B._conversion(A.qualifiedName + ".pimpA1")
+ assert(conv.members.length == 1)
+ assert(conv.constraints.length == 0)
+ assert(conv._member("convToNumericA").resultType.name == "Double")
+
+ // def convToGtColonDoubleA: Double // pimpA3: no constraints
+ conv = B._conversion(A.qualifiedName + ".pimpA3")
+ assert(conv.members.length == 1)
+ assert(conv.constraints.length == 0)
+ assert(conv._member("convToGtColonDoubleA").resultType.name == "Double")
+
+ // def convToPimpedA: Bar[Foo[Double]] // pimpA5: no constraints
+ conv = B._conversion(A.qualifiedName + ".pimpA5")
+ assert(conv.members.length == 1)
+ assert(conv.constraints.length == 0)
+ assert(conv._member("convToPimpedA").resultType.name == "Bar[Foo[Double]]")
+
+ // def convToMyNumericA: Double // pimpA6: (if showAll is set) with a constraint that there is x: MyNumeric[Double] implicit in scope
+ conv = B._conversion(A.qualifiedName + ".pimpA6")
+ assert(conv.members.length == 1)
+ assert(conv.constraints.length == 1)
+ assert(conv._member("convToMyNumericA").resultType.name == "Double")
+
+ // def convToManifestA: Double // pimpA7: no constraints
+ // def convToTraversableOps: Double // pimpA7: no constraints
+ // // should not be abstract!
+ conv = B._conversion(A.qualifiedName + ".pimpA7")
+ assert(conv.members.length == 2)
+ assert(conv.constraints.length == 0)
+ assert(conv._member("convToManifestA").resultType.name == "Double")
+ assert(conv._member("convToTraversableOps").resultType.name == "Double")
+ assert(conv._member("convToTraversableOps").flags.toString.indexOf("abstract") == -1)
+
+//// class C ///////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+ val C = base._class("C")
+
+ // these conversions should not affect C
+ assert(C._conversions(A.qualifiedName + ".pimpA0").isEmpty)
+ assert(C._conversions(A.qualifiedName + ".pimpA3").isEmpty)
+ assert(C._conversions(A.qualifiedName + ".pimpA4").isEmpty)
+ assert(C._conversions(A.qualifiedName + ".pimpA7").isEmpty)
+
+ // def convToNumericA: Int // pimpA1: no constraints
+ conv = C._conversion(A.qualifiedName + ".pimpA1")
+ assert(conv.members.length == 1)
+ assert(conv.constraints.length == 0)
+ assert(conv._member("convToNumericA").resultType.name == "Int")
+
+ // def convToIntA: Int // pimpA2: no constraints
+ conv = C._conversion(A.qualifiedName + ".pimpA2")
+ assert(conv.members.length == 1)
+ assert(conv.constraints.length == 0)
+ assert(conv._member("convToIntA").resultType.name == "Int")
+
+ // def convToPimpedA: Bar[Foo[Int]] // pimpA5: no constraints
+ conv = C._conversion(A.qualifiedName + ".pimpA5")
+ assert(conv.members.length == 1)
+ assert(conv.constraints.length == 0)
+ assert(conv._member("convToPimpedA").resultType.name == "Bar[Foo[Int]]")
+
+ // def convToMyNumericA: Int // pimpA6: (if showAll is set) with a constraint that there is x: MyNumeric[Int] implicit in scope
+ conv = C._conversion(A.qualifiedName + ".pimpA6")
+ assert(conv.members.length == 1)
+ assert(conv.constraints.length == 1)
+ assert(conv._member("convToMyNumericA").resultType.name == "Int")
+
+//// class D ///////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+ val D = base._class("D")
+
+ // these conversions should not affect D
+ assert(D._conversions(A.qualifiedName + ".pimpA0").isEmpty)
+ assert(D._conversions(A.qualifiedName + ".pimpA2").isEmpty)
+ assert(D._conversions(A.qualifiedName + ".pimpA3").isEmpty)
+ assert(D._conversions(A.qualifiedName + ".pimpA4").isEmpty)
+ assert(D._conversions(A.qualifiedName + ".pimpA7").isEmpty)
+
+ // def convToNumericA: String // pimpA1: (if showAll is set) with a constraint that there is x: Numeric[String] implicit in scope
+ conv = D._conversion(A.qualifiedName + ".pimpA1")
+ assert(conv.members.length == 1)
+ assert(conv.constraints.length == 1)
+ assert(conv._member("convToNumericA").resultType.name == "String")
+
+ // def convToPimpedA: Bar[Foo[String]] // pimpA5: no constraints
+ conv = D._conversion(A.qualifiedName + ".pimpA5")
+ assert(conv.members.length == 1)
+ assert(conv.constraints.length == 0)
+ assert(conv._member("convToPimpedA").resultType.name == "Bar[Foo[String]]")
+
+ // def convToMyNumericA: String // pimpA6: (if showAll is set) with a constraint that there is x: MyNumeric[String] implicit in scope
+ conv = D._conversion(A.qualifiedName + ".pimpA6")
+ assert(conv.members.length == 1)
+ assert(conv.constraints.length == 1)
+ assert(conv._member("convToMyNumericA").resultType.name == "String")
+ }
+} \ No newline at end of file
diff --git a/test/scaladoc/run/implicits-chaining.check b/test/scaladoc/run/implicits-chaining.check
new file mode 100644
index 0000000000..619c56180b
--- /dev/null
+++ b/test/scaladoc/run/implicits-chaining.check
@@ -0,0 +1 @@
+Done.
diff --git a/test/scaladoc/run/implicits-chaining.scala b/test/scaladoc/run/implicits-chaining.scala
new file mode 100644
index 0000000000..96e288b204
--- /dev/null
+++ b/test/scaladoc/run/implicits-chaining.scala
@@ -0,0 +1,64 @@
+import scala.tools.nsc.doc.model._
+import scala.tools.partest.ScaladocModelTest
+
+object Test extends ScaladocModelTest {
+
+ // test a file instead of a piece of code
+ override def resourceFile = "implicits-chaining-res.scala"
+
+ // start implicits
+ def scaladocSettings = "-implicits"
+
+ def testModel(root: Package) = {
+ // get the quick access implicit defs in scope (_package(s), _class(es), _trait(s), object(s) _method(s), _value(s))
+ import access._
+
+ // SEE THE test/resources/implicits-chaining-res.scala FOR THE EXPLANATION OF WHAT'S CHECKED HERE:
+ val base = root._package("scala")._package("test")._package("scaladoc")._package("implicits")._object("chaining")
+ var conv: ImplicitConversion = null
+
+//// class A ///////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+ val A = base._class("A")
+
+ conv = A._conversion(base.qualifiedName + ".convertToZ")
+ assert(conv.members.length == 1)
+ assert(conv.constraints.length == 1)
+
+//// class B ///////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+ val B = base._class("B")
+
+ conv = B._conversion(base.qualifiedName + ".convertToZ")
+ assert(conv.members.length == 1)
+ assert(conv.constraints.length == 0)
+
+//// class C ///////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+ val C = base._class("C")
+
+ assert(C._conversions(base.qualifiedName + ".convertToZ").isEmpty)
+
+//// class D ///////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+ val D = base._class("D")
+
+ conv = D._conversion(base.qualifiedName + ".convertToZ")
+ assert(conv.members.length == 1)
+ assert(conv.constraints.length == 0)
+
+//// class E ///////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+ val E = base._class("E")
+
+ conv = E._conversion(base.qualifiedName + ".convertToZ")
+ assert(conv.members.length == 1)
+ assert(conv.constraints.length == 0)
+
+//// class F ///////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+ val F = base._class("F")
+
+ assert(F._conversions(base.qualifiedName + ".convertToZ").isEmpty)
+ }
+} \ No newline at end of file
diff --git a/test/scaladoc/run/implicits-elimination.check b/test/scaladoc/run/implicits-elimination.check
new file mode 100644
index 0000000000..619c56180b
--- /dev/null
+++ b/test/scaladoc/run/implicits-elimination.check
@@ -0,0 +1 @@
+Done.
diff --git a/test/scaladoc/run/implicits-elimination.scala b/test/scaladoc/run/implicits-elimination.scala
new file mode 100644
index 0000000000..71319f9f47
--- /dev/null
+++ b/test/scaladoc/run/implicits-elimination.scala
@@ -0,0 +1,22 @@
+import scala.tools.nsc.doc.model._
+import scala.tools.partest.ScaladocModelTest
+
+object Test extends ScaladocModelTest {
+
+ // test a file instead of a piece of code
+ override def resourceFile = "implicits-elimination-res.scala"
+
+ // start implicits
+ def scaladocSettings = "-implicits"
+
+ def testModel(root: Package) = {
+ // get the quick access implicit defs in scope (_package(s), _class(es), _trait(s), object(s) _method(s), _value(s))
+ import access._
+
+ // SEE THE test/resources/implicits-elimination-res.scala FOR THE EXPLANATION OF WHAT'S CHECKED HERE:
+ val base = root._package("scala")._package("test")._package("scaladoc")._package("implicits")._package("elimination")
+ val A = base._class("A")
+
+ assert(A._conversions(A.qualifiedName + ".toB").isEmpty)
+ }
+} \ No newline at end of file
diff --git a/test/scaladoc/run/implicits-scopes.check b/test/scaladoc/run/implicits-scopes.check
new file mode 100644
index 0000000000..619c56180b
--- /dev/null
+++ b/test/scaladoc/run/implicits-scopes.check
@@ -0,0 +1 @@
+Done.
diff --git a/test/scaladoc/run/implicits-scopes.scala b/test/scaladoc/run/implicits-scopes.scala
new file mode 100644
index 0000000000..7fb41e1ae8
--- /dev/null
+++ b/test/scaladoc/run/implicits-scopes.scala
@@ -0,0 +1,76 @@
+import scala.tools.nsc.doc.model._
+import scala.tools.partest.ScaladocModelTest
+
+object Test extends ScaladocModelTest {
+
+ // test a file instead of a piece of code
+ override def resourceFile = "implicits-scopes-res.scala"
+
+ // start implicits
+ def scaladocSettings = "-implicits"
+
+ def testModel(root: Package) = {
+ // get the quick access implicit defs in scope (_package(s), _class(es), _trait(s), object(s) _method(s), _value(s))
+ import access._
+ var conv: ImplicitConversion = null
+
+ // SEE THE test/resources/implicits-chaining-res.scala FOR THE EXPLANATION OF WHAT'S CHECKED HERE:
+ val base = root._package("scala")._package("test")._package("scaladoc")._package("implicits")._package("scopes")
+
+//// test1 /////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+ val doTest1 = {
+ val test1 = base._package("test1")
+ val A = test1._class("A")
+
+ conv = A._conversion(test1.qualifiedName + ".package.toB") // the .package means it's the package object
+ assert(conv.members.length == 1)
+ assert(conv.constraints.length == 0)
+ }
+
+//// test2 /////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+ val doTest2 = {
+ val test2 = base._package("test2")
+ val classes = test2._package("classes")
+ val A = classes._class("A")
+
+ assert(A._conversions(test2.qualifiedName + ".toB").isEmpty)
+ }
+
+//// test3 /////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+ val doTest3 = {
+ val test3 = base._package("test3")
+ val A = test3._class("A")
+
+ conv = A._conversion(A.qualifiedName + ".toB")
+ assert(conv.members.length == 1)
+ assert(conv.constraints.length == 0)
+ }
+
+//// test4 /////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+ val doTest4 = {
+ val test4 = base._package("test4")
+ val A = test4._class("A")
+ val S = test4._object("S")
+
+ conv = A._conversion(S.qualifiedName + ".toB")
+ assert(conv.members.length == 1)
+ assert(conv.constraints.length == 0)
+ }
+
+//// test5 /////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+ val doTest5 = {
+ val test5 = base._package("test5")
+ val scope = test5._object("scope")
+ val A = scope._class("A")
+
+ conv = A._conversion(scope.qualifiedName + ".toB")
+ assert(conv.members.length == 1)
+ assert(conv.constraints.length == 0)
+ }
+ }
+} \ No newline at end of file
diff --git a/test/scaladoc/scalacheck/CommentFactoryTest.scala b/test/scaladoc/scalacheck/CommentFactoryTest.scala
index 69c314a64c..68ca68efdd 100644
--- a/test/scaladoc/scalacheck/CommentFactoryTest.scala
+++ b/test/scaladoc/scalacheck/CommentFactoryTest.scala
@@ -3,11 +3,12 @@ import org.scalacheck.Prop._
import scala.tools.nsc.Global
import scala.tools.nsc.doc
+import scala.tools.nsc.doc.model._
import scala.tools.nsc.doc.model.comment._
class Factory(val g: Global, val s: doc.Settings)
extends doc.model.ModelFactory(g, s) {
- thisFactory: Factory with CommentFactory with doc.model.TreeFactory =>
+ thisFactory: Factory with ModelFactoryImplicitSupport with CommentFactory with doc.model.TreeFactory =>
def strip(c: Comment): Option[Inline] = {
c.body match {
@@ -28,7 +29,7 @@ object Test extends Properties("CommentFactory") {
val settings = new doc.Settings((str: String) => {})
val reporter = new scala.tools.nsc.reporters.ConsoleReporter(settings)
val g = new Global(settings, reporter)
- (new Factory(g, settings) with CommentFactory with doc.model.TreeFactory)
+ (new Factory(g, settings) with ModelFactoryImplicitSupport with CommentFactory with doc.model.TreeFactory)
}
def parse(src: String, dst: Inline) = {