Skip to content

Conversation

@odersky
Copy link
Contributor

@odersky odersky commented Jan 23, 2018

In non-variant contexts, we used to always maximize undetermined type variables, but this is unsound. See neg/patternUnsoundness.scala. We now create fresh abstract types in
these situations. This forced us to also fix the pickling and unpickling of Bind nodes.

In non-variant contexts, we used to always maximize them, but this is unsound.
See neg/patternUnsoundness.scala. We now create fresh abstract types in
these situations.
Make bind-defined symbols forward-referencable. This is necessary
to support more interesting patterns of Binds. E.g. in

   case (bla: List[t])

the bound symbol `bla` refers to the bound type `t` in its info. Previously
we used BindDefinedType for that, but that cannot work in general, because
it does not distinguish between a reference and a binding.
Have to modify the way templates are scanned, so far,
all non-member definitions inside a template were forgotten.

Strangely enough this caused a completely unrelated
fromTastyTest to fail.
A clause was accidentally disabled fir debugging purposes.

x match {
case x: C[u] =>
def x: u = x
Copy link
Member

Choose a reason for hiding this comment

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

Is the self-recursive call intended here?

Copy link
Contributor Author

@odersky odersky Jan 23, 2018

Choose a reason for hiding this comment

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

I assume so, it was an old test in pos. The new test in pickling adds more variations that exercise forward binds in pickling.

With the changes in the last commit, the symbol of a Bind
always exists.
@smarter smarter merged commit 8ab3ce6 into scala:master Feb 1, 2018
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