aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Drop redundant context parameterMartin Odersky2016-02-081-1/+1
|
* Slight optimizationMartin Odersky2016-02-041-6/+8
|
* Try to make refinements match in approximateUnionsMartin Odersky2016-02-042-2/+41
| | | | | See comment in Typer#approximateUnion for an explanation. Fixes #1045.
* Push `|' into corresponding RefinedTypes in approximateUnionMartin Odersky2016-02-041-22/+41
| | | | | This gives in general a supertype, that's OK for approximation. See ee76fda for an explanation.
* Fix i939: Patmat shouldn't compare selectors to module TypeTrees.Dmitry Petrashko2016-01-241-1/+2
| | | | | | | | It would be great to augment Ycheck to ensure that some trees are not permitted, e.g. TypeTree cannot be a stat in a block or a receiver of a call. Currently this is `ensured` by backend by failing.
* Merge pull request #1039 from dotty-staging/fix-#998Guillaume Martres2016-01-231-3/+22
|\ | | | | Fix #998
| * Fix #998Martin Odersky2016-01-201-3/+22
| | | | | | | | Needed a fix in approximateUnion.
* | Merge pull request #1038 from dotty-staging/fix-#1037Guillaume Martres2016-01-234-8/+16
|\ \ | | | | | | Fix #1037
| * | Perform isCurrent at transform phaseMartin Odersky2016-01-191-3/+8
| | | | | | | | | | | | instead of the one after it. Fixes problem with t7475b.scala
| * | Small refactoringMartin Odersky2016-01-191-2/+5
| | |
| * | Don't force symbol denotation when taking fingerprint.Martin Odersky2016-01-192-2/+2
| | |
| * | Avoid repeated evaluations of parentIsYounger.Martin Odersky2016-01-191-1/+1
| |/
* / Fix #1036Martin Odersky2016-01-201-1/+6
|/ | | | Achieved by tweaking from where we get the parameter types of an eta-expansion.
* Check AppliedTypeTrees bounds inside AppliedTypeTreeGuillaume Martres2016-01-181-7/+10
|
* Avoid infinite subtyping checks when intersecting denotationsGuillaume Martres2016-01-182-12/+32
| | | | This allows us to run compileStdLib without deep subtypes again.
* Avoid caching the wrong bounds in TypeRefsMartin Odersky2016-01-181-1/+16
| | | | | Checking bounds everywhere revealed a problem in compileStdLib, which this commit fixes.
* Check bounds everywhereMartin Odersky2016-01-183-29/+35
| | | | | | | | Previously, bounds of a TypeDef tree were not checked. We now make sure bounds are checked everywhere in PostTyper. The previous partial check in Applications gets removed (it was not complete even for TypeApplications because sometimes bounds were not yet known when the test was performed.)
* Keep rhs of TypeDef in typed treeMartin Odersky2016-01-182-2/+10
| | | | | This is important for IDEs who want to see the full tree. The tree now gets replaced by a TypeTree in PostTyper.
* Fix caching bug: don't assume that tvars instantiation cannot be retractedGuillaume Martres2016-01-171-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | When TypeVar#inst is empty but an instantiation exists in the typer state, we should set ephemeral to true, because this instantiation will be retracted if we throw away the current typer state. This makes hkrange.scala pass, it compiled before but the type parameter of `f` was inferred to be `Nothing` because of this bug, and this failed Ycheck. For anyone who wonders how caching bugs manifest themselves, here's what happened in details in hkrange.scala: 1. In an ExploreTyperState we set `CC` to be `IndexedSeq` in the constraint set 2. In that same typer state the TypeRef `CC[Int]` (it's a TypeRef because `CC` is a type lambda) gets the denotation `IndexedSeq[Int]`, which is correct, but the denotation is cached since `ephemeral` is false, which is wrong. 3. Later, we retract the ExplorerTyperState, so `CC` is uninstantiated again and unconstrained. 4. Then we do the subtyping check `CC[Int] <:< IndexedSeq[Int]`, because the denotation of `CC[Int]` was cached, this returns true, but `CC` stays unconstrained. 5. This means that when we instantiate `CC`, we get `Nothing` After this fix, the TypeRef denotation is no longer cached, so when we do `CC[Int] <:< IndexedSeq[Int]`, `CC` gets constrained as expected.
* Merge pull request #1021 from dotty-staging/fix/procedure-migrationodersky2016-01-171-1/+1
|\ | | | | Improve migration message for Scala 2 procedures
| * Improve migration message for Scala 2 proceduresGuillaume Martres2016-01-141-1/+1
| | | | | | | | | | | | It's not correct to just add `=` you also need to specify the return type to be `Unit` otherwise things may not work as expected, this is especially important for a `main` method.
* | Always eta-expand AppliedTypeTrees argumentsGuillaume Martres2016-01-161-1/+1
| | | | | | | | This makes compileIndexedSeq pass again.
* | Compute type params in namer without completing the whole infoMartin Odersky2016-01-164-15/+49
| | | | | | | | | | | | | | | | | | Type params should be computed before computing the whole info of a type. Without the patch we get a cyclic reference in the compileMixed test. Note that compileIndexedSeq does not pass with this commit (it passed before), this is fixed in the next commit.
* | Fix checkNonCyclic.Martin Odersky2016-01-161-6/+6
| | | | | | | | | | | | | | Need to also look info refined types. Need to handle case where we hit a NoCompleter again. Fixes #974 and makes MutableSortedSetFactory in stdlib compile.
* | Make skolems uncachedMartin Odersky2016-01-161-2/+2
|/ | | | | | There was no reason in the first case to cache them, as their equality is reference identity. Maybe this fixes the OOM errors we encounter.
* Partest dotty non-bootstrapped.Dmitry Petrashko2016-01-131-1/+1
| | | | | | Needs to go in before https://github.com/scala/scala-jenkins-infra/pull/152 is deployed
* Merge pull request #1004 from dotty-staging/linker/typesodersky2016-01-063-30/+38
|\ | | | | Subtle changes to TypeComarer needed for Linker.
| * Mark TermRefWithFixedSym as non-final.Dmitry Petrashko2016-01-041-2/+3
| |
| * Allow comparisons between TypeRefs and ThisTypes.Dmitry Petrashko2016-01-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Motivation comes from Linker: List$.canBuildFrom is implemented as ReusableCBF.asInstanceOf[GenericCanBuildFrom[A]] static type of field ReusableCBF here is TypeRef(TypeRef(List$), GenericCanBuildFrom[Nothing]) but the ident ReusableCBF gets type TypeRef(ThisType(List$), GenericCanBuildFrom[Nothing]) We already permit comparisons between static TermRefs and ThisTypes, this change additionally allows TypeRefs to static modules to become subtypes of ThisTypes of static modules.
| * Linker specific: add note to withSymAndName.Dmitry Petrashko2015-12-201-0/+4
| |
| * LinkerSpecific: make functionality of ResolveSuper accessible.Dmitry Petrashko2015-12-201-27/+30
| | | | | | | | | | Linker needs to resolve super calls before they are rewritten in the tree.
* | VCArrayPrototype: replace override "def clone" by "def clone()"Guillaume Martres2016-01-041-1/+1
| | | | | | | | | | | | This prevented Dotty from bootstrapping when the file arguments were given in a certain order because of #1017. Regardless of what we do regarding #1017, it makes sense to use "def clone()" here.
* | Merge pull request #1003 from dotty-staging/linker/tastyDmitry Petrashko2016-01-0410-296/+339
|\ \ | | | | | | Fixes&Changes to TASTY inspired by Linker
| * | Address review comments.Dmitry Petrashko2016-01-041-1/+1
| | |
| * | TreeUnpickler unpickle only top-level packages and imports.Dmitry Petrashko2015-12-201-2/+26
| | |
| * | Postpone tree compaction till all phases finish operating TASTY.Dmitry Petrashko2015-12-202-4/+10
| | | | | | | | | | | | Linker adds new sections. Wait for sections to be added and then compact.
| * | Maintain original completer in SymDenotation.Dmitry Petrashko2015-12-201-1/+1
| | | | | | | | | | | | Needed to be able to access additional sections of TASTY.
| * | Linker specific: TreePicker: export functions for reuseDmitry Petrashko2015-12-201-272/+271
| | | | | | | | | | | | | | | Linker needs to save some trees. Instead of reimplementing I would rather reuse already existing methods.
| * | Allow unpickler to be accessible after FromTastyDmitry Petrashko2015-12-202-1/+4
| | |
| * | Have only one tree pickler per TASTY pickler.Dmitry Petrashko2015-12-202-1/+3
| | |
| * | Fix reading of Longs from tasty. Fixes wrong UUID.Dmitry Petrashko2015-12-201-1/+1
| | |
| * | Linker Specific: allow phases to get to TASTY section.Dmitry Petrashko2015-12-202-16/+25
| |/ | | | | | | | | | | Makes all classes and fields on the way to TASTY section accessible. Example of usage can be found here: https://gist.github.com/DarkDimius/0f9dc769b0dd7a3c7365
* | Merge pull request #1005 from dotty-staging/ycheck-erasure-arraysDmitry Petrashko2016-01-042-2/+7
|\ \ | | | | | | Ycheck that scala.Array is erazed to either Object or JavaArrayType.
| * | Refine interdiction of Array after erasureMartin Odersky2015-12-211-1/+5
| | | | | | | | | | | | Array is still allowed after erasure when compiling Array.scala.
| * | Fix erasure of raw arraysDmitry Petrashko2015-12-212-1/+2
| | |
| * | TypeErasure.isErasedType: scala.Array is invalid after Erasure.Dmitry Petrashko2015-12-201-1/+1
| |/ | | | | | | It should either be erased to j.l.Object or replaced by JavaArrayType.
* | Merge pull request #1010 from dotty-staging/fix/new-asSeenFromodersky2016-01-031-1/+1
|\ \ | | | | | | Fix #1009: Do not forget to skolemize some types
| * | Fix #1009: Do not forget to skolemize some typesGuillaume Martres2015-12-241-1/+1
| | |
* | | Merge pull request #1006 from dotty-staging/more-testsGuillaume Martres2015-12-2611-32/+49
|\ \ \ | |/ / |/| | More tests
| * | Fix problem dealing with symbolic import renamesMartin Odersky2015-12-201-1/+1
| | |