summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* do not add entry in InnerClass attribute if out...michelou2010-12-161-11/+13
| | | | | | | | | | | | | | | | do not add entry in InnerClass attribute if outer name is null (according to comment for outerName method) in order to remove the following warning message reported by the dx tool (Android): warning: Ignoring InnerClasses attribute for an anonymous inner class (test$$anonfun$1) that doesn't come with an associated EnclosingMethod attribute. This class was probably produced by a compiler that did not target the modern .class file format. The recommended solution is to recompile the class from source, using an up-to-date compiler and without specifying any "-target" type options. The consequence of ignoring this warning is that reflective operations on this class will incorrectly indicate that it is *not* an inner class.
* Stops barking up the wrong tree with -Ywarn-dea...Paul Phillips2010-12-152-31/+40
| | | | | | | | | | | | | Stops barking up the wrong tree with -Ywarn-dead-code. The origin of its issues was twofold: 1) synchronized acts by-name without being by-name (ticket #4086) 2) warnings are swallowed if context.reportGeneralErrors is false Those two plus a dash of bitrot. In any case it's at its all time happiest now. It found all the dead code related fixes in this commit. Way to go, -Ywarn-dead-code! Review by odersky.
* Fixed various issues with -Ywarn-dead-code.Paul Phillips2010-12-143-0/+42
| | | | | enjoy fewer spurious warnings. Closes #1681, no review.
* Closes #4024. No review.Martin Odersky2010-12-141-0/+9
|
* Told the boy trying to plug the dike holes that...Paul Phillips2010-12-124-8/+12
| | | | | | | | | | Told the boy trying to plug the dike holes that he can go home. Instead of trying to catch unpositioned EmptyTrees from the XML parser, don't generate them. It's the kind of commit you would tell your grandkids about if your grandkids could sit still for five seconds: fixes bugs by deleting code and eliminates extraneous error messages to boot (see .check diffs.) No review.
* New jline: BSD licensed, based on [ https://git...Paul Phillips2010-12-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | New jline: BSD licensed, based on [ https://github.com/jdillon/jline2 ] with additional code thanks to [ https://github.com/huynhjl/jline2 ]. Replaces lib/jline.jar with build of these sources, and modifies trunk code to work with the new jar. Hopeful improvements including baseline functionality on cygwin and 64bit windows, as well as more accurate line wrapping / cursor positioning on all platforms and ctrl-R history search. For the time being the canonical source repository is this: https://github.com/paulp/jline2 The enclosed sources are a mirror of that repository, and should be treated as read-only in the scala svn repository. No review, codewise, but people are very strongly encouraged to try it out and report any regressions.
* A little more finnesse needed with backquoting.Paul Phillips2010-12-122-0/+20
|
* Turned an assert/compiler crash into an error m...Paul Phillips2010-12-112-0/+26
| | | | | | | | Turned an assert/compiler crash into an error message. Admittedly the error output is still terrible (the XML positioning looks like it came from an RNG) but more helpful than the crash. Also misc advantage of a handy new method. Closes #4069, no review.
* When was the last time -Xcheckinit was run? It ...Paul Phillips2010-12-1114-69/+52
| | | | | | | | | | When was the last time -Xcheckinit was run? It must have been a long time. All these changes are to address bugs revealed by -Xcheckinit, mostly in test cases, some in the compiler. I'm guessing the partest -Xcheckinit runs are hanging the first time they run into a failure, so if it starts "working" again after this commit don't get too confident. No review.
* closes #4064.Adriaan Moors2010-12-092-0/+9
|
* Minor changes.Aleksandar Pokopec2010-12-092-4/+4
| | | | | No review.
* Made parallel collections serializable.Aleksandar Pokopec2010-12-0911-10/+100
| | | | | No review.
* Array combiners implementation changed from arr...Aleksandar Pokopec2010-12-099-41/+118
| | | | | | | | | Array combiners implementation changed from array buffers to doubling unrolled buffers to avoid excessive copying. Still evaluating the benefits of this. No review.
* Fixed parallel ranges to use the same range log...Aleksandar Pokopec2010-12-093-4/+7
| | | | | | | | | | Fixed parallel ranges to use the same range logic under the hood, and not introduce code duplication. Slight fix in Tasks. No review.
* Fixing jvm 1.5 support for parallel collections.Aleksandar Pokopec2010-12-0917-41/+94
| | | | | | | | | | | | | | | | | | Special cased with thread pool executor scheduling. Fixed an ugly concurrency bug where futures returned by a thread pool executor didn't remove the task from the queue when cancel was called. Note to self and others: don't cancel futures returned by thread pool executors, it might lead to unexpected behaviour. Modified the executor to add new threads if all the active threads are syncing, in order to avoid deadlocks. Fixed a hidden bug in AdaptiveWorkStealingTasks, where correct behaviour depended on the execution order of the tasks. This didn't fail before with ForkJoinTasks, since there the execution order is well-defined. Scalachecked 1.5 & 1.6 support. No review.
* minor code updates (detach plugin)michelou2010-12-089-162/+38
|
* again: relax access boundry check for overridin...Lukas Rytz2010-12-085-13/+17
| | | | | | again: relax access boundry check for overriding protected java members. review by eugenevigdorchik.
* Test case closes #3642, no review.Paul Phillips2010-12-072-0/+10
|
* Reverts previous commit: needs a new starr..Lukas Rytz2010-12-072-10/+0
| | | | | This reverts commit 99652fe553a1a5b0c551950e8178e867943a088f.
* follow up on fix #3946.Lukas Rytz2010-12-072-0/+10
|
* Added uniqueness annotations. Review by rytz.Philipp Haller2010-12-071-2/+2
|
* Don't transform patterns during superaccessors:...Paul Phillips2010-12-062-0/+18
| | | | | | Don't transform patterns during superaccessors: the matcher can't deal with funny trees. Closes #4062, review by dragos.
* Moved ClassfileAnnotation/StaticAnnotation/Anno...Paul Phillips2010-12-064-10/+12
| | | | | | | Moved ClassfileAnnotation/StaticAnnotation/Annotation/TypeConstraint into scala.annotation and enabled the deprecated type aliases in scala.* to point there. Also enclosed is a new starr to bootstrap. No review.
* Burned by a last minute text change.Paul Phillips2010-12-051-1/+1
|
* Cleaned up and brought up to date the help text...Paul Phillips2010-12-051-25/+27
| | | | | | | | Cleaned up and brought up to date the help text for -X and -Y options. Made some enhancements to PhasesSetting, which are documented if you run scalac -X or -Y. (Try it!) Disabled some dead settings and renamed others to reflect their current purpose. No review.
* Introducing scala.system, the product of a whir...Paul Phillips2010-12-045-10/+10
| | | | | | | | | | Introducing scala.system, the product of a whirlwind couple of hours. More useful stuff than you can shake three sticks at. See the scala.system package object. It's even documented. And since it has methods error and exit, proceeded to deprecate the ones in Predef. No review.
* Starting the mopping up now that names have som...Paul Phillips2010-12-031-2/+4
| | | | | | | | | | | | | | Starting the mopping up now that names have some more sense of their place in the universe. Cleaned up some heavy multi-boolean logic. Added more documentation on the relationships between entities in Symbols and some other compiler things which often blur together. Fun fact: the incorrect usage of nme.ScalaObject in Contexts which I reported when first broaching the namespace subject became a compile time error during the writing of this patch, because there is no longer any such thing as nme.ScalaObject. It's a little bit like magic. No review.
* close #4036, fix #2489.Lukas Rytz2010-12-032-0/+14
|
* close #3951. review by dubochet.Lukas Rytz2010-12-032-0/+40
|
* close #3946.Lukas Rytz2010-12-033-0/+13
|
* Added test for #4052Hubert Plociniczak2010-12-031-0/+5
|
* Parameterizes TraversableFactory.range so it ca...Paul Phillips2010-12-031-7/+1
| | | | | | Parameterizes TraversableFactory.range so it can be used with any integral type. Closes #3542, no review.
* immutable.Map keySet returns immutable.Set.Paul Phillips2010-12-032-3/+3
|
* Overrides immutable.{ Map, Set, Seq } to return...Paul Phillips2010-12-031-0/+11
| | | | | | | Overrides immutable.{ Map, Set, Seq } to return self on the corresponding toMap/toSet/toSeq. Closes #3953, review by prokopec.
* Generalizes catch blocks to include any Partial...Paul Phillips2010-12-032-0/+38
| | | | | | | | | | | | | | | | | | | Generalizes catch blocks to include any PartialFunction[Throwable, T]. Existing catch blocks will compile exactly as before. Anything else (which mean: the token after CATCH is not a left brace, or it is a left brace not immediately followed by CASE) is desugared as follows: try body catch expr // becomes try body catch { case x => val catchFn = expr if (catchFn isDefinedAt x) catchFn(x) else throw x } Review by odersky.
* It's a big one!Paul Phillips2010-12-021-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TermName and TypeName are exposed throughout the compiler based on what kind of name a given abstraction ought to have. (There remain places where one needs to create a name without knowing yet what it will be, and those will always be Names.) The nme object in the compiler now holds only term names. To reference a known type name, use tpnme: nme.List == ("List": TermName) tpnme.List == ("List": TypeName) The contents of nme and tpname are defined in traits, many of which are shared, so if a name should exist only as a Type and not a Term, it should be defined in CompilerTypeNames, but otherwise in CompilerTermNames or CompilerCommonNames. This is partially complete but I'm sure there are still many shared which should pick a side. Usage of .toTermName and .toTypeName is strongly discouraged. After the dust has settled, there will be very few places where it will make sense to hop between namespaces like that. There are some implicits to smooth everything out, most of which should be removable eventually. // these two are in no hurry to go anywhere String => TermName String => TypeName // but not String => Name: def view in the compiler is no longer implicit // these two are temporary, and can log when they kick off to help us flush // out remaining issues of "name migration" Name => TermName Name => TypeName There is more work to be done before we're properly protected from naming errors, but I will not allow another eight hour tragedy to befall lukas or anyone else! Review by rytz. (Formality.)
* minor update (detach examples)michelou2010-12-023-7/+12
|
* A patch authored by martin to fix one of the bi...Paul Phillips2010-12-016-748/+0
| | | | | | | | | | | | | A patch authored by martin to fix one of the big outstanding issues with -Ycheck. The typer had a vision of the world which fell to pieces if presented with a tree from after phase constructors. Now it is wiser: perhaps a bit sadder as well, but every typer must face this day sooner or later. Also removed the various passing tests from test/checker-tests, but still plenty of fascinating failures in there for anyone interested in helping push to the finish line! No review.
* More fiddling with checkSensible.Paul Phillips2010-12-012-8/+9
| | | | | | | | | | warnings. Fixed some bugs revealed by said warnings, and made some minor changes to avoid warnings. (Technically it's not a bug to have unrelated classes compare as equal, but it so often is a bug that it behooves us not to do it intentionally so the warnings stand out.) Disabled the most useful warning for the moment since it'd be wrong with some frequency. No review.
* Disabled test after failing to read linux's mind.Paul Phillips2010-12-012-0/+0
|
* Attempt to fix failing test. No review.Paul Phillips2010-11-301-3/+4
|
* Parser relaxation so that one can name the type...Paul Phillips2010-11-302-2/+16
| | | | | | | Parser relaxation so that one can name the type variables in a constructor pattern match: this is a prerequisite to realizing the full potential of gadts. (Nothing new works here however.) No review.
* Found several minor thigns wrong with checkSens...Paul Phillips2010-11-302-23/+27
| | | | | | | Found several minor thigns wrong with checkSensible, which tries to issue warnings for comparisons which will always be true or false. No review.
* Deprecated the @serializable annotation, introd...Lukas Rytz2010-11-306-28/+50
| | | | | | | | | | | | | | | | | | | Deprecated the @serializable annotation, introduce a new trait "scala.Serializable" which has to be extended instead (cross-platform). Known issues: - Companion objects of serializable classes (including case classes) are automatically made serializable. However, they don't extend "Serializable" statically because of the known difficulty (should be done before typing, but hard). - Writing "case class C() extends Serializable" gives "error: trait Serializable is inherited twice" - Functions are serializable, but don't extend Serializable dynamically (could be fixed by making FunctionN Serializable - shouldn't we?) Note that @SerialVersionUID continues to be an annotation; it generates a static field, which is not possible otherwise in scala. Review by dragos, extempore. Question to dragos: in JavaPlatform.isMaybeBoxed, why is there a test for "JavaSerializableClass"? Is that correct?
* It looks like the fix for #2318 was causing pro...Paul Phillips2010-11-302-0/+39
| | | | | | | It looks like the fix for #2318 was causing problems, so I gave it some more graceful failure. Leaving #2318 open because the implementation could still work harder to find the right method. No review.
* The initial implementation of TraversableOnce c...Paul Phillips2010-11-291-0/+8
| | | | | | | | | | | | | | | | | | The initial implementation of TraversableOnce could not supply concrete methods or even signatures for map and flatMap because they have different signatures in Iterator and TraversableLike. But we can take another approach which works out as nicely: 1) Create implicits which install those methods and flatten on TraversableOnce instances. 2) Generalize the signatures of flatten and flatMap to work with A => TraversableOnce[B] instead of A => Traversable[B]. And voila, you can mix and match Iterators and Traversables in a for comprehension, map, flatMap, and flatten, without the tedious process of sprinkling .iterator or .toList around to appease the compiler. No review.
* "I invite everyone to change this rule, and obs...Paul Phillips2010-11-294-5/+10
| | | | | | | | | | | | | | | | | | | | | "I invite everyone to change this rule, and observe what breaks!" This much beloved comment from #1208 has been on my radar for two years. The worm has turned. Closes #1208. The inferred type of an object is now Foo.type instead of "object Foo". What once was this: scala> val x: Map[Int, Singleton] = Map(1 -> None) <console>:5: error: type mismatch; found : (Int, object None) required: (Int, Singleton) Now exudes a pleasing aura of workingness: scala> val x: Map[Int, Singleton] = Map(1 -> None) x: Map[Int,Singleton] = Map(1 -> None) No review.
* Did some more polishing on the infamous partial...Paul Phillips2010-11-281-1/+2
| | | | | | Did some more polishing on the infamous partial function error message. No review.
* Test case closes #3106, no review.Paul Phillips2010-11-281-0/+7
|
* Fleshed out the mock code a little further so i...Paul Phillips2010-11-282-0/+32
| | | | | | | | | | | | | | | | | | | Fleshed out the mock code a little further so it's easy for closures to become SAMs. // implicit not necessary, but improves fun factor scala> implicit def mkUFn(x: AnyRef) = scala.tools.reflect.UniversalFn(x) mkUFn: (x: AnyRef)scala.tools.reflect.UniversalFn scala> (() => 5*5*5).as[java.util.concurrent.Callable[Int]] res1: java.util.concurrent.Callable[Int] = <function1> scala> res1.call res2: Int = 125 No review.