File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
tasty/src/dotty/tools/tasty Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -254,7 +254,7 @@ object TastyFormat {
254254 val MajorVersion : Int = 18
255255 val MinorVersion : Int = 0
256256
257- /** Tags used to serialize names */
257+ /** Tags used to serialize names, should update [[ nameTagToString ]] if a new constant is added */
258258 class NameTags {
259259 final val UTF8 = 1 // A simple name in UTF8 encoding.
260260
@@ -286,6 +286,11 @@ object TastyFormat {
286286 }
287287 object NameTags extends NameTags
288288
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+ */
289294 def nameTagToString (tag : Int ) = {
290295 import NameTags ._
291296 tag match {
@@ -300,6 +305,7 @@ object TastyFormat {
300305 case INLINEACCESSOR => " INLINEACCESSOR"
301306 case OBJECTCLASS => " OBJECTCLASS"
302307 case SIGNED => " SIGNED"
308+ case id => s " NotANameTag( $id) "
303309 }
304310 }
305311
You can’t perform that action at this time.
0 commit comments