Skip to content

Commit 0a86409

Browse files
committed
Improve comments
1 parent d9e6366 commit 0a86409

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

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

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,23 @@ import collection.mutable
4747
* reverse linearization order, add the following definitions to C:
4848
*
4949
* 3.1 (done in `traitInits`) For every concrete trait getter `<mods> def x(): T` in M,
50-
* in order of textual occurrence:
50+
* in order of textual occurrence, produce the following:
51+
*
52+
* 3.1.1 If `x` is also a member of `C`, and M is a Dotty trait:
5153
*
5254
* <mods> def x(): T = super[M].initial$x()
5355
*
56+
* 3.1.2 If `x` is also a member of `C`, and M is a Scala 2.x trait:
57+
*
58+
* <mods> def x(): T = _
59+
*
60+
* 3.1.3 If `x` is not a member of `C`, and M is a Dotty trait:
61+
*
62+
* super[M].initial$x()
63+
*
64+
* 3.1.4 If `x` is not a member of `C`, and M is a Scala2.x trait, nothing gets added.
65+
*
66+
*
5467
* 3.2 (done in `superCallOpt`) The call:
5568
*
5669
* super[M].<init>

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ class TraitConstructors extends MiniPhaseTransform with SymTransformer {
2323

2424
def transformSym(sym: SymDenotation)(implicit ctx: Context): SymDenotation = {
2525
if (sym.isPrimaryConstructor && (sym.owner is Flags.Trait))
26-
// TODO: Someone needs to carefully check if name clashes are possible with this mangling scheme
2726
sym.copySymDenotation(name = nme.IMPLCLASS_CONSTRUCTOR)
2827
else sym
2928
}

0 commit comments

Comments
 (0)