Skip to content

infix methods accept type parameters in multiple positions #9091

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
smarter opened this issue May 31, 2020 · 1 comment
Closed

infix methods accept type parameters in multiple positions #9091

smarter opened this issue May 31, 2020 · 1 comment

Comments

@smarter
Copy link
Member

smarter commented May 31, 2020

http://dotty.epfl.ch/docs/reference/contextual/extension-methods.html says:

If an extension method has type parameters, they come immediately after the def and are followed by the extended parameter.

But in fact they're also accepted after the method name:

scala> def (x: A) foo[A]: A = x
def foo[A](x: A): A

scala> def [A] (x: A) foo: A = x
def foo[A](x: A): A

@odersky: I assume this is a remnant of a previous syntax and not intentional?

@odersky
Copy link
Contributor

odersky commented Jun 1, 2020

yes indeed. We need to drop that syntax

@smarter smarter closed this as completed in ffe859e Jun 1, 2020
smarter added a commit that referenced this issue Jun 1, 2020
Fix #9091: Drop deprecated extension method syntax
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

2 participants