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 updates for overloading #3595

Closed
scabug opened this issue Jun 23, 2010 · 3 comments
Closed

Spec updates for overloading #3595

scabug opened this issue Jun 23, 2010 · 3 comments

Comments

@scabug
Copy link

scabug commented Jun 23, 2010

From a discussion on Scala User:

http://thread.gmane.org/gmane.comp.lang.scala.user/28171
http://thread.gmane.org/gmane.comp.lang.scala.user/28169

I think the spec should be updated to replace:

"If there is precisely one alternative in A which is a (possibly
polymorphic) method
type whose arity matches the number of arguments given, that
alternative is chosen."

with:

"If there is precisely one alternative in A which is a (possibly
polymorphic) method
type which is potentially applicably to the arguments given, that
alternative is chosen.

A list of arguments (e1, ..., em) is potentially applicable to a
method m in the context of an expected type E if the arguments (e1', ..., em') are applicable to m, either with the expected type E or with
no expected type. ei' is defined as the shape of the argument ei.

The shape of an argument is defined as:

  • for a function expression of (p1: T1, ..., pn: TN) => body: (p1$$: Any,..., pn$$: Any) => shape(body)
  • for a named argument name = expr: name = shape(expr))
  • for all other expressions: nothing$$, where nothing$$ an synthetic expression of type Nothing.
@scabug
Copy link
Author

scabug commented Jun 23, 2010

Imported From: https://issues.scala-lang.org/browse/SI-3595?orig=1
Reporter: @retronym

@scabug
Copy link
Author

scabug commented Jul 2, 2010

@harrah said:
Included in updates to the spec in r22427.

@scabug
Copy link
Author

scabug commented Dec 28, 2011

@paulp said:
Sure enough.

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