File tree 2 files changed +3
-2
lines changed
2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -315,7 +315,7 @@ object SymDenotations {
315
315
encl = encl.owner
316
316
sep += " ~"
317
317
}
318
- if (owner.is(ModuleClass ) && sep == " $" ) sep = " " // duplicate scalac's behavior: don't write a double '$$' for module class members.
318
+ if (owner.is(ModuleClass , butNot = Package ) && sep == " $" ) sep = " " // duplicate scalac's behavior: don't write a double '$$' for module class members.
319
319
val fn = encl.fullNameSeparated(separator) ++ sep ++ name
320
320
if (isType) fn.toTypeName else fn.toTermName
321
321
}
Original file line number Diff line number Diff line change @@ -23,7 +23,8 @@ class TraitConstructors extends MiniPhaseTransform with SymTransformer {
23
23
24
24
def transformSym (sym : SymDenotation )(implicit ctx : Context ): SymDenotation = {
25
25
if (sym.isPrimaryConstructor && (sym.owner is Flags .Trait ))
26
- sym.copySymDenotation(name = nme.INITIALIZER_PREFIX ++ sym.owner.fullName)
26
+ // TODO: Someone needs to carefully check if name clashes are possible with this mangling scheme
27
+ sym.copySymDenotation(name = nme.INITIALIZER_PREFIX ++ sym.owner.fullNameSeparated(" $" ))
27
28
else sym
28
29
}
29
30
You can’t perform that action at this time.
0 commit comments