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

* cannot be used as an infix type #8325

Closed
scabug opened this issue Feb 22, 2014 · 4 comments
Closed

* cannot be used as an infix type #8325

scabug opened this issue Feb 22, 2014 · 4 comments
Assignees
Labels
Milestone

Comments

@scabug
Copy link

scabug commented Feb 22, 2014

It's possible to use symbolic type names, then use them in infix position, however this doesn't work for *. Maybe there's a good reason for this, but I can't think what it is.

scala> type +[A, B] = (A, B)
defined type alias $plus

scala> type *[A, B] = (A, B)
defined type alias $times

scala> type X[A, B] = A + B
defined type alias X

scala> type Y[A, B] = A * B
<console>:1: error: ';' expected but identifier found.
       type Y[A, B] = A * B
                        ^
@scabug
Copy link
Author

scabug commented Feb 22, 2014

Imported From: https://issues.scala-lang.org/browse/SI-8325?orig=1
Reporter: @propensive
Affected Versions: 2.10.3, 2.11.0-M7
See #5702

@scabug
Copy link
Author

scabug commented Feb 22, 2014

@som-snytt said:
In patterns, this was fixed, or should I say infixed, in the linked issue.

@scabug
Copy link
Author

scabug commented Feb 23, 2014

@som-snytt said:
Provisionally, scala/scala#3576

The spec specifically disallows star in 3.2.8 because of repeated parameter syntax.

@scabug scabug closed this as completed May 7, 2014
@scabug
Copy link
Author

scabug commented May 7, 2014

@som-snytt said:
Following up the spec

scala/scala#3722

@scabug scabug added this to the 2.11.1 milestone Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants