Skip to content

Conversation

@OlivierBlanvillain
Copy link
Contributor

No description provided.


> Why do we want to make this change to the language?

tbd
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@odersky Do you have any input on that? I couldn't find anything on the motivation in history...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shadowing is a irregular case. We don't do that for any other kind of member. In both theory and the new compiler implementation the only way to implement it would be to invent a new mangled name for each inner class, which is really clunky.

Copy link
Contributor

@odersky odersky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise LGTM.

= Si` is assumed. If the expected type of the anonymous implicit function is
some other type, all implicit parameter types must be explicitly given, and
the expected type of `e` is undefined. The type of the anonymous implicit
function is `scala.ImplicitFunctionN[S1, ...,Sn, T]`, where `T` is the packed
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The term "packed" does not exist anymore in Scala 3. The term to use is probably something like "widened" (i.e singleton type are widened), but we'd need to define that centrally for the new spec.

Note: The closing paragraph of the [Anonymous Functions section](https://www
.scala-lang.org/files/archive/spec/2.12/06-expressions.html#anonymous-
functions) of the Scala 2.12 is subsumed by implicit function types and should
be remove.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed.


> Why do we want to make this change to the language?

tbd
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy the gist of my comment in there.

Copy link
Contributor

@odersky odersky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now!

@odersky odersky merged commit f5b9572 into scala:master Nov 3, 2018
@allanrenucci allanrenucci deleted the sips-olivier branch November 3, 2018 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants