Skip to content

Commit 27881d3

Browse files
committed
WIP: Do not add @SourceFile
1 parent 3dbfd7d commit 27881d3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

compiler/src/dotty/tools/dotc/transform/PostTyper.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -420,10 +420,10 @@ class PostTyper extends MacroTransform with InfoTransformer { thisPhase =>
420420
// Add SourceFile annotation to top-level classes
421421
if sym.owner.is(Package) then
422422
// TODO do not add SourceFile annotation
423-
if ctx.compilationUnit.source.exists && sym != defn.SourceFileAnnot then
424-
val reference = ctx.settings.sourceroot.value
425-
val relativePath = util.SourceFile.relativePath(ctx.compilationUnit.source, reference)
426-
sym.addAnnotation(Annotation.makeSourceFile(relativePath, tree.span))
423+
// if ctx.compilationUnit.source.exists && sym != defn.SourceFileAnnot then
424+
// val reference = ctx.settings.sourceroot.value
425+
// val relativePath = util.SourceFile.relativePath(ctx.compilationUnit.source, reference)
426+
// sym.addAnnotation(Annotation.makeSourceFile(relativePath, tree.span))
427427
if sym != defn.WithPureFunsAnnot && sym != defn.CaptureCheckedAnnot then
428428
if Feature.ccEnabled then
429429
sym.addAnnotation(Annotation(defn.CaptureCheckedAnnot, tree.span))

0 commit comments

Comments
 (0)