summaryrefslogtreecommitdiff
path: root/test/files/run
Commit message (Collapse)AuthorAgeFilesLines
* SI-6811 Remove deprecated constructorsSimon Ochsenreither2013-01-172-9/+18
|
* SI-6811 Remove usages of scala.annotation.cloneableSimon Ochsenreither2013-01-172-2/+2
| | | | | The source file itself will be removed later, because the compiler seems to need it for boot-strapping.
* Merge pull request #1880 from som-snytt/issue/6894-javap-appPaul Phillips2013-01-1510-0/+136
|\ | | | | Fixes and features for javap (fixing SI-6894)
| * Restore pending repl-javap tests that now succeed under java 6.Som Snytt2013-01-118-0/+118
| | | | | | | | Knock on wood.
| * Fixes and features for javap (fixing SI-6894)Som Snytt2013-01-112-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Output filtering is refactored for javap6. That means javap6 also supports -raw. Handling of # is: Foo#foo filter on foo, Foo# filter on apply, -fun Foo#foo for anonfuns of foo, -fun Foo# anonfuns filtering on apply. One is loath to add command options, so it's not possible to ask for "only apply methods in anonfuns pertaining to a method." Hypothetical syntax to say "show me the apply only": -fun Foo#foo(), for future reference.
* | Merge pull request #1881 from adriaanm/rebase-1879-masterPaul Phillips2013-01-152-0/+29
|\ \ | | | | | | SI-6955 switch emission no longer foiled by type alias
| * | SI-6955 switch emission no longer foiled by type aliasAdriaan Moors2013-01-112-0/+29
| |/ | | | | | | | | | | | | dealiasWiden the type of the scrutinee before checking it's switchable now with tests! (using IcodeTest since javap is not available everywhere) rebase of #1879
| * Moved repl javap tests into pending.Paul Phillips2013-01-118-118/+0
| | | | | | | | For not passing on java6.
| * Merge pull request #1849 from som-snytt/issue/6894-javap-appPaul Phillips2013-01-108-0/+118
| |\ | | | | | | Repl javap decodes various synthetic names for us (fixing SI-6894)
| | * Repl javap decodes various synthetic names for us (fixing SI-6894)Som Snytt2013-01-098-0/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For instance, javap -app Test is equivalent to javap Test$delayedInit$App with the correct line and iw prepended. This works by taking Test as a name in scope, translating that, and then supplying the suffix. Then javap -fun Test shows Test$$anonfun*, and for member m, javap -fun Test#m shows Test$$anonfun$$m*. This also works for classes and values defined in the repl. javap -fun -raw m shows $line3.$read$$iw$$iw$$anonfun$m$1. E.g., javap -fun scala.Enumeration obviates knowing or guessing scala/Enumeration$$anonfun$scala$Enumeration$$populateNameMap$1.class. Also, scala> :javap -fun scala.Array#concat but still to do is using imported syms. Both files and replout are supported for searching for artifacts. The trigger is detecting the synthetic name (has an interior dollar). Still to do, filter the output on Test#m to show only m. Need a way to explore the list of artifacts; ideally, related symbols would be available reflectively. Prefer companion class to object, otherwise it's not showable; for object, require dollar when both exist. A JavapTest is supplied that is a ReplTest that asserts something about its output instead of printing it.
* | | macroExpandAll is now triggered by typedEugene Burmako2013-01-092-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously delayed macro expansions (the sole purpose of macroExpandAll) were triggered by `typedArgs`. Probably I wanted to save CPU cycles on not checking whether we have pending macro expansions on every iteration of typecheck. However this optimization is uncalled for, because the check just entails reading a var, therefore benefits of the current approach are negliible, whereas the robustness hit is tangible. After delayed macro expansion mechanism became more robust, it exposed a bug, well-hidden before. If one first delays a macro and then finds out that the expandee is erroneous, subsequent `macroExpandAll` will crash, because it expects a macro runtime attachment to be present. Previously the erroneous code path never got triggered, because the macro expansion never commenced. Luckily the fix was easy.
* | | refactors handling of macros in replEugene Burmako2013-01-092-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Macros now have a dedicated member handler, so that the logic of their processing doesn't get mixed up with vanilla DefHandler. I've also factored out an abstract MacroHandler to provides a basis to build the upcoming type macro handler upon.
* | | SI-5903 extractor macros do workEugene Burmako2013-01-098-0/+72
|/ / | | | | | | | | | | | | | | | | Apparently it is already possible to use macros to customize pattern matching as described in the comments to the aforementioned JIRA issue. What's even better - with the incoming addition of c.introduceTopLevel it becomes possible to generate arbitrarily complex unappliers, even with heterogeneous types of arguments varying from expansion to expansion
* | Merge branch '2.10.x'Adriaan Moors2013-01-0811-83/+180
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patches applied: - rename of `dropRepeatedParamType` to `dropIllegalStarTypes` -- required since 8886d22cd6 - fixed test/files/neg/t6406-regextract.flags -- how could this have worked before? Conflicts: src/compiler/scala/tools/nsc/interpreter/TypeStrings.scala src/library/scala/collection/LinearSeqOptimized.scala src/library/scala/util/Properties.scala test/files/run/streams.check test/files/run/streams.scala
| * \ Merge pull request #1840 from paulp/issue/6911Paul Phillips2013-01-063-69/+106
| |\ \ | | | | | | | | SI-6911, regression in generated case class equality.
| | * | SI-6911, regression in generated case class equality.Paul Phillips2013-01-033-69/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Caught out by the different semantics of isInstanceOf and pattern matching. trait K { case class CC(name: String) } object Foo extends K object Bar extends K Foo.CC("a") == Bar.CC("a") That expression is supposed to be false, and with this commit it is once again.
| * | | Merge pull request #1841 from adriaanm/rebase-6827-2.10.xAdriaan Moors2013-01-042-0/+46
| |\ \ \ | | | | | | | | | | Fix Iterator#copyToArray (fixes SI-6827).
| | * | | Fix Iterator#copyToArray (fixes SI-6827).Erik Osheim2013-01-042-0/+46
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As pointed out in #scala, when using a non-zero start it's possible to get an ArrayIndexOutOfBoundsException due to an incorrect bounds check. This patch fixes this, as well as another potential bounds error, and adds test cases. Incorporates some other suggestions by Som-Snytt to ensure that callers will get useful error messages in cases where the start parameter is wrong (negative or out-of-array-bounds). Review by @som-snytt.
| * | | Merge pull request #1739 from jedesah/Array_optPaul Phillips2013-01-042-0/+15
| |\ \ \ | | |/ / | |/| | SI-5017 Poor performance of :+ operator on Arrays
| | * | SI-5017 Poor performance of :+ operator on ArraysJean-Remi Desjardins2012-12-232-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Control performance of :+ and +: operator on my machine were 700-800 ms After adding size hint on the implementation in SeqLike, it went down to 500-600 ms But with specialixed implementation in ArrayOps, brings it down to 300-400 ms Unfortunatly, this method will only be called when the Array object is being referenced directly as it's type, but that should be the case enough times to justify the extra method. I ended up removing the sizeHint in SeqLike because it made the execution of the "benchmark" slower when the Array was being manipulated as a Seq. Side note: Interestingly enough, the benchmark performed better on my virtualized Fedora 17 with JDK 7 than natively on Mac OS X with JDK 6
| * | | Merge pull request #1822 from paulp/issue/6194Paul Phillips2013-01-032-0/+9
| |\ \ \ | | | | | | | | | | SI-6194, repl crash.
| | * | | SI-6194, repl crash.Paul Phillips2012-12-272-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Always a bad idea to use replaceAll on unknown strings, as we saw here when windows classpaths arrived containing escape-requiring backslashes.
| * | | | LinearSeq lengthCompare without an iterator.Paul Phillips2012-12-282-10/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Had to fix up an iffy test: not only was it testing undefined behavior, it demanded just the right numbers be printed in a context where all negative or positive numbers are equivalent. It's the ol' "get them coming and going" trick.
| * | | | SI-6415, overly eager evaluation in Stream.Jean-Remi Desjardins2012-12-282-0/+34
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | The lengthCompare method in LinearSeqOptimized was looking one step further than it needed to in order to give the correct result, which was creating some unwanted side effects related to Streams.
* | | | Merge pull request #1817 from scalamacros/topic/introduce-top-levelv2.11.0-M1Eugene Burmako2013-01-0616-4/+136
|\ \ \ \ | | | | | | | | | | adds c.introduceTopLevel
| * | | | adds c.introduceTopLevelEugene Burmako2013-01-0516-4/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The first in the family of mutators for the global symbol table, `introduceTopLevel` is capable of creating synthetic top-level classes and modules. The addition of nme.EMPTY_PACKAGE_NAME is necessary to let programmers insert definitions into the empty package. That's explicitly discouraged in the docs, but at times might come in handy. This patch introduce workarounds to avoid incompatibilities with SBT. First of all SBT doesn't like VirtualFiles having JFile set to null. Secondly SBT gets confused when someone depends on synthetic files added by c.introduceTopLevel. Strictly speaking these problems require changes to SBT, and that will be done later. However the main target of the patch is paradise/macros, which needs to be useful immediately, therefore we apply workarounds.
* | | | | Merge pull request #1847 from JamesIry/SI-6916_masterPaul Phillips2013-01-062-0/+19
|\ \ \ \ \ | | | | | | | | | | | | SI-6916 makes FlatHashTable#remove a Boolean not Option[A]
| * | | | | SI-6916 makes FlatHashTable#remove a Boolean not Option[A]James Iry2013-01-042-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Makes FlatHashTable#remove return a boolean instead of Option[A]. Updates HashSet accordingly. Adds a test to make sure remove works as advertised.
* | | | | | SI-6918 Changes REPL output from "defined module" to "defined object"Simon Ochsenreither2013-01-057-10/+10
|/ / / / /
* | | | | Merge pull request #1839 from JamesIry/SI-6908_masterAdriaan Moors2013-01-042-0/+74
|\ \ \ \ \ | |/ / / / |/| | | | SI-6908 Makes FlatHashTable as well as derived classes support nulls
| * | | | SI-6908 Makes FlatHashTable as well as derived classes support null valuesJames Iry2013-01-032-0/+74
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | This change adds a null sentinel object which is used to indicate that a null value has been inserted in FlatHashTable. It also makes a strong distinction between logical elements of the Set vs entries in the hash table. Changes are made to mutable.HashSet and ParHashSet accordingly.
* | | | Merge pull request #1785 from non/bug/fix-copyToArrayAdriaan Moors2013-01-042-0/+46
|\ \ \ \ | |/ / / |/| | | Fix Iterator#copyToArray (fixes SI-6827).
| * | | Fix Iterator#copyToArray (fixes SI-6827).Erik Osheim2012-12-202-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As pointed out in #scala, when using a non-zero start it's possible to get an ArrayIndexOutOfBoundsException due to an incorrect bounds check. This patch fixes this, as well as another potential bounds error, and adds test cases. Incorporates some other suggestions by Som-Snytt to ensure that callers will get useful error messages in cases where the start parameter is wrong (negative or out-of-array-bounds). Review by @som-snytt.
* | | | Merge pull request #1816 from scalamacros/topic/enclosuresEugene Burmako2012-12-305-1/+59
|\ \ \ \ | | | | | | | | | | enclosures are now strongly typed and are no longer vals
| * | | | enclosures are now strongly typed and are no longer valsEugene Burmako2012-12-255-1/+59
| | | | |
* | | | | Merge pull request #1818 from scalamacros/topic/auto-duplicate-expansionsEugene Burmako2012-12-294-0/+36
|\ \ \ \ \ | | | | | | | | | | | | macro expansions are now auto-duplicated
| * | | | | macro expansions are now auto-duplicatedEugene Burmako2012-12-254-0/+36
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fix still requires macro developers to be careful about sharing trees by references, because attributed DefTrees will still bring trouble. However this is an improvement, because it doesn't make matters worse and automatically fixes situations similar to one in the test. A much more thorough discussion with a number of open questions left: http://groups.google.com/group/scala-internals/browse_thread/thread/492560d941b315cc
* | | | | Merge pull request #1814 from scalamacros/topic/reflectionEugene Burmako2012-12-29134-293/+293
|\ \ \ \ \ | | | | | | | | | | | | adds extractors for TypeName, TermName and Modifiers
| * | | | | cleans up usages of <init>Eugene Burmako2012-12-299-9/+9
| | | | | |
| * | | | | Changes reflection tests to use shorter name constructorsDen Shabalin2012-12-25134-292/+292
| |/ / / /
* | | | | Cleaning up type alias usage.Paul Phillips2012-12-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I determined that many if not most of the calls to .normalize have no intent beyond dealiasing the type. In light of this I went call site to call site knocking on doors and asking why exactly they were calling any of .normalize .widen.normalize .normalize.widen and if I didn't like their answers they found themselves introduced to 'dropAliasesAndSingleTypes', the recursive widener and dealiaser which I concluded is necessary after all. Discovered that the object called 'deAlias' actually depends upon calling 'normalize', not 'dealias'. Decided this was sufficient cause to rename it to 'normalizeAliases'. Created dealiasWiden and dealiasWidenChain. Dropped dropAliasesAndSingleTypes in favor of methods on Type alongside dealias and widen (Type#dealiasWiden). These should reduce the number of "hey, the type alias doesn't work" bugs.
* | | | | Fix and simplify typedTypeConstructor.Paul Phillips2012-12-2812-68/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Investigating the useful output of devWarning (-Xdev people, it's good for you) led back to this comment: "normalize to get rid of type aliases" You may know that this is not all the normalizing does. Normalizing also turns TypeRefs with unapplied arguments (type constructors) into PolyTypes. That means that when typedParentType would call typedTypeConstructor it would find its parent had morphed into a PolyType. Not that it noticed; it would blithely continue and unwittingly discard the type arguments by way of appliedType (which smoothly logged the incident, thank you appliedType.) The simplification of typedTypeConstructor: There was a whole complicated special treatment of AnyRef here which appears to have become unnecessary. Removed special treatment and lit a candle for regularity. Updated lots of tests regarding newly not-so-special AnyRef.
* | | | | Removed old pattern matcher.Paul Phillips2012-12-264-89/+1
|/ / / /
* | | | Merge pull request #1506 from som-snytt/issue/6446-plugin-descPaul Phillips2012-12-224-31/+53
|\ \ \ \ | | | | | | | | | | PluginComponent contributes description to -Xshow-phases. (Fixes SI-6446)
| * | | | PluginComponent contributes description to -Xshow-phases.Som Snytt2012-12-184-31/+53
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Global, SubComponent is called a phase descriptor, but it doesn't actually have a description. (Phase itself does.) This fix adds a description to PluginComponent so that plugins can describe what they do in -Xshow-phases. Elliptical descriptions Exploded archives Plugged-in partest Roundup at the Little h!
* | | | Merge pull request #1769 from soc/SI-6809Adriaan Moors2012-12-203-3/+3
|\ \ \ \ | | | | | | | | | | SI-6809 Forbids deprecated case class definitions without parameter list
| * | | | SI-6809 Forbids deprecated case class definitions without parameter listSimon Ochsenreither2012-12-133-3/+3
| | | | | | | | | | | | | | | | | | | | This has been deprecated since at least 2.7.7, so it should be good to go.
* | | | | Merge remote-tracking branch 'origin/2.10.x' into merge-2.10.xPaul Phillips2012-12-209-10/+290
|\ \ \ \ \ | | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * origin/2.10.x: (31 commits) Implicit vars should have non-implicit setters. Deprecate `scala.tools.nsc.Phases` because it's dead-code. scaladoc Template: remove duplicate code and several usages of Option.get. adds scala-reflect.jar to MIMA in ant Test showing the absence of a forward reference update mailmap Remove dead code from `Global`. Cleanup MemberLookup. Better explain ambiguous link targets. typedIdent no longer destroys attachments fixes incorrect handling of Annotated in lazy copier simplifies checkBounds Recurse into instantiations when stripping type vars. Extract base scaladoc functionality for the IDE. Expand pattern match position tests. SI-6288 Remedy ill-positioned extractor binding. SI-6288 Fix positioning of label jumps SI-6288 Position argument of unapply Fixes SI-6758: force LazyAnnnotationInfo for DefDef and TypeDef SI-6795 Simplify errors related to "abstract override" on type members SI-6795 Adds negative check for "abstract override" on types in traits ... Conflicts: .mailmap src/compiler/scala/tools/nsc/Global.scala src/compiler/scala/tools/nsc/ast/DocComments.scala src/compiler/scala/tools/nsc/doc/base/CommentFactoryBase.scala src/compiler/scala/tools/nsc/doc/html/page/Source.scala src/compiler/scala/tools/nsc/doc/html/page/Template.scala src/compiler/scala/tools/nsc/doc/model/LinkTo.scala src/compiler/scala/tools/nsc/doc/model/MemberLookup.scala src/compiler/scala/tools/nsc/doc/model/diagram/DiagramFactory.scala src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala src/compiler/scala/tools/nsc/typechecker/Typers.scala src/reflect/scala/reflect/runtime/JavaMirrors.scala test/scaladoc/run/links.scala
| * | | | Merge pull request #1727 from scalamacros/ticket/6548Paul Phillips2012-12-192-0/+14
| |\ \ \ \ | | |_|_|/ | |/| | | SI-6548 reflection now correctly enters jinners
| | * | | SI-6548 reflection now correctly enters jinnersEugene Burmako2012-12-072-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When completing Java classes, runtime reflection enumerates their fields, methods, constructors and inner classes, loads them and enters them into either the instance part (ClassSymbol) or the static part (ModuleSymbol). However unlike fields, methods and constructors, inner classes don't need to be entered explicitly - they are entered implicitly when being loaded. This patch fixes the double-enter problem, make sure that enter-on-load uses the correct owner, and also hardens jclassAsScala against double enters that can occur in a different scenario. Since the fix is about Java-compiled classes, the test needs *.class artifacts produced by javac. Therefore I updated javac-artifacts.jar to include the new artifacts along with their source code.