summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | Merge pull request #4876 from ruippeixotog/issue/9581Seth Tisue2015-12-151-0/+30
| |\ \ \ | | | | | | | | | | SI-9581 Fix overflow on Vector take and drop methods
| | * | | SI-9581 Fix overflow on Vector take and drop methodsRui Gonçalves2015-12-061-0/+30
| | |/ / | | | | | | | | | | | | | | | | | | | | Fixes the index/length comparison in `Vector#take` and `Vector#drop` so that they handle all possible integer values. Given the collection's invariants `startIndex >= endIndex` and `0 >= startIndex, endIndex`, it is sufficient to change the arithmetic in the comparison as done in this commit to avoid overflows. As cases when `n <= 0` are handled beforehand, `endIndex - n` cannot overflow, contrary to `startIndex + n`. If without the danger of overflows the condition yields true, on the other hand, `startIndex + n` cannot overflow as it is smaller than `endIndex` (as the previous formulation of the condition shows).
| * / / Make all of partest work in the sbt buildStefan Zeiger2015-12-041-4/+5
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Fix the scoping of files/lib/*.jar. These files were not on the classpath when running partest from sbt. - Pass the same standard Java options to partest as from the command line. This requires new versions of scala-partest and scala-partest-interface. - Fix the classpath scanning in jvm/innerClassEnclMethodJavaReflection. It only worked for JARs and relative directories but not for absolute directory paths (which are produced by sbt).
* | | SI-9599 Multiple @todo formatted with comma on separate linepeterz2016-01-292-0/+13
| | |
* | | Merge pull request #4917 from retronym/ticket/9629Jason Zaugg2016-01-292-0/+29
|\ \ \ | | | | | | | | SI-9629 Emit missing 'pattern must be a value' error
| * | | SI-9629 Emit missing 'pattern must be a value' errorJason Zaugg2016-01-252-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The error used to only be emitted for top-level patterns. This commit moves it into `typedInternal` so it works for nested patterns. It uses the typer mode to know when to fire.
* | | | SI-9398 Treat case classes as one-element ADTs for analysisJason Zaugg2016-01-2914-12/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, exhaustivity analysis only runs for scrutinees with a sealed type. This commit treats any case class as a one-element, sealed type to enable additional analysis, such as in the new test case.
* | | | SI-9630 Fix spurious warning related to same-named case accessorsJason Zaugg2016-01-299-0/+101
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hash consing of trees within pattern match analysis was broken, and considered `x1.foo#1` to be the same tree as `x1.foo#2`, even though the two `foo`-s referred to different symbols. The hash consing was based on `Tree#correspondsStructure`, but the predicate in that function cannot veto correspondance, it can only supplement the default structural comparison. I've instead created a custom tree comparison method for use in the pattern matcher that handles the tree shapes that we use.
* | | Merge pull request #4735 from soc/SI-9437Lukas Rytz2016-01-267-0/+161
|\ \ \ | | | | | | | | SI-9437 Emit and support parameter names in class files
| * | | SI-9437 Emit and support parameter names in class filesSimon Ochsenreither2016-01-257-0/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | JEP 118 added a MethodParameters attribute to the class file spec which holds the parameter names of methods when compiling Java code with `javac -parameters`. We emit parameter names by default now.
* | | | Rename junit tests to end in *Test to make them run in ANTLukas Rytz2016-01-254-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | Our ANT script only runs junit tests that match *Test.class. https://github.com/scala/scala/blob/1081e718f8f8e174dbf615e42b157e187d3d3886/build.xml#L1467
* | | | Rewrite test: no local for underscoreLukas Rytz2016-01-255-49/+19
| | | |
* | | | Rewrite test: no null in patmatLukas Rytz2016-01-255-40/+13
| | | |
* | | | Rewrite test: no type test on primitives in patmatLukas Rytz2016-01-255-34/+19
| | | |
* | | | Rewrite test for SI-7006Lukas Rytz2016-01-255-61/+24
| | | |
* | | | Rewrite test for inlining higher-order functionsLukas Rytz2016-01-253-92/+20
| | | |
* | | | Rewrite test for inlining from sealed classLukas Rytz2016-01-254-56/+29
| | | |
* | | | Rewrite copy propagation testLukas Rytz2016-01-253-191/+73
| | | |
* | | | Rewrite test for SI-5313Lukas Rytz2016-01-253-67/+92
| | | |
* | | | Rewrite test for SI-6955Lukas Rytz2016-01-252-33/+28
| | | |
* | | | Rewrite test for SI-6956Lukas Rytz2016-01-252-31/+58
| | | |
* | | | Merge remote-tracking branch 'upstream/2.12.x' into opt/elimBoxesLukas Rytz2016-01-24154-392/+768
|\ \ \ \ | | |/ / | |/| |
| * | | Add partial appearance update of inheritence graphs in scaladocFelix Mulder2016-01-231-1/+0
| |/ / | | | | | | | | | | | | | | | | | | | | | This commit updates color and shape of the inheritence graphs. Also adds a dropshadow on hover instead of opacity change. Graphviz broke upon trying to include svg buttons instead of png. Looking for a solution.
| * | SD-70 Don't share footnotes across multiple calls to universe.showRawLukas Rytz2016-01-193-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | Before this commit, multiple invocations of universe.showRaw used a shared weak map that caches footnotes. If the two printed objects have equal components printed as footnotes, e.g., an equal TypeRef, the result of the second invocation depends on whether the object has been collected (and removed from the weak map) or not. See https://github.com/scala/scala-dev/issues/70#issuecomment-171701671
| * | Merge pull request #4903 from som-snytt/issue/9622Jason Zaugg2016-01-181-0/+4
| |\ \ | | | | | | | | SI-9622 Native method may be private
| | * | SI-9622 Native method may be privateSom Snytt2016-01-131-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | This was lost in a refactor. https://github.com/scala/scala/commit/290f687fb6ab91b6aef62d871036ddc3829f12b4
| * | | Merge pull request #4898 from soc/SI-8700Lukas Rytz2016-01-1410-0/+72
| |\ \ \ | | | | | | | | | | SI-8700 Exhaustiveness warning for enums from Java source
| | * | | SI-8700 Exhaustiveness warning for enums from Java sourceSimon Ochsenreither2016-01-1410-0/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until now, the warning was only emitted for enums from Java class files. This commit fixes it by - aligning the flags set in JavaParsers with the flags set in ClassfileParser (which are required by the pattern matcher to even consider checking exhaustiveness) - adding the enum members as childs to the class holding the enum as done in ClassfileParser so that the pattern matcher sees the enum members when looking for the sealed children of a type
| * | | | Fix problems with a locale-dependent decimal mark in StringContextTestMichał Pociecha2016-01-131-16/+36
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | Depending on the current locale one can get 3,400000e+00 instead of 3.400000e+00 so the expected result should take this into account. It's a similar change to one I made some time ago in 2.11.x: https://github.com/scala/scala/pull/4204
| * | | Make StringContextTest pass on WindowsLinas Medziunas2016-01-131-3/+2
| |/ / | | | | | | | | | | | | | | | One assertion in StringContextTest."f interpolator baseline"() was relying on platform specific newline encoding, making it fail when run on Windows.
| * | Merge pull request #4875 from slothspot/ticket/9454Lukas Rytz2015-12-181-0/+1
| |\ \ | | | | | | | | [SI-9454] Add isAlive method into sys.process.Process trait
| | * | [SI-9454] Add isAlive method into sys.process.Process traitDmitry Melnichenko2015-12-111-0/+1
| | | |
| * | | Remove unused imports and other minor cleanupsSimon Ochsenreither2015-12-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Language imports are preceding other imports - Deleted empty file: InlineErasure - Removed some unused private[parallel] methods in scala/collection/parallel/package.scala This removes hundreds of warnings when compiling with "-Xlint -Ywarn-dead-code -Ywarn-unused -Ywarn-unused-import".
| * | | Merge pull request #4729 from retronym/topic-trait-defaults-moduleLukas Rytz2015-12-186-4/+57
| |\ \ \ | | | | | | | | | | Desugar module var and accessor in refchecks/lazyvals
| | * | | Desugar module var and accessor in refchecks/lazyvalsJason Zaugg2015-10-086-4/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than leaving it until mixin. The broader motivation is to simplify the mixin phase of the compiler before we get rid of implementatation classes in favour of using JDK8 default interface methods. The current code in mixin is used for both lazy val and modules, and puts the "slow path" code that uses the monitor into a dedicated method (`moduleName$lzyCompute`). I tracked this back to a3d4d17b77. I can't tell from that commit whether the performance sensititivity was related to modules or lazy vals, from the commit message I'd say the latter. As the initialization code for a module is just a constructor call, rather than an arbitraryly large chunk of code for a lazy initializer, this commit opts to inline the `lzycompute` method. During refchecks, mixin module accessors are added to classes, so that mixed in and defined modules are translated uniformly. Trait owned modules get an accessor method with an empty body (that shares the module symbol), but no module var. Defer synthesis of the double checked locking idiom to the lazyvals phase, which gets us a step closer to a unified translation of modules and lazy vals. I had to change the `atOwner` methods to to avoid using the non-existent module class of a module accessor method as the current owner. This fixes a latent bug. Without this change, retypechecking of the module accessor method during erasure crashes with an accessibility error selecting the module var. In the process, I've tweaked a tree generation utility method to wvoid synthesizing redundant blocks in module desugaring.
| * | | | Merge pull request #4265 from retronym/ticket/9110Lukas Rytz2015-12-181-0/+27
| |\ \ \ \ | | | | | | | | | | | | SI-9110 Pattern `O.C` must check `$outer eq O` for a top level O
| | * | | | SI-9110 Pattern `O.C` must check `$outer eq O` for a top level OJason Zaugg2015-11-261-0/+27
| | | |/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The outer check was not being generated when the prefix was a top level module. The enclosed test shows that we in fact must synthesize the outer check in that case. Perhaps the bug was introduced by neglecting to consider that a module can inherit member classes.
| * / | | SI-9583: Update SystemProperties.empty to return a mutable.Map to fix buildersShane Delmore2015-12-101-0/+27
| |/ / /
| * | | Merge pull request #4863 from retronym/topic/leaner-patmat-codegenLukas Rytz2015-11-241-10/+4
| |\ \ \ | | | | | | | | | | DRY-er trees in pattern matcher code gen.
| | * | | DRY-er trees in pattern matcher code gen.Jason Zaugg2015-11-241-10/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than building a cascade of if/elses, push additional conditions into a conjunction in the condition of a single if/else. This is possible when emitting conditions for the list of arguments of a pattern. Here's an example of the improvement to post-pattern matcher trees: https://gist.github.com/retronym/0d8f7126157061d72b81 While we could try to rely on the optimizer to coalesce the repeated else clauses, it seems wasteful to emit the code in that way in the first place.
| * | | | Merge commit '8eb1d4c' into merge-2.11-to-2.12-nov-24Lukas Rytz2015-11-2421-27/+155
| |\ \ \ \ | | | |_|/ | | |/| |
| | * | | Merge pull request #4828 from retronym/topic/existential-containsLukas Rytz2015-11-163-0/+15
| | |\ \ \ | | | | | | | | | | | | Attacking exponential complexity in TypeMaps
| | | * | | Attacking exponential complexity in TypeMapsJason Zaugg2015-11-133-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Don't normalize existentials during the `contain`-s type map; `ExistentialType#normalize' calls contains internally and an exponential blowup ensues. - Ensure that the type map used in variance validation never returns modified types in order to avoid needless cloning of symbols. The enclosed test case still gets stuck in Uncurry, thanks to the way that `TypeMap#mapOver(List[Symbol])` recurses through the type first to check whether the type map would be an no-op or not. If not, it repeats the type map with cloned symbols. Doing the work twice at each level of recursion blows up the complexity. Removing that "fast path" allows the enclosed test to compile completely. As at this commit, it gets stuck in uncurry, which dealiases `s.List` to `s.c.i.List` within the type. Some more background on the troublesome part of `TypeMap`: http://lrytz.github.io/scala-aladdin-bugtracker/displayItem.do%3Fid=1210.html https://github.com/scala/scala/commit/f8b2b21050e7a2ca0f537ef70e3e0c8eead43abc
| | * | | | Merge pull request #4839 from SethTisue/reword-dependent-type-errorSeth Tisue2015-11-141-2/+2
| | |\ \ \ \ | | | | | | | | | | | | | | less confusing wording for a dependent method type error
| | | * | | | less confusing wording for a dependent method type errorSeth Tisue2015-11-071-2/+2
| | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | note to reviewers: the error messages in this file are over the place about whether they're called "parameter sections", or "argument lists", or what, so there's no point in being picky about that here for context see SI-823
| | * | | | Merge pull request #4809 from wpopielarski/delambdafy-multiple-outputsJason Zaugg2015-11-131-0/+73
| | |\ \ \ \ | | | | | | | | | | | | | | Multi output problem with delambdafied compilation
| | | * | | | Test addedwpopielarski2015-11-061-0/+73
| | | |/ / /
| | * | | | Merge pull request #4843 from SethTisue/scaladoc-little-d-pleaseJason Zaugg2015-11-139-9/+9
| | |\ \ \ \ | | | | | | | | | | | | | | it's Scaladoc, not ScalaDoc
| | | * | | | it's Scaladoc, not "ScalaDoc" or "Scala doc"Seth Tisue2015-11-129-9/+9
| | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | renaming the existing ScalaDoc and ScalaDocReporter classes might break stuff, sadly, but at least we can fix the rest
| | * | | | Merge pull request #4810 from ruippeixotog/fix-mutable-setlike-clearAdriaan Moors2015-11-121-0/+26
| | |\ \ \ \ | | | | | | | | | | | | | | SI-9497 Fix SetLike#clear() default implementation