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

Compiler flag to interpret implicit definitions as givens #22482

Open
WojciechMazur opened this issue Jan 29, 2025 · 0 comments · May be fixed by #22580
Open

Compiler flag to interpret implicit definitions as givens #22482

WojciechMazur opened this issue Jan 29, 2025 · 0 comments · May be fixed by #22580
Assignees
Labels
area:private options Issues tied to -Y private/internal compiler settings. area:typer itype:enhancement

Comments

@WojciechMazur
Copy link
Contributor

In the context of changed prioritization rules for givens resolution and lack of formal reference to describe differences between resolution of givens or implicits and their combinations at call site it might be beneficial to introduce a private setting (-Y) allowing to treat all implicits as givens.

The flag can be potentially used to test libraries (or whole ecosystems inside OpenCB build) that are powered heavily by implicits resolutions and type classes to check how switching from implcit to given definitions would affect their users.

The flag might be beneficial for libraries that cross compile between Scala 2/3 to test correctness low priority implicits to ensure they behave similarly between different Scala majors

@WojciechMazur WojciechMazur added itype:enhancement area:typer area:private options Issues tied to -Y private/internal compiler settings. labels Jan 29, 2025
@WojciechMazur WojciechMazur changed the title Compiler flag allowing interpret implicit definitions as givens Compiler flag to interpret implicit definitions as givens Jan 29, 2025
@odersky odersky self-assigned this Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:private options Issues tied to -Y private/internal compiler settings. area:typer itype:enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants