aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* 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 #950 from dotty-staging/fix-#916odersky2015-11-177-80/+147
|\ | | | | 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-172-16/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-172-11/+63
| | | | | | | | | | | | | | 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`.
* | 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.
* 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-161-2/+2
| | | | | | 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-161-2/+13
| | | | | | | | 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.
* Remove duplication of companion methods in Scala2UnpicklerVladimirNik2015-11-161-6/+10
|
* Merge pull request #946 from dotty-staging/more-predictable-hashesDmitry Petrashko2015-11-112-2/+2
|\ | | | | Make hash codes on type more predictable.
| * Make hash codes on type more predictable.Dmitry Petrashko2015-11-102-2/+2
| | | | | | | | May help finding the partest issue.
* | Merge pull request #921 from dotty-staging/polytypes-hashcodesDmitry Petrashko2015-11-102-9/+30
|\ \ | |/ |/| Add stable hash codes to PolyTypes and PolyParams.
| * Address review comments.Dmitry Petrashko2015-11-102-1/+6
| |
| * Add stable hash codes to PolyParams.Dmitry Petrashko2015-11-041-4/+20
| | | | | | | | Helps me a lot in linker.
| * Hashable: make finishHash protected.Dmitry Petrashko2015-11-041-5/+5
| | | | | | | | Is in sync with hashSeed being protected.
* | Merge pull request #928 from dotty-staging/stdlib-definitionsDmitry Petrashko2015-11-1056-494/+703
|\ \ | | | | | | Make Definitions survive recompilation of core definitions.
| * | Get more info on HeisenbugsMartin Odersky2015-11-092-1/+21
| | | | | | | | | | | | | | | | | | 1) Check that searched scope is consistent 2) Do a linear search for symbol with name, and report if something was found that way.
| * | Print missing ref diagnostics on stderrMartin Odersky2015-11-091-2/+2
| | | | | | | | | | | | Was stdout, but this gets mixed up with the exception printing on stderr.
| * | Avoid cyclic reference errors when unpickling classesMartin Odersky2015-11-092-6/+10
| | | | | | | | | | | | | | | | | | | | | Set info early in order to avoid cyclic reference errors. Errors were observed when compiling scala/Predef.scala scala/package.scala scala/collection/GenSeqLike.scala
| * | Don't inspect info when dealiasing classesMartin Odersky2015-11-091-2/+3
| | | | | | | | | | | | | | | | | | | | | Forces a bit less, and could be more efficient. Did not seem to make a difference with current CyclicReferences though, except that cyclic error happened a bit later in the sequence.
| * | Better diagnosis from completions printerMartin Odersky2015-11-092-1/+13
| | | | | | | | | | | | Track starts and ends of completions using indentation.
| * | More info when TreeChecker failsMartin Odersky2015-11-091-1/+1
| | | | | | | | | | | | Now also provides compilation unit.
| * | Trying to get more diagnostics out of TreeCheckerMartin Odersky2015-11-091-0/+4
| | | | | | | | | | | | Again it dies without an exception trace. Is partest eating error output?
| * | Make dir.list synchronized.Martin Odersky2015-11-091-2/+5
| | | | | | | | | | | | | | | Just a grap at straws to get a handle for the missing reference problem.
| * | More refined Retyping tracingMartin Odersky2015-11-091-3/+4
| | | | | | | | | | | | | | | | | | Instead of simply dropping all Retyper error traces, we now send them to the config.Printers.transforms printer, so what happens depends on the value of that printer.
| * | Disable "Exception while typing" trace in retyper.Martin Odersky2015-11-091-2/+2
| | | | | | | | | | | | | | | | | | I looked a some of the failures so far, and in each case we got a huge "exception while typing" cascade but then no actual error! Buffer overflow? To find out more I disabled the trace for now.
| * | Generalize MultiArrayOf to arrays of wildcardsMartin Odersky2015-11-092-5/+21
| | | | | | | | | | | | | | | Needed for both ClassTags and instance of checks. This makes scala/Array.scala compile.
| * | Avoid taking references before toplevel symbols are entered.Martin Odersky2015-11-095-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | Taking a reference means that the symbol will be brought forward into the current run, then if the same symbol is entered from source, a datarace ensues. This affected the ProductN symbols because these are automatically added to a case class suring desugaring.
| * | Don't try to transform sources of primitive value classes after FrontEnd.Martin Odersky2015-11-091-1/+14
| | |
| * | Make symbol methods in Definitions depend on implicit contextMartin Odersky2015-11-092-103/+120
| | | | | | | | | | | | | | | | | | | | | Otherwise they would always return the symbol in the original context where Definitions was first created. Also, cache two more arrays of symbols per run.
| * | Rename AnnotRef -> AnnotTypeMartin Odersky2015-11-093-58/+57
| | |
| * | Shorten ..Class.typeRef to ..TypeMartin Odersky2015-11-0917-43/+43
| | | | | | | | | | | | | | | Since we now have two forms of (almost) everything in Definitions, might as well profit from it.
| * | Fix dotty compilation problem in DefinitionsMartin Odersky2015-11-091-4/+4
| | |
| * | Renamings in DefinitionsMartin Odersky2015-11-0920-163/+140
| | | | | | | | | | | | | | | | | | TypeRef becomes Type, thus removing duplicates. Where ...Type was used in an extraction (e.g. ArrayType(...), FunctionType(...)), we now use ...Of.
| * | Avoid overhead of generating symbol sets on each accessMartin Odersky2015-11-0912-36/+49
| | | | | | | | | | | | | | | | | | 1) Have symbol sets cached per run 2) Use methods Denotation#isPrimitiveValueClass, Denotation#isNumericValueClass instead of calling contains directly on symbol sets.
| * | Make Set[TypeRef]s privateMartin Odersky2015-11-091-5/+5
| | | | | | | | | | | | Contains tests on thsoe sets would be flakey anyway.
| * | Remove/hide value class mapsMartin Odersky2015-11-092-17/+14
| | | | | | | | | | | | | | | | | | | | | Remove unneeded maps and make the ones that are needed private. Reason: Maps indexed with TypeNames are prone to misuse; should be accessed only with names of known primitive classes.
| * | Move refType/Class maps from Definitions to CapturedVarsMartin Odersky2015-11-092-20/+27
| | | | | | | | | | | | | | | | | | | | | Maps should not have TypeRefs as keys, yet symbols are not stable for recompilation. Solution: Construct these maps over symbols but move them to CapturedVars#Transform where they will be re-built on each run.
| * | Make BoxedUnit_UNIT a defMartin Odersky2015-11-091-2/+1
| | | | | | | | | | | | Was a lazy val, but this is not stable under recompilation.
| * | Match on _name rather than TypeRef in scalaPrimitivesMartin Odersky2015-11-092-32/+32
| | |
| * | Standardize requiredMethod callsMartin Odersky2015-11-095-44/+34
| | | | | | | | | | | | | | | Remve versions in Symbols, always go through version in Denotations. Avoids having two equivalent ways to do the same thing.