aboutsummaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Fix #400Martin Odersky2015-03-131-0/+13
| |/ | | | | | | In a call-by-name arg, replace () => f.apply() with f only if f is pure.
* | Merge pull request #408 from dotty-staging/test/#390Dmitry Petrashko2015-03-131-0/+0
|\ \ | | | | | | New test for valueclasses
| * | New test for valueclassesMartin Odersky2015-03-131-0/+0
| |/ | | | | | | | | | | Re-instantiated t2667.scala, which failed before because of issue #390. Also changed order of tests in isDerivedValueClass, to make more disriminating test come first.
* / add/strictMartin Odersky2015-03-132-0/+0
|/ | | | | | | | | | | Add -strict option to do some type checks that are encessary to ensure type soundness, but are stricter than what Scala 2.x enforces. The first such test is the "pattern cannot be uniquely instantiated" problem where we reject a non-variant case subclass of a covariant superclass in a pattern match. The error is now only issued in -struct mode, otherwise it will be a warning. We might move more tests into the same category. This should help the transition.
* Merge pull request #383 from smarter/fix/fullyParameterizedDefDmitry Petrashko2015-03-051-0/+1
|\ | | | | FullParameterization: fix rewiring of Returns
| * FullParameterization: fix rewiring of ReturnsGuillaume Martres2015-03-021-0/+1
| | | | | | | | | | The `from` field of a Return tree should either be EmptyTree or an Ident corresponding to the method we're returning from.
* | Fix bug which prevented New over type-instantiated aliases.Martin Odersky2015-02-281-0/+8
|/ | | | | | | | | | | Previously, type Map = HashMap[Int, String] new Map did not work. See test aliasNew.scala for a test. Formerly this logic handled in Parsers (wrapNew), but that one does not work for aliastypes.
* Fix tests/pos/{i143,extmethods}.scala: value classes must have exactly one ↵Guillaume Martres2015-02-152-4/+2
| | | | val param
* Merge pull request #359 from dotty-staging/fix/erasure-lub-alternativeDmitry Petrashko2015-02-131-0/+27
|\ | | | | Fix/erasure lub alternative
| * Insert correct boxing/unboxing conversions for branchesMartin Odersky2015-02-111-0/+27
| | | | | | | | ... of an If, Match, or Try. Fixes #355.
* | Merge pull request #358 from dotty-staging/backend-backportsDmitry Petrashko2015-02-122-0/+2
|\ \ | | | | | | Backend discovered issues
| * | Disable t2669 dies in Classfile parser while parsing ↵Dmitry Petrashko2015-02-111-0/+1
| | | | | | | | | | | | java.util.Vector(requested by backend)
| * | Disable t2667 that fails inside Extension methods.Dmitry Petrashko2015-02-111-0/+1
| |/ | | | | | | This info transformation was left untriggered before backend was enabled.
* | Prevent block types with references to local symbolsGuillaume Martres2015-02-112-0/+19
| |
* | Java methods: JavaMethodType instead of MethodType, convert Object to AnyOndrej Lhotak2015-02-072-0/+0
|/ | | | | | | | | | Fixes two bugs needed for java-override test: Namer was creating a MethodType instead of a JavaMethodType even though the JavaDefined flag was set on the DefDef. Following Scalac, Namer needs to convert Java method parameters of type j.l.Object to s.Any.
* New failing testMartin Odersky2015-02-072-0/+10
| | | | As noticed by @retronym, Any and Object are not identified when matching Scala and Java methods. I believe this is because the Java method does not have the Java flag set. @olhotak can you take a look?
* More negative override testsMartin Odersky2015-02-071-0/+14
|
* New spec and implementation for matching.Martin Odersky2015-02-071-0/+8
| | | | | Reformulated matchign spec and implemented accordingly. Previous fix for #329 would have missed third new error case in over.scala.
* Fix of #329.Martin Odersky2015-02-071-0/+7
| | | | Overriding pairs needs to match ExprTypes with field types. Closes #329.
* Test reorgMartin Odersky2015-02-0718-61/+58
|
* Fixes handling of op-assignments for polymorphic apply/update.Martin Odersky2015-02-071-0/+0
| | | | See t3252 for a test case.
* Merge pull request #346 from dotty-staging/local-lazy-valsodersky2015-02-071-0/+16
|\ | | | | Bring back lazy vals. Changed encoding scheme of local(non-field) lazy vals
| * Fix problems with lazy vals and separate compilationDmitry Petrashko2015-02-031-0/+16
| | | | | | | | | | Somehow this error manifested itself in a quite weird way during erasure. So it was hard to track down
* | Addressing review comments of #336Dmitry Petrashko2015-02-031-1/+1
| |
* | Even more careful handling of tailcalls.Dmitry Petrashko2015-02-031-5/+21
| | | | | | | | See i321 doc for description of problem and decision taken.
* | Fix i321, tail call needs to be careful with abstracting over class type ↵Dmitry Petrashko2015-02-031-0/+10
|/ | | | | | arguments. Or it could lead to Ycheck error that was triggered in #321.
* Merge pull request #338 from dotty-staging/fix/t3152-findMemberodersky2015-01-3110-0/+38
|\ | | | | Fix/t3152 find member
| * New testsMartin Odersky2015-01-2710-0/+162
| |
| * Use normnalized type to report type errors.Martin Odersky2015-01-278-124/+0
| | | | | | | | | | | | | | | | | | Without it, we get strange error messages like found: (implicit X)Y requred: Z when the problem is really that Y is not a subtype of Z.
* | Merge pull request #331 from dotty-staging/fix/refined-subtypingodersky2015-01-3114-67/+71
|\ \ | | | | | | Fix/refined subtyping
| * | Fixed problem with ensureSingletonMartin Odersky2015-01-281-3/+1
| | | | | | | | | | | | | | | Need to also ensure that the singleton is stable. This makes compound.scala pass.
| * | Cleanups prompted by reviews.Martin Odersky2015-01-281-1/+4
| |/
| * Fixes suggested by reviews from @smarter.Martin Odersky2015-01-242-3/+2
| | | | | | | | Also, added tests trhat work now.
| * Moved previously failing tests to posMartin Odersky2015-01-185-66/+6
| | | | | | | | | | GADTs now work again (they stopped workign when we went to the inductive satisfiability checks). The deep for expression also works, even with some more levels added.
| * New test: moduleSubtypingMartin Odersky2015-01-141-0/+23
| | | | | | | | Tests (non)equivalence of modules and their ThisTypes.
| * Made constraint data structures pluggable.Martin Odersky2015-01-121-0/+13
| | | | | | | | | | Factored out interface for constraints. Current implementation: NaiveConstraint. Preparing for a more efficient one.
| * Rename RefinedThis -> SkolemTypeMartin Odersky2015-01-101-1/+1
| | | | | | | | | | Also, make binder type of SkolemType refer to arbitrary type, not necessarily RefinedType.
| * Reverting the idea that RefinedThis types take levels.Martin Odersky2015-01-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the end, this did not buy us anything. What matters is that - we can reliably identify RefinedThis types pointing to a given refinement type. Making sure that the `binder` field of q RefinedThis type in a refinedInfo is always the containing refined type is good enough for that. - we take care to rebind RefinedThis types in isSubType. This was leaky before, is handled now better in the new isSubType. So, in the end, adding a level was a needless complication. Also, as a next step we should be able to identify skolem types and RefinedThis types.
| * Simplify and fix bounds propagation in constraints.Martin Odersky2015-01-081-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous scheme did not ensure that transitivity was eliminated. Example scenario: We have in the constraint P <: Q for constrained variables P, Q and add Q <: T Previous propagation added the constraint and then tested whether the bounds of all variables were satisfiable. For Q we test P <: T but that is true because P <: Q and we already added the constraint Q <: T. So we fail to add the constraint P <: T, and transitivity is no longer eliminated. Instead we now test the new bounds (in this case P <: T) *before* adding the new constraint Q <: T. This is also simpler than the previous scheme.
| * New scheme for subtyping refined types.Martin Odersky2015-01-081-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Instead of rebasing, use the DeBrujn level of a RefiendThis. - Make sure lower type is a singleton by skolemizing it if necessary. - Do the correct rebinding of the upper type's RefinedThis. Remarks: - The new scheme discovered quite a lot of errors which are mostly fixded in other commits of this branch. i0268 (GADT matching) still does not work, moved to pending. - Some optimizations are currently missing: (1) fast path refined subtyping (2) faster operations for substituting refined thistypes which explot the fact that RefinedThis is relatively rare.
| * Reorg of subtyping.Martin Odersky2015-01-014-1/+26
| | | | | | | | Plus, RefinedThis gets a second parameter, `level`. This will replace the first one in due time.
| * test reorgMartin Odersky2014-12-214-1/+3
| | | | | | | | Moved working tests to pos, annotated non-working ones.
* | Merge pull request #313 from dotty-staging/more-testsDmitry Petrashko2015-01-0918-24/+92
|\| | | | | More tests
| * tests reorgsMartin Odersky2014-12-216-0/+35
| | | | | | | | Move some tests into proper slots + comments what they are.
| * Don't emit copy method for case classes with repeated parameters.Martin Odersky2014-12-201-0/+0
| | | | | | | | | | | | | | | | scalac has the same restriction. The reason is that we do not have a means to specify a sequence-valued default for a vararg parameter. It would be nice if we could, but this requires a more substantial development effort.
| * New passing tests.Martin Odersky2014-12-192-0/+31
| |
| * Harden implicit scope computation against CyclicReference errors.Martin Odersky2014-12-192-31/+0
| |
| * Fix isUnboundedGeneric for alias types.Martin Odersky2014-12-191-0/+52
| | | | | | | | | | Fixes problem in test case SI-7638a.scala which gave an override error before.
| * Avoid name clashes when generating synthetic companion objects.Martin Odersky2014-12-191-1/+2
| |
| * Test re-org.Martin Odersky2014-12-196-23/+3
| | | | | | | | Moved some working test to pos. I wonder why they were in pending? They did work for me.