aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* 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 #1000 from dotty-staging/fix-#241odersky2015-12-1530-769/+996
|\ | | | | Fix #241
| * More tweaks to override checks.Martin Odersky2015-12-151-2/+2
| |
| * Change <:< to overridesMartin Odersky2015-12-151-1/+1
| | | | | | | | This is needed to freeze the constraint.
| * Check types for overriding conditions.Martin Odersky2015-12-141-5/+15
| | | | | | | | Closes #241 -- that took a while!
| * Use symbolic refs when testing whether a TypeBounds contains a ClassInfoMartin Odersky2015-12-142-9/+14
| | | | | | | | | | Without the fix and the later commit that checks types for overriding we get a Ycheck failure in t3452h.scala.
| * Generalize overriding checking from isDefinedMartin Odersky2015-12-143-1/+9
| | | | | | | | | | | | | | | | Generalize overriding checking from isDefined to all methods added by desugar to a case class. None of these methods has an override so we need to add one in case they do override another method (previously we would flag this as an error).
| * Only select parameterless get methods in unapplys.Martin Odersky2015-12-141-1/+1
| | | | | | | | | | | | Otherwise we'd get a failure due to an overloaded `get` definition whenever we typecheck a case class that is also a Map (because maps inherit a `get`).
| * Improve printing of overloaded denotationsMartin Odersky2015-12-141-1/+1
| |
| * Better diagnosis for cyclic references caused by class clashes.Martin Odersky2015-12-141-1/+6
| | | | | | | | | | | | | | We now get a cyclic reference when inheriting from an inner class with the same name in an outer supertype. Since this was legal in Scala2 it's good to explain that particular case. Test case in overrideClass.scala
| * Fix problem handling SuperTypes in asSeenFromMartin Odersky2015-12-141-11/+12
| | | | | | | | | | | | | | | | A SuperType should behave just as the underlying ThisType in asSeenFrom. Without this patch, compiling the ...ViewLike hierarachy crashes with a YCheck error in resolveSuper. The underlying issue is that the very complicated tangle of supercalls does not type check because an asSeenFrom with a SuperType prefix does not compute the right type.
| * Convert super. prefixes of types to this.Martin Odersky2015-12-141-1/+6
| | | | | | | | | | `super` has no meaning for type membes. Harmonizing the prefix to `this` avoids spurious incompatibilities.
| * Better diagnostics for clashing classesMartin Odersky2015-12-144-7/+18
| | | | | | | | | | | | We do not allow same-named class members in supertraits of a mixin composition anymore. This commit gives a better error message and avoids a crash in RefChecks.
| * Drop redundant conditionMartin Odersky2015-12-141-1/+1
| |
| * Make some types of definitions symbolicMartin Odersky2015-12-141-3/+20
| | | | | | | | | | | | | | | | | | This is needed to ensure that the type of a definition node (ValDef, TypeDef, or DefDef) always refers to the symbol of that definition. Caused a spurious error in selfReq to go away (so error count was updated).
| * Fix sleeper bug in ParamForwardingMartin Odersky2015-12-144-7/+23
| | | | | | | | | | | | | | | | | | ParamForwarding converts some parameters to nullary methods, yet it does not update the references to these parameters. Their signature is still NotAMethod, which is wrong. Causes subtle differences in peckle tests: a param accessor get type T before pickling (which is wrong), gets => T when reading back (which is right). Test case in pickling/selfSym.scala.
| * Adaptations to checkSymAssignMartin Odersky2015-12-141-3/+8
| | | | | | | | | | | | | | | | (1) Also allow symbols to switch between a member of a class and a member of its selftype. Seen in the wild in TraversableViewLike.scala. Test case in pickling/selfSym.scala (2) Tidy up the error message.
| * Do not report data races between symbols defined in class and its selftypeMartin Odersky2015-12-142-5/+11
| | | | | | | | | | | | | | Analogous to the previous situation where we do not report a data race if the previous symbol comes from a superclass, we now do the same if the previous symbol comes from a given self type. Makes overrideDataRace.scala pass, and finally enables stdlib test with TraverableViewLike.scala added.
| * Fix tricky bug coming up when compiling TraversableViewLike.Martin Odersky2015-12-141-4/+34
| |
| * Avoid unassigned type errors when typing curried functions.Martin Odersky2015-12-141-21/+21
| | | | | | | | | | | | If a partial application of a function has an error type, make sure the whole tree also has an error type. Before, sometimes the type was missing which led to a partial application error.
| * Remove stray assignmentMartin Odersky2015-12-141-1/+0
| |
| * Fix of too strict variance checking.Martin Odersky2015-12-141-1/+1
| | | | | | | | | | | | When following an alias type, go directly to aliased type. Going via the TypeAlias link causes the current variance ot be narrowed to 0.
| * Disregard BaseTypeArg parameters when variance checking.Martin Odersky2015-12-141-1/+1
| | | | | | | | Allows us to compile immutable.Set.
| * Make all arg bindings have flag BaseTypeArg.Martin Odersky2015-12-141-6/+15
| | | | | | | | | | | | It's unclear what the prupose of the previous restriction to Local only was. And we need it to be set for all arg bindings so that immutable.Set does not fail with a variance error.
| * Rename TypeArgument -> BaseTypeArg flag.Martin Odersky2015-12-141-5/+7
| | | | | | | | Describes its meaning more accurately.
| * Remove redundant type parameter in testLiftedMartin Odersky2015-12-141-1/+1
| |
| * Shortcut in derivesFrom for high bound Any.Martin Odersky2015-12-131-14/+17
| | | | | | | | | | | | Any is a supertype of every other type, so no need to analyze types in detail. This also fixes the cyclic reference error observed for sets.scala, but only for the special case where the base class is Any.
| * Better explanation for adaptHkVariancesMartin Odersky2015-12-131-13/+19
| |
| * Avoid cycle when computing setsMartin Odersky2015-12-131-1/+21
| | | | | | | | | | The tightened subtyping algorithm led to a cycle in baseTypeRef when compiling sets.scala. This commit fixes the problem.
| * In isSubType, follow aliases only if prefix is a path.Martin Odersky2015-12-131-2/+20
| | | | | | | | | | Comment explains why following aliases in general is incomplete and potentially unsound. This makes Iter2 compile, but causes cyclic reference errors for pos/sets.scala.
| * Perform variance adaptation only when needed in isSubTypeMartin Odersky2015-12-135-29/+48
| | | | | | | | | | | | Previously adaptIfHK was performed on every type application. This made t3152 fail. We now do this only on demand, in isSubType. t3152 now passes again. But the change unmasked another error, which makes Iter2 fail to compile.
| * Allow bottom types as hk type argumentsMartin Odersky2015-12-112-4/+8
| | | | | | | | Fixes problem raised in #966.
| * Add isBottomType/Class tests to DefinitionsMartin Odersky2015-12-112-4/+7
| |
| * Remove extraneous matchMartin Odersky2015-12-111-10/+6
| |
| * Disallow hk type parameters in lower bounds.Martin Odersky2015-12-115-8/+16
| | | | | | | | Also: various cleanups to comments.
| * Fix TypeLambda extractor.Martin Odersky2015-12-101-3/+11
| | | | | | | | | | As remarked by @smarter, argInfos does not work for type lambdas, so argBoundss is always Nil.
| * Cleanup of RefinedType subtype comparison.Martin Odersky2015-12-061-9/+7
| |
| * Code and documentation cleanupsMartin Odersky2015-12-061-300/+107
| |
| * Fix tasty test failuresMartin Odersky2015-12-061-4/+4
| | | | | | | | by bringing homogenization of # $Apply projections back.
| * Avoid false positives when extracting AppliedTypeMartin Odersky2015-12-062-2/+18
| |
| * Be DRY betweeen EtaExpand and LambdaAbstractMartin Odersky2015-12-061-15/+7
| | | | | | | | | | | | All Lambda abstractions, not just eta expansions, should use actual parameter bounds, not the one retrieved from the parameter symbols.
| * Allow for F-bounded bounds in TypeLambdaMartin Odersky2015-12-061-8/+16
| |
| * Fix printing of type lambdasMartin Odersky2015-12-061-9/+26
| |
| * Reset constraint when one of several implicit arguments is not found.Martin Odersky2015-12-061-1/+7
| |
| * Switch to new hk scheme.Martin Odersky2015-12-068-248/+307
| |
| * Better diagnostics for applyOverloaded.Martin Odersky2015-12-061-9/+16
| |
| * Fully type annotate PrintersMartin Odersky2015-12-061-9/+9
| | | | | | | | | | This prevents propagation changes leading to long recompiles when a printer is changed.
| * Fixes to TypeLambda and EtaExpansion extractors.Martin Odersky2015-12-061-5/+13
| | | | | | | | Makes i815 compile.
| * Fix to TypeLambda over with a TypeBounds bodyMartin Odersky2015-12-061-1/+1
| | | | | | | | Taking typeAlias is illegal in that case.
| * Fix bug computing typeParams for hk typesMartin Odersky2015-12-062-2/+2
| | | | | | | | | | | | Arg bounds do not count is bindings. Also: TypeLambda's $Apply binding should be covariant, because the parameter is (not sure it matters though).