Skip to content

Commit 5c1a68e

Browse files
committed
remove useless transform of inline val
1 parent 5ca0b9a commit 5c1a68e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

compiler/src/dotty/tools/debug/ExtractExpression.scala

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,6 @@ private class ExtractExpression(config: ExpressionCompilerConfig, expressionStor
5858
case tree: ImportOrExport => tree
5959
case tree if isLocalToExpression(tree.symbol) => super.transform(tree)
6060

61-
case tree if tree.symbol.is(Inline) =>
62-
val tpe = tree.symbol.info.asInstanceOf[ConstantType]
63-
cpy.Literal(tree)(tpe.value)
64-
6561
// static object
6662
case tree: (Ident | Select | This) if isStaticObject(tree.symbol) =>
6763
getStaticObject(tree)(tree.symbol.moduleClass)

tests/debug/eval-inline.check

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,7 @@ eval test2
1111
result 42
1212
eval m2(test2)
1313
result 42
14+
eval
15+
inline val x = 3
16+
x
17+
result 3

0 commit comments

Comments
 (0)