summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* SI-4540 Fix [RichDouble|RichFloat|RichLong].isValid[Byte|Short|Char|Int].Dmitry Nadezhin2012-04-081-58/+273
| | | | | | | | | | This commit fixes test cases mentioned in comment 03/Apr/12 to SI-4540. Methods are fixed in leaf classes RichDouble|RichFloat|RichLong. Their superclasses are not modified. File is-valid-num.scala contains commented tests of isValidLong|isValidFloat|isValidLong, but they are not added anywhere now.
* Merge branch 'apr6-flags' of leaf:/scala/trunk into developPaul Phillips2012-04-061-18/+18
|\
* \ Merge commit 'pull/358/head' into developPaul Phillips2012-04-061-0/+16
|\ \
| * | Test case for overloading resolution during reflection.Martin Odersky2012-04-051-0/+16
| | |
* | | SI-4134: abstract override crasher if lacking super implSom Snytt2012-04-062-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The example from the ticket is committed as a neg test. The problem is that a super.m on an abstract override member m has no concrete implementation, that is, the trait T is not mixed in after a class C with a concrete m. The error is noticed at phase mixin when the super accessor is added to the concrete mixer. (Pun alert?) When super.m is rebound, no concrete matching symbol is found up the linearization. Previously, it was asserted that such a symbol should be found, but since this is our first opportunity to detect that there is none, an error should be emitted instead. The new message is of the form: Member method f of mixin trait T2 is missing a concrete super implementation. Additionally, a couple of flag tests were changed to use isAbstractOverride.
* | | Make NumericRange# O(1) instead of O(n).Simon Ochsenreither2012-04-062-17/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It makes me a bit nervous that NumericRange[Int] will get different wrong values in overflow situations compared to Range due to the missing toLong though. It could probably need some investigation if reordering the operations can rule out wrong values, e. g. only fail when the fold also fails. Apart from that, it might make sense to just throw an exception if an overflow happens instead of silent overflow.
* | | Fix for SI-5591.Geoff Reedy2012-04-062-0/+11
| |/ |/| | | | | And test case for SI-5591.
* | Fix for SI-5644.Paul Phillips2012-04-062-0/+839
| | | | | | | | | | | | | | Don't let OverloadedTypes reach the backend. When you want a method from a particular symbol, avoid getMember, which may inflict upon you an OverloadedType if an inherited member has the same name. Instead, use the (just now appearing) definitions.getDecl.
* | Merge branch 'develop'Paul Phillips2012-04-054-16/+283
|\ \
| | \
| | \
| | \
| | \
| | \
| | \
| *-----. \ Merge commit 'refs/pull/353/head'; commit 'refs/pull/354/head'; commit ↵Paul Phillips2012-04-054-16/+283
| |\ \ \ \ \ | | |_|_|_|/ | |/| | | | | | | | | | 'refs/pull/356/head'; commit 'refs/pull/337/head'; commit 'refs/pull/339/head' into develop
| | | | | * String interpolation bug fixDominik Gruntz2012-03-283-0/+9
| | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change fixes a bug in class StringContext.scala. Parts were not correctly added to the resulting string. This commit includes a test case which covers the example reported in the bug. Closes SI-5614.
| | * | / Add tests for future combinators: map, flatMap, filter, collect, foreach, ↵phaller2012-04-041-16/+274
| | |/ / | | | | | | | | | | | | recoverWith, zip, fallbackTo
* | / / A boatload of work on Symbols and Flags.Paul Phillips2012-04-051-0/+6
|/ / / | | | | | | | | | | | | | | | | | | Finally my dream of orderliness is within sight. It's all pretty self-explanatory. More polymorphism, more immutable identity, more invariants.
* | | Fix for continuations issue with match blocks.Paul Phillips2012-04-052-0/+31
| | | | | | | | | | | | Don't type pattern trees with annotations still attached.
* | | Fix for continuations issue.Paul Phillips2012-04-054-5/+58
| | | | | | | | | | | | | | | | | | | | | | | | Avoid explicit type arguments which don't conform to bounds where they could be successfully inferred. I had to disable one "neg" test which is no longer neg. Can anyone clue me in as to whether it is important?
* | | Added Option#fold.Paul Phillips2012-04-042-0/+24
| | |
* | | Unify "object Foo" and "Foo.type".Paul Phillips2012-04-041-0/+6
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The source of many bugs over the years is that the first is represented as a TypeRef and the second a SingleType. Over a great period of time I figured out how to shield us from the more obvious bug manifestations, but a recent comment by adriaan jarred me into realizing that we can fix it at the source. This commit changes <:< and =:= to recognize when those two representations are being compared and to treat them as equivalent regardless of which is on the left. The reason I don't quash one representation entirely is that a fair bit of code depends on singleton types having an underlying type which is not the same, and regardless of that it would entail more changes and more risk. The change allows removing the type inference conditions which worried about this, and also fixes SI-4910. scala> val t1 = typeRef(ScalaPackageClass.thisType, NoneModule.moduleClass, Nil) t1: $r.intp.global.Type = None.type scala> val t2 = t1.narrow t2: $r.intp.global.Type = None.type scala> (t1.getClass, t2.getClass) res20: (Class[?0], Class[?0]) forSome { type ?0 <: $r.intp.global.Type; type ?0 <: $r.intp.global.Type } = (class scala.reflect.internal.Types$ModuleTypeRef,class scala.reflect.internal.Types$UniqueSingleType) scala> ((t1 =:= t2, t2 =:= t1, t1 <:< t2, t2 <:< t1)) res21: (Boolean, Boolean, Boolean, Boolean) = (true,true,true,true)
* | Merge commit 'refs/pull/350/head'; commit 'refs/pull/351/head' into developPaul Phillips2012-04-032-0/+139
|\ \
| * | Added presentation memory leak test.Iulian Dragos2012-04-032-0/+139
| | |
* | | Remedies Try/Either signature disparity for source compat. w/ AkkaHeather Miller2012-04-031-3/+77
| | |
* | | Merge branch 'develop'Paul Phillips2012-04-023-2/+146
|\ \ \
| | \ \
| | \ \
| | \ \
| | \ \
| | \ \
| | \ \
| *-----. \ \ Merge remote-tracking branches 'axel22/feature/future-compat', ↵Paul Phillips2012-04-0216-9/+273
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 'dlwh/issues/5632', 'jsuereth/feature/import-jars-from-maven', 'nadezhin/master' and 'axel22/feature/collection-concurrent' into develop
| | | | | * | | Merge branch 'master' into feature/collection-concurrentAleksandar Prokopec2012-04-0292-242/+1382
| | | | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/library/scala/collection/JavaConversions.scala src/library/scala/collection/JavaConverters.scala Add one test for concurrent map conversion.
| | | | * | | | SI-5627 BigInt.equals(Number) and BigDecimal.equals(Number) should implement ↵Dmitry Nadezhin2012-04-022-2/+110
| | | | | |/ / | | | | |/| | | | | | | | | | | | | | | | equality in mathematical sense
* | | | / | | Fix for SI-3272.Paul Phillips2012-04-023-17/+39
| |_|_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "References to the type parameters in object-private or object-protected values, variables, or methods (§5.2) of the class are not checked for their variance position." Review by @odersky.
* | | | | | Pushed Symbol/Type creation partitioning further.Paul Phillips2012-04-014-4/+4
| |_|/ / / |/| | | | | | | | | | | | | | | | | | | Yet more funnelling of immutable creation-time known information into the identities of symbols and types.
* | | | | Merge remote-tracking branch 'adriaanm/topic/partialfun' into developPaul Phillips2012-03-301-3/+3
|\ \ \ \ \ | |_|/ / / |/| | | |
| * | | | a fast, functional PartialFunction implementationPavel Pavlov2012-03-301-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | runtime.AbstractPartialFunction provides a default implementation for the new-style partial function. In principle this class is only subclassed by compiler-generated partial functions arising from matches. Either - the apply method (old-style partialfun) or - the applyOrElse method (current scheme) must be overridden, and the isDefinedAt method implemented. The applyOrElse method implementation is provided to ease the transition from the old scheme, since starr still generates old-style PartialFunctions, but locker's library has the new AbstractPartialFunction. Thus, this implementation is intended as a drop-in replacement for the old partial function, and does not require changes to the compiler. (compiler patches, both for old and new-style pattern matching, follow) - runtime.AbstractPartialFunction is based on PartialFunction.WithDefault Original version of FunctionWithDefault by Odersky (http://article.gmane.org/gmane.comp.lang.scala.internals/4032) - better performance for OrElse#applyOrElse, OrElse#lift, PF.cond - new combinator methods: PF#run, PF#runWith, PF.apply authored by @pavelpavlov, refactored by @adriaanm, review by @paulp
* | | | | Fix for regression with inference at arity 21+.Paul Phillips2012-03-301-0/+14
| | | | | | | | | | | | | | | | | | | | A classic "off by two" error. Closes SI-4545, SI-5633.
| | | | |
| \ \ \ \
*-. \ \ \ \ Merge remote-tracking branches 'heathermiller/doc/linking' and ↵Paul Phillips2012-03-301-1/+1
|\ \ \ \ \ \ | |_|/ / / / |/| | / / / | | |/ / / 'axel22/feature/future-compat' into develop
| | * | | Work on source compatibility between akka and scala futures.Aleksandar Prokopec2012-03-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Removed some methods from execution contexts. Changed Awaitable interface.
* | | | | A couple tests for pending.Paul Phillips2012-03-294-0/+62
|/ / / /
* | | | Revert the lisp test.Paul Phillips2012-03-282-3/+4
| | | | | | | | | | | | | | | | The lisp test enjoys the suffering of others.
* | | | Never write final fields outside of constructors.Paul Phillips2012-03-283-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | Closes SI-3569, SI-3770. Also threw in experimental -Yoverride-vars. It's not robust.
* | | | Revived the lisp test.Paul Phillips2012-03-282-4/+3
|/ / / | | | | | | | | | | | | | | | All hail the lisp test! Closes SI-4579.
* | | Merge remote-tracking branch 'axel22/feature/collection-concurrent' into developPaul Phillips2012-03-278-64/+65
|\| |
| * | Rename ConcurrentTrieMap to concurrent.TrieMap.Aleksandar Prokopec2012-03-278-64/+65
| | | | | | | | | | | | | | | | | | | | | | | | Introduced the collection.concurrent package and introduced the concurrent.Map trait there. Deprecated the mutable.ConcurrentMap trait. Pending work - introduce the appropriate changes to JavaConversions and JavaConverters.
* | | Workaround for "package is not a value".Paul Phillips2012-03-272-0/+83
| |/ |/| | | | | | | | | Not actually a fix, but when we see a package where a module is expected, it's not a great stretch to try the package object. References SI-5604.
* | Fixes SI-5373Vlad Ureche2012-03-278-5/+39
| | | | | | | | | | And adds basic support for scaladoc model tests (class partest.ScaladocModelTest)
* | Merge remote-tracking branch 'adriaanm/topic/virtpatmat' into developPaul Phillips2012-03-233-0/+16
|\ \
| * | do nothing when closing closed block in ignoremodeAdriaan Moors2012-03-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this came to light with the virtual pattern matcher, which emits jumps like `matchEnd3(_test(Test.this, false))`, where _test is a tailcall the nested jumping caused double-closing (the second time in ignore mode) thus. when closing a closed block in ignore mode, simply do nothing from genLoad for label-jumps: note: when one of the args to genLoadLabelArguments is a jump to a label, it will call back into genLoad and arrive at this case, which will then set ctx1.bb.ignore to true, this is okay, since we're jumping unconditionally, so the loads and jumps emitted by the outer call to genLoad (by calling genLoadLabelArguments and emitOnly) can safely be ignored, however, as emitOnly will close the block, which reverses its instructions (when it's still open), we better not reverse when the block has already been closed but is in ignore mode (if it's not in ignore mode, double-closing is an error) @dragos figured it out, all I did was write the comment and the `if` test case to repro basic blocks crasher the tailcall in the forward jump `matchEnd3(_test(Test.this, false))` in the following program crashes the back-end (error below) @scala.annotation.tailrec final def test(meh: Boolean): Boolean = { <synthetic> val _$this: Test.type = Test.this; _test(_$this,meh){ case <synthetic> val x1: Some[String] = new Some[String]("a"); case3(){ matchEnd2({ case <synthetic> val x1: Some[String] = x1; case4(){ if (x1.ne(null)) matchEnd3(if (meh) _test(Test.this, false) else false) else case5() }; case5(){ matchEnd3(_test(Test.this, false)) }; matchEnd3(x){ x } }) }; matchEnd2(x){ x } } }; The last instruction (of basic block 11) is not a control flow instruction: CONSTANT(false) // methods def test(meh: Boolean (BOOL)): Boolean { locals: value meh, value _$this, value x1, value x, value x, value x1 startBlock: 1 blocks: [1,2,3,4,5,6,7,8,9,10,11,12,13] 1: 4 JUMP 2 2: 5 NEW REF(class Some) 5 DUP(REF(class Some)) 5 CONSTANT("a") 5 CALL_METHOD scala.Some.<init> (static-instance) 5 STORE_LOCAL(value x1) 5 SCOPE_ENTER value x1 5 JUMP 3 3: 5 LOAD_LOCAL(value x1) 7 STORE_LOCAL(value x1) 7 SCOPE_ENTER value x1 7 JUMP 4 4: 7 LOAD_LOCAL(value x1) 7 CZJUMP (REF(class Object))NE ? 5 : 6 5: 8 LOAD_LOCAL(value meh) 8 CZJUMP (BOOL)NE ? 8 : 9 6: ? JUMP 11 7: 7 DROP BOOL 7 JUMP 11 8: 8 CONSTANT(false) 8 STORE_LOCAL(value meh) 8 JUMP 2 9: 8 CONSTANT(false) 8 JUMP 10 10: 8 STORE_LOCAL(value x) 8 JUMP 12 11: 9 JUMP 2 9 STORE_LOCAL(value meh) 9 CONSTANT(false) 12: 7 LOAD_LOCAL(value x) 7 SCOPE_EXIT value x1 7 STORE_LOCAL(value x) 7 JUMP 13 13: 5 LOAD_LOCAL(value x) 5 SCOPE_EXIT value x1 5 RETURN(BOOL)
| * | [vpm] avoid verifyerror: leave jump to tail-pos labelAdriaan Moors2012-03-233-0/+15
| | | | | | | | | | | | | | | the following commit deals with the fall-out in basicblocks (double closing of blocks in ignore mode)
* | | Adapted scaladoc testVlad Ureche2012-03-231-6/+9
| | |
* | | Document regex replacement strings behavior.Daniel C. Sobral2012-03-232-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | All replacement methods use dolar signs to identify groups in the matched string, and backslashes to escape characters. Document this behavior, and provide a method that can be used to properly quote replacement strings when this behavior is not desired. Closes SI-4750.
* | | Regex improvementsDaniel C. Sobral2012-03-231-0/+32
|/ / | | | | | | | | | | | | | | | | | | | | This adds findAllMatchIn to Regex to mirror other similar methods. It also overloads StringLike's "r", adding a version that accepts group names. It includes test cases for both methods. Closes SI-2460.
* | Undo the revert.Lukas Rytz2012-03-232-16/+0
| | | | | | | | | | reverts 3db29dde051614d976bca92a1cdeb109c9c0ab01 and 5af2bf54d21ac63236cd6e68586b2c38fa0f28c3 restores 19a48510c2e18430a35319c04dfe3bad7119f23f
* | Test case for cause of previous commit's reversion.Paul Phillips2012-03-222-0/+16
| |
| |
| \
| \
| \
| \
| \
*-----. \ Merge remote-tracking branches 'axel22/feature/pc-execution-contexts', ↵Paul Phillips2012-03-2263-223/+1031
|\ \ \ \ \ | |_|_|_|/ |/| | | | | | | | | 'VladUreche/issue/5593', 'dragos/master', 'VladUreche/issue/5599', 'adriaanm/ticket/treeannot' and 'heathermiller/issue/5291' into develop
| | | | * Test case closes SI-4987.Paul Phillips2012-03-222-0/+6
| | | |/
| | * / Increased the timeout from 5s to 60s to make the presentation compiler ↵Iulian Dragos2012-03-221-1/+1
| | |/ | | | | | | | | | shutdown test more resilient on slow machines.