File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed
src-bootstrapped/scala/quoted/util Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ trait ExprMap {
13
13
final class MapChildren () {
14
14
15
15
def transformStatement (tree : Statement )(using ctx : Context ): Statement = {
16
- def localCtx (definition : Definition ): Context = definition.symbol.localContext
16
+ def localCtx (definition : Definition ): Context = ctx // definition.symbol.localContext
17
17
tree match {
18
18
case tree : Term =>
19
19
transformTerm(tree, defn.AnyType )
@@ -25,7 +25,7 @@ trait ExprMap {
25
25
}
26
26
27
27
def transformDefinition (tree : Definition )(using ctx : Context ): Definition = {
28
- def localCtx (definition : Definition ): Context = definition.symbol.localContext
28
+ def localCtx (definition : Definition ): Context = ctx // definition.symbol.localContext
29
29
tree match {
30
30
case tree : ValDef =>
31
31
given Context = localCtx(tree)
Original file line number Diff line number Diff line change @@ -1993,7 +1993,7 @@ trait Reflection extends reflect.Types { reflectSelf: CompilerInterface =>
1993
1993
def pos : Position = reflectSelf.Symbol_pos (sym)
1994
1994
1995
1995
// TODO replace with different abstraction
1996
- def localContext (using ctx : Context ): Context = ctx // reflectSelf.Symbol_localContext(sym)
1996
+ // def localContext(using ctx: Context): Context = ctx // reflectSelf.Symbol_localContext(sym)
1997
1997
1998
1998
/** The comment for this symbol, if any */
1999
1999
def comment : Option [Comment ] = reflectSelf.Symbol_comment (sym)
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ trait TreeAccumulator[X] {
23
23
def foldTrees (x : X , trees : Iterable [Tree ])(using ctx : Context ): X = trees.foldLeft(x)(foldTree)
24
24
25
25
def foldOverTree (x : X , tree : Tree )(using ctx : Context ): X = {
26
- def localCtx (definition : Definition ): Context = definition.symbol.localContext
26
+ def localCtx (definition : Definition ): Context = ctx // definition.symbol.localContext // FIXME
27
27
tree match {
28
28
case Ident (_) =>
29
29
x
@@ -84,7 +84,7 @@ trait TreeAccumulator[X] {
84
84
case Import (expr, _) =>
85
85
foldTree(x, expr)
86
86
case clause @ PackageClause (pid, stats) =>
87
- foldTrees(foldTree(x, pid), stats)(using clause.symbol.localContext)
87
+ foldTrees(foldTree(x, pid), stats) // (using clause.symbol.localContext)
88
88
case Inferred () => x
89
89
case TypeIdent (_) => x
90
90
case TypeSelect (qualifier, _) => foldTree(x, qualifier)
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ trait TreeMap {
20
20
def transformTree (tree : Tree )(using ctx : Context ): Tree = {
21
21
tree match {
22
22
case tree : PackageClause =>
23
- PackageClause .copy(tree)(transformTerm(tree.pid).asInstanceOf [Ref ], transformTrees(tree.stats)(using tree.symbol.localContext))
23
+ PackageClause .copy(tree)(transformTerm(tree.pid).asInstanceOf [Ref ], transformTrees(tree.stats)/* (using tree.symbol.localContext)*/ )
24
24
case tree : Import =>
25
25
Import .copy(tree)(transformTerm(tree.expr), tree.selectors)
26
26
case tree : Statement =>
@@ -42,7 +42,7 @@ trait TreeMap {
42
42
}
43
43
44
44
def transformStatement (tree : Statement )(using ctx : Context ): Statement = {
45
- def localCtx (definition : Definition ): Context = definition.symbol.localContext
45
+ def localCtx (definition : Definition ): Context = ctx // definition.symbol.localContext
46
46
tree match {
47
47
case tree : Term =>
48
48
transformTerm(tree)
You can’t perform that action at this time.
0 commit comments