Skip to content

"Could not find proxy for implicit evidence" when using doubly nested quotes #17026

Closed
@kitlangton

Description

@kitlangton

Compiler version

3.2.2

Minimized code

import scala.quoted.*

def macroImpl(using Quotes) =
  '{
    def weird[A: ToExpr: Type](a: A)(using quotes: Quotes) =
      '{ Some(${ Expr(a) }) }
  }

Output

[error] (Test / compileIncremental) java.lang.IllegalArgumentException: Could not find proxy for implicit evidence$2: scala.quoted.Type in [parameter evidence$2, method weird, method macroImpl, package object Reproducer$package, package quotidian, package <root>], encl = method macroImpl, owners = method macroImpl, package object Reproducer$package, package quotidian, package <root>; enclosures = method macroImpl, package object Reproducer$package, package quotidian, package <root>

Expectation

Well, it'd be great if it somehow compiled 😄
I'm certainly doing some weird stuff, what with the doubly nested quotes and all. For context, I wrote some macros for deriving ToExpr and FromExpr (https://github.com/kitlangton/quotidian). However, they don't work with parameterized types.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions