Skip to content

Commit 683a4a1

Browse files
committed
Handle access param of warm objects
1 parent 3d6c79a commit 683a4a1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,9 @@ class Semantic {
221221
resolveSuper(warm.klass, superType.classSymbol.asClass, meth)
222222
else
223223
resolve(warm.klass, meth)
224-
if target.hasSource then
224+
if target.is(Flags.Param) then
225+
Result(Hot, Nil)
226+
else if target.hasSource then
225227
val rhs = target.defTree.asInstanceOf[ValOrDefDef].rhs
226228
eval(rhs, warm, target.owner.asClass, cacheResult = true)
227229
else

0 commit comments

Comments
 (0)