Skip to content

Commit f095806

Browse files
authored
surface (internal): Fix tree owner in surfaceDefs ValDef (#3474)
Fixes issue investigated as scala/scala3#20072 Unfortunately there are still other issues preventing compiling with `-Xcheck-macros` (https://stackoverflow.com/questions/78193025/how-to-extract-type-parameter-from-typelambda-correctly), but this fix is an important step in that direction.
1 parent 4725c92 commit f095806

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

airframe-surface/src/main/scala-3/wvlet/airframe/surface/CompileTimeSurfaceFactory.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ private[surface] class CompileTimeSurfaceFactory[Q <: Quotes](using quotes: Q):
725725
seenMethodParent.clear()
726726

727727
val surfaceDefs: List[ValDef] = surfaceToVar.toSeq.map { case (tpe, sym) =>
728-
ValDef(sym, Some(surfaceOf(tpe, useVarRef = false).asTerm))
728+
ValDef(sym, Some(surfaceOf(tpe, useVarRef = false).asTerm.changeOwner(sym)))
729729
}.toList
730730

731731
/**

0 commit comments

Comments
 (0)