Skip to content

Commit 25a0aa2

Browse files
Add documentation
1 parent 2bbd6ce commit 25a0aa2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

compiler/src/dotty/tools/dotc/interpreter/Interpreter.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ class Interpreter(implicit ctx: Context) {
115115
case Typed(expr, _) =>
116116
interpretTreeImpl(expr, env)
117117

118+
// Getting the underlying value of a value class. The value class is evaluated as its boxed representation
119+
// as values in the interpreter are `Object`s. Therefore we just get it from the enviroment as is.
118120
case Select(qualifier, _)
119121
if tree.symbol.owner.isValueClass && tree.symbol.is(ParamAccessor) && env.contains(qualifier.symbol) =>
120122
env(qualifier.symbol)

0 commit comments

Comments
 (0)