summaryrefslogtreecommitdiff
path: root/test/files/res
Commit message (Collapse)AuthorAgeFilesLines
* SI-9170 Fix resident compilation / specialization NPEJason Zaugg2015-02-253-0/+13
| | | | | | | | | | | | | | | | | | | The resident compiler does its best to clean the decks at the conclusion of a compilation batch. One part of this is as follows: if the run was erroneous, reset the info of top level symbols defined in this run to the initial state, that is, to a `SourceFileLoader`. However, if the errors came late in the compilation pipeline, the map from symbols to the source files includes the results of the specialization transformation, which ends up with mappings like `Function1$sp... -> null`. This results in a `NullPointerException` on subsequent runs. This commits filters out null source files during the reset process.
* SI-9089 Another REPL/FSC + specialization bug fixJason Zaugg2015-01-153-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | The enclosed test case stopped working in 2.11.5 on the back of https://github.com/scala/scala/pull/4040. The key change was that we ran all post-typer info transformers on each run of the compiler, rather than trying to reuse the results of the previous run. In that patch, I noticed one place [1] in specialization that aggressively entered specialized members into the owning scope, rather than relying on `transformInfo` to place the new members in the scope of the newly created element of the info history. I made that change after noticing that this code could actually mutated scopes of specializaed types at the parser phase, which led to fairly obscure failures. This bug is another one of these obscure failures, and has the same root cause. We effectively "double specialiaze" Function0, which trips an assertion when `method apply$mcI$sp` is found twice in a scope. I have found another spot that was directly manipulating the scope, and removed the offending code. [1] https://github.com/scala/scala/pull/4040#commitcomment-8531516
* SI-6613 Make Java enums work in FSC / REPLJason Zaugg2014-10-094-0/+10
| | | | | | | | | | | | We needed to hop from the enum's owner to its companion module in an early phase of the compiler. The enclosed test used to fail when this lookup returned NoSymbol on the second run of the resident compiler when triggered from `MixinTransformer`: the lookup didn't work after the flatten info transform. This is related to the fact that module classes are flattened into the enclosing package, but module accessors remain in the enclosing class.
* SI-8871 Fix specialization under REPL / FSCJason Zaugg2014-10-094-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The transformation of applications to specialized methods relies on the owner of said method having had the specialization info transform run which stashes a bunch of related data into per-run caches such as `SpecializeTypes#{typeEnv}`. Recently, we found that per-run caches didn't quite live up to there name, and in fact weren't being cleaned up before a new run. This was remedied in 00e11ff. However, no good deed goes unpunished, and this led to a regression in specialization in the REPL and FSC. This commit makes two changes: - change the specialization info tranformer to no longer directly enter specialized methods into the `info` of whatever the current phase happens to be. This stops them showing up `enteringTyper` of the following run. - change `adaptInfos` to simply discard all but the oldest entry in the type history when bringing a symbol from one run into the next. This generalizes the approach taken to fix SI-7801. The specialization info transformer will now execute in each run, and repopulate `typeEnv` and friends. I see that we have a seemingly related bandaid for this sort of problem since 08505bd4ec. In a followup, I'll try to revert that.
* Generalize OverridingPairs to SymbolPairs.Paul Phillips2013-10-051-3/+3
| | | | | | | | | | | | | | | | | Increases your chance of knowing what is going on in OverridingPairs. Introduces some new abstractions which I hope for your own sakes you will put to use in some way: RelativeTo: operations relative to a prefix SymbolPair: two symbols being compared for something, and the enclosing class where the comparison is being performed Fixed a minor bug with access by accident by way of more principled pair analysis. See run/private-override.scala. Upgraded the error message issued on certain conflicts to give the line numbers of both conflicting methods, as opposed to just one and you go hunting.
* Cull extraneous whitespace.Paul Phillips2013-09-187-17/+17
| | | | | | | | | | | | | | | | | | | | | One last flurry with the broom before I leave you slobs to code in your own filth. Eliminated all the trailing whitespace I could manage, with special prejudice reserved for the test cases which depended on the preservation of trailing whitespace. Was reminded I cannot figure out how to eliminate the trailing space on the "scala> " prompt in repl transcripts. At least reduced the number of such empty prompts by trimming transcript code on the way in. Routed ConsoleReporter's "printMessage" through a trailing whitespace stripping method which might help futureproof against the future of whitespace diseases. Deleted the up-to-40 lines of trailing whitespace found in various library files. It seems like only yesterday we performed whitespace surgery on the whole repo. Clearly it doesn't stick very well. I suggest it would work better to enforce a few requirements on the way in.
* SI-5489 Avoid accidentally adding members to Object in erasure.Jason Zaugg2012-07-013-0/+20
| | | | | | | | | | | `Symbol#classBound` assumed that `refinedType` would return a a type based on new refinement class symbol; but that isn't so during erasure. Instead, it returns the first super class, into which we entered new members. Needless to say, the next run of the resident compiler didn't take kindly to these hijinks. To remedy the situation, I've added (yet another) condition on `phase.erasedTypes`.
* SI-5167 An impl class method should refer to its own parameter symbols.Jason Zaugg2012-06-034-0/+25
| | | | | | | | Rather than those of the original method in the trait. If they are shared, parameter renaming in the implementaion class is visible in the original method. This led to a crash in the resident compiler when looking up the default argument getter.
* Begone t1737...Hubert Plociniczak2011-11-027-17/+17
|
* Selective dealiasing when printing errors.Paul Phillips2011-10-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | *** Important note for busy commit log skimmers *** Symbol method "fullName" has been trying to serve the dual role of "how to print a symbol" and "how to find a class file." It cannot serve both these roles simultaneously, primarily because of package objects but other little things as well. Since in the majority of situations we want the one which corresponds to the idealized scala world, not the grubby bytecode, I went with that for fullName. When you require the path to a class (e.g. you are calling Class.forName) you should use javaClassName. package foo { package object bar { class Bippy } } If sym is Bippy's symbol, then sym.fullName == foo.bar.Bippy sym.javaClassName == foo.bar.package.Bippy *** End important note *** There are many situations where we (until now) forewent revealing everything we knew about a type mismatch. For instance, this isn't very helpful of scalac (at least in those more common cases where you didn't define type X on the previous repl line.) scala> type X = Int defined type alias X scala> def f(x: X): Byte = x <console>:8: error: type mismatch; found : X required: Byte def f(x: X): Byte = x ^ Now it says: found : X (which expands to) Int required: Byte def f(x: X): Byte = x ^ In addition I rearchitected a number of methods involving: - finding a symbol's owner - calculating a symbol's name - determining whether to print a prefix No review.
* Renamed tests named bugXXX to tXXX, no review.Paul Phillips2011-08-2436-29/+29
|
* Reversed the values of "is" and "is not" in rec...Paul Phillips2011-08-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Reversed the values of "is" and "is not" in recent for comprehension deprecation. DO NOT BLOW HATCH REPEAT DO NOT BLOW HATCH "Roger! Hatch blown." Events reveal it was all baby, no bathwater. It turns out that the specification is merely a document, not infallible holy writ as we had all previously believed. So it is not the ABSENCE of val in a for comprehension assignment which is deprecated, it is the PRESENCE of val. Summarizing again, more accurately perhaps: for (x <- 1 to 5 ; y = x) yield x+y // THAT's the one for (val x <- 1 to 5 ; y = x) yield x+y // fail for (val x <- 1 to 5 ; val y = x) yield x+y // fail for (x <- 1 to 5 ; val y = x) yield x+y // deprecated No review.
* I wrote a warning when nullary methods return U...Paul Phillips2011-04-283-4/+4
| | | | | | | | | | | | | | | I wrote a warning when nullary methods return Unit. I wimped out of including it in this patch because we had about 200 of them, and that's what is fixed in this patch. I will add the warning to some kind of "-Xlint" feature after 2.9. This is motivated at least partly by the resolution of #4506, which indicates the distinction between "def foo()" and "def foo" will continue to jab its pointy stick into our eyes, so I believe we have a minimal duty of at least following our own advice about what they mean and not making a semirandom choice as to whether a method has parens or not. Review by community.
* Some fixes for partest issues.Paul Phillips2011-01-121-3/+0
| | | | | | | | prejudice and puts the new process code to work instead. There are still a couple bugs on my short term partest list. If this commit causes some weird issue which only arises on virtualized windows you can expect to hear from me next by postcard from st. lucia. No review.
* Rolled partest back to r21328.Paul Phillips2010-05-061-2/+3
| | | | | | | | changes necessary to plug it back in while preserving everything which has happened since then in tests and such, but we should be the lookout for overreversion. Review by phaller (but as a formality, I don't think it requires direct review.)
* If I work on this patch any longer without chec...Paul Phillips2010-04-051-3/+2
| | | | | | | | | | | | | | | | If I work on this patch any longer without checking in I will go stark raving mad. It is broken up into a couple pieces. This one is the changes to test/. It includes fixing a bunch of tests, removing deprecated constructs, moving jars used by tests to the most specific plausible location rather than having all jars on the classpath of all tests, and some filesystem layout change (continuations get their whole own srcpath.) This would be the world's most tedious review, so let's say no review. [Note: after this commit, I doubt things will build very smoothly until the rest of the partest changes follow. Which should only be seconds, but just in case.]
* [no content change] Fixed all SVN properties: m...Gilles Dubochet2009-09-2411-11/+11
| | | | | | | | [no content change] Fixed all SVN properties: mimes, EOL, executable. Id expansion is consistently enabled for Scala/Java/C# sources in 'src/' and consistently disabled and removed from everywhere else: there should not be any dead Id tags anymore.
* Named and default argumentsLukas Rytz2009-05-301-3/+3
| | | | | | | - MethodTypes now have (params: List[Symbol]) - "copy"-methods for case classes - the "copy" object in the compiler is now called "treeCopy"
* SuperSABBUS runs the full test suite and is fas...Gilles Dubochet2008-03-068-16/+16
| | | | | | | | | | SuperSABBUS runs the full test suite and is faster. - Reorganised build for better dependencies. - Various improvements and fixes in build process' correction and ease-of-use. - Partest Ant task can now run resident tests. - Fixed some issues with Partest.
* Changed paths in resident compiler tests + scal...Philipp Haller2008-03-048-16/+16
| | | | | | Changed paths in resident compiler tests + scalatest so that partest can emulate it.
* Fixed commit test (which breaks partest res tes...Philipp Haller2008-02-298-16/+16
| | | | | Fixed commit test (which breaks partest res tests again)
* Removed superfluous filesPhilipp Haller2008-02-298-35/+0
|
* Modified scalatest and .res files so that parte...Philipp Haller2008-02-2916-16/+51
| | | | | Modified scalatest and .res files so that partest can simulate it
* Massive check-in for IDE.Sean McDirmid2007-09-171-1/+1
|
* [cont'd] suppress "scala." prefix in string rep...Adriaan Moors2007-04-191-3/+3
| | | | | [cont'd] suppress "scala." prefix in string representation of types (in error messages,..) -- forgot to update these check-files
* added one test, changed to check files.Martin Odersky2007-01-081-1/+1
|
* renamed directory 'resident' to match '--res' o...michelou2006-11-2929-0/+216
renamed directory 'resident' to match '--res' option