From 21ded6ee9f727bd5a1c3975809c06868fe1b5536 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Thu, 30 Mar 2017 13:44:02 +0200 Subject: Revise qualified names 1. Fix problem in fullNameSeparated 2. Revise expandedName operations --- compiler/src/dotty/tools/dotc/core/tasty/TastyFormat.scala | 3 ++- compiler/src/dotty/tools/dotc/core/tasty/TastyUnpickler.scala | 8 ++------ 2 files changed, 4 insertions(+), 7 deletions(-) (limited to 'compiler/src/dotty/tools/dotc/core/tasty') diff --git a/compiler/src/dotty/tools/dotc/core/tasty/TastyFormat.scala b/compiler/src/dotty/tools/dotc/core/tasty/TastyFormat.scala index f7e61c924..ec59e711a 100644 --- a/compiler/src/dotty/tools/dotc/core/tasty/TastyFormat.scala +++ b/compiler/src/dotty/tools/dotc/core/tasty/TastyFormat.scala @@ -223,8 +223,9 @@ object TastyFormat { final val UTF8 = 1 final val QUALIFIED = 2 final val FLATTENED = 3 + final val EXPANDPREFIX = 5 final val EXPANDED = 4 - final val TRAITSETTER = 5 + final val TRAITSETTER = 6 final val UNIQUE = 10 final val DEFAULTGETTER = 11 final val VARIANT = 12 diff --git a/compiler/src/dotty/tools/dotc/core/tasty/TastyUnpickler.scala b/compiler/src/dotty/tools/dotc/core/tasty/TastyUnpickler.scala index a14691ed5..835222727 100644 --- a/compiler/src/dotty/tools/dotc/core/tasty/TastyUnpickler.scala +++ b/compiler/src/dotty/tools/dotc/core/tasty/TastyUnpickler.scala @@ -49,12 +49,8 @@ class TastyUnpickler(reader: TastyReader) { case UTF8 => goto(end) termName(bytes, start.index, length) - case QUALIFIED => - QualifiedName(readName(), readName().asSimpleName) - case FLATTENED => - FlattenedName(readName(), readName().asSimpleName) - case EXPANDED => - ExpandedName(readName(), readName().asSimpleName) + case QUALIFIED | FLATTENED | EXPANDED | EXPANDPREFIX => + qualifiedNameKindOfTag(tag)(readName(), readName().asSimpleName) case UNIQUE => val separator = readName().toString val num = readNat() -- cgit v1.2.3