diff --git a/compiler/src/dotty/tools/dotc/core/Symbols.scala b/compiler/src/dotty/tools/dotc/core/Symbols.scala index d6b6ed1efd1c..588d2abe1743 100644 --- a/compiler/src/dotty/tools/dotc/core/Symbols.scala +++ b/compiler/src/dotty/tools/dotc/core/Symbols.scala @@ -265,8 +265,8 @@ trait Symbols { this: Context => newConstructor(cls, EmptyFlags, Nil, Nil) /** Create a synthetic lazy implicit value */ - def newLazyImplicit(info: Type): TermSymbol = - newSymbol(owner, LazyImplicitName.fresh(), Lazy, info) + def newLazyImplicit(info: Type, coord: Coord): TermSymbol = + newSymbol(owner, LazyImplicitName.fresh(), Lazy, info, coord = coord) /** Create a symbol representing a selftype declaration for class `cls`. */ def newSelfSym(cls: ClassSymbol, name: TermName = nme.WILDCARD, selfInfo: Type = NoType): TermSymbol = diff --git a/compiler/src/dotty/tools/dotc/core/tasty/TastyFormat.scala b/compiler/src/dotty/tools/dotc/core/tasty/TastyFormat.scala index c337db42b9f9..8db9e0a4d277 100644 --- a/compiler/src/dotty/tools/dotc/core/tasty/TastyFormat.scala +++ b/compiler/src/dotty/tools/dotc/core/tasty/TastyFormat.scala @@ -526,6 +526,7 @@ object TastyFormat { case STATIC => "STATIC" case OBJECT => "OBJECT" case TRAIT => "TRAIT" + case ENUM => "ENUM" case LOCAL => "LOCAL" case SYNTHETIC => "SYNTHETIC" case ARTIFACT => "ARTIFACT" diff --git a/compiler/src/dotty/tools/dotc/typer/Implicits.scala b/compiler/src/dotty/tools/dotc/typer/Implicits.scala index c5fd94db5330..ee31378b971d 100644 --- a/compiler/src/dotty/tools/dotc/typer/Implicits.scala +++ b/compiler/src/dotty/tools/dotc/typer/Implicits.scala @@ -671,7 +671,7 @@ trait Implicits { self: Typer => */ val (formalValue, lazyImplicit, argCtx) = formal match { case ExprType(fv) => - val lazyImplicit = ctx.newLazyImplicit(fv) + val lazyImplicit = ctx.newLazyImplicit(fv, pos) (fv, lazyImplicit, lazyImplicitCtx(lazyImplicit)) case _ => (formal, NoSymbol, ctx) } diff --git a/compiler/src/dotty/tools/dotc/typer/Typer.scala b/compiler/src/dotty/tools/dotc/typer/Typer.scala index dca8c7137111..1b36eb4a4eac 100644 --- a/compiler/src/dotty/tools/dotc/typer/Typer.scala +++ b/compiler/src/dotty/tools/dotc/typer/Typer.scala @@ -1290,7 +1290,6 @@ class Typer extends Namer case _ => } if (desugaredArg.isType) { - var res = typed(desugaredArg, argPt) arg match { case TypeBoundsTree(EmptyTree, EmptyTree) if tparam.paramInfo.isLambdaSub && @@ -1302,10 +1301,10 @@ class Typer extends Namer // type parameter in `C`. // The transform does not apply for patterns, where empty bounds translate to // wildcard identifiers `_` instead. - res = res.withType(tparamBounds) + TypeTree(tparamBounds).withPos(arg.pos) case _ => + typed(desugaredArg, argPt) } - res } else desugaredArg.withType(UnspecifiedErrorType) } diff --git a/compiler/test/dotc/pos-test-pickling.blacklist b/compiler/test/dotc/pos-test-pickling.blacklist index 22a41321bf77..6398ace56bb3 100644 --- a/compiler/test/dotc/pos-test-pickling.blacklist +++ b/compiler/test/dotc/pos-test-pickling.blacklist @@ -4,10 +4,7 @@ i1812.scala i1867.scala i3067.scala i3149.scala -i3542-1.scala -i3585.scala i3692.scala -i3976.scala i4125.scala implicit-dep.scala inline-access-levels