File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ object SymDenotations {
135
135
def name = myName
136
136
137
137
/** Update the name; only called when unpickling top-level classes */
138
- def name_= (n : Name ) = myName = n
138
+ protected [dotc] def name_= (n : Name ) = myName = n
139
139
140
140
/** The owner of the symbol; overridden in NoDenotation */
141
141
def owner : Symbol = ownerIfExists
Original file line number Diff line number Diff line change @@ -186,12 +186,12 @@ class SymbolLoaders {
186
186
187
187
private [core] val currentDecls : MutableScope = new PackageScope ()
188
188
189
- def isFlatName (name : SimpleTermName ) = name.lastIndexOf('$' , name.length - 2 ) >= 0
189
+ /** A name is a flat name if it contains a `$` which is not its last character */
190
+ def isFlatName (name : SimpleTermName ) =
191
+ name.lastIndexOf('$' , name.length - 2 ) >= 0
190
192
191
- def isFlatName (classRep : ClassPath # ClassRep ) = {
192
- val idx = classRep.name.indexOf('$' )
193
- idx >= 0 && idx < classRep.name.length - 1
194
- }
193
+ def isFlatName (classRep : ClassPath # ClassRep ) =
194
+ classRep.name.lastIndexOf('$' , classRep.name.length - 2 ) >= 0
195
195
196
196
def maybeModuleClass (classRep : ClassPath # ClassRep ) = classRep.name.last == '$'
197
197
You can’t perform that action at this time.
0 commit comments