summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Avoid spurious warning for `def foo = x.foo`.Jason Zaugg2012-09-112-6/+27
| | | | Followup to SI-6276.
* Merge pull request #1279 from rkuhn/fix-duration-usageJosh Suereth2012-09-111-1/+28
|\ | | | | fix usage of Duration in Promise impl
| * improve docs and Promise implRoland2012-09-111-8/+1
| | | | | | | | | | | | | | - scaladoc the exceptions thrown by Await.* and Awaitable.* - move intercept[Exception] into partest’s TestUtil object - improve Promise.tryAwait implementation following Viktor’s comments and make use of Deadline to avoid calling System.nanoTime too often
| * fix usage of Duration in Promise implRoland2012-09-101-0/+34
| | | | | | | | | | | | | | | | | | - correctly treat MinusInf and Undefined - don't toMillis in the timeout message (could be MinusInf) - also notice that Inf did not actually wait unbounded - and further notice that tryAwait swallows InterruptedException instead of bailing out early => changed to do so and added throws annotation - also removed some unused imports of Duration
* | Merge pull request #1286 from paulp/topic/inliner-loggingJosh Suereth2012-09-111-6/+6
|\ \ | | | | | | Topic/inliner logging
| * \ Merge branch '2.10.x' into topic/inliner-loggingPaul Phillips2012-09-1179-160/+1365
| |\ \ | | | | | | | | | | | | | | | | Conflicts: src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
| * | | Large logging cleanup effort.Paul Phillips2012-09-011-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Quieted down many logging statements which contribute disproportionate noise. Made others emit something more sensible. Spent lots of time on the inliner trying to find a regular format to make the logs more readable. Long way to go here but it'd be so worth it to have readable logs instead of mind-numbing indiscriminate text dumps.
* | | | Merge pull request #1287 from lrytz/disable-t2868Josh Suereth2012-09-115-0/+0
|\ \ \ \ | | | | | | | | | | Disable test t2868
| * | | | Disable test t2868Lukas Rytz2012-09-115-0/+0
| | |/ / | |/| | | | | | | | | | it keeps failing randomly, e.g. http://scala-webapps.epfl.ch/artifacts/e3b0c7abbf637dacce7bcd7b69d5655820e8e714/buildLog.txt
* | | | Merge pull request #1262 from jsuereth/fix/SI-6271Josh Suereth2012-09-111-0/+32
|\ \ \ \ | |/ / / |/| | | Fixes SI-6271 - Missing isEmpty override for views.
| * | | Fixes SI-6271 - Missing isEmpty override for views.Josh Suereth2012-09-061-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | GenIterableView didn't override isEmpty for views to look at *filtered* iterator, but was instead pulling unfiltered iterator and causing issues. Chalk up another bizzare bug to lack of insight/visibility into linearization and what havoc overriding new methods can spew on our library.
* | | | Merge pull request #1274 from retronym/ticket/6335Grzegorz Kossakowski2012-09-113-0/+41
|\ \ \ \ | | | | | | | | | | SI-6335 More precise location of the implicit class synthetic method.
| * | | | More tests for SI-6335.Jason Zaugg2012-09-093-1/+31
| | | | |
| * | | | SI-6335 More precise location of the implicit class synthetic method.Jason Zaugg2012-09-091-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One approach would be to disallow an implicit class in a template that already has a member with the same name. But this commit doesn't do this; instead it uses `isSynthetic` to find the synthesized implicit conversion method from the potentially overloaded alternatives.
* | | | | Merge pull request #1284 from retronym/topic/deprecated-inheritanceGrzegorz Kossakowski2012-09-116-0/+55
|\ \ \ \ \ | | | | | | | | | | | | SI-6162 Adds private[scala] @deprecatedInheritance/@deprecatedOverriding
| * | | | | Rescues @deprecated{Inheritance, Overriding}Jason Zaugg2012-09-114-6/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While they ought to be generalized to aribirary modifier changes before being offered in the standard library, the opportunity to use them in 2.10 is too important to pass up. So for now, they're private[scala]. En route: - made the error messages more concise - fix positioning of inheritance error - improve test coverage
| * | | | | SI-6162 Adds @deprecatedInheritance/@deprecatedOverridingSimon Ochsenreither2012-09-106-0/+22
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These annotations are meant to warn from inheriting a class or from overriding a member, due to the reasons given in `msg`. The naming and placement of the methods is in line with @deprecated and @deprecatedName.
* | | | | Merge pull request #1275 from retronym/ticket/6276Grzegorz Kossakowski2012-09-115-2/+45
|\ \ \ \ \ | | | | | | | | | | | | SI-6276 Warn on def or val that trivially loops infinitely
| * | | | | SI-6276 Warn on def or val that trivially loops infinitelyJason Zaugg2012-09-095-2/+45
| |/ / / /
* | | | | Merge pull request #1270 from paulp/issue/6327Josh Suereth2012-09-102-0/+26
|\ \ \ \ \ | | | | | | | | | | | | Fix for SI-6327, wrongness in Dynamic.
| * | | | | Fix for SI-6327, wrongness in Dynamic.Paul Phillips2012-09-082-0/+26
| | |_|_|/ | |/| | |
* | | | | Merge pull request #1269 from jsuereth/wip/si-6333Josh Suereth2012-09-101-0/+29
|\ \ \ \ \ | | | | | | | | | | | | Wip/si 6333
| * | | | | Fix for SI-6333 - Try throws from combinators.Josh Suereth2012-09-071-0/+29
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | * Added more comprehensive tests to Try. * Delineated what methods do and don't catch exceptions in docs. * Fixed combinator methods that should catch exceptions.
* | | | | Merge pull request #1277 from som-snytt/issue-2.10/6278-inline-class-synth-defJosh Suereth2012-09-101-0/+30
|\ \ \ \ \ | | | | | | | | | | | | SI-6278 fixed: synthetic implicit def must sort with its associated impl...
| * | | | | SI-6278 fixed: synthetic implicit def must sort with its associated implicit ↵Som Snytt2012-09-091-0/+30
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | class Add a case to the ad-hoc (or add-hack) addSynthetics to keep the trees close. This relies on naming convention, so changes in naming of the implicit def would require an update here.
* / / / / Makes getClass of a value class work.Martin Odersky2012-09-082-0/+12
|/ / / /
* | | | Merge pull request #1265 from scalamacros/ticket/6318Josh Suereth2012-09-064-0/+125
|\ \ \ \ | | | | | | | | | | SI-6318 fixes ClassTag.unapply for primitives
| * | | | SI-6318 fixes ClassTag.unapply for primitivesEugene Burmako2012-09-064-0/+125
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ClassTag.unapply now has overloads for primitive value classes so that it can preserve boxiness when performing subtyping tests. First I wanted to annotate ClassTag.unapply with a ClassTag itself, i.e. to transform its signature from "def unapply(x: Any): Option[T]" to "def unapply[U: ClassTag](x: U): Option[T]". But then virtpatmat_typetag.scala exhibited a nasty problem. When pattern matching with this unapply, patmat first infers U as something and then tries to pattern match against this inferred type. And if U gets inferred as an abstract type itself, bad things happen: warning: The outer reference in this type test cannot be checked at run time. That's why I decided to drop the ClassTag idea and go with 9 extra overloads. Not very beautiful, but definitely robust.
* | | | Merge pull request #1267 from scalamacros/ticket/6246Eugene Burmako2012-09-0610-38/+154
|\ \ \ \ | | | | | | | | | | fixes for class tags and manifests
| * | | | fixes Manifest.Nothing and Manifest.NullEugene Burmako2012-09-068-38/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also introduces an important change to Manifest.Nothing and Manifest.Null. Previously their `erasure` was equal to classOf[Object]. Now it's correctly set to classOf[scala.runtime.Nothing$] and classOf[scala.runtime.Null$] correspondingly. See a discussion here: https://groups.google.com/forum/#!topic/scala-internals/Y0ALGo7QPqE
| * | | | SI-6246 deprecated apis for core class tagsEugene Burmako2012-09-062-0/+116
| | | | | | | | | | | | | | | | | | | | | | | | | Aliases ClassTag.XXX to Manifest.XXX to reuse already existing implementations of deprecated APIs.
* | | | | Merge pull request #1168 from retronym/ticket/6258-2Josh Suereth2012-09-062-0/+41
|\ \ \ \ \ | |/ / / / |/| | | | SI-6258 Reject partial funs with undefined param types
| * | | | SI-6258 Reject partial funs with undefined param typesJason Zaugg2012-08-232-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This regressed with virtpatmat. With -Xoldpatmat, pattern matching anonymous functions with an expected type of PartialFunction[A, B] are translated to a Function tree, and typed by typedFunction, which issues an error of the parameter types are not fully defined. This commit adds the same check to MatchFunTyper. It doesn't plug the hole in RefChecks#validateVariance (which is reminiscent of SI-3577.) Seems to me that in general one should handle: a) both BoundedWildcardType and WildcardType when in a place that can be called during inference, or b) neither otherwise
* | | | | Merge pull request #1266 from scalamacros/topic/removes-isconcreteEugene Burmako2012-09-066-6/+6
|\ \ \ \ \ | | | | | | | | | | | | removes Type.isConcrete
| * | | | | removes Type.isConcreteEugene Burmako2012-09-066-6/+6
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This method was no longer used anywhere, except for a place where it wasn't really necessary. Its implementation is non-trivial, and I have doubts about it, so I propose to remove it altogether instead of living with some dubious code necessary for some dubious matter.
* / | | | More fix for invalid companions.Paul Phillips2012-09-054-3/+14
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eliminated InvalidCompanions exception entirely. Anyone's guess why we unholstered this exception every time someone calls "isCodefinedWith" rather than when symbols are created. I moved the check into Namers, where it can be done once and with sufficient finesse not to crash so much. With this patch in place, "playbench" can be built with java7.
* | | | 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!