summaryrefslogtreecommitdiff
path: root/test/files/pos
Commit message (Collapse)AuthorAgeFilesLines
* Fixed some tests, renamed from Any to Gen.Aleksandar Pokopec2011-04-131-1/+1
| | | | | No review.
* Refactoring the collections api to support diff...Aleksandar Pokopec2011-04-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactoring the collections api to support differentiation between referring to a sequential collection and a parallel collection, and to support referring to both types of collections. New set of traits Gen* are now superclasses of both their * and Par* subclasses. For example, GenIterable is a superclass of both Iterable and ParIterable. Iterable and ParIterable are not in a subclassing relation. The new class hierarchy is illustrated below (simplified, not all relations and classes are shown): TraversableOnce --> GenTraversableOnce ^ ^ | | Traversable --> GenTraversable ^ ^ | | Iterable --> GenIterable <-- ParIterable ^ ^ ^ | | | Seq --> GenSeq <-- ParSeq (the *Like, *View and *ViewLike traits have a similar hierarchy) General views extract common view functionality from parallel and sequential collections. This design also allows for more flexible extensions to the collections framework. It also allows slowly factoring out common functionality up into Gen* traits. From now on, it is possible to write this: import collection._ val p = parallel.ParSeq(1, 2, 3) val g: GenSeq[Int] = p // meaning a General Sequence val s = g.seq // type of s is Seq[Int] for (elem <- g) { // do something without guarantees on sequentiality of foreach // this foreach may be executed in parallel } for (elem <- s) { // do something with a guarantee that foreach is executed in order, sequentially } for (elem <- p) { // do something concurrently, in parallel } This also means that some signatures had to be changed. For example, method `flatMap` now takes `A => GenTraversableOnce[B]`, and `zip` takes a `GenIterable[B]`. Also, there are mutable & immutable Gen* trait variants. They have generic companion functionality.
* Test cases for #1071 and #4275 since I don't se...Paul Phillips2011-04-132-0/+30
| | | | | | Test cases for #1071 and #4275 since I don't see a lot of test cases, hint hint, no review.
* Closes #4432. review by dragosHubert Plociniczak2011-04-121-0/+42
|
* Closes #4402. Review by plocinic.Martin Odersky2011-04-113-0/+18
|
* Looks like another java5/java6 difference gets ...Paul Phillips2011-03-281-5/+13
| | | | | | Looks like another java5/java6 difference gets me on a test. At least this time I was looking for that. No review.
* Expanding the test which tries to use the colle...Paul Phillips2011-03-281-9/+60
| | | | | | Expanding the test which tries to use the collections from java. No review.
* Looks like I accidentally committed a test log,...Paul Phillips2011-03-241-2/+0
| | | | | Looks like I accidentally committed a test log, no review.
* Restoring my higher-kinded-Array signature chec...Paul Phillips2011-03-242-0/+6
| | | | | | Restoring my higher-kinded-Array signature check which martin callously blew away while fixing all our other problems. Review by odersky.
* Simple test case to see whether Java understand...Martin Odersky2011-03-231-0/+16
| | | | | | Simple test case to see whether Java understands mixed in signatures. This should be extended with more cases. Review by extempore.
* closes #4345.Adriaan Moors2011-03-221-0/+7
|
* closes #4205: quick&dirty fix to force loading ...Adriaan Moors2011-03-222-0/+7
| | | | | | closes #4205: quick&dirty fix to force loading of info's and thus avoid order-dependency until we fix unsafeTypeParams for good. no review
* Not yet learned my lesson about partest and emp...Paul Phillips2011-03-225-0/+16
| | | | | | | | | | Not yet learned my lesson about partest and empty directories. Rather than reapply that bandaid, went after partest. Attempts to make partest ignore empty directories. Discover directory tests aren't run when the command line tool is used, make them run like everyone else. Find more tests which due to misplacement are silently ignored, move them into tested locations. No review.
* [I'm laptop only so there's some chance this wi...Paul Phillips2011-03-213-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | [I'm laptop only so there's some chance this will incur temporary breakage, but it needs committing.] Heading off gratuitous complications which haven't yet shipped, I eliminated the -jar startup option in favor of doing what we already do, figuring it out. So now all these things work. scala foo/bar.scala // if file is a script or has one main method scala foo.Bar // if it has a legal main method scala foo.jar // if it has a legal MainClass attribute Also changed "-savecompiled" to "-save" and given scala source called foo.scala, generate foo.jar rather than foo.scala.jar. Cleaned up a bunch of related code and further polished the scala startup message. And unbroke choice settings and improved that error too, which closes #3849. While trying to write a test for the choice setting, was reminded that partest just discards invalid flags files. Made it fail instead, which closes #3712. Fixed the new failures that revealed. No review.
* Closes #4202 again, closes #4363.Hubert Plociniczak2011-03-212-1/+20
|
* Prevent a divergent implicit from terminating i...Paul Phillips2011-03-191-0/+15
| | | | | | | Prevent a divergent implicit from terminating implicit search, so that there can still be a winner, as endorsed by martin over a cheese plate. Closes #3883, review by dmharrah.
* Fix for crasher with Class objects.Paul Phillips2011-03-191-0/+31
| | | | | extempore. References #4305, no review.
* Removed long deprecated and obscure CloneableCo...Paul Phillips2011-03-191-0/+9
| | | | | | | | | | | | | Removed long deprecated and obscure CloneableCollection. Discovered we have a scala.collection.mutable.Cloneable which does not extend java.lang.Cloneable, which is why Array is not considered cloneable. That seems wrong, but to be conservative I gave Array the Cloneable interface without altering the scala trait. Also, if @serializable is deprecated in favor of Serializable, should not @cloneable be deprecated analogously? Closes #4307, and a commit-question review by rytz.
* Some boundary conditions in range.Paul Phillips2011-03-191-0/+16
| | | | | | | infix implicits to Integral and Fractional. As a bonus this patch knocked 10,000 long boxings off a specialized test. Who knew. Closes #4308, #4321, review by community.
* Reenabled the commented out bits of the test fo...Paul Phillips2011-03-172-3/+3
| | | | | Reenabled the commented out bits of the test for #1642. No review.
* Leveraged having a place to put some useful imp...Paul Phillips2011-03-151-0/+7
| | | | | | | | | | | | | | | Leveraged having a place to put some useful implicits which we sensibly are reluctant to introduce in the default scope. The test case pretty much sums it up. import Ordering.Implicits._ import Numeric.Implicits._ def f1[T: Numeric](x: T, y: T, z: T) = x + y + z def f2[T: Ordering](x: T, y: T, z: T) = if (x < y) (z > y) else (x < z) No review.
* One last build break and unbreak so I can be fo...Paul Phillips2011-03-081-0/+2
| | | | | | One last build break and unbreak so I can be fondly remembered as that guy who kept breaking the build. No review.
* More signature fixes and tests and generally be...Paul Phillips2011-03-072-6/+0
| | | | | | | More signature fixes and tests and generally being more sophisticated about our primitive squashing. These signatures belong in world-class museums but we are their shepherds for now. Closes #4317, no review.
* Another corner involving generic signatures and...Paul Phillips2011-03-062-0/+6
| | | | | | | | Another corner involving generic signatures and java interop flushed out by seth tisue. Keep that detector fired up seth or the rebel alliance will surely be crushed. (In fact, I nominate you to write a test suite!) Closes #4317, no review.
* Closes #4202 and removes empty TreeHashMap (sup...Hubert Plociniczak2011-02-221-0/+7
| | | | | | Closes #4202 and removes empty TreeHashMap (superseded by HashMap implementation). No review
* Renamed Application to App.Martin Odersky2011-02-2159-67/+67
|
* Fixed a bug where newly introduced type paramet...Aleksandar Pokopec2011-02-211-0/+27
| | | | | | | | Fixed a bug where newly introduced type parameters didn't have all the substitutions done correctly. Fixes #4266. No review.
* Observed that some historical issues with packa...Paul Phillips2011-02-202-0/+22
| | | | | | | | Observed that some historical issues with package objects no longer seem so issuey. In the interests of keeping the arbitrary limitations to a minimum, re-enabled case classes in package objects (see #2130, #3437.) Closes #3437, review by odersky.
* Test case closes #3137, no review.Paul Phillips2011-02-201-0/+17
|
* Test case closes #3861, no review.Paul Phillips2011-02-181-0/+2
|
* Added a missing test case for the previous commit.Aleksandar Pokopec2011-02-161-0/+15
| | | | | No review.
* A fix for #4243.Aleksandar Pokopec2011-02-141-0/+18
| | | | | No review.
* Test case closes #4173. No review.Paul Phillips2011-02-141-0/+4
|
* Fix for #4188.Paul Phillips2011-02-111-0/+6
| | | | | | | | It seems to arise from the changes to inner objects which make them look like lazy vals. I am not sure this is the right change but at least it's only about a six character diff to review. Closes #4188, review by odersky.
* Test case uncommented.Aleksandar Pokopec2011-02-091-32/+32
|
* Added a test case for anyref specialization.Aleksandar Pokopec2011-02-091-0/+64
|
* Closes #3986 plus some cleanup. no reviewHubert Plociniczak2011-02-081-0/+5
|
* The comment for isCoDefinedWith has long saidPaul Phillips2011-02-071-0/+7
| | | | | | | | | | | Is this symbol defined in the same scope and compilation unit as `that' symbol? But "same scope" was never checked, only "same compilation unit." Presumably other layers of logic kept this from being noticed until now, but it has been crashing sbt. Added check to isCoDefinedWith. Closes #4220, review by odersky.
* Re-enabled test spec-traits (removed the swing ...Iulian Dragos2011-02-051-0/+64
| | | | | | Re-enabled test spec-traits (removed the swing dependent part, since all it tested was call-by-name parameters). no review.
* I found more situations where primitive types w...Paul Phillips2011-02-011-0/+11
| | | | | | | | I found more situations where primitive types were appearing in signatures. I hacked in a flag which says boxing is or is not allowed. The code is getting hideous: foortunately I have it mostly rewritten, but I wanted to fix this bug now. No review.
* Fixed some generic signature bugs I found thank...Paul Phillips2011-01-282-0/+8
| | | | | | Fixed some generic signature bugs I found thanks to the compiler telling me it was buggy. Thanks compiler. No review.
* Merge branch 'work'Aleksandar Pokopec2011-01-261-23/+0
| | | | | | Conflicts: src/library/scala/concurrent/SyncVar.scala
* closes #2741, #4079: pickling now ensures that ...Adriaan Moors2011-01-262-0/+14
| | | | | | | | | | | | | | | closes #2741, #4079: pickling now ensures that a local type param with a non-local owner, which will thus get a localized owner, will only get a class as its localized owner if its old owner was a class (otherwise, NoSymbol) this ensures that asSeenFrom does not treat typerefs to this symbol differently after pickling. todo: should we pro-actively set the owner of these type params to something else than the type alias that they originate from? see notes in typeFunAnon review by odersky
* Made ().## and null.## not crash anymore.Paul Phillips2011-01-201-0/+6
|
* Updated copyright notices to 2011Antonio Cunei2011-01-203-3/+3
|
* introduce NullaryMethodType to disambiguate Pol...Adriaan Moors2011-01-202-18/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | introduce NullaryMethodType to disambiguate PolyType motivation: given `def foo[T]: (T, T)` and `type Foo[T] = (T, T)`, `foo.info` and `TypeRef(_, Foo, Nil).normalize` are both `PolyType(List(T), Pair[T, T])` uncurry has been relying on an ugly hack to distinguish these cases based on ad-hoc kind inference without this distinction, the type alias's info (a type function) would be transformed to `PolyType(List(T), MethodType(Nil, Pair[T, T]))` anonymous type functions are being used more often (see #2741, #4017, #4079, #3443, #3106), which makes a proper treatment of PolyTypes more pressing change to type representation: PolyType(Nil, tp) -> NullaryMethodType(tp) PolyType(tps, tp) -> PolyType(tps, NullaryMethodType(tp)) (if the polytype denoted a polymorphic nullary method) PolyType(Nil, tp) is now invalid the kind of a PolyType is * iff its resulttype is a NullaryMethodType or a MethodType (i.e., it's a polymorphic value) in all other cases a PolyType now denotes a type constructor NullaryMethodType is eliminated during uncurry pickling: for backwards compatibility, a NullaryMethodType(tp) is still pickled as a PolyType(Nil, tp), unpickling rewrites pre-2.9-pickled PolyTypes according to the expected kind of the unpickled type (similar to what we used to do in uncurry) a pickled PolyType(Nil, restpe) is unpickled to NullaryMethodType(restpe) a pickled PolyType(tps, restpe) is unpickled to PolyType(tps, NullaryMethodType(restpe)) when the type is expected to have kind * the rewrite probably isn't complete, but was validated by compiling against the old scalacheck jar (which has plenty of polymorphic nullary methods) nevertheless, this commit includes a new scalacheck jar summary of the refactoring: * PolyType(List(), tp) or PolyType(Nil, tp) or PolyType(parms, tp) if params.isEmpty ==> NullaryMethodType(tp) * whenever there was a case PolyType(tps, tp) (irrespective of tps isEmpty), now need to consider the case PolyType(tps, NullaryMethodType(tp)); just add a case NullaryMethodType(tp), since usually: - there already is a PolyType case that recurses on the result type, - the polytype case applied to empty and non-empty type parameter lists alike * tp.resultType, where tp was assumed to be a PolyType that represents a polymorphic nullary method type before, tp == PolyType(tps, res), now tp == PolyType(tps, NullaryMethodType(res)) * got bitten again (last time was dependent-method types refactoring) by a TypeMap not being the identity when dropNonConstraintAnnotations is true (despite having an identity apply method). Since asSeenFrom is skipped when isTrivial, the annotations aren't dropped. The cps plugin relies on asSeenFrom dropping these annotations for trivial types though. Therefore, NullaryMethodType pretends to never be trivial. Better fix(?) in AsSeenFromMap: `if(tp.isTrivial) dropNonContraintAnnotations(tp) else ...` TODO: scalap and eclipse review by odersky, rytz
* Moved and removed a bunch of tests from pending.Paul Phillips2011-01-191-0/+12
|
* Some modifications to @elidable: for reasons lo...Paul Phillips2011-01-121-1/+1
| | | | | | | | Some modifications to @elidable: for reasons lost to me now it had a default value such that annotated methods might be elided even if the option wasn't given. It now does nothing in that situation. Closes #4051, #4151, no review.
* Merge branch 'work'Aleksandar Pokopec2011-01-121-0/+1
|
* A test case for recently fixed #4114. Plus!Paul Phillips2011-01-101-0/+8
| | | | | | | | | I had closed #2441 as a duplicate of that, but unfortunately #4114 did not bring #2441 along with it. Then I realized I'm a programmer, not a helpless trac watcher. As is often the case with thes things, fixing that revealed a bug in the library. Closes #2441 for real, review by odersky.