diff options
Diffstat (limited to 'test/files/run')
96 files changed, 198 insertions, 183 deletions
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/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 index ac4213d6e9..e69de29bb2 100644 --- a/test/files/run/macro-reflective-mamd-normal-mi.check +++ b/test/files/run/macro-reflective-mamd-normal-mi.check @@ -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> |