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.
1 parent 6ae39ef commit 3d68bbaCopy full SHA for 3d68bba
compiler/src/dotty/tools/dotc/inlines/Inliner.scala
@@ -1050,6 +1050,7 @@ class Inliner(val call: tpd.Tree)(using Context):
1050
private def shouldStripAscription(tree: Typed)(using Context): Boolean =
1051
val exprTp = tree.expr.tpe
1052
tree.hasAttachment(PrepareInlineable.InlineResultAscription)
1053
+ && enclosingInlineds.size > 1
1054
&& exprTp.exists
1055
&& !exprTp.widen.isRef(defn.NothingClass)
1056
&& !exprTp.widen.isRef(defn.NullClass)
0 commit comments