File tree Expand file tree Collapse file tree 3 files changed +8
-7
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -365,7 +365,7 @@ object NameKinds {
365365 val ExtMethName : SuffixNameKind = new SuffixNameKind (EXTMETH , " $extension" )
366366 val ParamAccessorName : SuffixNameKind = new SuffixNameKind (PARAMACC , " $accessor" )
367367 val ModuleClassName : SuffixNameKind = new SuffixNameKind (OBJECTCLASS , " $" , optInfoString = " ModuleClass" )
368- val ImplMethName : SuffixNameKind = new SuffixNameKind (IMPLMETH , " $" )
368+ val DirectMethName : SuffixNameKind = new SuffixNameKind (DIRECT , " $direct " )
369369 val AdaptedClosureName : SuffixNameKind = new SuffixNameKind (ADAPTEDCLOSURE , " $adapted" ) { override def definesNewName = true }
370370 val SyntheticSetterName : SuffixNameKind = new SuffixNameKind (SETTER , " _$eq" )
371371
Original file line number Diff line number Diff line change @@ -24,8 +24,9 @@ object NameTags extends TastyFormat.NameTags {
2424
2525 final val ADAPTEDCLOSURE = 31 // Used in Erasure to adapt closures over primitive types.
2626
27- final val IMPLMETH = 32 // Used to define methods in implementation classes
28- // (can probably be removed).
27+ final val DIRECT = 32 // Used to define implementations of methods with
28+ // erased context function results that can override some
29+ // other method.
2930
3031 final val PARAMACC = 33 // Used for a private parameter alias
3132
@@ -48,7 +49,7 @@ object NameTags extends TastyFormat.NameTags {
4849 case INITIALIZER => " INITIALIZER"
4950 case FIELD => " FIELD"
5051 case EXTMETH => " EXTMETH"
51- case IMPLMETH => " IMPLMETH "
52+ case DIRECT => " DIRECT "
5253 case PARAMACC => " PARAMACC"
5354 case ADAPTEDCLOSURE => " ADAPTEDCLOSURE"
5455 case OBJECTCLASS => " OBJECTCLASS"
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import core.Types._
1212import core .Names ._
1313import core .StdNames ._
1414import core .NameOps ._
15- import core .NameKinds .{AdaptedClosureName , BodyRetainerName , ImplMethName }
15+ import core .NameKinds .{AdaptedClosureName , BodyRetainerName , DirectMethName }
1616import core .Scopes .newScopeWith
1717import core .Decorators ._
1818import core .Constants ._
@@ -63,10 +63,10 @@ class Erasure extends Phase with DenotTransformer {
6363 && contextResultsAreErased(ref.symbol)
6464 && (ref.owner.is(Flags .Trait ) || ref.symbol.allOverriddenSymbols.hasNext)
6565 then
66- // Add a `$` to prevent this method from having the same signature
66+ // Add a `$direct ` to prevent this method from having the same signature
6767 // as a method it overrides. We need a bridge between the
6868 // two methods, so they are not allowed to already override after erasure.
69- ImplMethName (ref.targetName.asTermName)
69+ DirectMethName (ref.targetName.asTermName)
7070 else
7171 ref.targetName
7272
You can’t perform that action at this time.
0 commit comments