aboutsummaryrefslogtreecommitdiff
path: root/tests/pos
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #310 from dotty-staging/fix/#305-annot-bootstrapDmitry Petrashko2014-12-311-0/+8
|\ | | | | Fix/#305 annot bootstrap
| * More careful usage of unforced decls in classes.Martin Odersky2014-12-181-0/+8
| | | | | | | | | | | | | | | | | | | | 1) Rename `decls` to `unforcedDecls` to make it clear that it is danegrous to use. 2) Prefer `info.decls` over `unforcedDecls`. This fixes the problem reported in #305 where the primary constructor was not found.
* | Fixed testMartin Odersky2014-12-191-3/+1
| |
* | Allow for varargs passed to Java annotation constructors.Martin Odersky2014-12-191-3/+5
| |
* | Merge pull request #271 from dotty-staging/fix/i268-gadtsodersky2014-12-191-0/+15
|\ \ | |/ |/| Fixed #264 - failure to typecheck GADTs
| * Fixed #264 - failure to typecheck GADTsMartin Odersky2014-12-161-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | The previous scheme derived the right bounds, but then failed to use them because a TypeRef already has a set info (its bounds). Changing the bounds in the symbol by a side effect does not affect that. This is good! But it showed that the previous scheme was too fragile because it used a sneaky side effect when updating the symbol info which failed to propgate into the cached info in TypeRef. We now keep GADT computed bounds separate form the symbol info in a map `gadt` in the current context.
* | Merge pull request #251 from dotty-staging/shared-backendDmitry Petrashko2014-12-173-0/+32
|\ \ | | | | | | Shared backend
| * | Handle Arrays in backend.Dmitry Petrashko2014-12-161-0/+8
| | |
| * | Label test with nested cycles and simple patterns.Dmitry Petrashko2014-12-161-0/+21
| | |
| * | Add test for backend.Dmitry Petrashko2014-12-161-0/+3
| | |
* | | Fix #300: Make literals have the same constants as their types.Martin Odersky2014-12-171-0/+6
| | |
* | | Merge pull request #282 from dotty-staging/fix/i0239-package-objectsodersky2014-12-162-0/+35
|\ \ \ | |/ / |/| | Fix #239 - handling of package objects
| * | Fix to asSeenFrom for package object membersMartin Odersky2014-12-151-0/+24
| | | | | | | | | | | | | | | Like TypeAssigner, asSeenFrom needs to insert a package object if the prefix is a package but the class enclosing the type is not.
| * | Fix #239 - handling of package objectsMartin Odersky2014-12-131-0/+11
| | | | | | | | | | | | | | | | | | References to `.package` are now also inserted if the accessed member comes from a class inherited by a package object.
* | | Fix typechecking rules for Binds of type trees.Martin Odersky2014-12-151-0/+19
| |/ |/|
* | 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.
* Fix subtyping of null and refined types.Martin Odersky2014-12-131-0/+19
|
* Previous scheme was buggy; leaked Array types to backend.Martin Odersky2014-11-281-0/+14
| | | | | | Now: All new Array[T] methods are translated to calls of the form dotty.Arrays.newXYZArray ...
* Allow refinements that refine already refined types.Martin Odersky2014-11-261-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Added test case from SI-6169Martin Odersky2014-11-251-0/+69
|
* Simpler cycle detectionMartin Odersky2014-11-241-0/+5
| | | | | | | | | | | Turns out that the last commit was a red herring. None of the hoops it jumped though was necessary. Instead there was a bug in isRef which caused `&` to erroneously compute T & Int as Int. The bug was that we always approximated alias types by their high bound. But in the present case, this leads to errors because U gets 'bounds >: Nothing <: Any', but it was still an alias type (i.e. its Deferred flag is not set). The fix dereferences aliases only if their info is a TypeAlias.
* Better printing of variant types with wildcard arguments.Martin Odersky2014-11-241-0/+11
| | | | | We used to approximate these by their bounds, but this is confusing. See comment in printbounds.scala.
* Fix to checkBoundsMartin Odersky2014-11-241-0/+8
| | | | | Need to account for the fact that some argument types may be TypeBoudns themselves. The change makes Jason's latest example work.
* Fixed type adaptation problem in checkBoundsMartin Odersky2014-11-241-0/+18
| | | | | | | We need to adapt type parameter bounds with an as-ssen-from to the prefix of the type constructor. Makes pos/boundspropagation pass.
* Moving java tests to posDmitry Petrashko2014-11-2275-0/+378
|
* Java annotations parsing problemDmitry Petrashko2014-11-221-1/+5
| | | | | | | | | | Annotations in java could be compiled as-if array-only annotation had <repeated> arguments constructor. That isn't true for scala. Also, type checking creation of single-element array requires implicit resolution to provide ClassTag. This makes problems while reading deferred annotation.
* Testcase that shows bug in ElimRepeated.Dmitry Petrashko2014-11-221-0/+3
|
* Add the right constructor to Java annotationsMartin Odersky2014-11-221-0/+11
|
* Add tests for the overriding of typesGuillaume Martres2014-11-181-0/+9
| | | | These tests work correctly since 222e9a478f7b851582550973df6a9d141766e49a
* Merge pull request #228 from dotty-staging/fix/overridingodersky2014-11-184-4/+12
|\ | | | | Fix/overriding
| * Fix OverridingPairsMartin Odersky2014-11-144-4/+12
| | | | | | | | | | | | | | | | OverridingPairs had several bugs which caused pairs to be lost, which caused missing overrides checks. Fixing OverridingPairs revealed several test failures (and a problem in Synthetics generation which was fixed in the last commit). Tests that became negative are all moved into neg/overrides.scala, and the original versions in pos were fixed.
* | Merge pull request #230 from dotty-staging/fix/and-or-subtypingodersky2014-11-181-0/+13
|\ \ | | | | | | Try to avoid overconstraining when comparing and/or types
| * | Fixed typosMartin Odersky2014-11-181-3/+0
| | |
| * | Restored accidentally deleted test code.Martin Odersky2014-11-181-0/+6
| | |
| * | Try to avoid overconstraining when comparing and/or typesMartin Odersky2014-11-161-5/+15
| |/ | | | | | | | | See comments in eitherIsSubType for an explanation what the problem is. Some test cases are in subtyping.scala
* / Moved pending tests that work into pos and neg.Martin Odersky2014-11-174-0/+84
|/ | | | | | | One test (t2613) required lifting a hard recursion limit in findMember (used for debug only, will be removed in the future). The same test also requires -Yno-deep-subtypes to be reset, so it's in pos_special instead of pos.
* Fixes problem exhibited by ensuring.scalaMartin Odersky2014-11-131-0/+5
| | | | | Need to account for the possibility that function arguments are wrapped in braces.
* Fix subtyping checks involving ThisType and PolyParamGuillaume Martres2014-11-111-0/+6
|
* Adding test for Unit vars.Martin Odersky2014-11-091-1/+1
|
* Improved version of mixin.Martin Odersky2014-11-091-2/+2
| | | | | Now also handles all supercalls. Seems to do the right thing on pos/traits.scala. But does not pass most tests because the sym transformer forces too many things.
* New phase: PrivateToStaticMartin Odersky2014-11-093-0/+97
| | | | | Make private methods in traits static, so that we do not need to give a default for them.
* Merge commits '474b2ae' and '46eb5ea' from #201 into umasterDmitry Petrashko2014-11-031-0/+15
|\
| * Added a test for by name functionsMartin Odersky2014-10-281-0/+15
| |
* | Typer should leave inline exception handlers inline.Dmitry Petrashko2014-10-301-2/+8
| |
* | TailRec now handles Try with Ident-handlerDmitry Petrashko2014-10-301-0/+14
|/
* LambdaLift checks now explicitly for references to labels outside scope.Martin Odersky2014-10-261-10/+0
| | | | | Nested methods cannot refer to labels in theior environment. Needs a fix in TailCalls. Moved failing test to pending.
* Avoid hoisting local classesMartin Odersky2014-10-263-5/+22
| | | | | | | | | | | | The patch disables hoisting of classes local to a block into the result type of the block. Instead, we widen the result type of the block to one which reflects all refinements made to the parents type of the local class. Test cases in avoid.scala, t1569.scala. The original t1569.scala no longer works. Why is explained in neg/t1569-failedAvoid.scala
* Test for patmat action on a @ Bind(_, Typed(_: Unapply, _)Dmitry Petrashko2014-10-141-0/+3
|
* Disambiguate names in test caseMartin Odersky2014-10-131-3/+3
|
* New testsMartin Odersky2014-10-127-0/+126
|