-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
area:metaprogramming:quotesIssues related to quotes and splicesIssues related to quotes and splices
Description
Minimization:
import scala.quoted.* trait C: type T def foo: T inline def makro(inline x: C): x.T = ${ impl[x.type]('x) } def impl[CC <: C](xp: Expr[CC])(using Quotes): Expr[CC#T] = '{ $xp.foo }-- Error: Test.scala:5:45 ------------------------------------------------------ 5 |inline def makro(inline x: C): x.T = ${ impl[x.type]('x) } | ^ | access to parameter x from wrong staging level: | - the definition is at level 0, | - but the access is at level -1. -- Error: Test.scala:5:53 ------------------------------------------------------ 5 |inline def makro(inline x: C): x.T = ${ impl[x.type]('x) } | ^ | access to parameter x from wrong staging level: | - the definition is at level 0, | - but the access is at level -1.
(only the first error shows if the
[x.type]
argument left to inference)Originally posted by @lrytz in sirthias/parboiled2#274 (comment)
DmytroMitin
Metadata
Metadata
Assignees
Labels
area:metaprogramming:quotesIssues related to quotes and splicesIssues related to quotes and splices