diff options
Diffstat (limited to 'test/files/run/macro-vampire-false-warning/Macros_1.scala')
-rw-r--r-- | test/files/run/macro-vampire-false-warning/Macros_1.scala | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/files/run/macro-vampire-false-warning/Macros_1.scala b/test/files/run/macro-vampire-false-warning/Macros_1.scala index 51869d214f..63c34b3ab6 100644 --- a/test/files/run/macro-vampire-false-warning/Macros_1.scala +++ b/test/files/run/macro-vampire-false-warning/Macros_1.scala @@ -21,7 +21,7 @@ object Macros { val kvps = xs.map(_.tree).toList map { case Apply(TypeApply(Select(Apply(_, List(Literal(Constant(name: String)))), _), _), List(value)) => name -> value } // val fields = kvps map { case (k, v) => q"@body($v) def ${TermName(k)} = macro Macros.selFieldImpl" } val fields = kvps map { case (k, v) => DefDef( - Modifiers(MACRO, tpnme.EMPTY, List(Apply(Select(New(Ident(TypeName("body"))), nme.CONSTRUCTOR), List(v)))), + Modifiers(MACRO, typeNames.EMPTY, List(Apply(Select(New(Ident(TypeName("body"))), termNames.CONSTRUCTOR), List(v)))), TermName(k), Nil, Nil, Ident(TypeName("Any")), Select(Ident(TermName("Macros")), TermName("selFieldImpl"))) } // q"import scala.language.experimental.macros; class Workaround { ..$fields }; new Workaround{}" c.Expr[Any](Block( @@ -32,8 +32,8 @@ object Macros { Template( List(Select(Ident(TermName("scala")), TypeName("AnyRef"))), noSelfType, DefDef( - NoMods, nme.CONSTRUCTOR, Nil, List(Nil), TypeTree(), - Block(List(Apply(Select(Super(This(tpnme.EMPTY), tpnme.EMPTY), nme.CONSTRUCTOR), List())), Literal(Constant(())))) + NoMods, termNames.CONSTRUCTOR, Nil, List(Nil), TypeTree(), + Block(List(Apply(Select(Super(This(typeNames.EMPTY), typeNames.EMPTY), termNames.CONSTRUCTOR), List())), Literal(Constant(())))) +: fields)), ClassDef( Modifiers(FINAL), TypeName("$anon"), Nil, @@ -41,9 +41,9 @@ object Macros { List(Ident(TypeName("Workaround"))), noSelfType, List( DefDef( - NoMods, nme.CONSTRUCTOR, Nil, List(Nil), TypeTree(), - Block(List(Apply(Select(Super(This(tpnme.EMPTY), tpnme.EMPTY), nme.CONSTRUCTOR), List())), Literal(Constant(())))))))), - Apply(Select(New(Ident(TypeName("$anon"))), nme.CONSTRUCTOR), List()))) + NoMods, termNames.CONSTRUCTOR, Nil, List(Nil), TypeTree(), + Block(List(Apply(Select(Super(This(typeNames.EMPTY), typeNames.EMPTY), termNames.CONSTRUCTOR), List())), Literal(Constant(())))))))), + Apply(Select(New(Ident(TypeName("$anon"))), termNames.CONSTRUCTOR), List()))) } } |