Skip to content

Commit 7593cf3

Browse files
committed
Invalide fullName cache when name changes
Also: use "_$" instead of "~" as filler when taking the full name of a term member. If the term member is symbolic (e.g. +) the filler name would be misinterpreted as a symbolic name "~+", so would be mangled as "$tilde$plus$ instead of "~$plus".
1 parent 6e29748 commit 7593cf3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/src/dotty/tools/dotc/core/SymDenotations.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ object SymDenotations {
397397
var encl = owner
398398
while (!encl.isClass && !encl.isPackageObject) {
399399
encl = encl.owner
400-
filler += "~"
400+
filler += "_$"
401401
}
402402
var prefix = encl.fullNameSeparated(kind)
403403
if (kind.separator == "$")
@@ -499,7 +499,7 @@ object SymDenotations {
499499
* step for creating Refinement types.
500500
*/
501501
final def isRefinementClass(implicit ctx: Context): Boolean =
502-
name.decode == tpnme.REFINE_CLASS
502+
name == tpnme.REFINE_CLASS
503503

504504
/** Is this symbol a package object or its module class? */
505505
def isPackageObject(implicit ctx: Context): Boolean = {

0 commit comments

Comments
 (0)