summaryrefslogtreecommitdiff
path: root/test/files/neg
Commit message (Collapse)AuthorAgeFilesLines
* Moved ClassfileAnnotation/StaticAnnotation/Anno...Paul Phillips2010-12-062-2/+4
| | | | | | | Moved ClassfileAnnotation/StaticAnnotation/Annotation/TypeConstraint into scala.annotation and enabled the deprecated type aliases in scala.* to point there. Also enclosed is a new starr to bootstrap. No review.
* Introducing scala.system, the product of a whir...Paul Phillips2010-12-045-10/+10
| | | | | | | | | | Introducing scala.system, the product of a whirlwind couple of hours. More useful stuff than you can shake three sticks at. See the scala.system package object. It's even documented. And since it has methods error and exit, proceeded to deprecate the ones in Predef. No review.
* Starting the mopping up now that names have som...Paul Phillips2010-12-031-2/+4
| | | | | | | | | | | | | | Starting the mopping up now that names have some more sense of their place in the universe. Cleaned up some heavy multi-boolean logic. Added more documentation on the relationships between entities in Symbols and some other compiler things which often blur together. Fun fact: the incorrect usage of nme.ScalaObject in Contexts which I reported when first broaching the namespace subject became a compile time error during the writing of this patch, because there is no longer any such thing as nme.ScalaObject. It's a little bit like magic. No review.
* close #3946.Lukas Rytz2010-12-033-0/+13
|
* immutable.Map keySet returns immutable.Set.Paul Phillips2010-12-032-3/+3
|
* More fiddling with checkSensible.Paul Phillips2010-12-012-8/+9
| | | | | | | | | | warnings. Fixed some bugs revealed by said warnings, and made some minor changes to avoid warnings. (Technically it's not a bug to have unrelated classes compare as equal, but it so often is a bug that it behooves us not to do it intentionally so the warnings stand out.) Disabled the most useful warning for the moment since it'd be wrong with some frequency. No review.
* Parser relaxation so that one can name the type...Paul Phillips2010-11-302-2/+16
| | | | | | | Parser relaxation so that one can name the type variables in a constructor pattern match: this is a prerequisite to realizing the full potential of gadts. (Nothing new works here however.) No review.
* Found several minor thigns wrong with checkSens...Paul Phillips2010-11-302-23/+27
| | | | | | | Found several minor thigns wrong with checkSensible, which tries to issue warnings for comparisons which will always be true or false. No review.
* "I invite everyone to change this rule, and obs...Paul Phillips2010-11-291-1/+1
| | | | | | | | | | | | | | | | | | | | | "I invite everyone to change this rule, and observe what breaks!" This much beloved comment from #1208 has been on my radar for two years. The worm has turned. Closes #1208. The inferred type of an object is now Foo.type instead of "object Foo". What once was this: scala> val x: Map[Int, Singleton] = Map(1 -> None) <console>:5: error: type mismatch; found : (Int, object None) required: (Int, Singleton) Now exudes a pleasing aura of workingness: scala> val x: Map[Int, Singleton] = Map(1 -> None) x: Map[Int,Singleton] = Map(1 -> None) No review.
* Did some more polishing on the infamous partial...Paul Phillips2010-11-281-1/+2
| | | | | | Did some more polishing on the infamous partial function error message. No review.
* Some work on error messages, somewhat based on ...Paul Phillips2010-11-264-1/+34
| | | | | | Some work on error messages, somewhat based on ideas in #3092. No review.
* Further fixes some issues for #3621.Aleksandar Pokopec2010-11-252-4/+14
| | | | | Review by Rytz.
* Fix for #3621.Aleksandar Pokopec2010-11-242-0/+27
| | | | | | | Added varargs annotation. Review by Rytz.
* Some refinement of the error messages when the ...Paul Phillips2010-11-187-6/+40
| | | | | | | | | | | | | | | | | Some refinement of the error messages when the found and required types have the same simple names. No longer must we watch people scratch their heads at such messages as: found : scala.collection.Set[String] required: Set[String] Now so clear you could enjoy a movie through it: found : scala.collection.Set[String] required: scala.collection.immutable.Set[String] No review.
* Half of an implementation of sealedness for jav...Paul Phillips2010-11-123-0/+19
| | | | | | | | | Half of an implementation of sealedness for java enums. Since it's only half it's behind -Xexperimental, but it works like a charm for the half where it works (that being compiling against bytecode.) Need input on how to approach the source half. References ticket #2442. Review by moors.
* protected[this] members should be accessible to...Paul Phillips2010-11-102-0/+28
| | | | | | protected[this] members should be accessible to super.x calls. Closes #464, review by odersky.
* Deprecation patrol.Paul Phillips2010-11-083-0/+25
| | | | | | | | | the same issues as JavaConversions with respect to overloading implicit methods making them inaccessible to view bounds. Fixed JavaConverters. Added a warning for when people overload parameterized implicits: in almost all cases the name is irrelevant so there's little point in unwittingly suffering degraded functionality. No review.
* Don't crash the compiler for the 'companions in...Hubert Plociniczak2010-11-021-2/+7
| | | | | | | Don't crash the compiler for the 'companions in different files' error. This turned out to be pretty bad for the presentation compiler. References #1286. Review by extempore
* Closes #3816. Review by moors.Hubert Plociniczak2010-11-022-0/+49
|
* Some uninteresting code related to error messag...Paul Phillips2010-10-272-3/+3
| | | | | | | | | | | | | | | | | | | | | | Some uninteresting code related to error messages, which I'm checking in mostly because I booted the r23379 commit in a git-svn meltdown and posterity demands the message, which was: You can now use the self-type of an anonymous class as a singleton type in a pattern match ON THE MOON. Actual test case excerpt: val x4 = new { self => def f(x: Any) = x match { case _: x1.type => 1 case _: x2.type => 2 case _: x3.type => 3 case _: self.type => 4 case x: Dingus.type => x.IamDingus } } Closes #576, no review.
* Case accessors are always public else the patte...Paul Phillips2010-10-262-0/+54
| | | | | | | Case accessors are always public else the pattern matcher goes south. A more discriminating fix may be possible at some point, but it looks to be an involved endeavor. Closes #3714, review by odersky.
* A modifier's work is never done.Paul Phillips2010-10-263-0/+92
| | | | | | | protected and its bevy of corner cases. Closes #3939, #3947. This patch is intended for both trunk and 2.8.1. Already reviewed and co-authored by moors, and review by oderksy.
* oh well.. so let's remove that test. no review.Lukas Rytz2010-10-212-15/+0
|
* splitting up scopes test into two parts.Lukas Rytz2010-10-214-23/+23
| | | | | | | | | | the behavior on the IBM VMs is really funny. when running the scopes test individually (using partest or ant), it succeeds. even when running all the neg tests with ant it succeeds. but when running the whole test suite, it fails. no review.
* Closes #2910.Hubert Plociniczak2010-10-202-0/+54
|
* Closes #3934 by fixing a typo (missing + in str...Martin Odersky2010-10-192-0/+36
| | | | | | | Closes #3934 by fixing a typo (missing + in string concat). Better effect analysis would have caught that one at compile-time. Review by extempore.
* Reverted previous commit as I think it is wedgi...Paul Phillips2010-10-172-37/+0
| | | | | | Reverted previous commit as I think it is wedging under -optimise. No review.
* Made some changes to fjbg so when people run in...Paul Phillips2010-10-162-0/+37
| | | | | | | | Made some changes to fjbg so when people run into #1133 at least it will tell them what method was the cause. The fact that ten files are touched in this commit instead of one or two is a testament to the wonder of checked exceptions. No review.
* Better check for objects trying to sneak themse...Paul Phillips2010-10-112-0/+12
| | | | | | Better check for objects trying to sneak themselves into the superconstructor arguments. Closes #3913, no review.
* Unreverting r23174. No review.Paul Phillips2010-10-061-1/+1
|
* Improves exhaustiveness analysis to not warn ab...Paul Phillips2010-10-057-3/+67
| | | | | | | | Improves exhaustiveness analysis to not warn about types which cannot match due to nonconformant type parameters. Also, look at the different warnings emitted in the test case based on the presence of a constraint. Nifty! Closes #3683, no review.
* Somewhere along the way AnyVal stopped working ...Paul Phillips2010-10-053-0/+19
| | | | | | Somewhere along the way AnyVal stopped working as sealed. (It was still sealed but had lost its children.) Closes #3163, review by rytz.
* Massively simplified the exhaustiveness checker...Paul Phillips2010-10-053-0/+65
| | | | | | | Massively simplified the exhaustiveness checker with no measurable loss of fidelity. I might be the only one who can be unsurprised by such a bloody diff: anyone else would rightly say "how on earth..." No review.
* Reverts r23174, which I believe will bring the ...Paul Phillips2010-10-041-1/+1
| | | | | | Reverts r23174, which I believe will bring the build back to life. It only chokes under -optimise. No review.
* Another batch of busywork shuffling the content...Paul Phillips2010-10-042-0/+26
| | | | | | Another batch of busywork shuffling the contents of pending around. Can almost see some daylight. No review.
* Pattern matching on Array types, working for re...Paul Phillips2010-10-044-20/+15
| | | | | | | | | | | | | | | | | Pattern matching on Array types, working for reals. def f[T](a: Array[T]) = a match { case x: Array[Int] => x(0) case x: Array[Double] => 2 // etc. } I'd also like to thank "instantiateTypeVar" for displacing the mechanical spiders and giant squid beings which used to fill my nightmares. Now that I know true horror, I welcome the squid. Closes #2755, review by odersky.
* Work on the pattern matcher.Paul Phillips2010-10-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | patches for #3887 and #3888, but I determined that I could achieve the same effect by deleting a bunch of code, so I did. This left only a few lines in TransMatch, so I eliminated it, which led me to remember that many places still reference non-existent phase transmatch, so those were updated. Notes: * This swaps equality tests on stable identifier patterns. They have never conformed to the spec (as noted long ago in ticket #785) which says "The pattern matches any value v such that r == v" whereas until now the test being performed was v == r. * An issue was introduced with specialization in that the implementation of "isTupleType" in Definitions relied upon sym == TupleClass(elems.length). This test is untrue for specialized tuples, causing mysterious behavior because only some tuples are specialized. There is now "isTupleTypeOrSubtype" although it seems likely the former implementation is unnecessary. The issue is sidestepped if one uses "getProductArgs" to retrieve the element types because it sifts through the base types for the Product symbol. Closes #3887 and #3888, review by dmharrah.
* One last batch of test cleanups and I think I'l...Paul Phillips2010-10-036-0/+41
| | | | | | | One last batch of test cleanups and I think I'll call it a day. If you're worried I didn't leave any for anyone else, let me put your fears to rest. PLENTY left to sift through. No review.
* The next batch of tests put up a little more st...Paul Phillips2010-10-022-0/+55
| | | | | | | | | | | | | | The next batch of tests put up a little more struggle, but only a little. See test/pending/pos/unappgadteval.scala (the changes for which were in the previous commit) for an example of a test which might be on to something. Any idea what it would take to get it working? // the key lines case i @ Suc() => { (y: Int) => y + 1 } // a = Int => Int case f @ Lam[b,c](x, e) => { (y: b) => eval(e, env.extend(x, y)) } // a = b=>c No review.
* Sorting through the tests in pending from oldes...Paul Phillips2010-10-022-0/+10
| | | | | | | | | | | | | | | | | Sorting through the tests in pending from oldest to newest because I don't believe in having useless appendages. The verdict on the oldest fifteen tests is: 15/15 are fixed. Many were already in files under a different name. I moved a few and deleted the rest. Fun fact of the day: apparently there was a time when to call into java varargs with no arguments you might have to write something like: getClass().getMethod("getCount", Array[java.lang.Class[T] forSome { type T }]()) On this basis I retract any complaints I've ever had about anything. There is one question mark outlined in pos/testCoercionThis.scala, a file formerly called pos/moors.scala and therefore... review by moors.
* closes #3873.Adriaan Moors2010-09-273-0/+19
| | | | | review by maier as no good deed goes unpunished
* Some progress on reviving TreeCheckers, plus a ...Paul Phillips2010-09-242-2/+2
| | | | | | | | Some progress on reviving TreeCheckers, plus a couple bugfixes and better error messages revealed by that progress. Also applied tiny increment in understanding to fixing up TreeDSL some more. The hand of martin guides from above, so no review.
* Test case closes #3774, no review.Paul Phillips2010-09-222-0/+10
|
* Test case closes #1548, no review.Paul Phillips2010-09-223-0/+19
|
* closes #1569, #3731: refactored dependent metho...Adriaan Moors2010-09-163-0/+16
| | | | | | | | | | | | | | closes #1569, #3731: refactored dependent method types to get rid of debruijn indices and use singleton types instead. this is the core of the dependent types refactoring, no implicit or inference changes (one baffling discovery: resultType should drop annotations that don't subclass TypeConstraint, even in the trivial case... wow -- thanks to Tiark for helping me figure it out on a terrace in Barcelona TODO: probably need a more principled approach to the propagation of plugin type-annotations) review by odersky
* positioning fix for infix expressions: report e...Paul Phillips2010-09-158-8/+19
| | | | | | | | | | | | positioning fix for infix expressions: report error at the operator instead of at the receiver of a binop In general use the operator position as the Select position's point instead of the left or right expression. Position.union always uses the receiver's point as point of the result, so swapping fixes that. See http://www.scala-lang.org/node/6912 for the report.
* closes #1693: improve implicit conversion disam...Adriaan Moors2010-09-141-10/+1
| | | | | | | | | | | closes #1693: improve implicit conversion disambiguation by incorporating the expected type of the member that triggered the conversion back-ported fix by Martin in embeddings branch. review by odersky (just in case it shouldn't have been back-ported)
* closes #3692: make instantiateTypeVar more care...Adriaan Moors2010-09-142-0/+31
| | | | | | | | closes #3692: make instantiateTypeVar more careful so it does not change T's info to >: T <: T. review by odersky
* relax implicit divergence checkAdriaan Moors2010-09-141-2/+1
| | | | | | | | patch contributed by Mark Harrah in http://article.gmane.org/gmane.comp.lang.scala/20700 reviewed by moors and odersky
* better error message for default arguments.Lukas Rytz2010-09-032-13/+20
|