summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* several fixes to scala.concurrent.util.DurationRoland2012-09-053-24/+141
| | | | | | | | | | | - add test cases (migrated from Akka sources) - add overflow checking (will throw IllegalArgumentException instead of giving wrong results) - make string parsing more precise when giving >100days in nanoseconds - make method signatures more precise in retaining FiniteDuration throughout calculations - fix mul/div of infinities by negative number - add Ordering for Deadline (was accidentally left out earlier)
* Removing duplication from Duration.Paul Phillips2012-09-042-0/+400
| | | | | | | | | | | | | | | | | | | | | | | | | | | I don't know what good it is to have code review if we are checking in code like this. We must raise the bar, people. When the justification for code being in the standard library is borderline at best - as it is here - then the code must be of exceptional quality. This code is not of exceptional quality. Mostly these are not behavioral changes, but: - I removed finite_? as it is a gratuitous deviation from every isXXX method in the world. This isn't ruby. - I removed all the regexps, which only made things complicated - I removed all the unnecessary casts, which is to say, all of them - I made more things final, sealed, and private - The unapply structure was all wrong; returning Option[Duration] on the string unapply meant you'd have to say case Duration(Duration(x, y)) => ... So I fixed apply and unapply to be symmetric. - And I removed the "parse" method, since it was doing what apply is supposed to do. There's a test case to exercise accessing it from java, which also reveals what I hope are bugs. Thanks to viktor klang for DurationConversions.
* Merge pull request #1251 from dragos/issue/fix-5064Paul Phillips2012-09-042-0/+48
|\ | | | | Fixed positions in de-aliased special symbols..
| * Fixed positions in de-aliased special symbols and for automatically added ↵Iulian Dragos2012-09-042-0/+48
| | | | | | | | | | `apply` methods. Fixed #5064, thanks to @paulp who showed the right direction (and how to test it).
* | Merge pull request #1245 from dragos/issue/fix-6312Josh Suereth2012-09-042-0/+24
|\ \ | | | | | | Allow nested calls to `askForResponse` in the presentation compiler.
| * | Allow nested calls to `askForResponse` in the presentation compiler.Iulian Dragos2012-09-042-0/+24
| |/ | | | | | | | | Fix #6312. review by @odersky,@lrytz.
* | Merge pull request #1246 from lrytz/t6274Paul Phillips2012-09-041-0/+13
|\ \ | | | | | | SI-6274 Fix owners when eta-expanding function with byName param
| * | SI-6274 Fix owners when eta-expanding function with byName paramLukas Rytz2012-09-041-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When eta-expanding a function that takes a by-name param the local definition for the corresponding argument is a function-0 val eta$1 = () => { argument-to-by-name } If there are any definitinos in the `argument-to-by-name`, the symbol owner needs to be changed to the anonymous function's symbol. To know the function symbol in eta expand, we need to type-check the function, and therefore pass the `Typer` instance to `etaExpand`.
* | | Merge pull request #1217 from axel22/issue/6294Paul Phillips2012-09-041-0/+14
|\ \ \ | |/ / |/| | Fix SI-6294.
| * | Fix SI-6294.Aleksandar Prokopec2012-08-301-0/+14
| | |
* | | Made Dynamic extend Any.Paul Phillips2012-09-032-0/+26
| |/ |/| | | | | So it can be used in value classes.
* | Merge pull request #1202 from scalamacros/topic/reflectionPaul Phillips2012-09-024-5/+5
|\ \ | | | | | | further polishing of reflection
| * | definitive way to learn if a symbol is a val/varEugene Burmako2012-08-274-5/+5
| |/ | | | | | | | | I think `isVal` and `isVar` are the right names, because they exactly map on Scala syntax.
* | Merge pull request #1231 from paulp/issue/6273Josh Suereth2012-09-023-1/+31
|\ \ | | | | | | Fix for SI-6273, repl string interpolation.
| * | Fix for SI-6273, repl string interpolation.Paul Phillips2012-09-013-1/+31
| | | | | | | | | | | | | | | | | | As usual the hard part is tracing through all the needless abstraction. Begone, 25 layers of parsing error issuing methods!
* | | Better errors for Any/AnyRef issues.Paul Phillips2012-09-0112-107/+205
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an error occurs because some type does not conform to AnyRef (and an AnyRef-derived type would have sufficed) try to say something useful about the situation. This commit also initializes scope members before printing error messages because the + version seems more useful than the - version (taken from one of the checkfile diffs.) - def <init>: <?> - def methodIntIntInt: <?> + def <init>(): X + def methodIntIntInt(x: scala.Int,y: scala.Int): scala.Int
* | | Fix for SI-6263, futile adaptation.Paul Phillips2012-09-012-0/+12
| | | | | | | | | | | | | | | | | | Don't try to implicitly convert an unstable prefix to a stable one by applying a view. As the matrix spoon kid says, "that's impossible."
* | | Suppressed 'possible cause' mis-warning.Paul Phillips2012-09-014-2/+13
|/ / | | | | | | | | I have seen this warning a bunch of times and it has not yet been close to right.
* | Merge pull request #1227 from paulp/issue/6034Paul Phillips2012-09-011-0/+1
|\ \ | | | | | | Fix for SI-6034, covariant value classes.
| * | Fix for SI-6034, covariant value classes.Paul Phillips2012-08-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | My summary in the ticket was incorrect. The problem was that the class type parameters were being cloned for the method and being allowed to keep their variance. I threw in an assertion for anyone attempting to create a method type with variant type parameters, because hey, why should we allow such madness.
* | | Merge pull request #1201 from axel22/issue/4581Josh Suereth2012-09-015-4/+42
|\ \ \ | | | | | | | | Fix SI-4581.
| * | | Fix SI-4581.Aleksandar Prokopec2012-08-275-4/+42
| | |/ | |/| | | | | | | | | | | | | | | | Specifically, the final flag on the generated static field is no longer ommitted. Fix 2 failing test-cases.
* | | Merge pull request #1225 from jsuereth/fix/si-6290Josh Suereth2012-09-011-0/+4
|\ \ \ | | | | | | | | Fixes SI-6290 by creating real instnaces of language features.
| * | | Fixes SI-6290 by creating real instnaces of language features.Josh Suereth2012-08-311-0/+4
| | | |
* | | | More useful -Xlog-implicits output.Jason Zaugg2012-09-013-0/+25
| |_|/ |/| | | | | | | | | | | The test exercises the most important case, when implicits are invalidated through shadowing. (See SI-4270)
* | | Merge pull request #1213 from paulp/topic/anyvalJosh Suereth2012-08-305-17/+7
|\ \ \ | | | | | | | | Expanded the reach of value classes.
| * | | Expanded the reach of value classes.Paul Phillips2012-08-295-17/+7
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now extending AnyVal: - RichInt, RichDouble, etc. - ArrayOps.ofRef, ofBoolean, etc - StringAdd - StringFormat The rest of it is the changes necessary to enable those.
* | | Merge pull request #1160 from rklaehn/SI-6220Josh Suereth2012-08-301-0/+92
|\ \ \ | | | | | | | | Si 6220
| * | | Added test that should cover all code paths of the changes done in SI-6220Ruediger Klaehn2012-08-181-0/+92
| | | | | | | | | | | | | | | | This test will pass even with an older version of the scala library, since as mentioned this is just a performance improvement.
* | | | Merge pull request #1169 from rklaehn/SI-6261Josh Suereth2012-08-301-0/+130
|\ \ \ \ | | | | | | | | | | Si 6261
| * | | | Added test to ensure that ListMap.tail is O(1)Ruediger Klaehn2012-08-251-0/+7
| | | | |
| * | | | Extended test to also check proper handling of collisionsRuediger Klaehn2012-08-211-0/+91
| | | | |
| * | | | Added test that tests that correct classes are being created when removing ↵Ruediger Klaehn2012-08-211-0/+32
| | | | | | | | | | | | | | | | | | | | elements
* | | | | Merge pull request #1209 from odersky/ticket/6227Josh Suereth2012-08-303-2/+10
|\ \ \ \ \ | | | | | | | | | | | | Closes SI-6227
| * | | | | Added/fixed test files for SI-6227Martin Odersky2012-08-292-2/+4
| | | | | |
| * | | | | Closes SI-6227Martin Odersky2012-08-291-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | I added some general hook where one can add validation code before a name conflict involving at least one implicit symbol is reported.
* | | | | | Fixed cloning a double-linked list.Josh Suereth2012-08-291-0/+18
| |_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Still need to determine if this is a systemic issue and needs to be addressed higher in the linked list hierarchy. For now, just fixing the reported bug, with a note here for other maintainers.
* | | | | Merge pull request #1197 from scalamacros/topic/kindEugene Burmako2012-08-293-10/+10
|\ \ \ \ \ | | | | | | | | | | | | removes Symbol.kind and Type.kind
| * | | | | removes Symbol.kind and Type.kindEugene Burmako2012-08-263-10/+10
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | use Universe.showRaw instead: scala> import scala.reflect.runtime.{universe => ru} import scala.reflect.runtime.{universe=>ru} scala> ru.showRaw(typeOf[Int]) res0: String = TypeRef(ThisType(scala), scala.Int, List()) scala> ru.showRaw(typeOf[Int].typeSymbol, printKinds = true) res1: String = scala.Int#CLS
* | | | | Merge pull request #1184 from pavelpavlov/partialfunGrzegorz Kossakowski2012-08-292-0/+92
|\ \ \ \ \ | | | | | | | | | | | | PartialFunction polishing
| * | | | | PartialFunction polishingPavel Pavlov2012-08-232-0/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - ScalaDocs added - TODOs fixed - controversive method `run` deleted - not used class runtime.AbstractTotalFunction removed - small corrections & fixes - tests for `orElse` & `runWith`
* | | | | | Merge pull request #1206 from paulp/issue/6283Grzegorz Kossakowski2012-08-292-0/+5
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix for SI-6283, no abstract value classes.
| * | | | | | Fix for SI-6283, no abstract value classes.Paul Phillips2012-08-282-0/+5
| | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The needless abstraction penalty was in full flower in Namers. I managed to find somewhere else to issue this error, where I can still just write an error message without tracking down an enumeration in a separate file and inventing an intermediate name for the enum member.
* | | | | | Merge pull request #1195 from Blaisorblade/topic/test-tryGrzegorz Kossakowski2012-08-291-1/+13
|\ \ \ \ \ \ | |/ / / / / |/| | | | | Add missing tests for SI-6190
| * | | | | Add missing tests for SI-6190Paolo Giarrusso2012-08-251-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was silently fixed in commit 3cb0e784a05db7d0b542cec9bf4c5fbf3772a6cf but no test was added.
* | | | | | Merge pull request #1188 from retronym/ticket/6272Josh Suereth2012-08-282-0/+72
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-6272 Support lazy vals defined in try in template.
| * | | | | | SI-6272 Support lazy vals defined in try in template.Jason Zaugg2012-08-242-0/+72
| |/ / / / /
* | | | | | Merge pull request #1185 from paulp/210-updateConservePaul Phillips2012-08-281-12/+15
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | Eliminated a metric ton of allocations.
| * | | | | Eliminated a metric ton of allocations.Paul Phillips2012-08-231-12/+15
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Thanks to the hotspot DTrace probes. I'm not sure why this checkfile changed, but hopefully it's innocuous. Review by @VladUreche for the checkfile and @gkossakowski so he can tell me how much faster.
* | | | | SI-6281 macroArgs for defs with implicit argsEugene Burmako2012-08-254-0/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | macroArgs now correctly calculates the argss in case when a macro def has implicit parameters. Macro impls can never have implicit parameters other than type tag evidences, so tags will always come in a separate parameter list w.r.t other parameters of macro impls (which are in 1-to-1 correspondence with the parameters of macro defs). Example 1: def w/o implicits: (params1)...(paramsN) impl w/o tags: (params1')...(paramsN') Example 2: def w/o implicits: (params1)...(paramsN) impl w tags: (params1')...(paramsN')(implicit tags) Example 3: def w implicits: (params1)...(paramsN)(implicit paramsN+1) impl w/o tags: (params1')...(paramsN')(paramsN+1') Note: paramsN+1' is not an implicit parameter list because impls cannot have implicit parameters other than tags Example 4: def w implicits: (params1)...(paramsN)(implicit paramsN+1) impl w tags: (params1')...(paramsN')(paramsN+1')(implicit tags) Therefore we don't need to merge the argss.last (that correspond to implicit parameters of macro defs) with tags, as it was incorrectly coded before. We just need to append tags to argss.