summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Overhaul of JavaConver{sions,ters}.Paul Phillips2012-03-215-0/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initially motivated by SI-5580, then just motivated. I broke up the opaquely named JavaConversions and JavaConverters into the following traits encapsulating some permutation of { to java, to scala, bidirectional } { wrappers, decorators } I named everything consistently in terms of either Wrappers or Decorators. Decorators install those asJava/asScala methods onto collections of the right kind; Wrappers hide the process. JavaConversions then reduces to an object which (ill-advisedly) extends both WrapAsJava and WrapAsScala. And JavaConverters is an object extending DecorateAsScala and DecorateAsJava. However other more clearly named vals exist in the newly created scala.collection.convert package object. val decorateAsJava = new DecorateAsJava { } val decorateAsScala = new DecorateAsScala { } val decorateAll = new DecorateAsJava with DecorateAsScala { } val wrapAsJava = new WrapAsJava { } val wrapAsScala = new WrapAsScala { } val wrapAll = new WrapAsJava with WrapAsScala { } So for instance to import asScala decorators, and only those: scala> import scala.collection.convert.decorateAsScala._ import scala.collection.convert.decorateAsScala._ scala> new java.util.ArrayList[String].asScala groupBy (x => x) res0: scala.collection.immutable.Map[String,scala.collection.mutable.Buffer[String]] = Map() I propose we put those vals or a subset of them in the scala package object rather than way down in scala.collection.convert.
* Clarifying MethodSynthesis.Paul Phillips2012-03-211-0/+17
| | | | | Tried to paint a picture of how one might synthesize an implicit method to accompany an implicit class.
* Restore irrefutability commits.Paul Phillips2012-03-209-0/+134
| | | | This reverts commit d8ba5d091e5641553b438ef9930a6023a2709dcd.
* Fix for stability failure.Paul Phillips2012-03-201-0/+37
| | | | | | | Pattern matcher! Totally unrelated to irrefutability, the pattern matcher at some point stopped sorting its lookup switch cases, and the butterfly's wings flapped enough to swap two cases. Now they're sorted in ascending order like they're supposed to be.
* Lots of tedious warning and tree printing work.Paul Phillips2012-03-2013-81/+104
| | | | | | | | | | | Fewer deprecation warnings, prettier trees, prettier symbols, more polished error messages. Oh the interesting people you meet handling warnings, I feel sorry for you all that I get to do it all the time. One of the characters I met invited me into the "Dead Code Society" and that's what I'm doing on Tuesdays now. No of course you haven't, it's a SECRET society.
* Revert irrefutability commits.Paul Phillips2012-03-209-134/+0
| | | | | Temporary reversion of irrefutability commits in interests of stable milestone. Expect to restore shortly.
*-. Merge remote-tracking branches 'vjovanov/duration-cleanup', ↵Paul Phillips2012-03-2029-97/+475
|\ \ | | | | | | | | | 'adriaanm/topic/virtpatmat' and 'vjovanov/actor-hierarchy' into develop
| * | [vpm] fix half of my existential troublesAdriaan Moors2012-03-201-0/+35
| | | | | | | | | | | | | | | | | | | | | no need for the clunky repackExistential pack the type of each case instead, since the skolems we've created shouldn't last beyond the case anyway this way we don't end up with fresh, incompatible, skolems for every case, but a neatly packed existential
| * | [vpm] typer synths Function{} for empty-sel matchAdriaan Moors2012-03-207-88/+200
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | typedMatchAnonFun is called from typedFunction when the function's body is a match this is work-in-progres: the compiler currently won't bootstrap under -Yvirtpatmat see also the pending test make sure to use the right context in typeFunction when the body is a Match when typer is set up for type checking a Function, the current owner is the symbol for the function, but we'll type check a Block(List(ClassDef(cd)), New(cd)) when the function is a match, and the function symbol is nowhere to be found, so go to outer context in patmatvirt: - simplified default case gen (no need for a Casegen instance) - using CASE | SYNTHETIC to detect generated matches (for switches) and avoid typing them endlessly more uniform, and necessary for new-style anon Function class instance gen for matches
| * | [vpm] TODO note: make unapply type list stricterAdriaan Moors2012-03-203-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | when an unapply returns Option[T] where T is some ProductN, does that mean the unapply returns 1 result, i.e., that T, or did it mean to return N results? to disambiguate, falling back to stricter spec-adherence, which requires T be exactly TupleN for N results for now, allow extractor result to be any product, not just tuple
| * | [vpm] test file for regression on old patmatAdriaan Moors2012-03-202-0/+9
| |/ | | | | | | it's a warning on new patmat -- TODO: dig deeper
| * Merge branch 'issue/5054-usecase-cleanup'Vlad Ureche2012-03-202-0/+54
| |\ | | | | | | | | | | | | Conflicts: test/scaladoc/scala/html/HtmlFactoryTest.scala
| | * Adapted indentation in scaladoc code blocksVlad Ureche2012-03-202-1/+55
| | | | | | | | | | | | | | | and fixed a pesky crash in the syntax highlighting caused by invalid chars (0x0E) in MarkupParser.scala.
| * | Test cases closes SI-4574.Paul Phillips2012-03-192-0/+15
| | | | | | | | | | | | Looks like I got that irrefutability bug too.
| * | Spiced up the irrefutability tests a bit.Paul Phillips2012-03-194-29/+36
| | |
| * | Discovered filter was still being generated.Paul Phillips2012-03-191-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than withFilter, for a subset of for comprehension structures. Not sure if this was somewhat by design - only seems possible because refchecks was only looking for nme.filter, not nme.withFilter, so perhaps this was intended as some secret irrefutability backchannel? Really have to document that sort of thing if it's intentional. I assumed it wasn't and unified everything.
| * | Finally did something about broken irrefutability.Paul Phillips2012-03-194-0/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The parser has always been confused about tuple patterns in for comprehensions. It thinks it can fail to recognize an irrefutable pattern and have it removed in refchecks, but it is sadly mistaken, because the unnecessary filter has a tendency to fail the compile in typer. Look more intently for irrefutable patterns and don't insert the unnecessary filter. Closes SI-5589, SI-1336.
| * | SI-5189: refined GADT soundness fixAdriaan Moors2012-03-195-9/+30
| | | | | | | | | | | | | | | extrapolate GADT skolems: only complicate types when needed make sure we only deskolemize GADT skolems after typedCase
* | | Cleaned up Duration for the standard library.Vojin Jovanovic2012-03-201-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | - Removed Timeout from the library. Each library should provide its own implementation of Timeout - Removed duration package object and replaced it with regular object - Removed usages of post Java 1.5 TimeUnit members - Added factory methods for FiniteDuration - Cleaned up some unnecessary comments - Merged duration DSL with Duration.scala file Review by: @phaller
* | Merge branch 'mar17-colorize'Paul Phillips2012-03-182-0/+726
|\ \
| * | Library for ansi color management.Paul Phillips2012-03-182-0/+726
| | | | | | | | | | | | | | | | | | | | | | | | | | | Having now experienced the unbelievable difference it makes to have one's voluminous debugging output effectively color-coded, I had to librarize the ansi codes in order to use them. This could all go in the standard library, or as soon as I can easily make use of compiler dependencies, a separate library altogether. For now it hides away in scala.tools.util.color.
* | | Added +: and :+ extractors to mirror append/prepend.Josh Suereth2012-03-162-0/+10
|/ / | | | | | | | | | | | | | | * +: does head/tail decomposition on any Seq * :+ does init/last decomposition on any Seq * Both preserve specific Seq types. Review by @odersky
* | Testing compiler asSeenFrom directly.Paul Phillips2012-03-163-1/+446
| | | | | | | | | | | | | | It's more of a "dump what it says to a file so we'll know if any of this ever changes" than a "test" per se. It could use some wheat/chaff/nonsense/sense sorting. Still, it would be great to have more stuff like this.
* | Added alternate test for SI-5545.Paul Phillips2012-03-162-0/+8
| |
| |
| \
| \
| \
| \
| \
| \
| \
| \
| \
*---------. | Merge remote-tracking branches 'VladUreche/feature/inheritdoc-clean', ↵Paul Phillips2012-03-1630-162/+491
|\ \ \ \ \ \| | | | | | | | | | | | | | | | | | | | | | 'acruise/t1118', 'hubertp/issue/5572', 'hubertp/topic/nightly-checkinit', 'axel22/feature/pc-ctrie', 'jsuereth/master-version-fixin' and 'axel22/feature/checkinit-transient' into develop
| | | | | * | Renaming Ctrie to ConcurrentTrieMap.Aleksandar Prokopec2012-03-169-67/+67
| | | | | | |
| | | * | | | Remove assert given the test. Fixes #SI-5572.Hubert Plociniczak2012-03-162-0/+34
| | | |/ / /
| | * | | | Fixed broken testsAlex Cruise2012-03-156-18/+19
| | | | | |
| | * | | | SI-1118:Alex Cruise2012-03-153-31/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use new-style deprecation annotations * Slightly less cutesy test text * Move t1118.scala to the right directory
| | * | | | SI-1118 WIPAlex Cruise2012-03-1510-22/+53
| | | | | |
| | * | | | SI-1118 WIPAlex Cruise2012-03-152-0/+0
| | | | | |
| * | | | | Merged and cleaned the 'feature/inheritdoc' branchVlad Ureche2012-03-165-57/+320
| | |/ / / | |/| | |
* | | | | Revert "More uniformity for the parser."Paul Phillips2012-03-161-12/+0
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit f987afe55e6d4f71c7e9ad10d1ca9f6120dc1132. Looks like somebody misread the grammar. Look for it to return in one of paulp's exclusive branches for today's discriminating hacker.
* | | | Finish fixing range positions.Paul Phillips2012-03-163-1/+5
| |_|/ |/| | | | | | | | At least, I think so.
* | | More uniformity for the parser.Paul Phillips2012-03-161-0/+12
| | | | | | | | | | | | | | | Type application and operator notation could not formerly be mixed. Now they can, as the grammar has always suggested.
* | | New option -Ypos-debug, and fixed range position breakage.Paul Phillips2012-03-152-0/+2
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (Looks like there is more range position breakage yet, but this gets the outermost layer.) Channeling my struggles into a slightly easier future. % scalac -Ypos-debug -d /tmp ./src/library/scala/Predef.scala ./src/library/scala/Predef.scala:222: warning: Positioned tree has unpositioned child in phase extmethods def x = __resultOfEnsuring ^ parent: #7109 line 222 Select // (value __resultOfEnsuring in class Ensuring) child: #7108 Ident // (value $this) ./src/library/scala/Predef.scala:258: warning: Positioned tree has unpositioned child in phase extmethods def x = __leftOfArrow ^ parent: #7280 line 258 Select // (value __leftOfArrow in class ArrowAssoc) child: #7279 Ident // (value $this) two warnings found Or try this to really see some output: % scalac -Yrangepos -Ypos-debug
* | Whitespace and a couple checkfile updates.Paul Phillips2012-03-144-30/+30
| |
* | The rest of the inline classes.Paul Phillips2012-03-141-1/+1
| | | | | | | | | | | | | | | | | | Have you often thought that programming is just like the movie 'Hackers', only with less rollerblading? Now that we have @inline skates, that last caveat can be retired. It's just like the movie 'Hackers'. Signed-off-by: Zero Cool
* | Merge remote-tracking branch 'odersky/topic/inline' into merge-inlinePaul Phillips2012-03-1447-95/+496
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: lib/scala-compiler.jar.desired.sha1 lib/scala-library-src.jar.desired.sha1 lib/scala-library.jar.desired.sha1 src/compiler/scala/reflect/internal/Definitions.scala src/compiler/scala/reflect/internal/Symbols.scala src/compiler/scala/tools/nsc/Global.scala src/compiler/scala/tools/nsc/transform/Constructors.scala src/compiler/scala/tools/nsc/transform/Erasure.scala src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala src/compiler/scala/tools/nsc/typechecker/Contexts.scala src/compiler/scala/tools/nsc/typechecker/RefChecks.scala src/compiler/scala/tools/nsc/typechecker/SyntheticMethods.scala src/library/scala/Function0.scala src/library/scala/Function1.scala src/library/scala/Function10.scala src/library/scala/Function11.scala src/library/scala/Function12.scala src/library/scala/Function13.scala src/library/scala/Function14.scala src/library/scala/Function15.scala src/library/scala/Function16.scala src/library/scala/Function17.scala src/library/scala/Function18.scala src/library/scala/Function19.scala src/library/scala/Function2.scala src/library/scala/Function20.scala src/library/scala/Function21.scala src/library/scala/Function22.scala src/library/scala/Function3.scala src/library/scala/Function4.scala src/library/scala/Function5.scala src/library/scala/Function6.scala src/library/scala/Function7.scala src/library/scala/Function8.scala src/library/scala/Function9.scala test/files/codelib/code.jar.desired.sha1 test/files/neg/anyval-children-2.check test/files/run/programmatic-main.check
| * | Allows case classes as value classesMartin Odersky2012-03-073-1/+121
| | |
| * | Fixes to value classes: Flags now double definitions, private constructors ↵Martin Odersky2012-03-065-17/+54
| | | | | | | | | | | | as errors. Fixed erasure scheme.
| * | Added check that primary constructor of a value class must be public.Martin Odersky2012-03-051-0/+6
| | |
| * | new and updated test cases for value classes.Martin Odersky2012-03-054-2/+39
| | |
| * | Compiler now ready to accept value classes in standard library. Time for a ↵Martin Odersky2012-02-222-5/+2
| | | | | | | | | | | | new STARR!
| * | Updatwd check file.Martin Odersky2012-02-221-2/+2
| | |
| * | Implemented super access in value classes, restrictions for value classes.Martin Odersky2012-02-196-34/+132
| | |
| * | New FlatArray scheme for handling value classes.Martin Odersky2012-02-171-12/+21
| | |
| * | Trying generic value classes. Does not work yet, but fixed on bug already.Martin Odersky2012-02-151-0/+12
| | |
| * | Updated check file.Martin Odersky2012-02-151-0/+11
| | |
| * | New scheme for "Rows" of value classes.Martin Odersky2012-02-151-28/+12
| | |