Closed
Description
Compiler version
This used to work in RC1. It fails in RC2 and RC3.
Minimized code
import scala.quoted.*
def qqq(s: String)(using Quotes): Expr[Unit] = '{()}
inline val InlineVal = "i"
inline def InlineDef = "i"
inline def withInlineVal = ${ qqq(InlineVal) }
inline def withInlineDef = ${ qqq(InlineDef) }
inline def withString = ${ qqq("i") }
Output
[error] -- Error: x.scala:8:34 --------------
[error] 8 |inline def withInlineVal = ${ qqq(InlineVal) }
[error] | ^^^^^^^^^
[error] | Malformed macro parameter
[error] |
[error] | Parameters may only be:
[error] | * Quoted parameters or fields
[error] | * Literal values of primitive types
[error] -- Error: x.scala:9:34 --------------
[error] 9 |inline def withInlineDef = ${ qqq(InlineDef) }
[error] | ^^^^^^^^^
[error] | Malformed macro parameter
[error] |
[error] | Parameters may only be:
[error] | * Quoted parameters or fields
[error] | * Literal values of primitive types
[error] two errors found
Expectation
Compilation.