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
Add source file to TASTy attributes. This is a first step towards
removing the `@SourceFile` annotation.
#### Release notes
Tools that read TASTy need to know that the source file must be
unpickled from TASTy attributes.
Copy file name to clipboardExpand all lines: compiler/src/dotty/tools/dotc/transform/PostTyper.scala
+3-2
Original file line number
Diff line number
Diff line change
@@ -417,12 +417,13 @@ class PostTyper extends MacroTransform with InfoTransformer { thisPhase =>
417
417
if illegalRefs.nonEmpty then
418
418
report.error(
419
419
em"The type of a class parent cannot refer to constructor parameters, but ${parent.tpe} refers to ${illegalRefs.map(_.name.show).mkString(",")}", parent.srcPos)
420
-
// Add SourceFile annotation to top-level classes
421
420
if sym.owner.is(Package) then
421
+
// Add SourceFile annotation to top-level classes
422
+
// TODO remove this annotation once the reference compiler uses the TASTy source file attribute.
422
423
if ctx.compilationUnit.source.exists && sym != defn.SourceFileAnnotthen
0 commit comments