Skip to content

Commit d500b1d

Browse files
committed
Propagate source file to synthetic companions
1 parent df5fcef commit d500b1d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dotty/tools/dotc/transform/FirstTransform.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ class FirstTransform extends MiniPhaseTransform with IdentityDenotTransformer wi
124124

125125
private def newCompanion(name: TermName, forClass: Symbol)(implicit ctx: Context) = {
126126
val modul = ctx.newCompleteModuleSymbol(forClass.owner, name, Synthetic, Synthetic,
127-
defn.ObjectType :: Nil, Scopes.newScope)
127+
defn.ObjectType :: Nil, Scopes.newScope, assocFile = forClass.asClass.assocFile)
128128
val mc = modul.moduleClass
129129

130130
val mcComp = ctx.synthesizeCompanionMethod(nme.COMPANION_CLASS_METHOD, forClass, mc)

0 commit comments

Comments
 (0)