diff --git a/compiler/src/dotty/tools/dotc/transform/PostTyper.scala b/compiler/src/dotty/tools/dotc/transform/PostTyper.scala index c31bfe5b1baa..f79e60f3e5ba 100644 --- a/compiler/src/dotty/tools/dotc/transform/PostTyper.scala +++ b/compiler/src/dotty/tools/dotc/transform/PostTyper.scala @@ -420,10 +420,10 @@ class PostTyper extends MacroTransform with InfoTransformer { thisPhase => // Add SourceFile annotation to top-level classes if sym.owner.is(Package) then // TODO do not add SourceFile annotation - if ctx.compilationUnit.source.exists && sym != defn.SourceFileAnnot then - val reference = ctx.settings.sourceroot.value - val relativePath = util.SourceFile.relativePath(ctx.compilationUnit.source, reference) - sym.addAnnotation(Annotation.makeSourceFile(relativePath, tree.span)) + // if ctx.compilationUnit.source.exists && sym != defn.SourceFileAnnot then + // val reference = ctx.settings.sourceroot.value + // val relativePath = util.SourceFile.relativePath(ctx.compilationUnit.source, reference) + // sym.addAnnotation(Annotation.makeSourceFile(relativePath, tree.span)) if sym != defn.WithPureFunsAnnot && sym != defn.CaptureCheckedAnnot then if Feature.ccEnabled then sym.addAnnotation(Annotation(defn.CaptureCheckedAnnot, tree.span))