summaryrefslogtreecommitdiff
path: root/test/files/run
Commit message (Collapse)AuthorAgeFilesLines
* TypeTag => AbsTypeTag, ConcreteTypeTag => TypeTagEugene Burmako2012-06-0853-243/+215
| | | | | This protects everyone from the confusion caused by stuff like this: https://issues.scala-lang.org/browse/SI-5884
* removes array tagsEugene Burmako2012-06-0817-212/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* repairs the tests after the refactoring spreeEugene Burmako2012-06-08402-1359/+2036
|
* 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].
* 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-072-3/+3
|\ \ | | | | | | Add the first iteration of the `util.hashing` package.
| * | Add the first iteration of the `util.hashing` package.Aleksandar Prokopec2012-06-072-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-062-19/+29
|/ / | | | | | | | | 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.
* 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.
* fix t5843Lukas Rytz2012-05-282-0/+24
|
* Orphan checkfile remover.Paul Phillips2012-05-2623-963/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Are these -msil checkfiles used in some secret fashion? The level of activity suggest otherwise. Since scala-nightly-msil has been disabled for over a year, it's an easy rm unless someone speaks up. % tools/rm-orphan-checkfiles Scanning for orphan check files... rm 'test/disabled/run/code.check' rm 'test/files/jvm/t1652.check' rm 'test/files/neg/macro-argtype-mismatch.check' rm 'test/files/neg/macro-noncompilertree.check' rm 'test/files/neg/macro-nontree.check' rm 'test/files/run/Course-2002-01-msil.check' rm 'test/files/run/Course-2002-02-msil.check' rm 'test/files/run/Course-2002-03-msil.check' rm 'test/files/run/Course-2002-04-msil.check' rm 'test/files/run/Course-2002-08-msil.check' rm 'test/files/run/Course-2002-09-msil.check' rm 'test/files/run/Course-2002-10-msil.check' rm 'test/files/run/absoverride-msil.check' rm 'test/files/run/bitsets-msil.check' rm 'test/files/run/boolord-msil.check' rm 'test/files/run/bugs-msil.check' rm 'test/files/run/impconvtimes-msil.check' rm 'test/files/run/infix-msil.check' rm 'test/files/run/iq-msil.check' rm 'test/files/run/macro-invalidret-doesnt-conform-to-impl-rettype.check' rm 'test/files/run/macro-rettype-mismatch.check' rm 'test/files/run/misc-msil.check' rm 'test/files/run/promotion-msil.check' rm 'test/files/run/richs-msil.check' rm 'test/files/run/runtime-msil.check' rm 'test/files/run/tuples-msil.check' rm 'test/pending/jvm/t1464.check' rm 'test/pending/run/subarray.check' rm 'test/pending/run/t0446.check' rm 'test/pending/run/t5629.check' Scanning for orphan flags files... rm 'test/files/neg/macro-argtype-mismatch.flags' rm 'test/files/neg/macro-noncompilertree.flags' rm 'test/files/neg/macro-nontree.flags' rm 'test/files/pos/anyval-children.flags' rm 'test/files/pos/t3097.flags' rm 'test/files/run/macro-invalidret-doesnt-conform-to-impl-rettype.flags' rm 'test/files/run/macro-rettype-mismatch.flags'
* Fixes SI-5428.Aleksandar Prokopec2012-05-242-0/+30
|
* Usability improvements to Origins.Paul Phillips2012-05-232-2/+2
|
* more tests for SI-3761Lukas Rytz2012-05-232-1/+23
|
* Merge pull request #595 from som-snytt/ticket/3761-overload-byname-onlyLukas Rytz2012-05-232-0/+29
|\ | | | | SI-3761: Overload resolution fails on by-name parameter
| * SI-3761: Overload resolution fails on by-name parameter (amended per lrytz)Som Snytt2012-05-222-0/+7
| | | | | | | | Lukas noted the stopgap at methTypeArgs isn't needed. What! No black tie formals.
| * SI-3761: Overload resolution fails on by-name parameterSom Snytt2012-05-212-0/+22
| | | | | | | | | | | | | | | | | | | | | | When isAsSpecific checks if method m applies to args of types of formal params of m1, a by-name parameter was converted to its underlying result type for the params (of m) but not the args (of m1). This had the useful effect of making m(A) more specific than m(=>A), which is the specified prioritization for implicit views, but also made m(=>A) and m(=>A, B*) ambiguous. To handle this edge case, the isCompatible test for A and =>A is made explicit, and by-name params are no longer converted.
* | Merge pull request #601 from adriaanm/3f7b8b58748eb70aec4269f1ef63853b5ad4af60Adriaan Moors2012-05-232-0/+19
|\ \ | | | | | | virtpatmat: treemaker approximation refactorings and exhaustivity
| * | Exhaustivity: TreeMakers as boolean propositionsAdriaan Moors2012-05-222-0/+19
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We check exhaustivity by representing a match as a formula in finite-domain propositional logic (FDPL) that is false when the match may fail. The variables in the formula represent tested trees in the match (type tests/value equality tests). The approximation uses the same framework as the CSE analysis. A matrix of tree makers is turned into a DAG, where sharing represents the same value/type being tested. We reduce FDPL to Boolean PL as follows. For all assignments, V_i = c_i_j, we introduce a proposition P_i_j that is true iff V_i is equal to the constant c_i_j, for a given i, and all j, P_i_j are mutually exclusive (a variable cannot have multiple values). If the variable's domain is closed, we assert that one of P_i_j must be true for each i and some j. The conjunction of these propositions constitutes the equality axioms. After going through negational normal form to conjunctive normal form, we use a small SAT solver (the DPLL algorithm) to find a model under which the equational axioms hold but the match fails. The formula: EqAxioms /\ -MatchSucceeds. Note that match failure expresses nicely in CNF: the negation of each case (which yields a disjunction) is anded. We then turn this model into variable assignments (what's the variable (not) equal to, along with recursive assignments for its fields). Valid assignments (no ill-typed field assignments) are then presented to the user as counter examples. A counter example is a value, a type test, a constructor call or a wildcard. We prune the example set and only report the most general examples. (Finally, we sort the output to yield stable, i.e. testable, warning messages.) A match is only checked for exhaustivity when the type of the selector is "checkable" (has a sealed type or is a tuple with at least one component of sealed type). We consider statically known guard outcomes, but generally back off (don't check exhaustivity) when a match has guards or user-defined extractor calls. (Sometimes constant folding lets us statically decide a guard.) We ignore possibly failing null checks (which are performed before calling extractors, for example), though this could be done easily in the current framework. The problem is false positives. People don't usually put nulls in tuples or lists. To improve the exhaustivity checks, we rewrite `List()` to Nil. TODO: more general rewrite of List(a, b, ..., z) to `a :: b :: ... :: z`. When presenting counter examples, we represent lists in the user-friendly List(a,...,z) format. (Similarly for tuples.) There are no exhaustivity checks for a match-defined PartialFunction. misc notes: - fix pure case of dpll solver impure set (symbol that occurs both as a positive and negative literal) was always empty since I was looking for literals (which are not equal if positivity is not equal) but should have been looking for symbols - FDPL -> BoolPL translation collects all syms in props since propForEqualsTo generates an Or, must traverse the prop rather than assuming only top-level Syms are relevant... also, propForEqualsTo will not assume Or'ing a whole domain is equivalent to True (which it isn't, since the type test may fail in general) - improve counter example description - treat as constructor call when we either have definite type information about a real class, or we have no equality information at all, but the variable's type is a class and we gathered constraints about its fields (typically when selector is a tuple) - flatten a :: b :: ... :: Nil to List(a, b, ...) - don't print tuple constructor names, so instead of "Tuple2(a, b)", say "(a, b)" - filter out more statically impossible subtypes the static types convey more information than is actually checkable at run time this is good, as it allows us to narrow down the subtypes of a sealed type, however, when modeling the corresponding run-time checks we need to "erase" the uncheckable parts (using existentials so that the types are still well-kinded), so that we can use static subtyping as a sound model for dynamic type checks - experimental java enum handling seals enum class before, we created a refinement class as the placeholder for the sealed children it seems more direct to use the enum class for that this way, the new pattern matcher's exhaustiveness checker just works for java enums
* | Merge pull request #596 from magarciaEPFL/ticket-SI-5672Adriaan Moors2012-05-221-57/+52
|\ \ | | | | | | fix for SI-5672
| * | fix for SI-5672Miguel Garcia2012-05-211-57/+52
| |/
* | Merge pull request #586 from axel22/issue/5804Josh Suereth2012-05-222-0/+36
|\ \ | |/ |/| Fixes SI-5804.
| * Fixes SI-5804.Aleksandar Prokopec2012-05-182-0/+36
| | | | | | | | | | | | | | | | | | The hash table initialSize method is now within the the hashset and hashmap classes, and not in the companion. Overriding this method now yields hashmaps and hashsets of the proper initial capacity. Review by @phaller.
* | Improve test for SI-5125.Jason Zaugg2012-05-201-1/+1
| | | | | | | | Uncomment a line, as was the intent.
* | Fix @varargs forwarder generation in the presence of nested templates.Jason Zaugg2012-05-204-0/+72
| | | | | | | | | | | | Makes `newMembers` a Map[Symbol, Buffer[Tree]] to ensure we add the forwarders to the right template. Closes SI-5125.
* | Merge pull request #577 from lrytz/wip/t2488Adriaan Moors2012-05-192-0/+15
|\ \ | | | | | | Fix SI-2488: allow named arg, in original position, before positionals
| * | Fix SI-2488Lukas Rytz2012-05-182-0/+15
| | |
* | | Merge pull request #574 from axel22/issue/4461Josh Suereth2012-05-182-1/+9
|\ \ \ | | | | | | | | Fixes SI-4461.
| * | | Fixes SI-4461.Aleksandar Prokopec2012-05-182-1/+9
| | |/ | |/| | | | | | | No review.
* | | Merge pull request #572 from lrytz/wip/t5544Adriaan Moors2012-05-183-0/+12
|\ \ \ | | | | | | | | Fix SI-5544
| * | | Fix SI-5544Lukas Rytz2012-05-183-0/+12
| | |/ | |/| | | | | | | Type-check annotations in a context with a localDummy owner
* | | Merge pull request #571 from lrytz/wip/t4138Josh Suereth2012-05-182-0/+8
|\ \ \ | |_|/ |/| | Fix 4138
| * | Fix 4138Lukas Rytz2012-05-182-0/+8
| |/
* | Merge pull request #567 from lrytz/wip/t3488Josh Suereth2012-05-182-0/+8
|\ \ | |/ |/| Test case for SI-3844 - fixed by #virtpatmat @adriaanm
| * Test case for SI-3844 - fixed by #virtpatmat @adriaanmLukas Rytz2012-05-162-0/+8
| |
* | Added infrastructure to enable easy enrichment of GenTraversables.Miles Sabin2012-05-172-0/+34
|/
* Merge pull request #557 from lrytz/wip/t5610Josh Suereth2012-05-162-0/+36
|\ | | | | Fix for SI-5610
| * Fix for SI-5610Lukas Rytz2012-05-152-0/+36
| |
* | Removing more unneeded code.Paul Phillips2012-05-155-101/+4
| |
* | Test adjustments.Paul Phillips2012-05-151-1/+3
| |
* | Removing extraneous files.Paul Phillips2012-05-1510-913/+0
|/ | | | Culling accumulated unnecessary code.