aboutsummaryrefslogtreecommitdiff
path: root/test/dotc
Commit message (Collapse)AuthorAgeFilesLines
...
* Rename -YnoDoubleBindings to -Yno-double-bindingsMartin Odersky2015-04-091-3/+3
| | | | | | | This aligns with the "-" instead of CamelCase convention for the other command line options. Also, enable -Yno-double-bindings for dotc_core.
* Change of TERMREFsymbol/TYPEREFsymbol semanticsMartin Odersky2015-04-071-3/+2
| | | | | | | | | | | | | | | | | | | | | Used to be "with fixed sym". Now it is: With initial symbol as given in the serialized info. It turns out the only previous uses of (TERM|TYPE)REFsymbol were types that were made symbolic in self types. But exactly that caused that problems in unpickling which we tried to workaround by changing WithFixedSym#newLikeThis. And these fixes became less and less intuitive and still could not solve the problem for good. Last hurdle was pickle-testing all files in ast together. It's much simpler to reserve (TERM|TYPE)REFsymbol for NamedTypes that have an initial symbol. Like the previous "WithFixedSym" pickling, this avoids inifinite recursions in pickling/extmethods.scala. But it also avoids problens with unpickling ast/*.scala. The reason it is better is that it more accurately models that types that exist before pickling. This change also undoes previous changes to WithFixedSym#newlikeThis. Better to keep the more restrictive contract for these.
* Some more pickling testsMartin Odersky2015-04-071-0/+2
|
* Reduced coverage of twice testsMartin Odersky2015-04-071-7/+7
| | | | | | | | ... in order to save some time. On my laptop: Without twice: 175sec With full twice as in last commit: 220sec With reduced twice: 188sec
* Test stillValid at initial phase, revive -twiceMartin Odersky2015-04-071-49/+49
| | | | | | | | | | | | | | stillValid should always be tested at the phase where the initial denotation is defined. If we do not do this we get false stale symbol errors. Here is a scenario: To `bringForward` `Predef$$ArrowAsscoc`, we check whether its initial denotation has an owner which contains the denotation as one of its members. But if we do this at a later phase (e.g. GenBCode), the owner of the initial denotation is Predef, but Predef no longer contains ArraoAssoc - it lost the member at flatten. With this fix we can run everything with -twice, except dotc_core. I left a comment what goes wrong there.
* Fixed test failure for core_pickling.Martin Odersky2015-04-031-1/+1
| | | | | When reading external symbols from class Object, need to consider members of Any as well.
* #435 Fix conflict between package object and case class with same nameDmitry Petrashko2015-03-261-1/+1
|
* Fixing conflicts between #361 and #394Dmitry Petrashko2015-03-181-1/+0
|
* Pickling test reorgMartin Odersky2015-03-181-2/+4
| | | | | | | | Move pickling tests into separate top-level test directory. That way they are not needlessly pos-tested before. Also, disable core tests for now - after rebasing we get a stale symbol error. Need to investigate that.
* Two more tweaks to make pickling invariant under printingMartin Odersky2015-03-181-0/+1
| | | | | | | | | 1) DefDefs with implicit method types generate implicit parameters 2) Super accessors are inserted after class parameters. With these changes files in core also print the same after pickling, with the exception of Types and TypeOps which have some spurious differences: Types are equal but appear in more simplified form after pickling.
* Homogenize package ids and literalsMartin Odersky2015-03-181-3/+8
| | | | | | | | | The unpickled term in a package id is different from the original but the type is the same. In a literal prefer constants in the types over thsoe in the terms. With this change, we get identical typed tree output also for core/pickled.
* Harmonize treatment of simplified between typer and unpicklerMartin Odersky2015-03-181-1/+1
| | | | | | | | We got some spurious differences in the types in TemplateParents because simplification was done in Typer but not in Unpickler. With the change we get perfect matches for all files in pickleOK also if we print their types.
* Add pickling testsMartin Odersky2015-03-181-1/+4
| | | | Some pickling tests are now run on every check in.
* Disallow refinements of types or methods that do not appear in parent.Martin Odersky2015-03-181-12/+5
| | | | | | | | We planned this for a long time but never implemented it. Instead, we sometimes issued an erro in Splitter, namely if reflection would have been needed to access the member. It turns out that some tests (e.g. neg/t625) fail -Ycheck (we knew that before and disabled) but also fail Pickling because they generate orhpan PolyParams. So rather than patching this up it seems now is a good time to enforce the restriction for real.
* Disable dotc_ast. It fails randomlyDmitry Petrashko2015-03-181-1/+2
|
* Update tests to show current errors revealed by backend.Dmitry Petrashko2015-03-181-26/+37
|
* Enabled genBCode for `doc_parsing`. Proceeding with `dotc_tranform`.Dmitry Petrashko2015-03-181-8/+9
|
* Enable all pos tests for backend.Dmitry Petrashko2015-03-111-3/+5
| | | | compiling dotty is stil WIP
* 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.
* Merge pull request #359 from dotty-staging/fix/erasure-lub-alternativeDmitry Petrashko2015-02-131-1/+1
|\ | | | | Fix/erasure lub alternative
| * Disable backend for dotc_printing need to find out why it fails.Dmitry Petrashko2015-02-131-1/+1
| | | | | | | | Will do it in a different PR.
* | Added test to TreeChecker that guards against orphan parameters.Martin Odersky2015-02-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | Currently, tests fail. The failures I checked are all related to tailcalls. Not sure whether there are others. This is a blocker for serialization. Orphan parameters cannot be serialized. Maybe rethink the position of tailcalls? It looks to me that the repeated trouble it gives us is more than the effort required to put an efficient tailcall recognition after pattern matching in place. But I might be wrong.
* | Prevent block types with references to local symbolsGuillaume Martres2015-02-111-0/+2
| |
* | Java methods: JavaMethodType instead of MethodType, convert Object to AnyOndrej Lhotak2015-02-071-0/+1
|/ | | | | | | | | | 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.
* More negative override testsMartin Odersky2015-02-071-1/+1
|
* New spec and implementation for matching.Martin Odersky2015-02-071-1/+1
| | | | | 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-2/+2
| | | | Overriding pairs needs to match ExprTypes with field types. Closes #329.
* Test reorgMartin Odersky2015-02-071-1/+1
|
* New test: moduleSubtypingMartin Odersky2015-01-141-0/+1
| | | | Tests (non)equivalence of modules and their ThisTypes.
* Simplify and fix bounds propagation in constraints.Martin Odersky2015-01-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Fixed bug that caused error message to be suppressed.Martin Odersky2015-01-081-3/+0
| | | | | | Symptom was: When compiling Definitions.scala with the changes in the subsequent commits, an empty tree was passed as implicit parameter, without an "implicit not found" error being reported. The problem needed a fix in TyperState.
* Treat i0239 specially. It shows some problems that could be of interest.Dmitry Petrashko2014-12-171-0/+1
|
* Enable backend specific tests. Flag those that failDmitry Petrashko2014-12-161-15/+25
|
* Label test with nested cycles and simple patterns.Dmitry Petrashko2014-12-161-0/+1
|
* Add test for backend.Dmitry Petrashko2014-12-161-1/+3
|
* Disable backend by default in tests.Dmitry Petrashko2014-12-161-1/+5
|
* Erasure is on by default.Dmitry Petrashko2014-12-161-30/+30
| | | | Remove historical enabling of erasure for some tests: its enabled by default now
* Merge pull request #279 from dotty-staging/test/#91odersky2014-12-131-0/+1
|\ | | | | Two new tests
| * Two new testsMartin Odersky2014-12-131-0/+1
| | | | | | | | | | 1) Verify we survive illegal infinite paths. Closes #91. 2) Verify we handle fbounds in and types correctly.
* | Disable implicit conversions between from `Null` and `Nothing`.Martin Odersky2014-12-131-0/+1
|/ | | | | | | | | | | | This is necessary to reject code like val x: Boolean = null Without the restriction, this code would typecheck and expand to val x: Boolean = Predef.Boolean2boolean(null) since `null` counts as a value of type `java.kang.Boolean`.
* One more test case, coming from #214.Martin Odersky2014-12-131-1/+1
|
* Fix #248: Class cannot inherit from refinement typesMartin Odersky2014-12-131-0/+1
| | | | | | We now check that classes do not inherit from refinement types (unless they are an encoding of parameterized types), nor from & or | types.
* Merge pull request #242 from dotty-staging/fix/mixinsDmitry Petrashko2014-11-261-2/+1
|\ | | | | Fix/mixins
| * Allow deep subtypes in dotc_transform.Martin Odersky2014-11-261-1/+1
| | | | | | | | The clause got accidentally dropped in the rebase.
| * Fixed data race in ResolveSuperMartin Odersky2014-11-261-2/+1
| | | | | | | | | | | | | | | | | | | | The datarace happened because for method "transform" implemented by ResolveSuper which disambiguated overridden methods. Previously, there was a reference FirstTransform.this.transform of type termRefWithSig to the method implemented in a super trait. Now the same reference points to the newly implemented method. Solved because ResolveSuper now generates symbolic references.
* | Allow refinements that refine already refined types.Martin Odersky2014-11-261-0/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | Previously, a double definition errorfor `T` was produced in a case like this: type T1 = C { T <: A } type T2 = T1 { T <: B } This was caused by the way T1 was treated in the refinement class that is used to typecheck the type. Desugaring of T2 with `refinedTypeToClass` would give trait <refinement> extends T1 { type T <: B } and `normalizeToClassRefs` would transform this to: trait <refinement> extends C { type T <: A; type T <: B } Hence the double definition. The new scheme desugars the rhs of `T2` to: trait <refinement> extends C { this: T1 => type T <: B } which avoids the problem. Also, added tests that #232 (fix/boundsPropagation) indeed considers all refinements together when comparing refined types.
* Fixed cycle detection.Martin Odersky2014-11-241-1/+1
| | | | Now detects the cycles reported by @retronym
* Added and corrected testsMartin Odersky2014-11-241-2/+2
| | | | to reflect last commit.
* Fixes in TypeComparer for RefinedTypes.Martin Odersky2014-11-241-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous scheme did not propagate bounds correctly. More generally, given a comparison T { X <: A } <: U { X <: B } it would errenously decompose this to T <: U, A <: B But we really need to check whether the total constraint for X in T { X <: A } subsumes the total constraint for X in T { X <: B } The new scheme propagates only if the binding in the lower type is an alias. E.g. T { X = A } <: Y { X <: B } decomposes to T { A = A } <: U, A <: B The change uncovered another bug, where in the slow path we too a member relative to a refined type; We need to "narrow" the type to a RefinedThis instead. (See use of "narrow" in TypeComparer). That change uncovered a third bug concerning the underlying type of a RefinedThis. The last bug was fixed in a previous commit (84f32cd814f2e07725b6ad1f6bff23d4ee38c397). Two tests (1048, 1843) which were pos tests for scalac but failed compling in dotc have changed their status and location. They typecheck now, but fail later. They have been moved to pending. There's a lot of diagnostic code in TypeComparer to figure out the various problems. I left it in to be able to come back to the commit in case there are more problems. The checks and diagnostics will be removed in a subsequent commit.
* Make reduceProjection use lookupRefinedMartin Odersky2014-11-241-1/+1
| | | | | | | | | | | Needed some fixes to lookup refined. The potential alias type is now calculated by taking the member of the original refined type, instead of by simply following the refined info. This takes into account refinements that were defined after the refinement type that contains the alias. The change amde another test (transform) hit the deep subtype limit, which is now disabled.