aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* isSubtype: try to dealias TypeRefs before recursively checking the prefixesGuillaume Martres2015-11-253-10/+23
| | | | | | | As demonstrated by tests/pos/hk-deep-subtype.scala, we can avoid some deep subtype recursions that result in stack overflows by doing this. Fix #943.
* Merge pull request #969 from dotty-staging/change-swap-annot-argsDmitry Petrashko2015-11-2215-32/+28
|\ | | | | Swap order of arguments in annotations
| * Swap order of arguments in annotations for TastyVladimirNik2015-11-233-4/+3
| |
| * Swap order of arguments in annotationsMartin Odersky2015-11-2213-30/+27
|/ | | | | | | | | The fact that the annotation comes first is weird, because when I write an annotated type it's <type> @<annotation>. Also, annotated types are like RefinedTypes in that they derive from a parent type. And in RefinedTypes the parent comes first. So swapping the arguments improves consistency.
* Merge pull request #967 from dotty-staging/tasty-testsodersky2015-11-211-0/+7
|\ | | | | New tests for tasty
| * New tests for tastyVladimirNik2015-11-201-0/+7
|/
* Merge pull request #965 from reactormonk/masterDmitry Petrashko2015-11-201-1/+1
|\ | | | | Fixed != comparison
| * Fixed != comparisonSimon Hafner2015-11-201-1/+1
|/ | | | | | By linter: comparing values of types Char and String using `!=' will always yield true
* Merge pull request #963 from smarter/fix/poly-implicitsGuillaume Martres2015-11-184-11/+48
|\ | | | | Fix ambiguity errors with polymorphic implicits
| * Annotate `isAsSpecific` with references to its documentationGuillaume Martres2015-11-181-9/+9
| | | | | | | | Also reorder the cases to be in the same order as the documentation.
| * Fix ambiguity errors with polymorphic implicitsGuillaume Martres2015-11-184-6/+43
|/ | | | | | | | | Previously, `isAsSpecific(alt1, tp1, alt2, tp2)` did not handle having `tp2` be a polymorphic non-method type like `[A]Foo[A]`. Also update the documentation of `isAsSpecific` to account for this change, the new documentation is based on SLS ยง 6.26.3 but adapted to reflect the code.
* Merge pull request #955 from dotty-staging/fix-#937odersky2015-11-172-5/+3
|\ | | | | Fix #937
| * Add one more passing filt to whitelistMartin Odersky2015-11-171-1/+1
| |
| * Fix bug with finger printing in delete.Martin Odersky2015-11-171-4/+2
|/
* Merge pull request #957 from dotty-staging/fix-#938odersky2015-11-175-7/+30
|\ | | | | Fix #938
| * Fix comparisonMartin Odersky2015-11-171-1/+1
| |
| * Add test caseMartin Odersky2015-11-172-1/+22
| |
| * Compensate for getter transform in isSubType testMartin Odersky2015-11-171-0/+3
| | | | | | | | | | | | Getters transform `T` to `=> T`. This means that `=> T <: T` might need to be true after getters. Observed in the wild tree checking t938.scala after getters.
| * Fix bug in phase identification for YcheckMartin Odersky2015-11-171-2/+2
| | | | | | | | | | -Ycheck:era checked after phase resolveSuper. This was due to an overly simplistic containsPhase check.
| * Fix #938 - escaping reference.Martin Odersky2015-11-171-4/+3
| | | | | | | | Need to avoid also symbols in ThisTypes
* | Merge pull request #958 from dotty-staging/companion-methodsDmitry Petrashko2015-11-175-12/+30
|\ \ | |/ |/| Links between companions after unpickling are added
| * Links between companions after unpickling are addedVladimirNik2015-11-175-12/+30
|/
* Merge pull request #950 from dotty-staging/fix-#916odersky2015-11-178-85/+151
|\ | | | | Adapt type parameters of typed eta expansion according to expected variances
| * Extend synchronized scope in newTermNameMartin Odersky2015-11-171-48/+45
| | | | | | | | | | | | | | Just noted that the previous scope might have been too small. We compute the bucket index with the table size before going into the synchronized. But that might mean we see a stale table size. Let's see what this gives us.
| * Packages are never fully completedMartin Odersky2015-11-171-3/+4
| | | | | | | | | | | | The previous commit made packages always fully completed. This is wrong - since new members can be added to packages at any time, packages are never fully completed.
| * Fix problems arising when hierarchies of classes are under completionMartin Odersky2015-11-173-17/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix problems arising when hierarchies of classes are under completion at the same time. In this case it can happen that we see a subclass (e.g. Arrays.scala) which depends on a superclass (e.g. GenTraversableLike.scala) that itself does not have its parents defined yet. Previously, several things went wrong here - One of the base classes would be marked as frozen, even though it dod not have all members entered yet. This led to an error in finger printing. - The baseclasses and super class bits of the subclass would be computed before the parents of the middle class were known. The baseclasses would then be chached, leading to false results for isDerivedFrom. We need to refine the logic for computing base classes, super class bits, and fingerprints to account for that issue.
| * Avoid setting info with parents too early when unpicklingMartin Odersky2015-11-171-2/+0
| | | | | | | | | | | | Adding parents signals (via SymDenotation.fullyDefined) that the class can now be frozen. So this should be done only after all members are entered.
| * Revert: Make hash codes on type more predictable.Martin Odersky2015-11-172-2/+2
| | | | | | | | | | | | getSimpleName crashes on some module names created by scalac. May help finding the partest issue. (reverted from commit c11646c40042404550eb983577c9e7096a40502a)
| * Harden definition of isScalaTraitMartin Odersky2015-11-171-1/+1
| | | | | | | | | | Exclude false positives such as `Lambda|` be requiring that lambda traits are defined in the Scala package.
| * Eta expand according to expected type parameter varianceMartin Odersky2015-11-173-15/+66
| | | | | | | | | | | | | | When eta expanding a type `C` to `[vX] => C[X]` the variance `v` is now the variance of the expected type, not the variance of the type constructor `C`, as long as the variance of the expected type is compatible with the variance of `C`.
* | Merge pull request #962 from dotty-staging/fix-#947Guillaume Martres2015-11-185-4/+39
|\ \ | |/ |/| Fix #947
| * scala-collections.whitelist: remove stray 'x' that broke the testGuillaume Martres2015-11-171-1/+1
| |
| * Add ArrayBuilder to whitelistMartin Odersky2015-11-171-1/+3
| |
| * Test case for #947Martin Odersky2015-11-171-0/+16
| |
| * Extend implicits testMartin Odersky2015-11-171-0/+6
| | | | | | | | ... to show that we support implicit patterns.
| * Add file to scala-collections-whitelistMartin Odersky2015-11-171-1/+1
| | | | | | | | | | This witnesses that #945 is fixed (by pushing a fix to the Scala file to dotty-library).
| * More refined treatement of pattern type variablesMartin Odersky2015-11-172-3/+14
|/ | | | | | | | | | | | | | | Previously all lower case names were treated as variables in patterns. But that made code like x: cls crash the compiler if `cls` was a class. Also, it owuld preventing this idiom unless one wrote x: `cls` We now do it like scalac and treat lower case names as variables only in arguments of types.
* Merge pull request #960 from dotty-staging/fix-#941odersky2015-11-167-7/+47
|\ | | | | Fix #941
| * Enable more parts of whitelistMartin Odersky2015-11-161-4/+4
| |
| * Avoid merge errors in Scala2 modeMartin Odersky2015-11-161-1/+1
| | | | | | | | | | | | | | | | Linearize instead. It would be nice to be able to give a migration warning here, but unfortunately we do not have a position at the point the warning would be generated, and it feels like overkill to do another kind of exception that gets propagated and caught in typer.
| * Generalize test to function classesMartin Odersky2015-11-163-2/+21
| | | | | | | | | | | | The previous test was too struct, missed cases where some arguments of the function were unbound. i583a.scala contains a test case.
| * Better diagnostic for migration warningsMartin Odersky2015-11-161-0/+2
| | | | | | | | Flag them as "migration warning" rather than just "warning".
| * Flag trailing `_' following non-function as an errorMartin Odersky2015-11-162-2/+14
| | | | | | | | | | | | | | | | If `x` is not a function or method, then `x _` should be disallowed. scalac accepts this and converts it to () => x instead. I'd like to drop this because it's unnecessary and non-obvious. If -language:Scala2 is on, the behavior is like Scala 2's but a migration warning is issued.
| * Make secondary constructor type parameters aliasesMartin Odersky2015-11-161-0/+7
|/ | | | | | Make secondary constructor type parameters aliases of the enclosing class parameters. Test case in i941.scala. Observed in the wild when trying to typecheck Streams.scala.
* Merge pull request #956 from dotty-staging/companion-methodsDmitry Petrashko2015-11-161-6/+10
|\ | | | | Remove duplication of companion methods in Scala2Unpickler
| * Remove duplication of companion methods in Scala2UnpicklerVladimirNik2015-11-161-6/+10
|/
* Merge pull request #936 from dotty-staging/more-collectionsDmitry Petrashko2015-11-112-18/+183
|\ | | | | Get more collections whitelisted
| * Remove leftover empty linesDmitry Petrashko2015-11-101-10/+0
| |
| * Change diagnosis of GenericTraversableTemplate.scala.Dmitry Petrashko2015-11-101-0/+1
| |
| * This cyclic ref is fixed.Dmitry Petrashko2015-11-101-6/+2
| |