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

Factories should produce better error messages for semi-compatible arguments #1700

Open
pshirshov opened this issue Feb 11, 2022 · 0 comments
Assignees
Milestone

Comments

@pshirshov
Copy link
Member

pshirshov commented Feb 11, 2022

 trait Super
 trait Sub extends Super

 case class Output(s: Super)

  trait Factory {
    def make(arg: Sub): Output
  }

arg will not be captured by the macro and the error message isn't easy to read/interpret. We should improve the error message and, possibly, allow non-ambiguous subtypes in such cases.

@pshirshov pshirshov added this to the 1.2 milestone Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants