summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
*-------. Merge commit 'refs/pull/825/head'; commit 'refs/pull/827/head'; commit ↵Adriaan Moors2012-07-1130-43/+359
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | 'refs/pull/828/head'; commit 'refs/pull/850/head'; commit 'refs/pull/858/head' into 2.10.x
| | | | * | SI-6042 Improve type selection from volatile type errorJason Zaugg2012-07-082-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Display the type of the typed qualifier (qual1), to avoid the message "Illegal type selection from volatile type null". - Show the upper bound, which is used to calculate the volatility.
| | | * | | SI-5974 make collection.convert.Wrappers serializableLukas Rytz2012-07-052-0/+11
| | | | | |
| | * | | | Allow attachments for symbols, just like for trees.Lukas Rytz2012-07-057-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | Removes the two global hash maps in Namers, and the one in NamesDefaults. Also fixes SI-5975.
| | * | | | Enhanced presentation compiler test infrastructureMirco Dotta2012-07-057-35/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Removed unneeded .flags. * Renamed a few methods in `InteractiveTest`. * Force the presentation compiler to shut down after each test. * -sourcepath in the .flags file is now relative to the test's base directory. * Use `InteractiveReporter` in Presentation Compiler tests. By using the `InteractiveReporter`, compilation errors are collected in the compilation unit. This was necessary for testing SI-5975.
| * | | | | stringinterpolation macro test filesAdriaan Moors2012-07-064-0/+266
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds test files neg: checks the error messages generated by the compiler run: checks the macro implementation features
| * | | | | adds the sha1 files of the new starr / stringContext.fDominik Gruntz2012-07-068-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit provides the new sha1 codes of the new STARR. Moreover, it replaces the implementation of StringContext.f to `macro ???`. The implementation is magically hardwired into `scala.tools.reflect.MacroImplementations.macro_StringInterpolation_f` by the new STARR.
* | | | | | Merge pull request #856 from havocp/sip14-execution-changesAdriaan Moors2012-07-104-112/+233
|\ \ \ \ \ \ | |_|_|_|_|/ |/| | | | | Collection of updates to SIP-14 (scala.concurrent)
| * | | | | Collection of updates to SIP-14 (scala.concurrent)Havoc Pennington2012-07-094-112/+233
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Developed by Viktor Klang and Havoc Pennington - add Promise.isCompleted - add Future.successful and Future.failed - add ExecutionContextExecutor and ExecutionContextExecutorService for Java interop - remove defaultExecutionContext as default parameter value from promise and future - add ExecutionContext.Implicits.global which must be explicitly imported, rather than the previous always-available value for the implicit EC - remove currentExecutionContext, since it could create bugs by being out of sync with the implicit ExecutionContext - remove Future task batching (_taskStack) and Future.releaseStack This optimization should instead be implemented either in a specific thread pool or in a specific ExecutionContext. Some pools or ExecutionContexts may not want or need it. In this patch, the defaultExecutionContext does not keep the batching optimization. Whether it should have it should perhaps be determined through benchmarking. - move internalBlockingCall to BlockContext and remove currentExecutionContext In this patch, BlockContext must be implemented by Thread.currentThread, so the thread pool is the only place you can add custom hooks to be run when blocking. We implement BlockContext for the default ForkJoinWorkerThread in terms of ForkJoinPool.ManagedBlocker. - add public BlockContext.current and BlockContext.withBlockContext These allow an ExecutionContext or other code to override the BlockContext for the current thread. With this API, the BlockContext is customizable without creating a new pool of threads. BlockContext.current is needed to obtain the previous BlockContext before you push, so you can "chain up" to it if desired. BlockContext.withBlockContext is used to override the context for a given piece of code. - move isFutureThrowable into impl.Future - add implicitNotFound to ExecutionContext - remove default global EC from future {} and promise {} - add ExecutionContext.global for explicit use of the global default EC, replaces defaultExecutionContext - add a timeout to scala-concurrent-tck tests that block on SyncVar (so tests time out rather than hang) - insert blocking{} calls into concurrent tck to fix deadlocking - add NonFatal.apply and tests for NonFatal - add OnCompleteRunnable marker trait This would allow an ExecutionContext to distinguish a Runnable originating from Future.onComplete (all callbacks on Future end up going through onComplete). - rename ListenerRunnable to CallbackRunnable and use for KeptPromise too Just adds some clarity and consistency.
* | | | | | Removing the actor migration undeterministic test.Vojin Jovanovic2012-07-091-188/+0
|/ / / / /
* | | | | New logic for TermSymbol.resolveOverloadedclhodapp2012-07-089-2/+319
| | | | |
* | | | | Merge pull request #843 from scalamacros/ticket/6036Adriaan Moors2012-07-082-0/+33
|\ \ \ \ \ | | | | | | | | | | | | SI-6036 yet again makes sense of magic symbols
| * | | | | SI-6036 yet again makes sense of magic symbolsEugene Burmako2012-07-062-0/+33
| |/ / / /
* | | | | Merge pull request #816 from VladUreche/feature/diagrams-dev-pullreq-newJosh Suereth2012-07-0728-66/+916
|\ \ \ \ \ | | | | | | | | | | | | Scaladoc diagrams (again)
| * | | | | Diagram tweaks #2Vlad Ureche2012-07-026-0/+311
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - fixed the AnyRef linking (SI-5780) - added tooltips to implicit conversions in diagrams - fixed the intermittent dot error where node images would be left out (dot is not reliable at all -- with all the mechanisms in place to fail gracefully, we still get dot errors crawling their way into diagrams - and that usually means no diagram generated, which is the most appropriate way to fail, I think...)
| * | | | | Diagram tweaks #1Vlad Ureche2012-07-023-4/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - relaxed the restrictions on nodes - nodes can be classes, traits and objects, both stand-alone and companion objects -- all are added to the diagram, but usually companion objects are filtered out as they don't have any superclasses - changed the rules for default diagram creation: - classes and traits (and AnyRef) get inheritance diagrams - packages and objects get content diagrams (can be overridden by @contentDiagram [hideDiagram] and @inheritanceDiagram [hideDiagram]) - tweaked the model to register subclasses of Any - hardcoded the scala package diagram to show all relations - enabled @contentDiagram showInheritedNodes by default and changed the setting to hideInheritedNodes (and added a test for this) - better node selection (can select nodes that don't have a corresponding trait) - fixed the docsite link in member selection, which was broken since the first commit :))
| * | | | | Scaladoc class diagrams part 1Vlad Ureche2012-07-0217-62/+529
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit contains model changes required for adding class diagrams to scaladoc. It also contains an improved implicit shadowing computation, which hides the shadowed implicitly inherited members from the main view and gives instructions on how to access them. This is joint work with Damien Obrist (@damienobrist) on supporting diagram generation in scaladoc, as part of Damien's semester project in the LAMP laborarory at EPFL. The full history is located at: https://github.com/damienobrist/scala/tree/feature/diagrams-dev Commit summary: - diagrams model - diagram settings (Settings.scala, ScalaDoc.scala) - diagram model object (Entity.scala, Diagram.scala) - model: tracking direct superclasses and subclasses, implicit conversions from and to (ModelFactory.scala) - diagram object computation (DiagramFactory.scala, DocFactory.scala) - capacity to filter diagrams (CommentFactory.scala, DiagramDirectiveParser.scala) - diagram statistics object (DiagramStats.scala) - delayed link evaluation (Body.scala, Comment.scala) - tests - improved implicits shadowing information - model shadowing computation (ModelFactoryImplicitSupport.scala, Entity.scala) - html generation for shadowing information (Template.scala) - tests Also fixes an issue reported by @dragos, where single-line comment expansion would lead to the comment disappearing. Review by @kzys, @pedrofurla. Adapted to the new model and fixed a couple of problems: - duplicate implicit conversions in StringAdd/StringFormat - incorrect implicit conversion signature (from X to X) Conflicts: src/compiler/scala/tools/nsc/doc/Settings.scala src/compiler/scala/tools/nsc/doc/html/page/Template.scala src/compiler/scala/tools/nsc/doc/model/Entity.scala src/compiler/scala/tools/nsc/doc/model/ModelFactory.scala src/compiler/scala/tools/nsc/doc/model/ModelFactoryImplicitSupport.scala
| * | | | | Reorganized scaladoc modelVlad Ureche2012-07-023-4/+6
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the old model was "interruptible", it was prone to something similar to race conditions -- where the model was creating a template, that template creating was interrupted to creat another template, and so on until a cycle was hit -- then, the loop would be broken by returning the originally not-yet-finished template. Now everything happens in a depth-first order, starting from root, traversing packages and classes all the way to members. The previously interrupting operations are now grouped in two categories: - those that were meant to add entities, like inheriting a class from a template to the other (e.g. trait T { class C }; trait U extends T) => those were moved right after the core model creation - those that were meant to do lookups - like finding the companion object -- those were moved after the model creation and inheritance and are not allowed to create new documentable templates. Now, for the documentable templates we have: DocTemplateImpl - the main documentable template, it represents a Scala template (class, trait, object or package). It may only be created when modelFinished=false by methods in the modelCreation object NoDocTemplateMemberImpl - a non-documented (source not present) template that was inherited. May be used as a member, but does not get its own page NoDocTemplateImpl - a non-documented (source not present) template that may not be used as a member and does not get its own page For model users: you can use anything in the ModelFactory trait at will, but not from the modelCreation object -- that is reserved for the core model creation and using those functions may lead to duplicate templates, invalid links and other ugly problems.
* | | | | Merge pull request #838 from adriaanm/ticket-2442Adriaan Moors2012-07-071-1/+1
|\ \ \ \ \ | |_|_|_|/ |/| | | | SI-2442 sealedness for java enums non-experimental
| * | | | SI-2442 sealedness for java enums non-experimentalAdriaan Moors2012-07-061-1/+1
| | |/ / | |/| |
* | | | Tweak test to pass under java 7.Paul Phillips2012-07-061-1/+1
| | | |
* | | | Merge pull request #834 from paulp/issue/3836-2Adriaan Moors2012-07-063-0/+55
|\ \ \ \ | |/ / / |/| | | Fix SI-3836 not-really-ambiguous import detection.
| * | | Fix SI-3836 not-really-ambiguous import detection.Paul Phillips2012-07-053-0/+55
| | | | | | | | | | | | | | | | | | | | Normalize types before declaring that two imports are ambiguous, because they might be the same thing. Review by @moors.
* | | | Merge pull request #830 from heathermiller/topic/tryeither-fixesAdriaan Moors2012-07-065-80/+330
|\ \ \ \ | | | | | | | | | | SI-5981, SI-5979, SI-5973, SI-5890 Closed. Maintenance to Try.
| * | | | SI-5981, SI-5979, SI-5973 Closed. Maintenance to Try.Heather Miller2012-07-055-80/+330
| | | | |
* | | | | Merge pull request #824 from adriaanm/ticket-4691_6008Adriaan Moors2012-07-066-1/+61
|\ \ \ \ \ | | | | | | | | | | | | [SI-4691, SI-6008] improve patmat analyses: irrefutable user-defined extractors, no-op type tests
| * | | | | SI-6008 use static knowledge of success of type testsAdriaan Moors2012-07-053-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | augment the equality axioms to take into account that a type test against the static type of a variable succeeds unless the variable is null for exhaustivity we disregard null, so the type test always succeeds during unreachability we model this knowledge as the obvious implication
| * | | | | SI-4691 exhaustivity: `unapply: Some` = irrefutableAdriaan Moors2012-07-053-0/+47
| |/ / / / | | | | | | | | | | | | | | | overhauls treeMakersToConds in the process -- was getting a bit unwieldy
* | | | | Merge pull request #826 from lrytz/t5907Adriaan Moors2012-07-064-5/+152
|\ \ \ \ \ | | | | | | | | | | | | SI-5907, SI-5009 case-class copy defaults only for first param list
| * | | | | SI-5907, SI-5009 case-class copy defaults only for first param listLukas Rytz2012-07-054-5/+152
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | `copy` no longer returns anonymous functions if there are multiple parameter lists, reverts most of 40e7cab7a2. Cleaned up the special type completer for copy methods.
* | | | | Merge pull request #822 from scalamacros/ticket/5959Adriaan Moors2012-07-062-0/+75
|\ \ \ \ \ | |_|_|/ / |/| | | | SI-5959 type equality now accounts for mirrors
| * | | | SI-5959 type equality now accounts for mirrorsEugene Burmako2012-07-042-0/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TypeRef(ThisType(<package1>), sym, args) should always be equal to TypeRef(ThisType(<package2>), sym, args) regardless of whether package1 and package2 actually represent the same symbols of not. This goes for subtyping (<:<) and type equality (=:=). However regular equality (==) and hashconsing is unaffected as per http://groups.google.com/group/scala-internals/browse_thread/thread/4bef4e6987bb68fe This is done to account for the fact that mirrors share normal symbols, but never share package symbols. Therefore at times it will occur that the same types loaded by different mirrors appear different because of the package symbols. More details: https://issues.scala-lang.org/browse/SI-5959.
* | | | | SI-6033 Closed. Provides implicit conversion from java.math.BigInteger to BigIntDominik Gruntz2012-07-051-0/+5
| |_|/ / |/| | |
* | | | Merge pull request #821 from adriaanm/64acb46ab7Adriaan Moors2012-07-059-35/+109
|\ \ \ \ | | | | | | | | | | SI-5830 switches: support guards, unreachability
| * | | | SI-5830 switches: support guards, unreachabilityAdriaan Moors2012-07-039-35/+109
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | turn switches with guards into guard-free switches by collecting all cases that are (possibly) guarded by different guards but that switch on the same constant, and pushing the implied if-then-else into the collapsed case body ``` case C if G1 => B1 case C if Gi => Bi case C if GN => BN ``` becomes ``` case C => if (G1) B1 else if (Gi) Bi else if (GN) BN else default() // not necessary if GN == EmptyTree ``` default() is a jump to the default case; to enable this, we wrap a default() { } labeldef around the last case's body (the user-defined default or the synthetic case that throws the matcherror) so we can jump to the default case after the last guard is checked (assuming unreachability is checked, once we ended up in a non-default case, one of the guards either matches or we go to the default case) the unreachability analysis is minimal -- we simply check (after rewriting to guard-free form) that: - there are no duplicate cases - the default case comes last misc notes: - can't jump in exception handlers (TODO: a more fine-grained analysis on when we need to jump) - work around SI-6015 (test file run/t5830.scala crashed the inliner) - propagate type of case body to label def of default case (needed for existentials, see e.g., t2683) - the default(){} LabelDef breaks SelectiveANFTransform -- workaround: don't write guarded switches in CPS code (do the above transformation manually)
* | | | Merge pull request #777 from retronym/ticket/2796Adriaan Moors2012-07-043-0/+33
|\ \ \ \ | | | | | | | | | | SI-2796 Warn if early definitions are used with a trait.
| * | | | SI-2796 Warn if early definitions are used with a trait.Jason Zaugg2012-06-263-0/+33
| | | | | | | | | | | | | | | | | | | | For which they (currently) have no special meaning.
* | | | | Merge pull request #818 from scalamacros/topic/tags-for-anyval-and-anyrefAdriaan Moors2012-07-046-52/+76
|\ \ \ \ \ | | | | | | | | | | | | tags for AnyVal and AnyRef
| * | | | | tags for AnyVal and AnyRefEugene Burmako2012-07-046-52/+76
| | |_|/ / | |/| | |
* | | | | Merge pull request #820 from retronym/ticket/6013Adriaan Moors2012-07-044-0/+31
|\ \ \ \ \ | | | | | | | | | | | | SI-6013 Disallow deferred members from intermediate java parents.
| * | | | | SI-6013 Disallow deferred members from intermediate java parents.Jason Zaugg2012-07-044-0/+31
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 76c76b28f allowed for the fact that a Java method can override a super class method without matching its type in a Scala sense; it need only match its type after erasure. However that change went too far, and considered a concrete method in a base class to override a deferred method in a subclass.
* | | | | Merge pull request #814 from hubertp/issue/5969Adriaan Moors2012-07-043-1/+19
|\ \ \ \ \ | | | | | | | | | | | | Closes SI-5969.
| * | | | | Closes SI-5969.Hubert Plociniczak2012-07-023-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Assumption that we enter tryTwice when inferring the right alternative with an empty buffer is wrong. In this particular bug it manifested itself on if/then/else which share the same context and 'else' branch was simply flushing the buffer with an error from the 'then' branch.
* | | | | | Merge pull request #809 from dragos/issue/fix-5929Adriaan Moors2012-07-041-0/+25
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix SI-5929 - Verify error with finally and pattern match
| * | | | | | Fix SI-5929 - Verify error with finally and pattern matchIulian Dragos2012-07-021-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't enter all labels in a method when emitting a forward jump, since some labels will be duplicated (if defined inside finally blocks). For each forward jump, enter only the label that is needed for that jump.
* | | | | | | Merge pull request #772 from magarciaEPFL/recoveringOptimizedStabilityCAdriaan Moors2012-07-041-73/+65
|\ \ \ \ \ \ \ | |_|_|_|/ / / |/| | | | | | recovering optimized stability
| * | | | | | inliner makes fields public only when actually inliningMiguel Garcia2012-06-251-73/+65
| | | | | | |
* | | | | | | SI-5990 u.build now correctly invokes missing symbol hooksEugene Burmako2012-07-032-0/+30
| |_|_|_|_|/ |/| | | | |
* | | | | | Merge pull request #810 from scalamacros/pullrequest/manifests-and-ticket6005Adriaan Moors2012-07-0369-195/+346
|\ \ \ \ \ \ | | | | | | | | | | | | | | two pullrequests from this morning, combined to merge changes to starrs
| * | | | | | reify no longer dealiases symbols and typesEugene Burmako2012-07-0235-105/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this uncovers a bug in toolboxes: https://issues.scala-lang.org/browse/SI-6007 however that bug is not critical, so it will be dealt with later