Skip to content

Commit b1a47aa

Browse files
committed
Do deferred given resolution only at typer phase
# Conflicts: # compiler/src/dotty/tools/dotc/typer/Typer.scala
1 parent 7cfc150 commit b1a47aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2836,7 +2836,7 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
28362836
* parameters of the current class are also defined.
28372837
*/
28382838
def implementDeferredGivens(body: List[Tree]): List[Tree] =
2839-
if cls.is(Trait) then body
2839+
if cls.is(Trait) || ctx.isAfterTyper then body
28402840
else
28412841
def isGivenValue(mbr: TermRef) =
28422842
val dcl = mbr.symbol

0 commit comments

Comments
 (0)