File tree Expand file tree Collapse file tree 3 files changed +16
-1
lines changed
compiler/src/dotty/tools/dotc/ast Expand file tree Collapse file tree 3 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -298,7 +298,7 @@ object desugar {
298298 rhs = vparam.rhs
299299 )
300300 .withMods(Modifiers (
301- meth.mods.flags & (AccessFlags | Synthetic ),
301+ meth.mods.flags & (AccessFlags | Synthetic ) | (vparam.mods.flags & Inline ) ,
302302 meth.mods.privateWithin))
303303 val rest = defaultGetters(vparams :: paramss1, n + 1 )
304304 if vparam.rhs.isEmpty then rest else defaultGetter :: rest
Original file line number Diff line number Diff line change 1+ import scala .quoted .*
2+
3+ object X :
4+ inline def blah (inline b : Boolean = true ): Unit =
5+ $ { _blah(' b ) }
6+
7+ private def _blah (b : Expr [Boolean ])(using Quotes ): Expr [Unit ] =
8+ import quotes .reflect .*
9+ println(" =" * 120 )
10+ println(b.asTerm)
11+ println(b.valueOrError)
12+ ' {()}
Original file line number Diff line number Diff line change 1+ object Y :
2+ X .blah(true ) // ok
3+ X .blah() // error
You can’t perform that action at this time.
0 commit comments