summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Suppress non-local return unchecked warnings.Paul Phillips2012-06-122-0/+7
| | | | | There doesn't seem to be any way to do that by adding a synthetic annotation.
* Merge pull request #698 from retronym/ticket/5696Adriaan Moors2012-06-112-0/+66
|\ | | | | SI-5696 Detect excess constructor argument lists.
| * SI-5696 Detect excess constructor argument lists.Jason Zaugg2012-06-102-0/+66
| | | | | | | | An apply method fooled the usual mechanism.
* | SI-5162 Exclude super.foo from the erasure cast of SI-4283Jason Zaugg2012-06-119-3/+43
|/ | | | | | | | | If the target method is defined in Java, treat the super reference as an error, otherwise allow it in the knowledge that Scala loosens the access restrictions on its generated classes. Moves the test for that bug out of pending-ville. It's sufficient to place Test in the empty package to exercise the right code paths.
* Merge pull request #694 from retronym/ticket/4831-2Adriaan Moors2012-06-093-0/+29
|\ | | | | SI-4831 Fix ambiguous import detection for renamed imports.
| * SI-4831 Fix ambiguous import detection for renamed imports.Jason Zaugg2012-06-093-0/+29
| |
* | Merge pull request #695 from adriaanm/topic-virtpatmatAdriaan Moors2012-06-093-0/+17
|\ \ | | | | | | better unreachability for selections
| * | better unreachability for selectionsAdriaan Moors2012-06-093-0/+17
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consts are hashconsed modulo static-approximation-for-dynamic-value-equality thus, two value-equality tests in patterns should reuse the same ValueConst if and only if the tested values are guaranteed to be equal in all possible executions the implementation uses unique types to track unique consts for an Ident with a stable symbol, we simply use the corresponding singleton type for a Select, we have to indirect some more: we store all the unique trees we've encountered and a unique type for each of them this unique type is then used to find the uniqut const that approximates the run-time value this may seem roundabout, but we need to standardize on types for representing "value" tests, as a type test against a singleton type must give rise to the same ValueConst as a value test using a tree that refers to the same symbol as the singleton type test
* | test case, closes SI-5840Eugene Burmako2012-06-091-0/+7
| |
* | test case, closes SI-5881Eugene Burmako2012-06-092-0/+8
| |
* | test case, closes SI-5816Eugene Burmako2012-06-092-0/+18
| |
* | test case, closes SI-5738Eugene Burmako2012-06-091-0/+8
| |
* | test case, closes SI-5742Eugene Burmako2012-06-091-0/+8
|/
* Merge pull request #660 from retronym/ticket/5167-3Josh Suereth2012-06-084-0/+25
|\ | | | | SI-5167 An impl class method should refer to its own parameter symbols.
| * SI-5167 An impl class method should refer to its own parameter symbols.Jason Zaugg2012-06-034-0/+25
| | | | | | | | | | | | | | | | Rather than those of the original method in the trait. If they are shared, parameter renaming in the implementaion class is visible in the original method. This led to a crash in the resident compiler when looking up the default argument getter.
* | Merge pull request #631 from retronym/ticket/5652-3Adriaan Moors2012-06-088-0/+55
|\ \ | | | | | | SI-5652 Mangle names of potentially public lambda lifted methods.
| * | SI-5652 Mangle names of potentially public lambda lifted methods.Jason Zaugg2012-05-268-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This can happen if they are accessed from an inner class. If a subclass is happens to lift a public method to the same name, a VerifyError ensues. The enclosed tests: - demonstrate the absense of the VerifyError - show the names generated for the lifted methods (which are unchanged if not called from an inner class, or if lifted into a trait implementation class.) - ensure that the callers are rewritten to call the correct method when multiple with the same name are lifted. It's not ideal that this phase needs a priori knowledge of the later phases to perform this mangling. A better fix would defer this until the point when the methods are publicised, and leave the unmangled private method in place and install an public, mangled forwarder.
* | | Merge pull request #679 from axel22/issue/5853Adriaan Moors2012-06-081-0/+55
|\ \ \ | | | | | | | | Fix SI-5853.
| * | | Fix SI-5853.Aleksandar Prokopec2012-06-071-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This solves two issues. First, up to now the newly generated symbols for normalized members were not being added to the declaration list of the owner during `specialize`. Now they are. Second, during `extmethods`, the extension methods generated get an additional curried parameter list for `$this`. Trouble was, after that, during `uncurry` and before `specialize`, these curried parameter lists were merged into one list. Specialization afterwards treats extension methods just like normal methods and generates new symbols without the curried parameter list. The `extensionMethod` now takes this into account by checking if the first parameter of a potential extension method has the name `$this`. Review by @dragos. Review by @odersky.
* | | | Reduce time spent in lubsMartin Odersky2012-06-081-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce time spent in lubs by making depth more adaptive. It now takes into account separately the depth of the lub types and the maximal depth of theior base type sequences. It cuts depth more aggressively if it is the base types instead of the types themselves that grow deep. The old truncation behavior is retained under option -Xfull-lubs Another change is that we now track depth more precisely, which should also help or at least allow better statistics. Also added statistics that measure #lubs and time spent in them.
* | | | tests and fixes for the mirror APIEugene Burmako2012-06-0845-33/+372
| | | |
* | | | a quickfix for test/partestEugene Burmako2012-06-081-1/+1
| | | |
* | | | don't warn about abstract types that are checkableAdriaan Moors2012-06-081-0/+1
| | | |
* | | | turn unchecked type patterns into checked onesAdriaan Moors2012-06-083-14/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the pattern `(_: T)` is made checkable using (ct: ClassTag[T]).unapply by rewriting it to `ct(_: T)` (if there's a ClassTag[T] available) similarly for extractors: if the formal type of the unapply method is an uncheckable type, wrap in the corresponding classtag extractor (if available) don't trigger rewrite on non-toplevel unchecked types (i.e., only look at type constructor part of T when looking for unchecked types) TODO: find outer match to figure out if we're supposed to be unchecked would like to give users a chance to opt-out from the wrapping, but finding the match to which this pattern belongs turned out to be tricky...
* | | | fixes some issues with reflectField brought up todayEugene Burmako2012-06-0812-0/+135
| | | |
* | | | TypeTag => AbsTypeTag, ConcreteTypeTag => TypeTagEugene Burmako2012-06-0885-369/+341
| | | | | | | | | | | | | | | | | | | | This protects everyone from the confusion caused by stuff like this: https://issues.scala-lang.org/browse/SI-5884
* | | | removes array tagsEugene Burmako2012-06-0838-278/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before 2.10 we had a notion of ClassManifest that could be used to retain erasures of abstract types (type parameters, abstract type members) for being used at runtime. With the advent of ClassManifest (and its subtype Manifest) it became possible to write: def mkGenericArray[T: Manifest] = Array[T]() When compiling array instantiation, scalac would use a ClassManifest implicit parameter from scope (in this case, provided by a context bound) to remember Ts that have been passed to invoke mkGenericArray and use that information to instantiate arrays at runtime (via Java reflection). When redesigning manifests into what is now known as type tags, we decided to explore a notion of ArrayTags that would stand for abstract and pure array creators. Sure, ClassManifests were perfectly fine for this job, but they did too much - technically speaking, one doesn't necessarily need a java.lang.Class to create an array. Depending on a platform, e.g. within JavaScript runtime, one would want to use a different mechanism. As tempting as this idea was, it has also proven to be problematic. First, it created an extra abstraction inside the compiler. Along with class tags and type tags, we had a third flavor of tags - array tags. This has threaded the additional complexity though implicits and typers. Second, consequently, when redesigning tags multiple times over the course of Scala 2.10.0 development, we had to carry this extra abstraction with us, which exacerbated the overall feeling towards array tags. Finally, array tags didn't fit into the naming scheme we had for tags. Both class tags and type tags sound logical, because, they are descriptors for the things they are supposed to tag, according to their names. However array tags are the odd ones, because they don't actually tag any arrays. As funny as it might sound, the naming problem was the last straw that made us do away with the array tags. Hence this commit.
* | | | Introduces scala-reflect.jarEugene Burmako2012-06-081-2/+2
| | | |
* | | | repairs the tests after the refactoring spreeEugene Burmako2012-06-08559-1733/+2611
| | | |
* | | | preparations: removes DynamicProxyEugene Burmako2012-06-083-93/+0
| | | | | | | | | | | | | | | | | | | | This is necessary because toolboxes will no longer be available from the library. Christopher Vogt will take care of the second reincarnation of DynamicRef.
* | | | macros: refactoring of fast track infrastructureEugene Burmako2012-06-084-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As a result, hardwired macros don't need implementation stubs. This is very important, because in a few commits scala.reflect.makro.Context will move out from scala-library.jar. Also adding fast track entries doesn't require jumping through hoops with PDTs. It's as simple as defining PartialFunction[Tree, Any].
* | | | macros: -Xmacros is now retiredEugene Burmako2012-06-0811-11/+11
| | | |
* | | | Merge pull request #672 from axel22/issue/5857Adriaan Moors2012-06-081-0/+45
|\ \ \ \ | | | | | | | | | | Fixes SI-5857. More efficient min and max in Range and NumericRange
| * | | | Fixes SI-5857.Aleksandar Prokopec2012-06-061-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Override `min` and `max` in `Range` and `NumericRange` to check if a default `Ordering` for the numeric type in question is used. If so, bypass traversal and compute the minimum or maximum element.
* | | | | Merge pull request #677 from axel22/feature/util-hashing2Josh Suereth2012-06-074-3/+12
|\ \ \ \ \ | | | | | | | | | | | | Add the first iteration of the `util.hashing` package.
| * | | | | Add the first iteration of the `util.hashing` package.Aleksandar Prokopec2012-06-074-3/+12
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move `MurmurHash3` to `util.hashing`. Make the `class` private and retain a public companion `object`, and put the `MurmurHash3.Hashing` implementations for various types in the companion. Add a method which composes `ByteswapHashing` with some other hashing. Rename `hashOf` to `hash`. Fix chi-square test in a test-case. Review by @jsuereth. Moved a failing test that seems to use some other library version to pending.
* / | | | Generate abstract methods in scala.Byte and friends.Paul Phillips2012-06-063-37/+47
|/ / / / | | | | | | | | | | | | | | | | Rather than stub implementations. This saves over 50K of bytecode. I also added the necessary imports to silence the feature warnings.
* | | | Merge pull request #673 from axel22/issue/5880Josh Suereth2012-06-061-0/+41
|\ \ \ \ | | | | | | | | | | Fix SI-5880.
| * | | | Fix SI-5880.Aleksandar Prokopec2012-06-061-0/+41
| |/ / / | | | | | | | | | | | | Add a ChiSquare test for the new hash code.
* | | | Merge pull request #671 from axel22/issue/5867Josh Suereth2012-06-062-0/+15
|\ \ \ \ | | | | | | | | | | Fix SI-5867.
| * | | | Fix SI-5867.Aleksandar Prokopec2012-06-062-0/+15
| |/ / / | | | | | | | | | | | | Override clone for unrolled buffer.
* / / / Fix SI-5879.Aleksandar Prokopec2012-06-062-0/+90
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a bug where a key in an immutable hash map have the corresponding value different in the iteration than when doing lookup. This use to happen after calling `merge`. Fix the order in which a key-value pair appears in the collision resolution function - the first argument always comes from the `this` hash map. Deprecate `merge` in favour of `merged`, as this is a pure method. As an added benefit, the syntax for invoking `merge` is now nicer.
* | | Merge pull request #655 from axel22/feature/hasherJosh Suereth2012-06-041-0/+46
|\ \ \ | | | | | | | | Implementing Hashing typeclass
| * | | Fix `Hashing`.Aleksandar Prokopec2012-06-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Move `Hashing` to `scala.util.hashing`. Adde `Hashing.Default` to `Hashing` companion object. Change `TrieMap` to autoswitch from `Hashing.Default` to `TrieMap.MangledHashing`.
| * | | Remove Equality in favour of Equiv.Aleksandar Prokopec2012-06-011-2/+2
| | | | | | | | | | | | | | | | Make Equiv serializable.
| * | | Add Hashing and Equality typeclasses.Aleksandar Prokopec2012-06-011-0/+46
| | |/ | |/| | | | | | | | | | | | | Modify TrieMap to use hashing and equality. Modify serialization in TrieMap appropriately.
* | | Merge pull request #665 from retronym/ticket/5213Adriaan Moors2012-06-041-0/+30
|\ \ \ | | | | | | | | SI-5313 Revert to two traversals in substThisAndSym.
| * | | SI-5313 Revert to two traversals in substThisAndSym.Jason Zaugg2012-06-031-0/+30
| |/ / | | | | | | | | | Partially reverts 334872e.
* | | Merge pull request #661 from retronym/ticket/5683Adriaan Moors2012-06-032-0/+39
|\ \ \ | | | | | | | | SI-5683 Fail gracefully when transposing a ragged type arg matrix.
| * | | SI-5683 Fail gracefully when transposing a ragged type arg matrix.Jason Zaugg2012-06-032-0/+39
| |/ / | | | | | | | | | | | | | | | | | | | | | The code used to do this, until `transpose` starting throwing IAE rather than AIOOBE. Symptomatic treatment only: The reported crasher now infers ill-kinded type args and reports an error.