summaryrefslogtreecommitdiff
path: root/test/files/pos
Commit message (Collapse)AuthorAgeFilesLines
* A modifier's work is never done.Paul Phillips2010-10-262-0/+82
| | | | | | | 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.
* Closes #3670, #3877.Hubert Plociniczak2010-10-201-0/+43
|
* Closes #2910.Hubert Plociniczak2010-10-201-0/+33
|
* Disambiguated all the implicits in JavaConversi...Paul Phillips2010-10-161-0/+7
| | | | | | | | | | Disambiguated all the implicits in JavaConversions. All the documentation had fallen out of date so I fixed that up too, in the process converting from HTML to wikiformatting. (Wouldn't it be nice to mass convert trunk out of the HTML tags?) Closes #3688, no review.
* new tests. no review.Martin Odersky2010-10-166-0/+58
|
* Modification to the widening logic to treat loc...Paul Phillips2010-10-141-0/+17
| | | | | | | | | | | | | | | | | | Modification to the widening logic to treat locally defined symbols like final members thus allowing more constants to be inlined. Concretely, that means that in code like this: def f: Unit = { val b = false ; if (b) println("ok") } The call to println is no longer generated at all, and in this code: def f(x: Int) = { val X = 1 ; val Y = 2; x match { case X => 1 ; case Y => 2 } } A tableswitch is generated instead of the present if/then/else. I also added a big comment to the former widenIfNotFinal (now widenIfNecessary for obvious reasons.) Review by rytz.
* closes #3862.Adriaan Moors2010-10-131-0/+8
|
* closes #3281, #3866.Adriaan Moors2010-10-131-0/+17
| | | | | | | | | | | I don't understand why we had to clear() the undoLog in the first place, since the undoXXX methods increase and decrease its size symmetrically, so the log should always be empty once they have all unwound. Was it a (premature) optimisation or was there some kind of semantic meaning to it that I didn't see? review by odersky
* closes #3890: propagate inferred type parameter...Adriaan Moors2010-10-121-0/+4
| | | | | | closes #3890: propagate inferred type parameters to info of undetermined type parameters. review by imaier.
* An overhaul of the collection-oriented methods ...Paul Phillips2010-10-111-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An overhaul of the collection-oriented methods in Tuple2/Tuple3 (which still need to be taken all the way to Tuple5.) * Zip semantics: zip and zipped now properly terminate when any collection runs out of elements, even if others are infinite. In addition, short circuiting methods (exists and forall) will terminate if the condition is met, even in the presence of infinity. Example: scala> val ys = Stream from 1 ys: scala.collection.immutable.Stream[Int] = Stream(1, ?) scala> (ys, ys).zipped forall ((x, y) => x+y < 100) res0: Boolean = false scala> (ys, ys).zipped exists ((x, y) => x+y > 100) res1: Boolean = true * There are implicits converting Zipped2/3 to Traversable to expose all the methods which aren't defined in an arity-specific way in the tuple classes. I have mixed feelings about putting these in Predef; but if there is another way to make them visible by default I wasn't able to find it. Example putting said implicit to use: scala> (ys, ys, ys).zipped find { case (x, y, z) => x+y+z > 1000 } res0: Option[(Int, Int, Int)] = Some((334,334,334)) Already reviewed by moors, so no review.
* temporary fix for compiler crash in dependend m...Lukas Rytz2010-10-112-0/+8
| | | | | | temporary fix for compiler crash in dependend method types with annotations. review by moors.
* One last batch of test cleanups and I think I'l...Paul Phillips2010-10-031-0/+8
| | | | | | | 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.
* Sorting through the tests in pending from oldes...Paul Phillips2010-10-024-0/+76
| | | | | | | | | | | | | | | | | 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.
* Another attempt for #1591.Hubert Plociniczak2010-10-012-0/+20
|
* Revert changes related to #1591. no review.Hubert Plociniczak2010-09-291-7/+0
|
* closes #3859.Adriaan Moors2010-09-281-0/+4
| | | | | review by odersky
* Cleaning up the contents of test.Paul Phillips2010-09-2825-9/+49
| | | | | | | | | | | including "CheckEither", written against scalacheck 1.2 in the year 471 AD. Removed all the duplicates I could find, mostly between pending and files. Renamed a bunch of tests so they wouldn't look like likely duplicates next time around. Nominated somebody else to do this once in a while. No review.
* close #3864.Lukas Rytz2010-09-272-0/+79
|
* closes #3808.Adriaan Moors2010-09-241-0/+11
| | | | | | | | moved typing indentation to where it belongs, now inliner shuold be able to do its job in implicits as well no review
* closes #3800.Adriaan Moors2010-09-231-0/+6
| | | | | | | | appliedType goes under annotations. removed some dead code in isSubtypeHK0. review by rytz
* Test case closes #3498, no review.Paul Phillips2010-09-221-0/+15
|
* Test case closes #2619, no review.Paul Phillips2010-09-221-0/+80
|
* closes #3792: type equality for singleton types...Adriaan Moors2010-09-221-0/+4
| | | | | | | | | closes #3792: type equality for singleton types did not take type aliases into account while chasing the chain of underlying types (if the underlying type is an alias of a singleton type, it should be followed) review by odersky
* Closes #1591.Hubert Plociniczak2010-09-221-0/+7
|
* Guard against overflow in fjbg.Paul Phillips2010-09-191-0/+7
|
* part 2 of the dependent method refactoring: imp...Adriaan Moors2010-09-1617-33/+331
| | | | | | | | | | | | | | | part 2 of the dependent method refactoring: improved interaction with implicit search (needed for oopsla paper) more to come in this area, see e.g. #3346 (stanford edsl stuff) reopens #13, which wasn't fixed properly before imo, anyway (have a look at -Xprint:typer output before this commit: a type that's not expressible in surface syntax is inferred -- also removed duplicate test file) closes #3731: co-evolve type alias type symbols when their rhs is updated and they are referenced by type selections (see typemap) review by odersky
* closes #1569, #3731: refactored dependent metho...Adriaan Moors2010-09-164-0/+13
| | | | | | | | | | | | | | 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
* Removed Throw from the set of unlabelled AST No...Paul Phillips2010-09-151-0/+6
| | | | | | Removed Throw from the set of unlabelled AST Nodes. Closes #3534, review by dragos.
* closes #1693: improve implicit conversion disam...Adriaan Moors2010-09-141-0/+9
| | | | | | | | | | | 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 #3612.Adriaan Moors2010-09-141-0/+6
| | | | | | | | | | | | | given the definitions below (for full context, see test file), before, O0 would work but O would not, now both are accepted: {{{ object O0 extends C {} object O extends C { self => } }}} review by odersky
* relax implicit divergence checkAdriaan Moors2010-09-141-0/+7
| | | | | | | | patch contributed by Mark Harrah in http://article.gmane.org/gmane.comp.lang.scala/20700 reviewed by moors and odersky
* Test case closes #2399, no review.Paul Phillips2010-09-111-0/+14
|
* partial fix for see #3772.Lukas Rytz2010-08-271-0/+5
| | | | | | | | | | | | {{{ scala> def g { case class C(); object C; } <console>:5: error: C is already defined as (compiler-generated) case class companion object C def g { case class C(); object C; } ^ }}} review by odersky
* Closes #3497.Iulian Dragos2010-08-261-0/+16
|
* closes #3777.Adriaan Moors2010-08-191-0/+7
| | | | | no review
* closes #3419: test filesAdriaan Moors2010-08-132-0/+6
| | | | | | | | | | | | omit check that wouldn't work with separate compilation, not needed anymore because compiler has become more robust the actual fix was committed as part of r22512, see #3374 also see #3512 no review
* Fixed type soundness problem someone raised on ...Martin Odersky2010-08-121-0/+9
| | | | | | Fixed type soundness problem someone raised on hackers news. Test in override.scala. Review by moors.
* different approach to manifests of type par...Adriaan Moors2010-08-101-0/+10
| | | | | | | | | different approach to manifests of type parameters: before, ambiguity was prevented by leaving type inference failures (Nothing was inferred) in the expression that needs an implicit manifest -- we now put these back in undetparams (maybe they will be inferred) and when we need to produce a manifest for an undetermined parameter (it ended up not being inferred), we assume it will get instantiated to Nothing (but for now don't actually reflect that in the SearchResult, as instantiate should take care of that anyway) see test file for use case that works with this new scheme, but did not work before: the eager instantiation of type params to Nothing before implicit search even got started would indeed prevent ambiguity -- unfortunately it also ruled out valid code like this (where the type parameter is inferred successfully by the time the manifest is needed) review by odersky
* closes #3676: cycle detection logic in BaseType...Adriaan Moors2010-08-101-0/+5
| | | | | | | | | | | closes #3676: cycle detection logic in BaseTypeSeq's should not overwrite elements in the BTS for cycle detection as these markers may be witnessed by callbacks in mergePrefixAndArgs now using a mutable bitset to keep track of which computations are pending -- benchmarked for speed, memory consumption not checked review by odersky
* closes #3582: typedTypeDef needs to run in a ne...Adriaan Moors2010-08-092-0/+17
| | | | | | | | | | | | | | | | | closes #3582: typedTypeDef needs to run in a new typer for TypeDefs with type parameters this was honored when typedTypeDef was called by typed1, but other callers did not this would cause higher-order type parameters to be re-entered in the scope of a method or a class (by the way, should we recycle scopes for higher-order type params? now new scopes are created, symbols entered, and tree's symbols updated) changed some spurious vars to vals review by odersky
* close #2799.Lukas Rytz2010-08-062-0/+2
|
* Parse ordering issue prevented passing properti...Paul Phillips2010-08-032-0/+3
| | | | | | | Parse ordering issue prevented passing properties containing a :. There is a test case included, but note that partest passes it with or without the patch: see ticket #3712. Closes #3495, no review.
* new test files.Martin Odersky2010-07-194-0/+90
|
* closes #3622: refchecks erased types without un...Adriaan Moors2010-07-083-0/+19
| | | | | | closes #3622: refchecks erased types without uncurrying them first review by odersky
* closes #3494.Adriaan Moors2010-07-081-0/+7
| | | | | review by prokopec
* closes #3486.Adriaan Moors2010-07-082-0/+9
| | | | | | | | | fixed by having mixin do the cloning at the beginning of erasure and then updating the symbol's info to transform it to be valid in current phase review by odersky
* closes #3477.Adriaan Moors2010-07-081-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | note that all type parameters must be reported in error messages about failing type inference, but only type parameters that were inferred successfully should be substituted the idea of mapping type parameter symbols to the corresponding type ref in order to make substitution the identity does not seem to work, leading to errors like: src/library/scala/collection/immutable/SortedMap.scala:38: error: type mismatch; found : scala.collection.immutable.SortedMap[A,B(in method empty)] required: scala.collection.immutable.SortedMap[A,B(in trait SortedMap)] override def empty: SortedMap[A, B] = SortedMap.empty ^ (I guess that's why they were retracted before, but that wasn't done consistently, leading to #3152 -- my first attempt at fixing the latter lead to this bug... I've assigned #3152 to you Martin, as I can't decide how to fix it.) review by odersky
* closes #3374.Adriaan Moors2010-07-081-0/+6
| | | | | review by odersky
* closes #3249.Adriaan Moors2010-07-082-0/+16
| | | | | review by dragos
* closes #2331: the pre-transform in Erasure did ...Adriaan Moors2010-07-081-0/+11
| | | | | | | | | | | | | | closes #2331: the pre-transform in Erasure did not correctly recurse in the case of a TypeApply. It simply returned the function, which might very well have been, say, a Select node, which had to be erased in case the qualifier's type is a refinement. (sorry about the whitespace changes) review by odersky