File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
src/dotty/tools/dotc/transform Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -54,9 +54,10 @@ class Inlining extends MacroTransform {
54
54
else super .transform(tree)
55
55
case _ : Typed | _ : Block =>
56
56
super .transform(tree)
57
- case _ if Inliner .isInlineable(tree) =>
58
- val inlined = Inliner .inlineCall(tree)
59
- transform(inlined)
57
+ case _ if Inliner .isInlineable(tree) && ! tree.tpe.widen.isInstanceOf [MethodOrPoly ] =>
58
+ val tree1 = super .transform(tree)
59
+ val inlined = Inliner .inlineCall(tree1)
60
+ inlined
60
61
case _ =>
61
62
super .transform(tree)
62
63
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ class CompilationTests {
39
39
compileFilesInDir(" tests/new" , defaultOptions),
40
40
compileFilesInDir(" tests/pos-scala2" , scala2CompatMode),
41
41
compileFilesInDir(" tests/pos-custom-args/erased" , defaultOptions.and(" -Yerased-terms" )),
42
- compileFilesInDir(" tests/pos" , defaultOptions),
42
+ compileFilesInDir(" tests/pos" , defaultOptions /* and "-Yinline-blackbox-after-typer" */ ),
43
43
compileFilesInDir(" tests/pos-deep-subtype" , allowDeepSubtypes),
44
44
compileFile(
45
45
// succeeds despite -Xfatal-warnings because of -nowarn
You can’t perform that action at this time.
0 commit comments