Skip to content

Refinement not taken in account for named params #8516

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

Closed
lrytz opened this issue Mar 11, 2020 · 0 comments
Closed

Refinement not taken in account for named params #8516

lrytz opened this issue Mar 11, 2020 · 0 comments

Comments

@lrytz
Copy link
Member

lrytz commented Mar 11, 2020

scala> ((x => x): Function1[Int, Int] { def apply(arg: Int): Int }).apply(arg = 1)
1 |((x => x): Function1[Int, Int] { def apply(arg: Int): Int }).apply(arg = 1)
  |                                                                   ^^^^^^^
  |                method apply: (v1: Int): Int does not have a parameter arg

scala> ((x => x): Function1[Int, Int] { def apply(arg: Int): Int }).apply(v1 = 1)
val res0: Int = 1

this is different in scala 2

odersky added a commit that referenced this issue Mar 21, 2020
Fix #8516: Keep correct parameter names when selecting in refined types
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant