Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot resolve <init> symbol of parent interface #407

Closed
adpi2 opened this issue Nov 30, 2023 · 0 comments
Closed

Cannot resolve <init> symbol of parent interface #407

adpi2 opened this issue Nov 30, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@adpi2
Copy link
Member

adpi2 commented Nov 30, 2023

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

@sjrd sjrd self-assigned this Nov 30, 2023
@sjrd sjrd added the bug Something isn't working label Nov 30, 2023
@sjrd sjrd closed this as completed in 56c7da0 Nov 30, 2023
sjrd added a commit that referenced this issue Nov 30, 2023
Fix #407: Synthesize a constructor for Java interfaces.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants