@@ -9,7 +9,7 @@ object Macros {
99
1010 // simple smoke test
1111 val sym1 : Symbol = Symbol .newMethod(
12- rootContext.owner ,
12+ Symbol .currentOwner ,
1313 " sym1" ,
1414 MethodType (List (" a" ," b" ))(
1515 _ => List (typeOf[Int ], typeOf[Int ]),
@@ -27,7 +27,7 @@ object Macros {
2727
2828 // test for no argument list (no Apply node)
2929 val sym2 : Symbol = Symbol .newMethod(
30- rootContext.owner ,
30+ Symbol .currentOwner ,
3131 " sym2" ,
3232 ByNameType (typeOf[Int ]))
3333 assert(sym2.isDefDef)
@@ -43,7 +43,7 @@ object Macros {
4343
4444 // test for multiple argument lists
4545 val sym3 : Symbol = Symbol .newMethod(
46- rootContext.owner ,
46+ Symbol .currentOwner ,
4747 " sym3" ,
4848 MethodType (List (" a" ))(
4949 _ => List (typeOf[Int ]),
@@ -63,7 +63,7 @@ object Macros {
6363
6464 // test for recursive references
6565 val sym4 : Symbol = Symbol .newMethod(
66- rootContext.owner ,
66+ Symbol .currentOwner ,
6767 " sym4" ,
6868 MethodType (List (" x" ))(
6969 _ => List (typeOf[Int ]),
@@ -85,7 +85,7 @@ object Macros {
8585
8686 // test for nested functions (one symbol is the other's parent, and we use a Closure)
8787 val sym5 : Symbol = Symbol .newMethod(
88- rootContext.owner ,
88+ Symbol .currentOwner ,
8989 " sym5" ,
9090 MethodType (List (" x" ))(
9191 _ => List (typeOf[Int ]),
@@ -119,13 +119,13 @@ object Macros {
119119
120120 // test mutually recursive definitions
121121 val sym6_1 : Symbol = Symbol .newMethod(
122- rootContext.owner ,
122+ Symbol .currentOwner ,
123123 " sym6_1" ,
124124 MethodType (List (" x" ))(
125125 _ => List (typeOf[Int ]),
126126 _ => typeOf[Int ]))
127127 val sym6_2 : Symbol = Symbol .newMethod(
128- rootContext.owner ,
128+ Symbol .currentOwner ,
129129 " sym6_2" ,
130130 MethodType (List (" x" ))(
131131 _ => List (typeOf[Int ]),
@@ -166,7 +166,7 @@ object Macros {
166166
167167 // test polymorphic methods by synthesizing an identity method
168168 val sym7 : Symbol = Symbol .newMethod(
169- rootContext.owner ,
169+ Symbol .currentOwner ,
170170 " sym7" ,
171171 PolyType (List (" T" ))(
172172 tp => List (TypeBounds (typeOf[Nothing ], typeOf[Any ])),
0 commit comments