File tree 2 files changed +6
-5
lines changed
compiler/src/dotty/tools/dotc 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,8 @@ class Inlining extends MacroTransform {
36
36
override def allowsImplicitSearch : Boolean = true
37
37
38
38
override def run (using Context ): Unit =
39
- if (ctx.settings.YinlineBlackboxAfterTyper .value) super .run
39
+ // if (ctx.settings.YinlineBlackboxAfterTyper.value)
40
+ super .run
40
41
41
42
override def checkPostCondition (tree : Tree )(using Context ): Unit =
42
43
tree match {
@@ -51,11 +52,11 @@ class Inlining extends MacroTransform {
51
52
case tree : DefTree =>
52
53
if tree.symbol.is(Inline ) then tree
53
54
else super .transform(tree)
54
- case _ : Typed =>
55
+ case _ : Typed | _ : Block =>
55
56
super .transform(tree)
56
- case _ if Inliner .isInlineable(tree) && ! Inliner .inInlineMethod =>
57
+ case _ if Inliner .isInlineable(tree) =>
57
58
val inlined = Inliner .inlineCall(tree)
58
- super . transform(inlined)
59
+ transform(inlined)
59
60
case _ =>
60
61
super .transform(tree)
61
62
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ object Inliner {
63
63
64
64
/** `sym` is an inline method with a known body to inline which looks like a tansparent inline */
65
65
def hasTransparentBody (sym : SymDenotation )(using Context ): Boolean =
66
- ! bodyToInline(sym).isInstanceOf [Typed ] // may have false negatives
66
+ sym.exists && ! bodyToInline(sym).isInstanceOf [Typed ] // may have false negatives
67
67
68
68
/** Try to inline a call to an inline method. Fail with error if the maximal
69
69
* inline depth is exceeded.
You can’t perform that action at this time.
0 commit comments