summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
...
* Should not set the parameter name's width on CSS.Kato Kazuyoshi2011-07-222-0/+22
|
* As per discussion documented in SI-1799, brough...Paul Phillips2011-07-212-0/+21
| | | | | | | | | | | | | | | | | | | | | | As per discussion documented in SI-1799, brought back the ProductN traits and synthesized them into case classes. It's -Xexperimental for now because there may be minor implications for existing code which should be discussed. And also because I snuck in another "improvement" but it's probably too dangerous to be touching productIterator directly and it should go into something else. scala> case class Bippy(x: Int, y: Int) defined class Bippy scala> Bippy(5, 10).productIterator res0: Iterator[Int] = non-empty iterator ^^^----- as opposed to Iterator[Any] There is an even better idea available than lubbing the case class field types: it starts with "H" and ends with "List"... Review by oderksy.
* Restored test case for SI-2873 which hubert had...Paul Phillips2011-07-192-0/+6
| | | | | | | Restored test case for SI-2873 which hubert had callously deleted back when it was briefly irrelevant. It would have been failing were it around, but now it passes. Closes SI-2873, no review.
* Modified erasure so we have enough information ...Paul Phillips2011-07-182-0/+11
| | | | | | | | | | | | Modified erasure so we have enough information to determine whether we need to use scala or java erasure semantics. This fixes the runtime failure illustrated here: % scala29 -e 'java.util.Collections.max(null)' java.lang.NoSuchMethodError: java.util.Collections.max(Ljava/util/Collection;)Ljava/lang/Comparable; Review by odersky.
* Fixed adriaan's patch for type constructor infe...Paul Phillips2011-07-181-0/+5
| | | | | | | | Fixed adriaan's patch for type constructor inference. The problem with haranguing people in bars about bugs is that the fixes with which they provide you may be flawed. Fortunately moors has this novelist on retainer. Review by moors.
* Workaround for scalacheck calling System.exit d...Paul Phillips2011-07-181-1/+1
| | | | | | | | | Workaround for scalacheck calling System.exit during testing. Not sure exactly what the sequence of events is here: I found the exit problem months ago and committed code to scalacheck to make that configurable, and then didn't see it again until recently, but I don't think it was ever addressed. This is just a bandaid. No review.
* Brought scalacheck up to date with scalacheck t...Paul Phillips2011-07-161-1/+1
| | | | | | Brought scalacheck up to date with scalacheck trunk (rev 06612e965d) and rebuilt jar against r25318, no review.
* Reverting recent type constructor patch until I...Paul Phillips2011-07-161-5/+0
| | | | | | Reverting recent type constructor patch until I can see why scalacheck is getting blinkered by it. No review.
* Test case for ticket #4582.Paul Phillips2011-07-161-0/+11
| | | | | Contributed by Daniel C. Sobral.
* Changes to reflection.Martin Odersky2011-07-161-1/+1
|
* Fixed a big bug in type constructor unification...Paul Phillips2011-07-161-0/+5
| | | | | | | | | | | | | Fixed a big bug in type constructor unification caused by considering only the parents rather than all the base types. This fix is a testament to the power of haranguing people in bars when you are deeply offended by a bug, like someone was by this one: def f[CC[X] <: Traversable[X]](x: CC[Int]) = () f(1 to 5) // did not compile! Fear not, it does now Review by moors.
* scaladoc fixes and improvementsmichelou2011-07-151-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes to scaladoc include: - fixed transformation of Code(text) into HTML tag <code> - added tool tips for deprecated entities (classes, methods) using the 'title' attribute - added syntax highlighting of Scala source code in generated <pre> blocks (CSS colors are defined in lib/template.css) Here are several examples of highlighted Scala code: scala.App scala.Application scala.Enumeration scala.Function1 scala.Function2 scala.native scala.Option scala.Proxy scala.specialized scala.throws scala.unchecked scala.actors.Actor scala.annotation.deprecatedName scala.annotation.elidable scala.annotation.switch scala.collection.DefaultMap scala.collection.JavaConversions scala.collection.JavaConverters scala.collection.LinearSeqLike scala.collection.MapLike scala.collection.SetLike scala.collection.TraversableLike scala.collection.immutable.NumericRange scala.collection.immutable.Range scala.collection.immutable.Stream scala.collection.mutable.BufferLike scala.concurrent.pilib scala.io.Position scala.reflect.BeanProperty scala.reflect.Manifest scala.testing.Benchmark scala.util.DynamicVariable scala.util.control.Breaks scala.util.control.ControlThrowable scala.util.control.Exception scala.util.control.TailCalls scala.util.logging.Logged scala.util.parsing.combinator.testing.Tester scala.util.parsing.json.JSON scala.util.regexp.WordExp scala.xml.factory.LoggedNodeFactory scala.xml.parsing.ConstructingParser
* prohibit case-to-case inheritance instead of is...Hubert Plociniczak2011-07-136-4/+11
| | | | | | | prohibit case-to-case inheritance instead of issuing warning. closes #4109. review by extempore, since it should make your life much easier in the pattern matcher
* Don't enter into same line infinite recursion w...Paul Phillips2011-07-132-0/+15
| | | | | | Don't enter into same line infinite recursion when erroneous code involves a self-normalizing type alias. Closes #3240, review by moors.
* Test case closes #3371, no review.Paul Phillips2011-07-131-0/+9
|
* Test case closes #1432, no review.Paul Phillips2011-07-132-0/+18
|
* Bounded wildcard types arising during pattern t...Paul Phillips2011-07-134-0/+49
| | | | | | Bounded wildcard types arising during pattern type inference can cause unnecessary crashes. Closes #1048, review by odersky.
* Catch type projections even when they disguise ...Paul Phillips2011-07-132-0/+14
| | | | | | Catch type projections even when they disguise themselves as stable via singleton bounds. Closes #1431, review by odersky.
* A response to adriaan's last lub commit of the ...Paul Phillips2011-07-131-0/+37
| | | | | | | | A response to adriaan's last lub commit of the housekeeping and pretty printing variety. Non-invasive surgery, don't worry martin. Simplified the input to lublist a bit. Includes illustrative test case for current brand of lub failures. Review by moors.
* Suppressed an error in type constructor bounds ...Paul Phillips2011-07-132-0/+9
| | | | | | Suppressed an error in type constructor bounds checking which was obscuring the meaningful error to follow. Review by moors.
* Making power mode startup a little less glacial...Paul Phillips2011-07-121-1/+1
| | | | | Making power mode startup a little less glacial, no review.
* A bunch of repl stuff.Paul Phillips2011-07-121-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | type mismatches, for real this time. :power mode goes to phase typer automatically. You can get the symbols for repl-defined names more directly: scala> case class Bippy(x: Int) defined class Bippy scala> intp.terms("Bippy") res1: intp.global.Symbol = object Bippy scala> intp.types("Bippy") res2: intp.global.Symbol = class Bippy scala> intp("Bippy") // tries type first res3: intp.global.Symbol = class Bippy scala> intp("scala.collection.Map") // falls back to fully qualified res4: intp.global.Symbol = trait Map I changed the implicit which used to install "tpe" and "symbol" to install "tpe_" and "symbol_" because it was too easy to do something you didn't mean to, like calling x.tpe where x is a Manifest. Said implicit now handles manifest type arguments, so you can get the full translation from a manifest representation to a compiler type, at least for simple types and only as much as manifests work, which is not that much. Fortunately that situation is all changing soon. scala> List(List(1, 2, 3)).tpe_ res5: power.Type = List[List[Int]] scala> res5.typeArgs res6: List[power.global.Type] = List(List[Int]) Review by moors.
* Fixes #4398.Aleksandar Pokopec2011-07-111-0/+11
| | | | | Review by extempore.
* Fixes #4709.Aleksandar Pokopec2011-07-111-0/+10
| | | | | Review by extempore.
* Fixes #4723.Aleksandar Pokopec2011-07-111-0/+9
| | | | | Review by extempore.
* Making empty streams serializable.Aleksandar Pokopec2011-07-112-0/+26
| | | | | No review.
* Fixes #4761.Aleksandar Pokopec2011-07-112-0/+19
| | | | | | | This changes the signature of flatten - I do not see how to use a @bridge annotation here, since after erasure both the bridge and the original method have the same signature. Review by extempore.
* Moved a warning behind -Xlint.Paul Phillips2011-07-091-1/+1
| | | | | meant for --grep to look in checkfiles too, and now it does. No review.
* Fix for failing test, review by extempore.Kato Kazuyoshi2011-07-091-1/+1
|
* Fixes SI-4759Philipp Haller2011-07-071-0/+47
|
* Test case for #4737, no review.Paul Phillips2011-07-062-0/+19
|
* Add a test for #4421 and clean up a little.Kato Kazuyoshi2011-07-062-0/+17
|
* Fixed a bug in the optimizer which was preventi...Paul Phillips2011-07-045-0/+112
| | | | | | | | | | | | | | | | | | | | | | | Fixed a bug in the optimizer which was preventing private methods from being inlined. Also relaxes a condition related to the "liftedTry" problem: the inliner has to exclude certain methods from consideration if there is a value on the stack and the method being inlined has exception handlers. The new condition is as before, except that it does not exclude methods of the "try/finally" variety (i.e. finalizers, but no other exception handlers.) This is necessary to optimize this common pattern: @inline private def foo(body: => Unit) { val saved = something try body finally something = saved } The closure for "body" can be fully eliminated, but only if the contents of foo can be inlined into the caller. Closes #4764, review by rompf.
* Looking forward to working positions.Paul Phillips2011-07-032-4/+8
|
* Logic bug in repl :paste parsing, no review.Paul Phillips2011-07-034-21/+43
|
* evalOnce needs to pack the type before using it...Paul Phillips2011-07-032-0/+8
| | | | | | evalOnce needs to pack the type before using it on new valdefs to avoid existential mismatches. Closes #3960, review by moors.
* Test case for #4757, no review.Paul Phillips2011-07-023-0/+13
|
* Fixed a bug involving classOf[Foo] having the w...Paul Phillips2011-07-012-0/+13
| | | | | | | Fixed a bug involving classOf[Foo] having the wrong erasure. Luckily I had only days ago deciphered the unique handling of classOf, so I knew what was up. Closes #4753, review by odersky.
* Fix a scalap checkfile, no review.Paul Phillips2011-07-011-0/+1
|
* Stable hashCodes for case objects.Paul Phillips2011-07-011-0/+10
| | | | | | | | | | | | Somehow case objects fell through the cracks and have had default hashCode implementations, leading to new hashCodes on each jvm run. Now we use the productPrefix, and inline it right into the bytecode. scala> None.## == "None".## res0: Boolean = true Closes #4752, no review.
* Keep BufferedSource from losing buffered data w...Paul Phillips2011-07-012-0/+59
| | | | | | Keep BufferedSource from losing buffered data when a derivative iterator is created via getLines. Closes #4671, #4662, no review.
* Fix for unfortunate bug in Range.init.Paul Phillips2011-06-301-0/+7
|
* Having established that r25051 is not responsib...Paul Phillips2011-06-301-1/+1
| | | | | | Having established that r25051 is not responsible for the compilation issue with scalaz, it is hereby restored. Review by moors.
* Warning! Warning! Yes, that's what's in this co...Paul Phillips2011-06-298-12/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Warning! Warning! Yes, that's what's in this commit. Why are you panicking? Mostly new command line options: -Xlint // basically, the ones which aren't noisy Ywarn-all -Ywarn-dead-code Ywarn-inaccessible // try this one on the library: -it makes some good points Ywarn-nullary-override Ywarn-nullary-unit -Ywarn-numeric-widen Ywarn-value-discard Some accumulated motivations: The wontfix resolution of ticket #4506 indicates that "def foo" and "def foo()" are always going to be treated differently in some situations and the same in others without users having any way to fix it. Summary expressed in latest comment with which I agree (and quite sadly, given that I've done a lot of work to try to make them usable) is "avoid using structural types like the plague." But the least we can do is warn if you're using parentheses "wrong". I think it would be better if the warning about "def foo()" overriding "def foo" were an error instead. If we have to live with this... trait Me { def f(): Int } class A { def f: Int = 5 } class C extends A with Me { } // error: Int does not take parameters def f(x: C) = x.f() // compiles def f(x: Me) = x.f() // error: Int does not take parameters. Mmph, how can a method be // legal with parameter "Foo" and illegal with parameter "Foo with // Bar" ? def f(x: Me with C) = x.f() The warning about a method contains a reference to a type which is less accessible than the method itself is obviously to those who recall it a response to GenTraversable being private and appearing in flatMap's signature during the 2.9.0 RCs. It avoids warning in the case where the unnormalized type is inaccessible but the normalized version would be, but it could use further refinement.
* slight improvement to lubList so that the simpl...Adriaan Moors2011-06-291-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | slight improvement to lubList so that the simple case of lubbing type constructors works. review by extempore the strategy is to detect when the ts in lub(ts) are actually type constructors and remember their type parameters the BTS of a type constructor is a list of proper types (the type constructors have been applied to their dummy arguments, which are simply type refs to the original type parameters) in lubList, we undo this damage by stripping these dummy arguments (they refer to type parameters that are meant to be bound) a better fix would be to actually bind those type parameters that appear free in error, but that would require major changes to the BTS infrastructure example that only kindasorta works now... given: trait Container[+T] trait Template[+CC[X] <: Container[X]] class C1[T] extends Template[Container] with Container[T] C1's BTS contains Template[Container] with Container[T], but that should really be [T] => Template[Container] with Container[T] instead of wrapping it in a polytype, the current approach uses elimHOTparams to patch up this type so that it looks more like a type ctor: Template[Container] with Container, but this is ill-kinded as Template[Container] is a proper type, whereas Container is not the performance impact should be minimal, but caveat reviewer
* Don't infer anonymous classes.Paul Phillips2011-06-274-1/+22
| | | | | | | | | | | | | | possible, just far enough to avoid all kinds of undesirable consequences which accompany the preservation of too much type information. (The problems are akin to inferring the singleton type too freely.) // Example of code which did not compile, but now does class A class B[T <: A](cons: T) object C extends B(new A {}) Closes #4110, #3048. I already ran this by moors, so review by odersky.
* Test cases close #2782, #2171, no review.Paul Phillips2011-06-253-0/+26
|
* Another one I missed which was fixed by r25149.Paul Phillips2011-06-241-0/+41
|
* Another one brought to compilation by r25149.Paul Phillips2011-06-241-0/+31
|
* A test case from recently closed #490, no review.Paul Phillips2011-06-241-0/+16
|