scalacenter / tasty-query

Apache License 2.0
51 stars 11 forks source link

Cannot resolve <init> symbol of parent interface #407

Closed adpi2 closed 10 months ago

adpi2 commented 10 months ago
import java.util.function.Consumer

class A extends Consumer[String]():
  def accept(x: String): Unit = println(x)

One of the parent trees of the template of A contains:

Select(
  New(
    AppliedTypeTree(
      TypeIdent(Consumer),
      List(TypeIdent(String))
    )
  ),
  <init>[with sig (1):java.util.function.Consumer @<init>]
)"

Resolving the symbol of this tree throws a MemberNotFoundException