aboutsummaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Generalize overloading resolution to type arguments.Martin Odersky2014-01-041-1/+4
| | | | | We need to take type arguments + value arguments into account when there are several overloaded alternatives that are all polymorphic and can be instantiated with the type arguments.
* Constraints need to be ignored when forming lubs and glbs of constrained ↵Martin Odersky2014-01-011-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | oarameter bounds. Otherwise we would get into situations like the following (experienced in typers.Arrays): Constraint: B >: String T >: B Add B >: T to this constraint. You get: B >: String | T, but because T >: B >: String, the rhs reduces to B >: T Simplified this gives B = T and the String lower bound has vanished!
* Adding a prototype of the right-hand side of default-getters.Martin Odersky2013-12-311-3/+12
|
* Upgrades to handle subtyping between parameterized and higher-kinded types.Martin Odersky2013-12-311-0/+35
|
* New version of eta-expansion.Martin Odersky2013-12-281-0/+4
| | | | | | | | This version expands a method ref p.m to the untyped tree p.m(_, ..., _) (after lifting impure expressions from p). Afterwards the usual application mechanisms kick in. This fixes problems also present in Scala 2.x, where an eta-expanded function was not as flexible as an explicitly expanded one (for instance, eta expansion did not honor default parameters).
* Making the name of self visible inside a class.Martin Odersky2013-12-251-0/+17
| | | | Previously, it wasn't.
* Fixing problems in treatment of private symbolsMartin Odersky2013-12-241-0/+15
| | | | | | | | | | | | 1) Accessibility check was broken because it looked at symbol's owner, where it should have looked at context owner. 2) Refined treatement if members. Previously, nonPrivate member returned a subset of member, i.e. those denotations returned by member that were not private. This is not correct. In a situation like class A { def x: Int = 1 } class B { private def x: String = "" } extends A (new B).x the non-private member returned should be A#x. Changed membersNamed and friends as well as checkAccessible to account for that.
* Handling implicit unapply arguments.Martin Odersky2013-12-201-0/+8
| | | | Changed format of UnApply nodes to also take implicit parameters. See doc comment in class Trees.UnApply
* Making sure New's always end in an application.Martin Odersky2013-12-181-0/+12
|
* Special handling of implicit members.Martin Odersky2013-12-171-0/+10
| | | | | The previous treatment would force all members, causing cyclic reference errors. We fix it by filtering early in computeMemberNames itself for implicits.
* Fixes for by-name argumentsMartin Odersky2013-12-171-1/+14
| | | | Previously, we did not strip off the => when comparing against expected type.
* Fixes to desugaring and indexing package objectsMartin Odersky2013-12-172-0/+9
| | | | Plus some small tweaks in Typer
* Small tweaks to typerMartin Odersky2013-12-161-4/+7
|
* Better handling of cyclic reference errors.Martin Odersky2013-12-162-0/+18
|
* Negative typer tests.Martin Odersky2013-12-161-0/+41
|
* Checking for double definitions among class definitions.Martin Odersky2013-12-163-24/+28
| | | | | | Also fixes to typedReturn. Adapted tests accordingly.
* Fix to desugaring refinement types.Martin Odersky2013-12-161-1/+32
|
* Fixes related to SAM types.Martin Odersky2013-12-151-2/+1
| | | | | | | 1. Changes to SAMType extractor 2. Self names are no longer members of enclosing class 3. SAM-Type closures now print with their result type. 4. refactoring newSkolemSingleon ==> narrow
* Fixed several deep problems in handling of types and symbols.Martin Odersky2013-12-141-1/+20
| | | | | | | | | 1. We forgot to mark declaration symbols Deferred. 2. Types with NoPrefix and the same name got identified. Fixed by adding a new category WithNoPrefix to named types, and changing the way named types get generated. 3. Self types lacked parameters. (Question: Do we need to also track type members?) 4. Printers caused cyclic reference errors. Now some print operations are more careful with forcing. 5. Namedparts accumulator has to be more careful with ThisTypes. Because self types now contain parameters, which might lead back to this, we only add the class name (or the source module, if it's a module class). 6. toBounds in TypeApplications needs to use Co/Contra aliases for expanded name parameters, not just local ones.
* Fixes to typer.Martin Odersky2013-12-112-0/+48
| | | | | | 1. Got rid if InSuperInit mode bit. 2. Fixes to typing assignments 3. Import qualifiers need to be stable
* Fixes and tests for typedIdentMartin Odersky2013-12-102-0/+68
| | | | Fixed a problem where an import and a definition in same scope were erroneously regarded as a conflict (L20 in typedIdents.scala)
* Fixes to avoid stale symbols and to avoid methods as pattern constructors.Martin Odersky2013-12-092-1/+21
|
* Added desugaring for & and | types.Martin Odersky2013-12-091-0/+18
|
* Fixes to desugaring and typing of parameterized TypedefsMartin Odersky2013-12-091-0/+4
|
* Fixes to inherited result types in Namer.Martin Odersky2013-12-092-3/+23
|
* Last fixes to desugar.Martin Odersky2013-12-081-1/+27
|
* Fixes to desugaring of for-expressions with embedded aliases.Martin Odersky2013-12-082-5/+25
|
* Better reporting for pattern matching errors.Martin Odersky2013-12-081-2/+6
|
* Fixes for translation of pattern definitions (PatDef)Martin Odersky2013-12-071-0/+2
|
* Fixes for desugarings of case classes.Martin Odersky2013-12-071-1/+10
| | | | Also: Standardized on selectorName; Translate $init$ to <init> when unpickling.
* Fixing expansion and merge companion defs.Martin Odersky2013-12-061-0/+14
|
* Fixes to liftingMartin Odersky2013-12-051-0/+30
| | | | Plus more commenting of Desugar
* Fixes to named and default arguments.Martin Odersky2013-12-052-0/+46
| | | | Now come with test cases.
* Fixes to type applications and unapply.Martin Odersky2013-12-022-0/+28
|
* Tweaks to applications, operator assignments, and variable definitions.Martin Odersky2013-12-011-0/+28
|
* Tweaks to adaptation and interpolationMartin Odersky2013-11-151-4/+2
| | | | | | | 1. Needed to interpolate aftyer implicit parameyters are added. 2. Also needed to avoid constraining typevars if compared against selection proto. Original coder example now typechecks.
* Tweak to Coder testMartin Odersky2013-11-151-2/+2
|
* Some configuation parametersMartin Odersky2013-11-141-1/+3
| | | | Caching, plus whether we want to match on signatures or types.
* Dealias before add to constraint.Martin Odersky2013-11-101-1/+2
| | | | We need to dealias any bounds before adding it to the constraint because otherwise we might have added a constraint X <: X in disguise.
* New tests.Martin Odersky2013-11-093-11/+43
|
* Fixing inference problem and block scope problemMartin Odersky2013-11-071-10/+34
| | | | | | 1. Typing blocks: forgot to create new scope. Now fixed. 2. The decitsion whether to interpolate a type variable was made based on the type variable's position and the current tree's position. This is too imprecise, because we might have auto-generated trees where all important parts have the same position. We now check for actual tree containment: A type variable can be interpolated for the type of a tree T if T contains the tree which introduced the type variable.
* Fallback to old treatement of tuples.Martin Odersky2013-11-041-0/+41
| | | | For interoperability we will keep for the time being the traditional treatment of tuples as instances of Tuple 2… Tuple 22. The new hlist-like treatment will be done in a future step. The flip is controlled by variable "unboxedPairs".
* Fixed unpickling of polymorphic constructors.Martin Odersky2013-10-273-1/+5
| | | | Constructors of parameterized classes now get polymorphic types when unpickled, as is the case when defining them or when reading them from a Java classfile. This caused a ripple of other faults which this commit also fixes.
* Fixed handling of varargsMartin Odersky2013-10-261-0/+13
|
* Fixed problem in handing of self types.Martin Odersky2013-10-241-0/+20
| | | | | Self types were not taken into account when doing a typedIdent. The fix in typedIdent caused as CyclicReference when typing the self type itself. This in turn is fixed by distinguishing more carefully in denotNamed in Namer which context we are in.
* Flipping the logic to determine type leaksMartin Odersky2013-10-242-0/+16
|
* New test case: map and filter now seem to work.Martin Odersky2013-10-241-2/+3
|
* Small cleanups, plus a new test case.Martin Odersky2013-10-241-2/+2
| | | | map on collections now works, including associated CanBuildFrom searches.
* Changes to adaptation and local type inference.Martin Odersky2013-10-151-0/+15
|
* New TypeArgs flagMartin Odersky2013-10-101-19/+0
|