Skip to content

Incorrect does not take parameters error when using quotes reflection #23969

@jchyb

Description

@jchyb

Found in open community build: https://github.com/VirtusLab/community-build3/actions/runs/17687960136/job/50279371233

Compiler version

3.8.0-RC1-bin-20250912-c4c48e3-NIGHTLY
works correctly in 3.7.3 and earlier

Minimized code

@main def main() = runMacro()
import scala.quoted._ inline def runMacro() = ${runMacroImpl} def runMacroImpl(using Quotes) = import quotes.reflect._ // '{BigDecimal(0).toString()} // works correctly Apply(Select.unique('{BigDecimal(0)}.asTerm, "toString"), List()).asExpr

Output

[error] ./a.scala:4:3 [error] method toString in class BigDecimal does not take parameters [error] runMacro() [error] ^^^^^^^^^^

Expectation

BigDecimal(0).toString() works so AST version of that should work too.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions