aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/core/tasty/NameBuffer.scala
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/src/dotty/tools/dotc/core/tasty/NameBuffer.scala')
-rw-r--r--compiler/src/dotty/tools/dotc/core/tasty/NameBuffer.scala5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/src/dotty/tools/dotc/core/tasty/NameBuffer.scala b/compiler/src/dotty/tools/dotc/core/tasty/NameBuffer.scala
index b45255eb8..19eb731c7 100644
--- a/compiler/src/dotty/tools/dotc/core/tasty/NameBuffer.scala
+++ b/compiler/src/dotty/tools/dotc/core/tasty/NameBuffer.scala
@@ -38,6 +38,8 @@ class NameBuffer extends TastyBuffer(10000) {
tcon(nameIndex(prefix, toTasty), nameIndex(qual.name))
case DerivedTermName(prefix, NameInfo.DefaultGetter(num)) =>
DefaultGetter(nameIndex(prefix, toTasty), num)
+ case DerivedTermName(prefix, NameInfo.Variant(sign)) =>
+ Variant(nameIndex(prefix, toTasty), sign)
case name1 =>
if (name1.isShadowedName) Shadowed(nameIndex(name1.revertShadowed, toTasty))
else toTasty(name1.asSimpleName)
@@ -102,6 +104,9 @@ class NameBuffer extends TastyBuffer(10000) {
case Shadowed(original) =>
writeByte(SHADOWED)
withLength { writeNameRef(original) }
+ case Variant(original, sign) =>
+ writeByte(VARIANT)
+ withLength { writeNameRef(original); writeNat(sign + 1) }
}
override def assemble(): Unit = {