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 5d354f3 commit 183bcd3Copy full SHA for 183bcd3
compiler/src/dotty/tools/dotc/typer/Inliner.scala
@@ -50,7 +50,7 @@ object Inliner {
50
51
/** Should call to method `meth` be inlined in this context? */
52
def isInlineable(meth: Symbol)(implicit ctx: Context): Boolean =
53
- meth.is(Inline) && !ctx.inInlineMethod && !bodyToInline(meth).isEmpty
+ meth.is(Inline) && meth.hasAnnotation(defn.BodyAnnot) && !ctx.inInlineMethod
54
55
/** Should call be inlined in this context? */
56
def isInlineable(tree: Tree)(implicit ctx: Context): Boolean = tree match {
tests/neg/i8050.scala
@@ -0,0 +1,5 @@
1
+object stuff with
2
+ def exec(dir: Int) = ???
3
+
4
+extension on (a: Int) with
5
+ inline def exec: Unit = stuff.exec("aaa") // error
0 commit comments