summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Moved meta annotations to annotation.meta, plus.Paul Phillips2011-10-102-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It took me a long time to find a trivial error while adjusting the annotation packages, so I spent even longer trying to make sure next time it would take me less time. It's the usual business of eliminating duplication and unnecessary indirection. Behavioral note: there was no consistency or deducible reasoning regarding when annotation checks would be performed against the typeSymbol directly (thus excluding annotation subclasses) or when they would do a subclass check. I saw no reason it shouldn't always be a subclass check; if the annotation isn't supposed to be subclassed it should be final, and if it is, then the subclasses had probably better not stop exhibiting the behavior of the base class. Example: this now draws deprecated warnings, but did not before. class bippy extends deprecated("hi mom", "burma shave") @bippy def f = 5 (The deprecation message isn't printed so we're not there yet, but closer.) There is some new internal documentation on annotations, sadly lacking in my famous ascii diagrams, and some new conveniences. Review by rytz.
* Flipped varargs eta-expansion behavior.Paul Phillips2011-10-098-3/+34
| | | | | | | | | | | (T*)U now eta-expands to Seq[T] => U, not T* => U. There is a transition command line switch to get the old behavior for any who may have relied upon it: -Yeta-expand-keeps-star Closes SI-4176, no review.
* Fix for error printing regression.Paul Phillips2011-10-092-0/+10
| | | | | | One's devotion to aesthetics must not be allowed to trump one's commitment to clearly delineated tuplehood. Closes SI-5067, no review.
* Add "Google tokens for Scala" for symbolic name...Kato Kazuyoshi2011-10-062-2/+15
| | | | | | | | | | | | | Add "Google tokens for Scala" for symbolic names on Scaladoc. Review by ureche. We can't use Scala's symbolic names on Google. Instead of waiting Google, we'll introduce mapping from the names to equivalent searchable representations. This idea proposed by Grzegorz Kossakowski. https://groups.google.com/group/scala-internals/browse_thread/thread/413 dbc691542f76f
* Closing soundness hole in variance checking.Paul Phillips2011-10-062-0/+26
| | | | | See SI-5060. Review by odersky.
* Imprison the lisp test, no review.Paul Phillips2011-10-062-0/+0
|
* Restores XML entity fix.Paul Phillips2011-10-042-0/+18
| | | | | | Did something eat some whitespace? I don't know. This is almost the same commit as r25783, but with different whitespace. No review.
* Revert "Fix for XML entity bug."Paul Phillips2011-10-042-18/+0
| | | | | | Until I have a second to figure out how a checkfile whose contents are *recorded from running the test case* can fail to match. No review.
* Add a small "template engine" and separete HTML...Kato Kazuyoshi2011-10-041-2/+19
| | | | | | Add a small "template engine" and separete HTML from Scaladoc's source code. Review by ureche.
* Add some basic tests for Scaladoc.Kato Kazuyoshi2011-10-042-0/+51
|
* Missing test closes #4494. no reviewHubert Plociniczak2011-10-042-0/+4
|
* Fix for XML entity bug.Paul Phillips2011-10-042-0/+18
| | | | | | | | | | | | Hard to believe a bug like this can exist this long. Cay Horstman showed me. // Hey, where's my eacute? scala> <city name="San Jos&eacute;"/>.attributes foreach println name="San Jos&;" No review.
* Repairing bitrot with serialization.Paul Phillips2011-10-031-12/+5
| | | | | | | | The comment in SyntheticMethods and the comment in the serialization test said exactly opposite things. The logic at work all seems to be invalid anyway since nested objects are not treated like lazy vals, they have no bitmap. Serialize everything serializable. Review by plocinic.
* Selective dealiasing when printing errors.Paul Phillips2011-10-0360-245/+253
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | *** 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.
* Shuffling classes around.Paul Phillips2011-10-018-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Old Man Reflection is coming home and he's not going to like finding out a bunch of beans have moved into his reflecting room. We had better evict those guys before he blows his stack. scala.reflect.*Bean* --> scala.beans.* scala.beans, that's kind of a fancy package name for some beans. I figure it's time to start fishing or cutting bait on this kind of thing. I don't even know what beans are, but if we're going to have them in the mainline, the least surprising place to find them is scala.beans. If we don't want to put them in scala.beans for whatever reason, then I say they don't belong in trunk at all. Bonus round: scala.annotation.target --> scala.beans.meta I don't know if there is any more unfortunate name for a package possible than "target". Maybe ".svn" or ".git" if you could have dots in package names. Package CVS wouldn't hit too hard these days. Package lib_managed? I'll try to come up with something. In any case this golden opportunity could not be squandered. There is a new starr included, because GenJVM contains all kinds of shooting-from-the-hip Bean-related name hardcoding. (Yes, still. I ran out of stones. So a few birds escape with their lives... this time.)
* Removed redundant testMartin Odersky2011-09-301-4/+0
|
* Massively simplified caseFieldAccessors.Paul Phillips2011-09-302-2/+2
| | | | | | | | | It's nice when you can delete such absurd complication by figuring out how to avoid it in the first place. Also includes some Namer cleanup as I tried to follow the logic involved to fix a protected[this] accessor bug. No review.
* Following Paul's detective work, fixed Java cla...Martin Odersky2011-09-292-0/+18
| | | | | | Following Paul's detective work, fixed Java class loading in reflection. Moved test code.scala into checkin build. Yay!
* A few pending refinements to SyntheticMethods.Paul Phillips2011-09-281-1/+0
| | | | | No review.
* Improved an error message.Paul Phillips2011-09-284-16/+23
| | | | | Closes SI-4319, no review.
* Fix bug in ModuleDef elimination.Paul Phillips2011-09-281-0/+12
| | | | | Fixes corner case diagnosed by miguel. Closes SI-5012, no review.
* BigDecimal adjustments.Paul Phillips2011-09-282-0/+41
| | | | | | More sensible use of MathContext, plus some BigDecimal tests. Contributed by Erik Osheim. Closes SI-4981, no review.
* Fixes #4895.Aleksandar Pokopec2011-09-281-0/+20
| | | | | | | The size map size computation for parallel hash sets was invalid. No review.
* Fixes #4894.Aleksandar Pokopec2011-09-281-0/+27
| | | | | | | Adds Growable and Shrinkable to parallel maps and sets. No review.
* Adding latest failures to code.scala test.Martin Odersky2011-09-281-2/+10
|
* Added Paul's failing scenario to test file.Martin Odersky2011-09-281-1/+12
|
* Removed a log file from the test dir.Aleksandar Pokopec2011-09-271-6/+0
| | | | | No review.
* Fixes #4716.Aleksandar Pokopec2011-09-272-0/+16
| | | | | | | | | | | During the generation of the specialized method implementation, local lazy vals in specialized classes were getting duplicated and assigned new (different) names. Also, the identifiers referring to them were not getting updated. This is fixed now. Further, the mutable flag is no longer getting set for a lazy val during method body duplication. Review by Dragos.
* Correcting resolution of top-level objects in r...Martin Odersky2011-09-271-1/+1
| | | | | Correcting resolution of top-level objects in reflection.
* Added new test file for reification/relfection,...Martin Odersky2011-09-271-0/+33
| | | | | | Added new test file for reification/relfection, which does not work yet under partest, but works when run individually.
* removed redundant testMartin Odersky2011-09-271-20/+0
|
* ProductN, and method synthesis toolbox.Paul Phillips2011-09-265-87/+90
| | | | | | | | | | | | | | | | | | | | | | - Finished giving case classes a ProductN parent, and flipped it on. The "finish" part involved not breaking existing code where case classes manually extend the appropriate ProductN. (Like, Tuple 1-22.) - Generalized most of SyntheticMethods to ease method creation and class manipulation in general. - Fixed bugs related to the above, like the fact that this used to be a compile error: scala> case class Foo() extends Serializable <console>:28: error: trait Serializable is inherited twice case class Foo() extends Serializable ^ It feels like there's a better way to eliminate the duplicate parents, but after spending a lot of time chasing my tail in that peril-fraught zone between namer and typer, I don't see an easy path to improve on it. Closes SI-1799. For that modification to Typers, review by odersky.
* Disable currently failing pos/code.scala.Hubert Plociniczak2011-09-261-0/+0
|
* Fixes #4351.Aleksandar Pokopec2011-09-262-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | Added an "Abstract" method info to the specialized phase, which denotes that no implementation should be generated. Previously: trait A[@specialized(Boolean) T] { def foo: T } used to generate: trait A$mcZ$sp extends A[Boolean] { def foo$mcZ$sp = this.foo } which caused cyclic calls because of linearization rules when several traits are mixed together. Now, the following is generated: trait A$mcZ$sp extends A[Boolean] { def foo$mcZ$sp: Boolean } Review by dragos.
* Added test for the completion problem in the pr...skyluc2011-09-264-0/+53
| | | | | | Added test for the completion problem in the presentation compiler reported in the scala-ide ticket 1000620.
* Getting liftCode to work.Martin Odersky2011-09-254-1/+1
|
* Handling Freevars in Importers and discovering ...Martin Odersky2011-09-231-1/+3
| | | | | | Handling Freevars in Importers and discovering whole new classes of errors in Liftcode.
* Now correctly handles moduleclasses in ImportersMartin Odersky2011-09-231-7/+3
|
* Back to square one.Hubert Plociniczak2011-09-237-40/+36
| | | | | | | | | | | | | | Current design of error trees complicates the design of reflection library, and introduces sometimes unnecessary boilerplate and since I do not want to stall that work I am reverting all the changes related to error trees. A different design is currently under consideration but work will be done on separate branch on github. Revisions that got reverted: r25705, r25704 (partially), r25673, r25669, r25649, r25644, r25621, r25620, r25619 Review by odersky and extempore.
* Removed devirtualize.Paul Phillips2011-09-221-1/+1
| | | | | | | It was time. Removed unused flags and devirtualize detritus. Cleaned up flags a bit further. Fixed the contents of phaseNewFlags in those places where it was inaccurate. No review.
* more tweaks to symbol importing; not done yetMartin Odersky2011-09-221-3/+3
|
* Started work on compiler toolbox that can compi...Martin Odersky2011-09-211-1/+16
| | | | | | Started work on compiler toolbox that can compile reflect trees at runtime.
* Changes to Liftcode to use new reflection seman...Martin Odersky2011-09-203-8/+12
| | | | | | Changes to Liftcode to use new reflection semantics, where a compiler uses type checking.
* Fixes #4417.Aleksandar Pokopec2011-09-202-0/+24
| | | | | Review by Dragos.
* Added new disabled test for eclipse scala-ide t...Micro Dotta2011-09-163-0/+11
| | | | | | | Added new disabled test for eclipse scala-ide ticket1000609. Corrected test framework to fail nicely when the tree retrieved after an has no associated symbol.
* Refine lub calculation.Paul Phillips2011-09-131-0/+4
| | | | | | | When a reasonable lub cannot be arrived at by direct means, use the bounds of the lub inputs to derive bounds for the lub rather than giving up. Closes SI-4938, review by moors.
* Helping Proxy equal itself.Paul Phillips2011-09-102-0/+10
| | | | | Fix for bumpy proxy equals. Closes SI-4807, no review.
* Fix various InnerClasses bugs.Grzegorz Kossakowski2011-09-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit fixes two major problems: 1. InnerClasses table missed entries that would close the chain between nested and top-level class. 2. In some situations, classes corresponding to objects would be not be reported in the InnerClasses table. For details it's the best to check SI-4819, SI-4820 and SI-4983. First problem mentioned above was straightforward to fix so I won't be going into details. The second one deserves more attention. From now, classes corresponding to objects are properly reported as inner classes. Also, members (classes, objects) of objects are reported as inner classes of classes corresponding to objects. There's one caveat though: top level objects get two classes (regular and mirror). Members of top-level objects are declared as inner classes of *mirror* class and not regular one. The reason for that is to allow importing them from Java. For example: object A { class B } will be compiled into following classes: A, A$, A$B. If we declared A$B as inner class of A$ (regular class for objects) then it would be impossible to import B using "import A.B" or "import A$.B" constructs. The reason for that is that Java compiler seems to blindly put dollars instead of looking at InnerClasses attribute. Since non-top-level objects don't have a mirror class it's impossible to use the same solution. Thus, in case like this: object A { object B { class C } } it's impossible to import C from Java. That's the tradeoff for fixing other (more serious) problems. It's never been possible to do that in a clean way so we are not making situation worse. As a nice consequence of this change, we get better way to refer to inner members of top-level objects. It's been reflected in one of test-cases that is updated by this change. Fixes SI-4789 SI-4819 SI-4820 SI-4983 and possibly some other tickets related to reflection. Review by extempore, dragos.
* Brought back unrelated type comparison warning.Paul Phillips2011-09-092-23/+30
| | | | | | Figured out how to turn it on by default, even. Closes SI-4979, no review.
* Allow for the overriding of objects.Paul Phillips2011-09-088-1/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Various and sundry manipulations to allow for objects to be overridden when the mood is right. It is not enabled by default. The major contributor of change turned out to be the decoupling of the FINAL flag (and the "isFinal" test which examines only that flag) and the many semantics which were attributed to this interpretation of finality in different circumstances. Since objects no longer have the FINAL flag automatically applied (only top-level objects and those marked final in source code do) we need apply a more nuanced test. Fortunately there is such a nuanced test: isEffectivelyFinal, which is always true if the FINAL flag is set but also in various other circumstances. In almost every case, you should be testing "isEffectivelyFinal", not "isFinal". To enable overridable objects, use: -Yoverride-objects -Xexperimental // includes the above and others Remain to be done: working out transition logistics. Most likely this would involve bumping the scala signature version, and all objects in versions before that would be assumed final. Review by moors.