diff options
Diffstat (limited to 'src')
4 files changed, 6 insertions, 8 deletions
diff --git a/src/dotty/tools/dotc/ast/tpd.scala b/src/dotty/tools/dotc/ast/tpd.scala index 61e608ddf..d1fa1733f 100644 --- a/src/dotty/tools/dotc/ast/tpd.scala +++ b/src/dotty/tools/dotc/ast/tpd.scala @@ -409,7 +409,8 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo { override def Select(tree: Tree)(qualifier: Tree, name: Name)(implicit ctx: Context): Select = { val tree1 = untpd.cpy.Select(tree)(qualifier, name) tree match { - case tree: Select if (qualifier.tpe eq tree.qualifier.tpe) => tree1.withTypeUnchecked(tree.tpe) + case tree: Select if (qualifier.tpe eq tree.qualifier.tpe) => + tree1.withTypeUnchecked(tree.tpe) case _ => tree.tpe match { case tpe: NamedType => tree1.withType(tpe.derivedSelect(qualifier.tpe)) case _ => tree1.withTypeUnchecked(tree.tpe) diff --git a/src/dotty/tools/dotc/core/pickling/PickleFormat.scala b/src/dotty/tools/dotc/core/pickling/PickleFormat.scala index 1bfe3784f..cafd9cc50 100644 --- a/src/dotty/tools/dotc/core/pickling/PickleFormat.scala +++ b/src/dotty/tools/dotc/core/pickling/PickleFormat.scala @@ -135,9 +135,8 @@ Standard-Section: "ASTs" TopLevelStat* ANNOTATED Length fullAnnotation_Term underlying_Type ANDtype Length left_Type right_Type ORtype Length left_Type right_Type - BIND Length boundName_NameRef bounds_Type selfRef_Type + BIND Length boundName_NameRef bounds_Type // for type-variables defined in a type pattern - // bounds = type bounds, selfRef = reference to type itself. BYNAMEtype underlying_Type POLYtype Length result_Type NamesTypes // needed for refinements METHODtype Length result_Type NamesTypes // needed for refinements diff --git a/src/dotty/tools/dotc/core/pickling/TreePickler.scala b/src/dotty/tools/dotc/core/pickling/TreePickler.scala index eca451d45..ca0ba4137 100644 --- a/src/dotty/tools/dotc/core/pickling/TreePickler.scala +++ b/src/dotty/tools/dotc/core/pickling/TreePickler.scala @@ -250,8 +250,6 @@ class TreePickler(pickler: TastyPickler) { pickleType(tpe.ref) case NoType => writeByte(NOTYPE) -// case NoPrefix => // not sure we need this! -// writeByte(NOPREFIX) }} catch { case ex: AssertionError => println(i"error while pickling type $tpe") diff --git a/src/dotty/tools/dotc/core/pickling/TreeUnpickler.scala b/src/dotty/tools/dotc/core/pickling/TreeUnpickler.scala index f55c0809c..fb076911b 100644 --- a/src/dotty/tools/dotc/core/pickling/TreeUnpickler.scala +++ b/src/dotty/tools/dotc/core/pickling/TreeUnpickler.scala @@ -201,9 +201,9 @@ class TreeUnpickler(reader: TastyReader, tastyName: TastyName.Table) { case ORtype => OrType(readType(), readType()) case BIND => - symAtAddr(start) = - ctx.newSymbol(ctx.owner, readName().toTypeName, BindDefinedType, readType()) - readType() + val sym = ctx.newSymbol(ctx.owner, readName().toTypeName, BindDefinedType, readType()) + symAtAddr(start) = sym + TypeRef.withFixedSym(NoPrefix, sym.name, sym) case POLYtype => val (names, paramReader) = readNamesSkipParams[TypeName] val result = PolyType(names)( |