Skip to content

Commit 051b264

Browse files
committed
Use $init$ as the name of trait constructors
This brings it in line with Scala2 conventions.
1 parent b52c1ab commit 051b264

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class TraitConstructors extends MiniPhaseTransform with SymTransformer {
2323
def transformSym(sym: SymDenotation)(implicit ctx: Context): SymDenotation = {
2424
if (sym.isPrimaryConstructor && (sym.owner is Flags.Trait))
2525
// TODO: Someone needs to carefully check if name clashes are possible with this mangling scheme
26-
sym.copySymDenotation(name = nme.INITIALIZER_PREFIX ++ sym.owner.fullNameSeparated("$"))
26+
sym.copySymDenotation(name = nme.IMPLCLASS_CONSTRUCTOR)
2727
else sym
2828
}
2929

0 commit comments

Comments
 (0)