Skip to content

Commit 3d6c79a

Browse files
committed
Respect lazy fields
1 parent a6f27df commit 3d6c79a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/transform/init/Semantic.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ class Semantic {
589589

590590
// class body
591591
tpl.body.foreach {
592-
case vdef : ValDef =>
592+
case vdef : ValDef if !vdef.symbol.is(Flags.Lazy) =>
593593
val res = eval(vdef.rhs, thisV, klass)
594594
errorBuffer ++= res.errors
595595
thisV.updateField(vdef.symbol, res.value)

0 commit comments

Comments
 (0)