@@ -9,7 +9,7 @@ object Macros {
9
9
10
10
// simple smoke test
11
11
val sym1 : Symbol = Symbol .newMethod(
12
- rootContext.owner ,
12
+ Symbol .currentOwner ,
13
13
" sym1" ,
14
14
MethodType (List (" a" ," b" ))(
15
15
_ => List (typeOf[Int ], typeOf[Int ]),
@@ -27,7 +27,7 @@ object Macros {
27
27
28
28
// test for no argument list (no Apply node)
29
29
val sym2 : Symbol = Symbol .newMethod(
30
- rootContext.owner ,
30
+ Symbol .currentOwner ,
31
31
" sym2" ,
32
32
ByNameType (typeOf[Int ]))
33
33
assert(sym2.isDefDef)
@@ -43,7 +43,7 @@ object Macros {
43
43
44
44
// test for multiple argument lists
45
45
val sym3 : Symbol = Symbol .newMethod(
46
- rootContext.owner ,
46
+ Symbol .currentOwner ,
47
47
" sym3" ,
48
48
MethodType (List (" a" ))(
49
49
_ => List (typeOf[Int ]),
@@ -63,7 +63,7 @@ object Macros {
63
63
64
64
// test for recursive references
65
65
val sym4 : Symbol = Symbol .newMethod(
66
- rootContext.owner ,
66
+ Symbol .currentOwner ,
67
67
" sym4" ,
68
68
MethodType (List (" x" ))(
69
69
_ => List (typeOf[Int ]),
@@ -85,7 +85,7 @@ object Macros {
85
85
86
86
// test for nested functions (one symbol is the other's parent, and we use a Closure)
87
87
val sym5 : Symbol = Symbol .newMethod(
88
- rootContext.owner ,
88
+ Symbol .currentOwner ,
89
89
" sym5" ,
90
90
MethodType (List (" x" ))(
91
91
_ => List (typeOf[Int ]),
@@ -119,13 +119,13 @@ object Macros {
119
119
120
120
// test mutually recursive definitions
121
121
val sym6_1 : Symbol = Symbol .newMethod(
122
- rootContext.owner ,
122
+ Symbol .currentOwner ,
123
123
" sym6_1" ,
124
124
MethodType (List (" x" ))(
125
125
_ => List (typeOf[Int ]),
126
126
_ => typeOf[Int ]))
127
127
val sym6_2 : Symbol = Symbol .newMethod(
128
- rootContext.owner ,
128
+ Symbol .currentOwner ,
129
129
" sym6_2" ,
130
130
MethodType (List (" x" ))(
131
131
_ => List (typeOf[Int ]),
@@ -166,7 +166,7 @@ object Macros {
166
166
167
167
// test polymorphic methods by synthesizing an identity method
168
168
val sym7 : Symbol = Symbol .newMethod(
169
- rootContext.owner ,
169
+ Symbol .currentOwner ,
170
170
" sym7" ,
171
171
PolyType (List (" T" ))(
172
172
tp => List (TypeBounds (typeOf[Nothing ], typeOf[Any ])),
0 commit comments