Skip to content

Commit b6c2e30

Browse files
committed
Clarification
1 parent b89d900 commit b6c2e30

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/src/dotty/tools/dotc/ast/TreeInfo.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ trait TypedTreeInfo extends TreeInfo[Type] { self: Trees.Instance[Type] =>
486486
* Select
487487
* TypeApply
488488
*
489-
* (2) A unary operator expression `pre.op` where `op` is one of `+`, `-`, `~`, `!`
489+
* (2) A primitive unary operator expression `pre.op` where `op` is one of `+`, `-`, `~`, `!`
490490
* that has a constant type `ConstantType(v)` but that is not a constant expression
491491
* (i.e. `pre` has side-effects) is translated to
492492
*
@@ -501,7 +501,7 @@ trait TypedTreeInfo extends TreeInfo[Type] { self: Trees.Instance[Type] =>
501501
if (isIdempotentExpr(tree1)) Literal(value)
502502
else tree1 match {
503503
case Select(qual, _) if tree1.tpe.isInstanceOf[ConstantType] =>
504-
// it's a unary operator; Simplify `pre.op` to `{ pre; v }` where `v` is the value of `pre.op`
504+
// it's a primitive unary operator; Simplify `pre.op` to `{ pre; v }` where `v` is the value of `pre.op`
505505
Block(qual :: Nil, Literal(value))
506506
case _ =>
507507
tree1

0 commit comments

Comments
 (0)