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

Scala 2.11 compatibility #1113

Merged
merged 2 commits into from Feb 12, 2014
Merged

Scala 2.11 compatibility #1113

merged 2 commits into from Feb 12, 2014

Conversation

retronym
Copy link
Member

Review by @gkossakowski

We now have `global.Range`, so our wildcard import of `global._`
shadows `scala.Range`.

This commit fully qualifies that type so as to be compatible with
Scala 2.10 and 2.11.
retronym added a commit to retronym/scala that referenced this pull request Feb 12, 2014
We've started calling this method during higher-kinded subtyping
to ensure that variances of higher order type params in overriding
as soundly aligned.

Turns out that running this over the expansion of the SBT task
macro leads to a SOE due to a corrupt owner chain.

I've fixed that in SBT (sbt/sbt#1113),
but we ought not crash like this.

This commit considers NoSymbol to be its own enclosing member and
logs a -Xdev warning. This is analagous to the handling of
`NoSymbol.owner`.
Since the fix for SI-2066, Scala 2.11 calls logicallyEnclosingMember on the
`x` in the expansion of the task macro:

    InitializeInstance.app[[T0[x]](T0[java.io.File], T0[java.io.File]), Seq[java.io.File]]

This exposed the fact that SBT has created `T0` with `NoSymbol` as
the owner. This led to the a SOE.

I will also change the compiler to be more tolerant of this, but we
can observe good discipline in the macro and pick a sensible owner.
@gkossakowski
Copy link
Contributor

LGTM.

@gkossakowski
Copy link
Contributor

I should mention that I verified your fixes by building this PR against M8. It works now.

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.

None yet

2 participants