summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #1278 from soc/remove-scalaruntime-tryJosh Suereth2012-09-101-29/+0
|\ | | | | SI-6345 Remove scala.runtime.ScalaRunTime.Try
| * SI-6345 Remove scala.runtime.ScalaRunTime.TrySimon Ochsenreither2012-09-101-29/+0
| |
* | Merge pull request #1276 from odersky/tickets/valueclassesJosh Suereth2012-09-104-2/+17
|\ \ | |/ |/| SI-6326. Makes getClass of a value class work.
| * Makes getClass of a value class work.Martin Odersky2012-09-084-2/+17
|/
* Merge pull request #1265 from scalamacros/ticket/6318Josh Suereth2012-09-065-1/+145
|\ | | | | SI-6318 fixes ClassTag.unapply for primitives
| * SI-6318 fixes ClassTag.unapply for primitivesEugene Burmako2012-09-065-1/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 #1268 from scalamacros/topic/removes-islocatableJosh Suereth2012-09-062-13/+10
|\ \ | | | | | | removes isLocatable from the public API
| * | removes isLocatable from the public APIEugene Burmako2012-09-062-13/+10
| | | | | | | | | | | | | | | | | | Hard to come up with a good name, would need extensive documentation to justify its purpose => no go. If necessary we can always reintroduce it later in 2.10.1.
* | | Merge pull request #1267 from scalamacros/ticket/6246Eugene Burmako2012-09-0612-62/+192
|\ \ \ | | | | | | | | fixes for class tags and manifests
| * | | fixes Manifest.Nothing and Manifest.NullEugene Burmako2012-09-0610-44/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-064-23/+148
| |/ / | | | | | | | | | | | | 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-063-1/+42
|\ \ \ | |/ / |/| | SI-6258 Reject partial funs with undefined param types
| * | SI-6258 Reject partial funs with undefined param typesJason Zaugg2012-08-233-1/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-068-26/+7
|\ \ \ | | | | | | | | removes Type.isConcrete
| * | | removes Type.isConcreteEugene Burmako2012-09-068-26/+7
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge pull request #1260 from jsuereth/issue/5031Josh Suereth2012-09-068-49/+69
|\ \ \ | |/ / |/| | Issue/5031
| * | More fix for invalid companions.Paul Phillips2012-09-057-47/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | Sort files to see if we get reproducible testing results across linux/macJosh Suereth2012-09-051-2/+2
|/ /
* | Merge pull request #1253 from paulp/topic/fix-durationPaul Phillips2012-09-043-328/+578
|\ \ | | | | | | Removing duplication from Duration.
| * | Removing duplication from Duration.Paul Phillips2012-09-043-328/+578
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-043-2/+50
|\ \ | | | | | | Fixed positions in de-aliased special symbols..
| * | Fixed positions in de-aliased special symbols and for automatically added ↵Iulian Dragos2012-09-043-2/+50
| | | | | | | | | | | | | | | `apply` methods. Fixed #5064, thanks to @paulp who showed the right direction (and how to test it).
* | | Merge pull request #1219 from odersky/topic/worksheet-instrumenterJosh Suereth2012-09-046-211/+51
|\ \ \ | | | | | | | | More worksheet nstrumentation changes
| * | | Removed previosuly uncommented code, added more diagnosis output to REPL.Martin Odersky2012-08-301-45/+1
| | | |
| * | | Made instrumenter more robust by looking at tokensMartin Odersky2012-08-302-18/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Made instrumenter more robust by taking into account the positions of the tokens in the source. This allows us to reliably put instrumentation code at the end of the previous token, which tends to put it at end of lines. Furthermore, we now skip left parents. Previously, the instrumenter got confused for a statement like ( x + 1 ) because it thought that the statement started at the `x` and not at the `(`. Another small change is that we now use decoded names in the worksheet. So ??? will show as ??? not $qmark$qmark$qmark.
| * | | Removed dead code.Martin Odersky2012-08-303-149/+0
| | | |
| * | | Two fixes for the worksheet instrumenterMartin Odersky2012-08-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (1) Handle empty worksheets (2) Handle for expressions Review by @dragos
* | | | Merge pull request #1244 from dgruntz/2.10.xJosh Suereth2012-09-041-4/+4
|\ \ \ \ | | | | | | | | | | Fixes typos in the ScalaDoc of StringContext
| * | | | Fixes typos in the ScalaDoc of StringContextDominik Gruntz2012-09-041-4/+4
| | | | |
* | | | | Merge pull request #1245 from dragos/issue/fix-6312Josh Suereth2012-09-043-5/+35
|\ \ \ \ \ | | | | | | | | | | | | Allow nested calls to `askForResponse` in the presentation compiler.
| * | | | | Allow nested calls to `askForResponse` in the presentation compiler.Iulian Dragos2012-09-043-5/+35
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | Fix #6312. review by @odersky,@lrytz.
* | | | | Merge pull request #1248 from jsuereth/fix/SI-6285Josh Suereth2012-09-041-1/+1
|\ \ \ \ \ | | | | | | | | | | | | Fixes SI-6285 - ParIterableLike no longer says sequential foreach.
| * | | | | Fixes SI-6285 - ParIterableLike no longer says sequential foreach.Josh Suereth2012-09-041-1/+1
| | | | | |
* | | | | | Merge pull request #1246 from lrytz/t6274Paul Phillips2012-09-043-3/+20
|\ \ \ \ \ \ | |/ / / / / |/| | | | | SI-6274 Fix owners when eta-expanding function with byName param
| * | | | | SI-6274 Fix owners when eta-expanding function with byName paramLukas Rytz2012-09-043-3/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-042-2/+19
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix SI-6294.
| * | | | | | Fix SI-6294.Aleksandar Prokopec2012-08-302-2/+19
| | | | | | |
* | | | | | | Merge pull request #1192 from jsuereth/deprecate/low-hangingPaul Phillips2012-09-047-0/+7
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | Deprecate unmaintained/old classes for removal in 2.11
| * | | | | | Deprecate unmaintained/old classes for removal in 2.11Josh Suereth2012-08-247-0/+7
| | | | | | |
* | | | | | | Merge pull request #1242 from paulp/topic/dynamic-anyvalJosh Suereth2012-09-033-5/+31
|\ \ \ \ \ \ \ | |_|_|/ / / / |/| | | | | | Made Dynamic extend Any.
| * | | | | | Made Dynamic extend Any.Paul Phillips2012-09-033-5/+31
|/ / / / / / | | | | | | | | | | | | | | | | | | So it can be used in value classes.
* | | | | | Merge pull request #1235 from paulp/topic/beautify-typedPaul Phillips2012-09-021-140/+51
|\ \ \ \ \ \ | | | | | | | | | | | | | | Formatting cleanup in def typed.
| * | | | | | Formatting cleanup in def typed.Paul Phillips2012-09-011-140/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | As seen on scala-internals.
* | | | | | | Merge pull request #1202 from scalamacros/topic/reflectionPaul Phillips2012-09-0217-53/+68
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | further polishing of reflection
| * | | | | | | definitive way to learn if a symbol is a val/varEugene Burmako2012-08-276-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I think `isVal` and `isVar` are the right names, because they exactly map on Scala syntax.
| * | | | | | | Exposes Symbol.sourceModuleEugene Burmako2012-08-272-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As discussed, this is not the best API to expose, because this is an implementation detail that might change. However the ship has sailed. We're already imposing the moduleClass <-> sourceModule quirk to the users of our API: Evidence: http://stackoverflow.com/questions/12128783. There are reflection tasks that cannot be pulled without the knowledge of this implementation detail, so we shouldn't pretend that we can change it on a whim and not break anything. Hence I propose to add sourceModule to the public contract and bear the potential consequences.
| * | | | | | | rehash of source file information for SymbolEugene Burmako2012-08-272-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Symbol.pos is moved to macros.Universe, because it's empty at runtime. Also added Symbol.associatedFile, because it has valid usages during runtime. When reflecting one might want to get to a classfile of the symbol and then analyze it to e.g. decompile the bytecode or find out the associated src file.
| * | | | | | | removes AbstractFileApiEugene Burmako2012-08-279-39/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | no longer necessary, since scala.tools.nsc.io.AbstractFile has been long moved to scala-reflect.jar
| * | | | | | | Exposes ToolBox.classLoaderEugene Burmako2012-08-272-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By giving ToolBox.mirror the correct type and constructing the underlying mirror from a proper classloader, we improve user experience w.r.t runtime code generation. Direct motivator: http://stackoverflow.com/questions/12122939, in which instances of a toolbox-generated class are accessed with Scala reflection.
| * | | | | | | exposes MethodSymbol.isPrimaryConstructorEugene Burmako2012-08-271-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Doesn't seem to be inferrable from the API we expose right now