summaryrefslogtreecommitdiff
path: root/test/files
Commit message (Collapse)AuthorAgeFilesLines
...
* virtpatmat, hidden behind -YvirtpatmatAdriaan Moors2011-10-2044-0/+307
| | | | | | | | | at least one imminent TODO: undo hardwired generation of if/then/else, and decide based on type whether to call flatMap/orElse or inline those methods from Option review by extempore
* infer singleton when asking for itAdriaan Moors2011-10-202-0/+6
| | | | | | | | | | | | | a type var's constraint now also tracks whether the type var was compared to a stable type if it was, we probably shouldn't widen the type argument that's inferred for this var, as the result will surely fail to type check NOTE: must be enabled using -Xexperimental review by extempore
* 5033: align bound syms when comparing method typesAdriaan Moors2011-10-201-0/+15
| | | | | | | | | | | | can't believe I missed that one... closes SI-5033 more complete test case to make sure the multi-arglist case works as well no review
* dependent methods types are now always enabledAdriaan Moors2011-10-2014-15/+3
| | | | | | | | | | for now, left the old if(settings.YdepMethTpes.value) guards in comments removed *.flags containing -Ydependent-method-types also updated one check file with one fewer error no review
* no need to add an x field to everythingAdriaan Moors2011-10-201-8/+2
| | | | | | | | | | | however, it must be possible to inline Ensuring, ArrowAssoc methods renamed the public val x to something a little less intrusive fixed check file to reflect better error message (see! it wasn't that uncommon for people to write `foo.x` -- NEWS AT ELEVEN) no review
* Cycle defense.Paul Phillips2011-10-193-1/+17
| | | | | | Notice when a typeref's info creates an obvious cycle, so we can see an error instead of a stack overflow. Closes SI-5093, review by moors.
* Fixing valueOfTerm in the repl.Paul Phillips2011-10-182-0/+18
| | | | | | | Impressed at the amount of ticket traffic for an unadvertised internal method. All the more reason to work toward that support repl API. Don't worry, it'll come. Closes SI-4899, no review.
* Shutdown hook modification.Paul Phillips2011-10-182-0/+40
| | | | | | | | Don't mark shutdown hooks as daemon threads, although it does not seem to make any difference. Instead have the code which waits for all threads to be complete be smarted about which codes to monitor. No review.
* Fix for comparison warnings.Paul Phillips2011-10-182-21/+33
| | | | | | | | | | | | true == new java.lang.Boolean(true) will in fact sometimes be true. Also fixes a bug caused by this change in r23627. - lazy val SerializableClass = getClass(sn.Serializable) + lazy val SerializableClass = getClass("scala.Serializable") It used to be java.io.Serializable. Hey, let's not change the meaning of existing symbols which are in active use. No review.
* Fix for multiple evaluation in structural calls.Paul Phillips2011-10-162-0/+25
| | | | | | | | | | | An interesting bug during cleanup: runtime checks on the target of a structural invocation duplicated the selection without regard for the fact that it might be an expression. So if the name of the method being invoked allowed the possibility that the target was a primitive type (such as "toInt") the expression would be evaluated three times. Closes SI-5080, no review.
* Test case closes SI-3898, no review.Paul Phillips2011-10-151-0/+6
|
* Harden the typer against surprise unapply types.Paul Phillips2011-10-152-0/+24
| | | | | Closes SI-5078, no review.
* Fix regression in companion check.Paul Phillips2011-10-151-2/+4
| | | | | | | | | Pulling back from expensive path normalization caused a regression where companions were no longer recognized as such after specialization. (Specifically, the paths turned up as "test.scala" and "./test.scala".) I made it a two-level check, doing the expensive one before failing. Closes SI-5023, no review.
* Another swing at r25823.Paul Phillips2011-10-143-0/+34
| | | | | | I verified this creates identical library bytecode so I anticipate no regressions. Review by prokopec anyway.
* Better error when abstract methods are missing.Paul Phillips2011-10-148-12/+165
| | | | | | | | When many methods are missing, print a list of signatures the way they need to be implemented, and throw in ??? stub implementations so it should be compilable code. If anyone would like this logic exposed more generally (for the IDE or whatever) just let me know. No review.
* Reverted r25823 as it breaks specialization of ...Grzegorz Kossakowski2011-10-131-18/+0
| | | | | Reverted r25823 as it breaks specialization of traits.
* Adjustment to @switch.Paul Phillips2011-10-131-0/+8
| | | | | | Don't require a tableswitch if the matcher elected not to emit one because there were so few cases. No review.
* Propagate self-type to specialized subclasses.Paul Phillips2011-10-111-0/+18
| | | | | Closes SI-5071, review by prokopec.
* Added check file for test.Martin Odersky2011-10-112-3/+3
|
* Simple test case for string interpolation.Martin Odersky2011-10-112-0/+10
|
* 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.
* 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-544/+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.
* 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/+70
| | | | | | 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.
* 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.
* 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-20/+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.
* Getting liftCode to work.Martin Odersky2011-09-254-0/+44
|
* 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.
* Changes to Liftcode to use new reflection seman...Martin Odersky2011-09-202-6/+6
| | | | | | Changes to Liftcode to use new reflection semantics, where a compiler uses type checking.