Skip to content

Missing macros to get Expr and raw source code of method arguments #5782

@alexarchambault

Description

@alexarchambault

It's the main issue I ran into when porting sourcecode to dotty. It needs macros to

  • get the arguments of ~the root context (like in def foo(a: Int, b: String)(implicit foo: Foo) with the implicit materialization of Foo backed by a macro - how can the macro get Exprs for 2 and "a" in f(2, "a")?). Prevents to have sourcecode.Args work fine.
  • get the ~raw code of arguments of the root context (in def foo(s: Seq[Int])(implicit foo: Foo), with the implicit materialization of Foo backed by a macro - how can the macro get a String "(1 to 10).sum" in f((1 to 10).sum)?). Prevents to have sourcecode.Text work fine.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions