File tree Expand file tree Collapse file tree 3 files changed +23
-0
lines changed
compiler/src/dotty/tools/dotc/inlines Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,12 @@ object Inlines:
113113
114114 if tree.symbol.isConstructor then return tree // error already reported for the inline constructor definition
115115
116+ tree match
117+ case Block (bindings, expr) =>
118+ return cpy.Block (tree)(bindings, inlineCall(expr))
119+ case _ =>
120+ ()
121+
116122 /** Set the position of all trees logically contained in the expansion of
117123 * inlined call `call` to the position of `call`. This transform is necessary
118124 * when lifting bindings from the expansion to the outside of the call.
Original file line number Diff line number Diff line change 1+ -- [E007] Type Mismatch Error: tests/neg/i18123b.scala:8:8 -------------------------------------------------------------
2+ 8 |def z = y.rep().toUpperCase // error
3+ | ^^^^^^^
4+ | Found: (??? : => Nothing)
5+ | Required: ?{ toUpperCase: ? }
6+ | Note that implicit conversions were not tried because the result of an implicit conversion
7+ | must be more specific than ?{ toUpperCase: <?> }
8+ |
9+ | longer explanation available when compiling with `-explain`
Original file line number Diff line number Diff line change 1+ // Minimized version of `tests/pos/i18123.scala` to test #24425.
2+
3+ extension (x : String )
4+ transparent inline def rep (min : Int = 0 ): String = ???
5+
6+ def y : String = ???
7+
8+ def z = y.rep().toUpperCase // error
You can’t perform that action at this time.
0 commit comments