File tree Expand file tree Collapse file tree 4 files changed +26
-0
lines changed Expand file tree Collapse file tree 4 files changed +26
-0
lines changed Original file line number Diff line number Diff line change 1+ import scala .quoted .*
2+ trait C :
3+ type T
4+ def foo : T
5+ inline def makro (inline x : C ): x.T = $ { impl[x.type ](' x ) } // error // error
6+ def impl [CC <: C ](xp : Expr [CC ])(using Quotes ): Expr [CC # T ] = ' { $xp.foo }
Original file line number Diff line number Diff line change 1+ import scala .quoted .*
2+ trait C :
3+ type T
4+ def foo : T
5+ inline def makro (x : C ): x.T = $ { impl[x.type ](' x ) }
6+ def impl [CC <: C ](xp : Expr [CC ])(using Quotes ): Expr [CC # T ] = ' { $xp.foo } // error
Original file line number Diff line number Diff line change 1+ import scala .quoted .*
2+ trait C :
3+ type T
4+ def foo : T
5+ inline def makro (x : C ): x.T = $ { impl[x.T ](' x ) }
6+ def impl [U : Type ](xp : Expr [C { def foo : U }])(using Quotes ): Expr [U ] =
7+ ' { $xp.foo }
Original file line number Diff line number Diff line change 1+ import scala .quoted .*
2+ trait C :
3+ type T
4+ def foo : T
5+ inline def makro (inline x : C ): C # T = $ { impl(' x ) }
6+ def impl [U : Type ](xp : Expr [C { def foo : U }])(using Quotes ): Expr [U ] =
7+ ' { $xp.foo }
You can’t perform that action at this time.
0 commit comments