aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * More flexible () applications.Martin Odersky2014-03-292-6/+44
| | | | | | | | | | | | | | | | | | | | | | | | New method ensureApplied which will add a () parameter list if a tree's widened type takes parameters. Used in numericConversion, so that we are independent whether we run before () insertion or after. With that change TypeTestCasts can stay enabled for the whole build. Conflicts: src/dotty/tools/dotc/ast/tpd.scala
| * Transform for normalizing type tests and type castsMartin Odersky2014-03-291-0/+101
| | | | | | | | To be executed before erasure.
| * Reworked erasure denotation transformerMartin Odersky2014-03-2910-101/+222
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now works for all combinations of java/scala sue ErasedValueClass/go directly to underlying type constructors/others wildcards ok/not Signatures had to be refined as well, because the signature depends on whether a type comes form Java or Scala (handling of intersections is different). Also, replaced splitArray method in TypeApplication by extractors for single- and multi-dimensional array types in definitions.
* | Merge pull request #93 from namin/update-scalaDmitry Petrashko2014-03-292-2/+2
|\ \ | |/ |/| Update to Scala 2.11.0-RC3.
| * Update to Scala 2.11.0-RC3.Nada Amin2014-03-252-2/+2
| | | | | | | | This was needed for running dotc.Main using latest Scala IDE 2.11 release.
* | Merge pull request #100 from DarkDimius/treetransform-nextDmitry Petrashko2014-03-2722-156/+217
|\ \ | |/ |/| Give phases periods, not only id's
| * Fix #95: Phases now have their own periods.Dmitry Petrashko2014-03-273-15/+29
| |
| * Rename methods on FreshContext to make mutation obviousDmitry Petrashko2014-03-2719-88/+88
| | | | | | | | And avoid name clashes
| * Fix Denotations#currentMartin Odersky2014-03-272-20/+35
| | | | | | | | | | | | | | | | | | | | | | The logic for dealing with periods in denotation histories did not correctly take into account the case where the current validity period of a denotation ends some phases before the next type transformer starts. And there was an off-by-one error in startPid. And Types#computeDenot erroneously tried to reload denotations even the run did not change.
| * Fix context.withPhaseMartin Odersky2014-03-275-9/+9
| | | | | | | | | | | | Previous version was wrong because every context is a fresh context at runtime, so the overriding version would always be executed, which means that withPhase becomes a side-effecting operation!
| * Changes to how we compute type parametersMartin Odersky2014-03-271-2/+6
| | | | | | | | | | | | | | | | | | Aim: Avoid expensive scanning of definitions in denotations other than the initial one. Technique: 1. If phase is erased, type params is Nil (except for Array class) 2. Otherwise, type params is the same as it was in initial phase.
| * Reworked phases.Martin Odersky2014-03-271-40/+68
|/ | | | | | | | | | | | | | | Aims 1) next/prev should be context-independent. Phase now stores its ContextBase in a field. 2) More robust handling of phaseNamed and the phase properties erasedTypes, flattened, refchecked, etc. These were previously dependent on when the first call to any of these methods was made, which led to a data race. There is now an init method in phases which centralizes all necessary intialization. It is checked that a phase is initialized only once.
* Merge pull request #89 from dotty-staging/fix/transform-contextsDmitry Petrashko2014-03-242-3/+8
|\ | | | | | | Fix phase of context for denotation transformer
| * Fix phase of context for denotation transformerMartin Odersky2014-03-242-3/+7
| | | | | | | | The phase is now always the phase on which the denotation transformer is defined.
* | Merge pull request #86 from dotty-staging/fixesSébastien Doeraene2014-03-24140-143/+316
|\ \ | | | | | | Fixes for various txxxx tickets
| * | Fix of Fix of t1236: higher-kindedMartin Odersky2014-03-213-12/+18
| | | | | | | | | | | | | | | | | | Fix of d6df293d2120f2247198cb6646a23c338f7dcbbf. It turned out the original commit was faulty in that iterator.flatten did not typecheck. The problem is fixed in this commit and flatten is added to the collections test.
| * | Fix of t1272: overloading resolutionMartin Odersky2014-03-212-3/+9
| | | | | | | | | | | | stripImplicits needs to take polytypes into account.
| * | Reverting decision what constitutes a double def.Martin Odersky2014-03-214-12/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | test case t0273. Was positive in Scala 2, is now deemed to be negative. Two two definitions def a = () => () def a[T] = (p:A) => () do have matching signatures, so should constitute a double definition. I previously thought that we can get away if the two definitions have different result types, but then you immediately have a problem because the denotations have matching signatures for the pruposes of "&" yet cannot be merged. Which of the two definitions would override a definition in a base class is then an arbitrary decision.
| * | Fix of t1279a: baseTypeWithArgsMartin Odersky2014-03-212-5/+25
| | | | | | | | | | | | | | | baseTypeWithArgs now also keeps track of refinements in the subtypes. Without that, the approximated lub in t1279a is too coarse and the program fails to typecheck.
| * | Refactored lookupRefinedMartin Odersky2014-03-212-10/+10
| | | | | | | | | | | | Turned parameter into receiver (reciever was not used before at all).
| * | More tests, currently disabledMartin Odersky2014-03-2132-0/+0
| | | | | | | | | | | | Mostly Java interop tests which are not yet supported. The test infrastructure for Java ocmpilation and the java parser from Scala are still missing.
| * | Fix of t1236: higher-kindedMartin Odersky2014-03-2110-39/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (and also of t0625, which reappeared). Several fixes were made. In summary: 1. Naming and representation of KigherKinded traits changed. It's now $HigherKinded$NIP where the letters after the second $ indicate variance (N)egative, (I)nvariant, (P)ositive. The HKtraits themselves are always non-variant in their parameters. 2. When deriving refined types over higher-kinded types, the variance of a type alias is the variance of the new type constructor. 3. isSubTypeHK was changed, as was the position from where it is called. 4. appliedTo also works for PolyTypes.
| * | Fix of t1280 - type of selfMartin Odersky2014-03-212-1/+1
| | | | | | | | | | | | | | | | | | The type of self name "x" was taken to be the thisType of the current owner. But the current owner was a local dummy of the class in question, so the ThisType was NoPrefix. Inserting an enclosingClass fixes the problem.
| * | Fix for t1292 - legal prefixesMartin Odersky2014-03-214-5/+60
| | | | | | | | | | | | | | | | | | | | | | | | The original test is now in error because the type Meta in the prefix Meta#Event is not stable and contains an abstract member Slog. Even after removing Slog, the test in pos was still in error because the bound type parameters were incorrectly recognized as abstract members. This has been fixed by the changes to Types.
| * | More testsMartin Odersky2014-03-2147-20/+25
| | |
| * | Fix of t1123 - Unit discardingMartin Odersky2014-03-212-2/+4
| | | | | | | | | | | | Need to do unit discarding also in selection prototypes.
| * | Fix of t112606A - path dependent typesMartin Odersky2014-03-212-1/+14
| | | | | | | | | | | | Needed an extra case in isSubType.
| * | Fix of t1056 - PartialFunctionMartin Odersky2014-03-212-2/+4
| | | | | | | | | | | | type T was not recorgnized as a SAM type because a case was missing in zeroParamClass.
| * | Fix of t0625 - compare method typesMartin Odersky2014-03-212-2/+6
| | | | | | | | | | | | | | | | | | Method type comparison via <:< yielded false if the signatures of the two method types differed. This is too strict, because methods can have the same parametyers but different result types and still be in a subtype relationship. We now onyl demand that the sighatures have the same parameters.
| * | More testsMartin Odersky2014-03-2112-26/+8
| | | | | | | | | | | | which all pass.
| * | Fix of t0774: empty fileMartin Odersky2014-03-215-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | Was previously wrapped in a package <empty> but the resulting tree had no position, which caused a Typer assertion. If now represented as EmptyTree.
| * | Fix of t0786: view boundsMartin Odersky2014-03-212-4/+4
| | | | | | | | | | | | | | | | | | | | | Previously, only implicit method types were eligible as views. This is too strict, as it rules out view bounds. We now also consider types that derive from Function1. The reason for not allowing any type is that this would cause us to check many more types for applicability when an implicit view is searched.
| * | More testsMartin Odersky2014-03-2115-5/+47
| | | | | | | | | | | | | | | | | | Added more tests which all pass, except for tests in disabled and pending. t0694 went from pos to neg, because the kind of alias type used in t0695 is no longer supported.
| * | Fix of t0591: implicitlyMartin Odersky2014-03-212-6/+1
| | | | | | | | | | | | A debug assertion in implicitSearch gave a false alarm and was removed.
| * | Fix of t0504: _root_ not foundMartin Odersky2014-03-212-2/+15
| | | | | | | | | | | | _root_ is now entered into an enclosing context.
| * | Fix of t0438 - lambdas and eta expansionMartin Odersky2014-03-217-45/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two fixes were needed 1) When typing a function value (x1: T1, ..., xN: Tn) => e, don't unconditionally issue an error if the expected function type arity is different from N. Instead, issue an error only if one of the types T1, ..., Tn is absent. The idea is that only then we need to consult the expected type for the parameter type. This allows to fix the problem later by an implicit conversion applied to the function value. 2) When eta-expanding, do not automtically take the arity of the expected function value as the arity of the generated lambda. Instead, take the method's arity, and copy method parameters into the lambda in case the arities are different.
| * | Tests t01xx and t02xxMartin Odersky2014-03-2111-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | Test t0288 moved to disabled due to lack of Java interop. Test t0273 fixed by relaxing double def condition: We only regard two definitions that define the same name and have exactly the same signature as double definitions. Previously, signatures that defined the same parameters were also excluded.
* | | Merge pull request #90 from samuelgruetter/java8-classfilesodersky2014-03-223-5/+29
|\ \ \ | |/ / |/| | ClassfileParser: Java8 bytecode (fixes #83)
| * | ClassfileParser: apply scala commit e78896f (invokedynamic)Samuel Gruetter2014-03-212-2/+9
| | |
| * | ClassfileParser: apply scala commit b2c67b3 (java8 default methods)Samuel Gruetter2014-03-212-0/+10
| | |
| * | ClassfileParser: apply scala commit f91242c6959471b6c463538beSamuel Gruetter2014-03-211-3/+10
| | |
* | | Merge pull request #87 from gzm0/context-in-prep-transformDmitry Petrashko2014-03-211-65/+65
|\ \ \ | |/ / |/| | Make context available in TreeTransform.prepareForXX methods
| * | Make context available in TreeTransform.prepareForXX methodsTobias Schlatter2014-03-201-65/+65
| |/
* | Merge pull request #88 from dotty-staging/try/hygienic-desugaringodersky2014-03-2133-56/+458
|\ \ | |/ |/| Try/hygienic desugaring
| * Minor improvements to tests (remove old comments)Tobias Schlatter2014-03-207-22/+7
| |
| * Hygienic desugaringMartin Odersky2014-03-2032-77/+447
| | | | | | | | | | | | | | | | | | | | | | | | Made desugaring hygienic. Trees that are derived from some other tree are no longer stored as simple untyped Ident trees, but as TypeTrees that know how to derive their types from some other type. Test cases in pos: hygiene.scala, t0054.scala and t0085.scala. The comment in hygiene.scala points to the difficulties we are facing. In particular, we need type trees that can rebind some references of a source type to local occurrences with the same name. t0054.scala is similar to hygiene.scala. t0085.scala is trickier, but also related. Essentially the problem there is that we have a class that inherits its outer class. In this case it is important to resolve an identifier in the right context. The identifier added to the copy method of a case class must be resolved outside the class (just like the same identifier in the constructor of that case class).
| * Generalize derived type tree scheme.Martin Odersky2014-03-203-34/+25
| | | | | | | | | | | | To get truly hygienic desugared trees, we need a derived type tree scheme that's more flexible than just the previous two choices of info-of-symbol and typeref-of-symbol. The new scheme based on DerivedTypeTrees allows arbitrary methods to derive the type tree's type.
| * New scheme for TypeTrees that refer to othersMartin Odersky2014-03-204-12/+68
| | | | | | | | | | Adds a new scheme by which a TypeTree() can refer for its type to the symbol of some other type. Applies the scheme to setter parameters, replacing the previous ad-hoc solution.
| * Better diagnostics for failing stub count testsMartin Odersky2014-03-201-1/+1
|/
* Merge pull request #85 from dotty-staging/topic/language-featuresDmitry Petrashko2014-03-2021-42/+384
|\ | | | | Topic/language features