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

Polymorphic function with context bound still needs modularity #22017

Closed
bishabosha opened this issue Nov 24, 2024 · 0 comments · Fixed by #22019
Closed

Polymorphic function with context bound still needs modularity #22017

bishabosha opened this issue Nov 24, 2024 · 0 comments · Fixed by #22019
Labels
area:experimental:modularity Issues related to the modularity extension. itype:bug

Comments

@bishabosha
Copy link
Member

Compiler version

3.6.2-RC1

Minimized code

import scala.math.Numeric.Implicits.given
val foo: [T: Numeric] => (t: T) => T = [T] => _ * Numeric[T].fromInt(3)

Output

-- [E040] Syntax Error: --------------------------------------------------------
2 |val foo: [T: Numeric] => (t: T) => T = [T] => _ * Numeric[T].fromInt(3)
  |           ^
  |           ']' expected, but ':' found

Expectation

should just work (right now you need to import scala.language.experimental.modularity)

@bishabosha bishabosha added itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label labels Nov 24, 2024
@Gedochao Gedochao added area:experimental:modularity Issues related to the modularity extension. and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels Nov 25, 2024
KacperFKorban added a commit to dotty-staging/dotty that referenced this issue Nov 29, 2024
WojciechMazur pushed a commit to scala/scala3-lts that referenced this issue Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:experimental:modularity Issues related to the modularity extension. itype:bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants