File tree 1 file changed +7
-1
lines changed
tasty/src/dotty/tools/tasty 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -254,7 +254,7 @@ object TastyFormat {
254
254
val MajorVersion : Int = 18
255
255
val MinorVersion : Int = 0
256
256
257
- /** Tags used to serialize names */
257
+ /** Tags used to serialize names, should update [[ nameTagToString ]] if a new constant is added */
258
258
class NameTags {
259
259
final val UTF8 = 1 // A simple name in UTF8 encoding.
260
260
@@ -286,6 +286,11 @@ object TastyFormat {
286
286
}
287
287
object NameTags extends NameTags
288
288
289
+ /** Should be kept in sync with [[NameTags ]]. Converts constants to a String representing their identifier,
290
+ * or NotANameTag(\d+) if unrecognised.
291
+ *
292
+ * For debugging purposes when unpickling names in a TASTy file.
293
+ */
289
294
def nameTagToString (tag : Int ) = {
290
295
import NameTags ._
291
296
tag match {
@@ -300,6 +305,7 @@ object TastyFormat {
300
305
case INLINEACCESSOR => " INLINEACCESSOR"
301
306
case OBJECTCLASS => " OBJECTCLASS"
302
307
case SIGNED => " SIGNED"
308
+ case id => s " NotANameTag( $id) "
303
309
}
304
310
}
305
311
You can’t perform that action at this time.
0 commit comments