-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix #9050: Allow multidenotations with same signature #9063
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
46c3e43
4f7a02e
f31cdf0
4723f16
dbc1e95
b6a5b4a
659b18b
288d7ef
b06055b
af103a4
dce3079
0bc0a2e
0cf9ee1
162f3fa
e82756a
d8c980f
64e0790
51ebf70
81f5c30
19e658c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,6 +75,7 @@ Standard-Section: "ASTs" TopLevelStat* | |
Term = Path -- Paths represent both types and terms | ||
IDENT NameRef Type -- Used when term ident’s type is not a TermRef | ||
SELECT possiblySigned_NameRef qual_Term -- qual.name | ||
SELECTin Length possiblySigned_NameRef qual_Term owner_Type -- qual.name, referring to a symbol declared in owner that has the given signature (see note below) | ||
QUALTHIS typeIdent_Tree -- id.this, different from THIS in that it contains a qualifier ident with position. | ||
NEW clsType_Term -- new cls | ||
THROW throwableExpr_Term -- throw throwableExpr | ||
|
@@ -122,7 +123,7 @@ Standard-Section: "ASTs" TopLevelStat* | |
TERMREFsymbol sym_ASTRef qual_Type -- A reference `qual.sym` to a local member with prefix `qual` | ||
TERMREFpkg fullyQualified_NameRef -- A reference to a package member with given fully qualified name | ||
TERMREF possiblySigned_NameRef qual_Type -- A reference `qual.name` to a non-local member | ||
TERMREFin Length possiblySigned_NameRef qual_Type namespace_Type -- A reference `qual.name` to a non-local member that's private in `namespace` | ||
TERMREFin Length possiblySigned_NameRef qual_Type owner_Type -- A reference `qual.name` referring to a non-local symbol declared in owner that has the given signature (see note below) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should the documentation for TYPEREFin be updated in a similar way? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No since TypeRefs never take a signature |
||
THIS clsRef_Type -- cls.this | ||
RECthis recType_ASTRef -- The `this` in a recursive refined type `recType`. | ||
SHAREDtype path_ASTRef -- link to previously serialized path | ||
|
@@ -212,6 +213,10 @@ Standard-Section: "ASTs" TopLevelStat* | |
|
||
Annotation = ANNOTATION Length tycon_Type fullAnnotation_Term -- An annotation, given (class) type of constructor, and full application tree | ||
|
||
Note: The signature of a SELECTin or TERMREFin node is the signature of the selected symbol, | ||
not the signature of the reference. The latter undergoes an asSeenFrom but the former | ||
does not. | ||
|
||
Note: Tree tags are grouped into 5 categories that determine what follows, and thus allow to compute the size of the tagged tree in a generic way. | ||
|
||
Category 1 (tags 1-49) : tag | ||
|
@@ -248,7 +253,7 @@ Standard Section: "Comments" Comment* | |
object TastyFormat { | ||
|
||
final val header: Array[Int] = Array(0x5C, 0xA1, 0xAB, 0x1F) | ||
val MajorVersion: Int = 22 | ||
val MajorVersion: Int = 23 | ||
val MinorVersion: Int = 0 | ||
|
||
/** Tags used to serialize names, should update [[nameTagToString]] if a new constant is added */ | ||
|
@@ -452,6 +457,7 @@ object TastyFormat { | |
final val ANNOTATION = 173 | ||
final val TERMREFin = 174 | ||
final val TYPEREFin = 175 | ||
final val SELECTin = 176 | ||
odersky marked this conversation as resolved.
Show resolved
Hide resolved
odersky marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
final val METHODtype = 180 | ||
|
||
|
@@ -646,6 +652,7 @@ object TastyFormat { | |
case SUPERtype => "SUPERtype" | ||
case TERMREFin => "TERMREFin" | ||
case TYPEREFin => "TYPEREFin" | ||
case SELECTin => "SELECTin" | ||
|
||
case REFINEDtype => "REFINEDtype" | ||
case REFINEDtpt => "REFINEDtpt" | ||
|
@@ -675,7 +682,7 @@ object TastyFormat { | |
*/ | ||
def numRefs(tag: Int): Int = tag match { | ||
case VALDEF | DEFDEF | TYPEDEF | TYPEPARAM | PARAM | NAMEDARG | RETURN | BIND | | ||
SELFDEF | REFINEDtype | TERMREFin | TYPEREFin | HOLE => 1 | ||
SELFDEF | REFINEDtype | TERMREFin | TYPEREFin | SELECTin | HOLE => 1 | ||
case RENAMED | PARAMtype => 2 | ||
case POLYtype | TYPELAMBDAtype | METHODtype => -1 | ||
case _ => 0 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
object RepeatedEnum { | ||
|
||
enum Maybe { // error | ||
case Foo // error | ||
case Foo | ||
} | ||
|
||
enum Maybe { // error | ||
|
Uh oh!
There was an error while loading. Please reload this page.