Skip to content

Synthesize class tags in top level splices.  #4515

Closed
@nicolasstucki

Description

@nicolasstucki
object Foo {
  inline def foo[X](x: X): Unit = ~fooImpl('(x))
  def fooImpl[X: quoted.Type](x: quoted.Expr[X]): quoted.Expr[Unit] = '()
}

currently fails with

3 |  inline def foo[X](x: X): Unit = ~fooImpl('(x))
  |                                                ^
  |no implicit argument of type quoted.Type[X] was found for parameter evidence$1 of method fooImpl in object Foo

We need to write instead

  inline def foo[X](x: X): Unit = ~fooImpl('(x))('[X])

We should be able to synthesize classtags inside top level splices to reduce this syntactic overhead.

This would be a change in Typer and not in ReifyQuotes.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions