We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6de4253 + 9a86612 commit 9de3905Copy full SHA for 9de3905
compiler/src/dotty/tools/dotc/ast/TreeInfo.scala
@@ -372,6 +372,8 @@ trait TypedTreeInfo extends TreeInfo[Type] { self: Trees.Instance[Type] =>
372
exprPurity(expr)
373
case Block(stats, expr) =>
374
minOf(exprPurity(expr), stats.map(statPurity))
375
+ case Inlined(_, bindings, expr) =>
376
+ minOf(exprPurity(expr), bindings.map(statPurity))
377
case NamedArg(_, expr) =>
378
379
case _ =>
tests/pos/i3633.scala
@@ -0,0 +1,4 @@
1
+class Test {
2
+ inline def foo = 1
3
+ def test = -foo
4
+}
0 commit comments