Skip to content

Commit d144418

Browse files
committed
change Designator to be an alias
1 parent fe49539 commit d144418

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,15 @@ object Names {
2020
*/
2121
type PreName = Name | String
2222

23-
/** A common superclass of Name and Symbol. After bootstrap, this should be
24-
* just the type alias Name | Symbol
25-
*/
26-
abstract class Designator
23+
/** A common type of Name and Symbol */
24+
type Designator = Name | Symbols.Symbol
2725

2826
/** A name is either a term name or a type name. Term names can be simple
2927
* or derived. A simple term name is essentially an interned string stored
3028
* in a name table. A derived term name adds a tag, and possibly a number
3129
* or a further simple name to some other name.
3230
*/
33-
abstract class Name extends Designator, Showable derives CanEqual {
31+
abstract class Name extends Showable derives CanEqual {
3432

3533
/** A type for names of the same kind as this name */
3634
type ThisName <: Name

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ object Symbols extends SymUtils {
4545
* @param id A unique identifier of the symbol (unique per ContextBase)
4646
*/
4747
class Symbol private[Symbols] (private var myCoord: Coord, val id: Int, val nestingLevel: Int)
48-
extends Designator, ParamInfo, SrcPos, printing.Showable {
48+
extends ParamInfo, SrcPos, printing.Showable {
4949

5050
type ThisName <: Name
5151

0 commit comments

Comments
 (0)