You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need to keep the reference to the called method, not only the symbol
of the to level class. This is important for the traces of the `assert`
method that is defined in a different file. This might also be useful
for macro annotations.
This is also a solution to the awkward Select vs. Ident distinction to
identify macros in `YCheckPositions`.
Copy file name to clipboardExpand all lines: compiler/src/dotty/tools/dotc/inlines/Inlines.scala
-14
Original file line number
Diff line number
Diff line change
@@ -299,20 +299,6 @@ object Inlines:
299
299
(newReposition).transform(tree)
300
300
endreposition
301
301
302
-
/** Leave only a call trace consisting of
303
-
* - a reference to the top-level class from which the call was inlined,
304
-
* - the call's position
305
-
* in the call field of an Inlined node.
306
-
* The trace has enough info to completely reconstruct positions.
307
-
* Note: For macros it returns a Select and for other inline methods it returns an Ident (this distinction is only temporary to be able to run YCheckPositions)
Copy file name to clipboardExpand all lines: compiler/src/dotty/tools/dotc/transform/YCheckPositions.scala
+6-6
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ class YCheckPositions extends Phase {
35
35
valcurrentSource= sources.head
36
36
assert(tree.source == currentSource, i"wrong source set for $tree # ${tree.uniqueId} of ${tree.getClass}, set to ${tree.source} but context had $currentSource\n${tree.symbol.flagsString}")
37
37
38
-
//Recursivlely check children while keeping track of current source
38
+
//Recursively check children while keeping track of current source
if (!isMacro(call)) // FIXME macro implementations can drop Inlined nodes. We should reinsert them after macro expansion based on the positions of the trees
0 commit comments