Skip to content

Commit 0321f9a

Browse files
committed
Disable localContext
1 parent 832c509 commit 0321f9a

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

library/src-bootstrapped/scala/quoted/util/ExprMap.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ trait ExprMap {
1313
final class MapChildren() {
1414

1515
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
1717
tree match {
1818
case tree: Term =>
1919
transformTerm(tree, defn.AnyType)
@@ -25,7 +25,7 @@ trait ExprMap {
2525
}
2626

2727
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
2929
tree match {
3030
case tree: ValDef =>
3131
given Context = localCtx(tree)

library/src/scala/tasty/Reflection.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1993,7 +1993,7 @@ trait Reflection extends reflect.Types { reflectSelf: CompilerInterface =>
19931993
def pos: Position = reflectSelf.Symbol_pos(sym)
19941994

19951995
// 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)
19971997

19981998
/** The comment for this symbol, if any */
19991999
def comment: Option[Comment] = reflectSelf.Symbol_comment(sym)

library/src/scala/tasty/reflect/TreeAccumulator.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ trait TreeAccumulator[X] {
2323
def foldTrees(x: X, trees: Iterable[Tree])(using ctx: Context): X = trees.foldLeft(x)(foldTree)
2424

2525
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
2727
tree match {
2828
case Ident(_) =>
2929
x
@@ -84,7 +84,7 @@ trait TreeAccumulator[X] {
8484
case Import(expr, _) =>
8585
foldTree(x, expr)
8686
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)
8888
case Inferred() => x
8989
case TypeIdent(_) => x
9090
case TypeSelect(qualifier, _) => foldTree(x, qualifier)

library/src/scala/tasty/reflect/TreeMap.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ trait TreeMap {
2020
def transformTree(tree: Tree)(using ctx: Context): Tree = {
2121
tree match {
2222
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)*/)
2424
case tree: Import =>
2525
Import.copy(tree)(transformTerm(tree.expr), tree.selectors)
2626
case tree: Statement =>
@@ -42,7 +42,7 @@ trait TreeMap {
4242
}
4343

4444
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
4646
tree match {
4747
case tree: Term =>
4848
transformTerm(tree)

0 commit comments

Comments
 (0)