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

Spec doesn't mention automatic tupling #3583

Open
scabug opened this issue Jun 18, 2010 · 7 comments
Open

Spec doesn't mention automatic tupling #3583

scabug opened this issue Jun 18, 2010 · 7 comments
Assignees
Milestone

Comments

@scabug
Copy link

@scabug scabug commented Jun 18, 2010

From Typers:

/** Try packing all arguments into a Tuple and apply `fun'
           *  to that. This is the last thing which is tried (after
           *  default arguments)
           */

I couldn't find this in the spec.

@scabug
Copy link
Author

@scabug scabug commented Jun 18, 2010

@scabug
Copy link
Author

@scabug scabug commented Jul 11, 2010

@retronym said:
While we're at it, we could make this safer by:

  • warning if auto tupling chooses one of overloaded alternatives
  • warning if any auto-tupling occurs if -Xwarn-auto-tupling is specified.
[11:13pm] paulp: So I change from one joda time class with a 7-arg constructor to a similar one with fewer.
[11:13pm] paulp: but in addition to not having a 7-arg constructor, it has one which takes Object.
[11:14pm] paulp: so no warning until runtime failure "what the <expletive deleted> is a 7-tuple?" says joda time.
[11:14pm] paulp: that is an absolute debacle. 
[11:14pm] paulp: I knew about this issue but it never bit me this ugly before.
[11:16pm] retronym: -Xwarn-auto-tupling would be popular, from my straw polls
[11:19pm] retronym: paulp: or just outright disable it if there are overloaded alternatives
@scabug
Copy link
Author

@scabug scabug commented Jul 11, 2010

@retronym said:
A warning could also be emitted if the target method is defined in Java.

@scabug
Copy link
Author

@scabug scabug commented Oct 10, 2012

@paulp said:
There has been a warning available since scala/scala@4e488a6 and the warning is included in -Xlint.

@scabug
Copy link
Author

@scabug scabug commented Oct 15, 2013

@gkossakowski said:
Unassigning and rescheduling to M7 as previous deadline was missed.

@scabug
Copy link
Author

@scabug scabug commented Mar 11, 2014

@adriaanm said:
Not classifying as a spec bug, because I believe we should instead deprecate this. See also the discussion over at Dotty, where I hope this won't be implemented at all: lampepfl/dotty#51

@adriaanm adriaanm added this to the 2.13.0-RC1 milestone Aug 8, 2018
@adriaanm adriaanm modified the milestones: 2.13.0-RC1, Backlog Jan 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.