summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | | Merge pull request #3625 from retronym/ticket/8403Adriaan Moors2014-03-142-2/+13
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | SI-8403 Fix regression in name binding with imports in templates
| * | | | | | | | SI-8403 Fix regression in name binding with imports in templatesJason Zaugg2014-03-132-2/+13
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Regressed in dbd8457 which changed `Context#make` to automatically include the imports from the given `Tree` if it was an `Import` tree, rather than requiring callers to call `makeNewImport`. However, this turns out to double up the imports for the "inner" namer of a template that starts with imports. The inner namer has a new scope, but the same owner and tree as its parent. This commit detects this case by seeing if the `Import` tree used to consruct the child context is the same as the parent context. If that is the case, we don't augment `Context#imports`.
* | | | | | | | Merge pull request #3627 from retronym/ticket/8407Grzegorz Kossakowski2014-03-133-1/+25
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | | SI-8407 "symbol not found" in Scaladoc use cases: warning only
| * | | | | | | SI-8407 "symbol not found" in Scaladoc use cases: warning onlyJason Zaugg2014-03-133-1/+25
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The refactoring in aedec1980 mistakenly used the non-silent typer to typecheck the use cases. It temptingly had the desired type (`ScalaDocAnalyzer`), but sadly the wrong properties (it will report errors, rather than buffer.) This meant that "symbol not found" errors in use cases would prevent Scaladoc generation. This commit introduces a little downcast on the silent typer. A more principled approach would be to go through the rigmarole of the virtual class pattern for `Analzyer.Typer`, but that will have to remain work for another day.
* | | | | | | Merge pull request #3622 from retronym/ticket/8395Adriaan Moors2014-03-122-4/+13
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-8395 Regression in pattern matching with nested binds
| * | | | | | | SI-8395 Regression in pattern matching with nested bindsJason Zaugg2014-03-122-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Regressed in https://github.com/scala/scala/pull/2848. In particular, see 0cf47bdb5b and 017460e63c. Because of the regression, this pattern: (s @ (_s @ (_: String))) was translated into `typeTestStep`, rather than a `bindingStep`. This came down the the use of `unbind` in the `TypeBound` extractor. My first step was to remove the `unbind`. That led to another problem: the tree now matches `SymbolAndTypeBound`, which extracted `symbol = s, tpe = String`, ignoring the `_s`. I changed that extractor to no longer recursively apply to the sub-pattern tree, which is what `MaybeTypedBound` used to do. I also checked for other uses of `unbind` in the match translation. The only place I found it is in `BoundTree#pt`. I believe that this usage is correct, or at least, not obviously incorrect.
* | | | | | | | Merge pull request #3615 from retronym/ticket/8376Adriaan Moors2014-03-127-2/+41
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | | SI-8376 Fix overload resolution with Java varargs
| * | | | | | | SI-8376 Better type printing for Java varargsJason Zaugg2014-03-104-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `T*` rather than `<repeated>[T]`, as we alreday do for Scala repeated parameters.
| * | | | | | | SI-8376 Fix overload resolution with Java varargsJason Zaugg2014-03-103-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When comparing specificity of two vararg `MethodTypes`, `isAsSpecific` gets to: ``` case mt @ MethodType(_, _) if bothAreVarargs => checkIsApplicable(mt.paramTypes mapConserve repeatedToSingle) ``` The formal parameter type of a Java varargs parameter is represented as `tq"${defintions.JavaRepeatedParamClass}[$elemTp]"`. For a Scala repeated parameter, we instead use `defintions.RepeatedParamClass`. `bothAreVarargs` detects `JavaRepeatedParamClass`, by virtue of: ``` def isRepeatedParamType(tp: Type) = isScalaRepeatedParamType(tp) || isJavaRepeatedParamType(tp) ``` But, `repeatedToSingle` only considers `RepeatedParamClass`. This bug was ostensibly masked in 2.10.3, but became apparent after a not-quite-refactoring in 0fe56b9770. It would be good to pin that change down to a particular line, but I haven't managed that yet.
* | | | | | | | Merge pull request #3619 from huitseeker/issue/SI-8392Adriaan Moors2014-03-111-1/+3
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | SI-8392 Guards QuasiquoteClass against non-availability in scala-reflect
| * | | | | | | | SI-8392 Guards QuasiquoteClass against non-availability in scala-reflectFrançois Garillot2014-03-111-1/+3
| | |_|/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This assimilates behavior on Quasiquotes to the one on Reflection : if we don't have the right resource on classpath, we do without rather than throwing. See the bug report for more on rationale (-Xsource flag, early quasiquote loading in Analyzer through FastTrack, etc). Review by @gkossakowski or @xeno-by
* | | | | | | | Merge pull request #3616 from retronym/ticket/8363Adriaan Moors2014-03-114-1/+18
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | SI-8363 Disable -Ydelambdafy:method in constructor position
| * | | | | | | | SI-8363 Disable -Ydelambdafy:method in constructor positionJason Zaugg2014-03-104-1/+18
| | |/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As @magarciaEPFL has done in his experimental optimizer [1], we can avoid running into limitations of lambdalift (either `VerifyError`s, ala SI-6666, or compiler crashes, such as this bug), by using the old style of "inline" lambda translation when in a super- or self- construtor call. We might be able to get these working later on, but for now we shouldn't block adoption of `-Ydelamndafy:method` for this corner case. [1] https://github.com/magarciaEPFL/scala/blob/GenRefactored99sZ/src/compiler/scala/tools/nsc/transform/UnCurry.scala#L227
* | | | | | | | Merge pull request #3604 from densh/si/8366Adriaan Moors2014-03-118-12/+68
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | SI-8366 make partial function and match trees disjoint
| * | | | | | | | Add more tests for partial functionsDenys Shabalin2014-03-102-0/+10
| | | | | | | | |
| * | | | | | | | SI-8366 make partial function and match trees disjointDenys Shabalin2014-03-108-12/+58
| | |/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously one could match a partial function with match quasiquote: scala> val q"$scrutinee match { case ..$cases }" = q"{ case Foo => Bar }" scrutinee: universe.Tree = <empty> cases: List[universe.CaseDef] = List(case Foo => Bar) This was quite annoying as it leaked encoding of partial functions as Match trees with empty tree in place of scrutinee. This commit make sure that matches and partial functions are disjoint and don't match one another (while preserving original encoding under the hood out of sight of the end user.)
* | | | | | | | Merge pull request #3621 from szeiger/tmp/si8368Adriaan Moors2014-03-111-1/+8
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | SI-8368 respect user-supplied -Dscala.usejavacp in Windows runner
| * | | | | | | | SI-8368 respect user-supplied -Dscala.usejavacp in Windows runnerStefan Zeiger2014-03-111-1/+8
| |/ / / / / / /
* | | | | | | | Merge pull request #3620 from huitseeker/fix-SI-8368Adriaan Moors2014-03-111-1/+1
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | | Fixes syntax error in unix runner.
| * | | | | | | Fixes syntax error in unix runner.François Garillot2014-03-111-1/+1
|/ / / / / / /
* | | | | | | Merge pull request #3611 from densh/si/8385Adriaan Moors2014-03-103-1/+13
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-8385 make sure $quasiquote$tuple gets reified properly
| * | | | | | | Move extra tuple placeholder case to reifyTreePlaceholderDenys Shabalin2014-03-101-4/+4
| | | | | | | |
| * | | | | | | Update quasiquote debug output minimization passDenys Shabalin2014-03-091-1/+1
| | | | | | | |
| * | | | | | | SI-8385 make sure $quasiquote$tuple gets reified properlyDenys Shabalin2014-03-092-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously due to greediness of SyntacticApplied there was a chance that quasiquote tuple placeholder got reified as its representation rather than its meaning.
* | | | | | | | Merge pull request #3609 from xeno-by/ticket/8370Adriaan Moors2014-03-101-1/+1
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | SI-8370 fixes an infinite loop in repl init
| * | | | | | | | SI-8370 fixes an infinite loop in repl initEugene Burmako2014-03-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Under a weird coincidence of circumstances provided by `sbt console-quick`, new XML parsing logic in compiler plugin initialization could lead to stack overflow errors. Here's the abridged sequence events that led to this unfortunate problem (full description can be found on the JIRA issue page): 1) Initialization of the compiler underlying the REPL would kick off plugin initialization. 2) PluginDescription.fromXML would call into DocumentBuilderFactory, i.e. DocumentBuilderFactory.newInstance.newDocumentBuilder.parse(xml). 3) That thing would call into javax.xml.parsers.SecuritySupport.getResourceAsStream, requesting META-INF/services/javax.xml.parsers.DocumentBuilderFactory. 4) That request would get serviced by TranslatingClassLoader provided by the REPL to expose dynamically compiled code. 5) TranslatingClassLoader would call translatePath that would call into IMain.symbolOfIdent trying to map the requested resource onto one of the classes defined by the REPL (which don't exist yet, because REPL hasn't yet finished initializing). 6) IMain.symbolOfIdent would request IMain.global, which is exactly the instance of the compiler that underlies the REPL, and that's currently being initialized. 7..inf) Repeat until a StackOverflowError.
* | | | | | | | | Merge pull request #3594 from densh/si/8331Adriaan Moors2014-03-108-12/+144
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | SI-8331 make sure type select & applied type doesn't match terms
| * | | | | | | | | Address pull request feedbackDenys Shabalin2014-03-092-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Tighten up the if else to avoid duplication 2. Add doc comments
| * | | | | | | | | SI-8331 make sure type select & applied type doesn't match termsDenys Shabalin2014-03-098-12/+140
| | |/ / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to tree re-use it used to be the fact that type quasiquotes could match term trees. This commit makes sure selections and applied type and type applied are all non-overlapping between q and tq.
* | | | | | | | | Merge pull request #3607 from xeno-by/ticket/8367Adriaan Moors2014-03-109-19/+28
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | SI-8367 revert SI-8192's change to primaryConstructor when isJavaDefined
| * | | | | | | | | SI-8367 revert SI-8192's change to primaryConstructor when isJavaDefinedAdriaan Moors2014-03-079-19/+28
| | |/ / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | this is some weird stuff
* | | | | | | | | Merge pull request #3608 from adriaanm/t8368Adriaan Moors2014-03-101-1/+7
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | SI-8368 respect user-supplied -Dscala.usejavacp in unix runner
| * | | | | | | | | SI-8368 respect user-supplied -Dscala.usejavacp in unix runnerAdriaan Moors2014-03-071-1/+7
| |/ / / / / / / /
* | | | | | | | | Merge pull request #3613 from viktorklang/patch-1Adriaan Moors2014-03-101-2/+7
|\ \ \ \ \ \ \ \ \ | |_|_|/ / / / / / |/| | | | | | | | SI-8377 - Clarify the asynchronous requirement of ExecutionContext
| * | | | | | | | SI-8377 - Clarify the asynchronous requirement of ExecutionContextViktor Klang (√)2014-03-101-2/+7
|/ / / / / / / /
* | | | | | | | Merge pull request #3606 from xeno-by/ticket/8375Jason Zaugg2014-03-1019-11/+87
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | SI-8375 saner binary incompat errors for macros
| * | | | | | | | Addresses pull request feedbackEugene Burmako2014-03-083-6/+14
| | | | | | | | |
| * | | | | | | | SI-8375 saner binary incompat errors for macrosEugene Burmako2014-03-0719-11/+79
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Inspired by Brian McKenna's RC1 migration experience, this commit improves macro impl binding validation in order to provide more helpful diagnostic for this quite frequent class of errors.
* | | | | | | | Merge pull request #3603 from xeno-by/ticket/8364Jason Zaugg2014-03-104-2/+22
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | SI-8364 fixes cxTree lookup for imports
| * | | | | | | | SI-8364 fixes cxTree lookup for importsEugene Burmako2014-03-074-2/+22
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is reminiscent of the bug that I recently fixed in paradise: https://github.com/scalamacros/paradise/commit/0dc4e35883d357b7cbcdfd83b5b4821c1dcc0bb1. When doing something non-standard with contexts, we usually have to keep in mind that new contexts are created not only for trees that demarcate blocks of code, but also for imports.
* | | | | | | | Merge pull request #3584 from martijnhoekstra/patch-1Adriaan Moors2014-03-091-1/+1
|\ \ \ \ \ \ \ \ | |_|/ / / / / / |/| | | | | | | minor typos in the doc of applyOrElse
| * | | | | | | minor typos in the doc of applyOrElsemartijnhoekstra2014-02-251-1/+1
| | | | | | | |
* | | | | | | | Merge pull request #3610 from xeno-by/ticket/8369Jason Zaugg2014-03-085-1/+25
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | SI-8369 resetAttrs now correctly accounts for skolems
| * | | | | | | | SI-8369 resetAttrs now correctly accounts for skolemsEugene Burmako2014-03-075-1/+25
| | |/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | resetAttrs (née resetLocalAttrs) has been oblivious to existence of skolems. Not anymore, which prevents us from reverting to the untyper nightmare.
* | | | | | | | Merge pull request #3605 from gkossakowski/issue/SI-8372Grzegorz Kossakowski2014-03-075-3/+233
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | | SI-8372: unspliceable type printed in error message
| * | | | | | | SI-8372: unspliceable type printed in error messageGrzegorz Kossakowski2014-03-074-5/+218
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The b8a76f688c6ce2a4c305da064303bb46b53be875 introduced ArrayOps.{unzip, unzip3} methods. Both of those methods have ClassTags as context bounds on their type parameters so they can create (and return) instances of Arrays. The type inference for those methods is supposed to be guided by implicit evidence that T <: (T1, T2) (or T <: (T1, T2, T3) in unzip3 case). However, context bounds are desugared into implicit parameters that prepended in front of implicit parameters declared in source code. That means the implicit evidence won't have a chance to guide type inference because it comes as last implicit parameter. This commit desugars context bounds and puts them at the end of implicit parameter list. This way type inference is guided properly and we get expected compiler errors for missing class tags. The change to parameters order breaks binary compatibility with respect to 2.11.0-RC1. I added filters to our binary compatibility configuration files. We can get rid of them as soon as 2.11.0 is out.
| * | | | | | | Test case for SI-8372: issue with ArrayOps.unzipGrzegorz Kossakowski2014-03-072-0/+17
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit merely documents current (suboptimal) error message printed for the code reported in SI-8372. The next commit will fix the problem.
* | | | | | | Merge pull request #3600 from adriaanm/build-cleanupGrzegorz Kossakowski2014-03-045-501/+301
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Enable binary comp testing. Final build cleanup.
| * | | | | | | Remove distribution building from ant build, see scala/scala-dist.Adriaan Moors2014-03-031-177/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only result of all this duplication was bitrot. The main build is responsible for building, testing, documenting and publishing. (It publishes everything needed to build a distribution to maven in `pack-maven.dist`.) The sbt build over at scala/scala-dist handles distribution building for the various platforms. Note: after `ant build`, `build/pack` will have a pretty complete distribution. (The only thing missing are the docs: see targets `pack.doc` and `docs.done`.) To build your own distribution, do, e.g.: ``` ant publish-local-opt -Dmaven.version.suffix="-foo" cd ~/git hub clone scala/scala-dist cd scala-dist sbt 'set version := "2.11.0-foo"' 'set resolvers += Resolver.mavenLocal' universal:package-bin ```
| * | | | | | | No longer generate deprecated dists/maven/latest/build.xmlAdriaan Moors2014-03-033-316/+224
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The distpack-maven-* targets no longer create said dir/build. Use the publish tasks directly instead.