summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Refactored parallel collections for pluggable t...Aleksandar Pokopec2010-11-272-13/+15
| | | | | | | | Refactored parallel collections for pluggable task support implementations. No review.
* Some work on error messages, somewhat based on ...Paul Phillips2010-11-265-1/+45
| | | | | | Some work on error messages, somewhat based on ideas in #3092. No review.
* A new totally safe signal manager, along with a...Paul Phillips2010-11-261-0/+22
| | | | | | | | | | | | | | | | | | | A new totally safe signal manager, along with all the support code needed for that. See the classes in scala.tools.reflect.* for interesting new weapons. Also includes inaugural handy usage: scala> val x = 10 x: Int = 10 scala> while (true) () [ctrl-C] Execution interrupted by signal. scala> x res1: Int = 10 No review, but feedback welcome.
* Disabled possibly failing test.Aleksandar Pokopec2010-11-261-0/+4
| | | | | No review.
* A test for collection conversions.Aleksandar Pokopec2010-11-261-0/+78
| | | | | No review.
* Further fixes some issues for #3621.Aleksandar Pokopec2010-11-255-5/+18
| | | | | Review by Rytz.
* Fix for #3621.Aleksandar Pokopec2010-11-246-0/+76
| | | | | | | Added varargs annotation. Review by Rytz.
* Fixes #3647, closes #3647, adds a test case for...Aleksandar Pokopec2010-11-192-0/+38
| | | | | | | | Fixes #3647, closes #3647, adds a test case for it, and a missing test case for #3935. No review.
* removed duplicated error message for bad compil...michelou2010-11-182-190/+211
| | | | | | removed duplicated error message for bad compiler options made some cleanups in detach plugin code
* Some refinement of the error messages when the ...Paul Phillips2010-11-188-12/+45
| | | | | | | | | | | | | | | | | Some refinement of the error messages when the found and required types have the same simple names. No longer must we watch people scratch their heads at such messages as: found : scala.collection.Set[String] required: Set[String] Now so clear you could enjoy a movie through it: found : scala.collection.Set[String] required: scala.collection.immutable.Set[String] No review.
* Added another fix for #3970.Aleksandar Pokopec2010-11-171-0/+21
| | | | | No review.
* Fixes #3989.Aleksandar Pokopec2010-11-172-0/+2
| | | | | No review.
* Fixes #3989, adding test cases for #3989 and #3...Aleksandar Pokopec2010-11-172-0/+28
| | | | | | | Fixes #3989, adding test cases for #3989 and #3996. No review.
* updates Scala examples, added detach pluginmichelou2010-11-1717-0/+813
|
* Changed javasigs test to use new javaccmd syste...Philipp Haller2010-11-151-1/+1
| | | | | Changed javasigs test to use new javaccmd system property.
* Moved failing test to pending until I figure ou...Iulian Dragos2010-11-142-0/+0
| | | | | | Moved failing test to pending until I figure out how hudson is running on chara
* Use partest's java and javac command in the jav...Iulian Dragos2010-11-131-9/+2
| | | | | Use partest's java and javac command in the javasigs test. no review.
* Fix InnerClasses attribute: anonymous classes d...Iulian Dragos2010-11-133-2/+408
| | | | | | | | Fix InnerClasses attribute: anonymous classes don't have an outer name. EnclosingMethod is correctly generated. Fixed isAnonymousClass definition. Updated test that depends on anonymous inner class names. Closes (again) #3249, references #2749. review by odersky,extempore.
* Half of an implementation of sealedness for jav...Paul Phillips2010-11-123-0/+19
| | | | | | | | | Half of an implementation of sealedness for java enums. Since it's only half it's behind -Xexperimental, but it works like a charm for the half where it works (that being compiling against bytecode.) Need input on how to approach the source half. References ticket #2442. Review by moors.
* A test case having some issues. No review.Paul Phillips2010-11-112-3/+4
|
* Some more work on options related to showing co...Paul Phillips2010-11-112-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some more work on options related to showing compiler structures during compilation. The pickler knew more than was healthy about things like compiler settings, so I let the pickler worry about pickling and moved that logic somewhere closer to the surface. Some convenience oriented tweaks to command line phase parsing. The end result is as follows (some output trimmed for brevity.) // dippy.scala class Dippy { def f[T <: Dippy](x: T) = (x, x) object DingusDippy extends util.Random { } } // className@phaseString should be reliably unambiguous % scalac -Xshow-class Dippy@typer,erasure,jvm dippy.scala <<-- class Dippy after phase 'typer' -->> Members (excluding Any/AnyRef unless overridden): final object DingusDippy extends object Dippy.this.DingusDippy def f[T <: Dippy](x: T): (T, T) <<-- class Dippy after phase 'erasure' -->> Members (excluding Any/AnyRef unless overridden): private lazy var DingusDippy$module: object Dippy#DingusDippy lazy val DingusDippy(): object Dippy#DingusDippy def f(x: Dippy): Tuple2 <<-- class Dippy after phase 'jvm' -->> Members (excluding Any/AnyRef unless overridden): protected var bitmap$0: Int private lazy var DingusDippy$module: object Dippy$DingusDippy lazy val DingusDippy(): object Dippy$DingusDippy def f(x: Dippy): Tuple2 No review.
* Unsuppressed generic signatures for members wit...Paul Phillips2010-11-114-0/+52
| | | | | | Unsuppressed generic signatures for members with expanded names. Closes #3897, review by dragos.
* Introduces "Origins" for all your superhero bac...Paul Phillips2010-11-112-0/+27
| | | | | | | | Introduces "Origins" for all your superhero backstory needs. It logs where all the calls are coming from: that's all for the moment. It's explained in the comments and test case, so I'm sure you don't need it all repeated here. No review.
* Benchmarking parallel sets.Aleksandar Pokopec2010-11-103-3/+12
| | | | | No review.
* Added a benchmark for mutable hash sets.Aleksandar Pokopec2010-11-102-0/+145
| | | | | No review.
* Fixes #3878. No review.Aleksandar Pokopec2010-11-102-1/+10
|
* To fix the failing nightly.Aleksandar Pokopec2010-11-101-0/+4
| | | | | No review.
* protected[this] members should be accessible to...Paul Phillips2010-11-103-0/+41
| | | | | | protected[this] members should be accessible to super.x calls. Closes #464, review by odersky.
* Closes #3980. Review by dragos.Hubert Plociniczak2010-11-092-0/+22
|
* Iteration bug in TrieIterator.Paul Phillips2010-11-091-0/+21
|
* Deprecation patrol.Paul Phillips2010-11-084-0/+33
| | | | | | | | | the same issues as JavaConversions with respect to overloading implicit methods making them inaccessible to view bounds. Fixed JavaConverters. Added a warning for when people overload parameterized implicits: in almost all cases the name is irrelevant so there's little point in unwittingly suffering degraded functionality. No review.
* Fixed crasher with @elidable on parameterized m...Paul Phillips2010-11-081-0/+10
| | | | | | Fixed crasher with @elidable on parameterized methods. Closes #3981, no review.
* This is work on -Ycheck:icode.Paul Phillips2010-11-081-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | distribution can now be built with that option, with or without optimization, and almost all tests cases can. (Those which can't are due to different -Ycheck: issues.) Major changes of interest are as follows: * LOAD_EXCEPTION and THROW are parameterized on the throwable symbol. * Does not squash all traits down to AnyRef, but instead deals with issues as they arise. By observation the cases where one needs a "Foo with Product" to manifest as both a "Foo" and a "Product" at different places are quite rare, so we need not throw out the whole baby. * Exception handlers now have positions. * The remaining checker failures removed, such as CALL_METHOD wanting to pop a value off the stack after calling a constructor. * Many multiply defined values such as REFERENCE(ObjectClass) put in one place (ICodes.scala) and reused. * -Ycheck:icode output (if also given -Ydebug) worthy of Michelangelo. Here is a class and the -Ycheck:icode -Ydebug output for f's block. class A { def f(x: Int, y: String) = try println(x + y.length) catch { case x: NullPointerException => () } } ** Checking Block 4 [S: 3, 2] [P: 1] <closed> 1-> REF(singleton class Predef) 3 + LOAD_MODULE object Predef 2-> INT 3 + LOAD_LOCAL(value x) 3-> REF(class String) 3 + LOAD_LOCAL(value y) 2<- REF(class String) 3 - CALL_METHOD java.lang.String.length (dynamic) 3-> INT 3 + CALL_METHOD java.lang.String.length (dynamic) 2<- INT 3 - CALL_PRIMITIVE(Arithmetic(ADD,INT)) 1<- INT 3 - """ 2-> INT 3 + CALL_PRIMITIVE(Arithmetic(ADD,INT)) 1<- INT 3 - BOX INT 2-> REF(class Integer) 3 + BOX INT 1<- REF(class Integer) 3 - CALL_METHOD scala.Predef.println (dynamic) 0<- REF(singleton class Predef) 3 - CALL_METHOD scala.Predef.println (dynamic) Review by dragos (I marked the specific spots I thought of interest with "PP to ID" which makes it sound like I'm talking to my primal self. Next week on programmer theater: "PP to SUPEREGO.")
* A bit of -Xshow-class / -Xshow-object which did...Paul Phillips2010-11-082-0/+83
| | | | | | | | | | | | A bit of -Xshow-class / -Xshow-object which didn't quite make the Global patch. Now type selections should do the right thing, e.g. scalac -Xshow-class Global#Run src/compiler/scala/tools/nsc/Global.scala will show you interesting things about Run. Or see the test case for even more thrills. No review.
* Disabled a test failing on server.Aleksandar Pokopec2010-11-081-1/+1
| | | | | No review
* A test output changed. No review.Aleksandar Pokopec2010-11-081-2/+2
|
* Added size maps to flat hash tables.Aleksandar Pokopec2010-11-086-7/+262
| | | | | | | | | | | Added parallel mutable hash sets. Implemented parallel mutable hash set iterators. Implemented parallel mutable hash set combiners. Factored out unrolled linked lists into a separate class UnrolledBuffer, added tests. Added parallel mutable hash set tests, and debugged hashsets. No review.