Skip to content

Commit d668ebc

Browse files
committed
Add position to synthetic lazy implicit symbols
1 parent d56af69 commit d668ebc

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

compiler/src/dotty/tools/dotc/core/Symbols.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,8 @@ trait Symbols { this: Context =>
265265
newConstructor(cls, EmptyFlags, Nil, Nil)
266266

267267
/** Create a synthetic lazy implicit value */
268-
def newLazyImplicit(info: Type): TermSymbol =
269-
newSymbol(owner, LazyImplicitName.fresh(), Lazy, info)
268+
def newLazyImplicit(info: Type, coord: Coord): TermSymbol =
269+
newSymbol(owner, LazyImplicitName.fresh(), Lazy, info, coord = coord)
270270

271271
/** Create a symbol representing a selftype declaration for class `cls`. */
272272
def newSelfSym(cls: ClassSymbol, name: TermName = nme.WILDCARD, selfInfo: Type = NoType): TermSymbol =

compiler/src/dotty/tools/dotc/typer/Implicits.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ trait Implicits { self: Typer =>
671671
*/
672672
val (formalValue, lazyImplicit, argCtx) = formal match {
673673
case ExprType(fv) =>
674-
val lazyImplicit = ctx.newLazyImplicit(fv)
674+
val lazyImplicit = ctx.newLazyImplicit(fv, pos)
675675
(fv, lazyImplicit, lazyImplicitCtx(lazyImplicit))
676676
case _ => (formal, NoSymbol, ctx)
677677
}

compiler/test/dotc/pos-test-pickling.blacklist

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ i1812.scala
44
i1867.scala
55
i3067.scala
66
i3149.scala
7-
i3542-1.scala
8-
i3585.scala
97
i3692.scala
108
i3976.scala
119
i4125.scala

0 commit comments

Comments
 (0)