File tree 3 files changed +8
-7
lines changed
compiler/src/dotty/tools/dotc
3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -365,7 +365,7 @@ object NameKinds {
365
365
val ExtMethName : SuffixNameKind = new SuffixNameKind (EXTMETH , " $extension" )
366
366
val ParamAccessorName : SuffixNameKind = new SuffixNameKind (PARAMACC , " $accessor" )
367
367
val ModuleClassName : SuffixNameKind = new SuffixNameKind (OBJECTCLASS , " $" , optInfoString = " ModuleClass" )
368
- val ImplMethName : SuffixNameKind = new SuffixNameKind (IMPLMETH , " $" )
368
+ val DirectMethName : SuffixNameKind = new SuffixNameKind (DIRECT , " $direct " )
369
369
val AdaptedClosureName : SuffixNameKind = new SuffixNameKind (ADAPTEDCLOSURE , " $adapted" ) { override def definesNewName = true }
370
370
val SyntheticSetterName : SuffixNameKind = new SuffixNameKind (SETTER , " _$eq" )
371
371
Original file line number Diff line number Diff line change @@ -24,8 +24,9 @@ object NameTags extends TastyFormat.NameTags {
24
24
25
25
final val ADAPTEDCLOSURE = 31 // Used in Erasure to adapt closures over primitive types.
26
26
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.
29
30
30
31
final val PARAMACC = 33 // Used for a private parameter alias
31
32
@@ -48,7 +49,7 @@ object NameTags extends TastyFormat.NameTags {
48
49
case INITIALIZER => " INITIALIZER"
49
50
case FIELD => " FIELD"
50
51
case EXTMETH => " EXTMETH"
51
- case IMPLMETH => " IMPLMETH "
52
+ case DIRECT => " DIRECT "
52
53
case PARAMACC => " PARAMACC"
53
54
case ADAPTEDCLOSURE => " ADAPTEDCLOSURE"
54
55
case OBJECTCLASS => " OBJECTCLASS"
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import core.Types._
12
12
import core .Names ._
13
13
import core .StdNames ._
14
14
import core .NameOps ._
15
- import core .NameKinds .{AdaptedClosureName , BodyRetainerName , ImplMethName }
15
+ import core .NameKinds .{AdaptedClosureName , BodyRetainerName , DirectMethName }
16
16
import core .Scopes .newScopeWith
17
17
import core .Decorators ._
18
18
import core .Constants ._
@@ -63,10 +63,10 @@ class Erasure extends Phase with DenotTransformer {
63
63
&& contextResultsAreErased(ref.symbol)
64
64
&& (ref.owner.is(Flags .Trait ) || ref.symbol.allOverriddenSymbols.hasNext)
65
65
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
67
67
// as a method it overrides. We need a bridge between the
68
68
// two methods, so they are not allowed to already override after erasure.
69
- ImplMethName (ref.targetName.asTermName)
69
+ DirectMethName (ref.targetName.asTermName)
70
70
else
71
71
ref.targetName
72
72
You can’t perform that action at this time.
0 commit comments