Skip to content

Change variances in TypeMaps and Accumulators #2934

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

Merged
merged 3 commits into from
Aug 2, 2017

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Jul 29, 2017

Based on #2932.

Also contains the owner change for typed idents.

// would not detect types to be compatible. Note: If we replace the
// 2nd condition by `defDenot.symbol.maybeOwner.isType` we get lots
// of failures in the `tastyBootstrap` test. Trying to compile these
// files in isolation works though.
Copy link
Member

Choose a reason for hiding this comment

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

testPickling also failed, here's a simplified way to reproduce the failure:

./bin/dotc -Xprint-types -Ytest-pickler compiler/src/dotty/tools/io/File.scala compiler/src/dotty/tools/io/Jar.scala

This fails with a pickling difference, here's the diff:

--- before-pickling.txt 2017-07-30 16:10:33.955539823 +0200
+++ after-pickling.txt  2017-07-30 16:10:33.955539823 +0200
@@ -111,7 +111,7 @@
           <<new java.util.jar.JarFile:java.util.jar.JarFile>:
             ((x$0: java.io.File): java.util.jar.JarFile)
           >
-        (<<Jar.this.file:dotty.tools.io.File>.jfile:=> dotty.tools.io.JFile>):
+        (<<Jar.this.file:dotty.tools.io.File>.jfile:<notype>>):
           java.util.jar.JarFile
         >
       lazy val manifest: scala.Option[java.util.jar.Manifest] = 

odersky added 3 commits July 31, 2017 17:49
Bonus point: No need to override applyPrefix in variances
accumulator. This means we have reduced three different ways
to compute the current variance to one.
@odersky odersky force-pushed the change-variances branch from d351c64 to 8683f66 Compare July 31, 2017 15:50
@odersky odersky merged commit 08087d8 into scala:master Aug 2, 2017
@allanrenucci allanrenucci deleted the change-variances branch December 14, 2017 16:58
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