summaryrefslogtreecommitdiff
path: root/test/files/pos
Commit message (Collapse)AuthorAgeFilesLines
* Test cases.Paul Phillips2012-05-101-0/+12
| | | | | | Closes SI-4482, SI-4651, SI-3702. Pending tests for SI-1832, SI-3439, SI-5091, SI-5231, SI-5265.
*-. Merge commit 'refs/pull/522/head'; commit 'refs/pull/523/head' into developPaul Phillips2012-05-102-0/+5
|\ \
| | * A bunch of fixes for positions when dealing with partial functionsHubert Plociniczak2012-05-102-0/+5
| |/
* | Fix an inference regression with this.type.Paul Phillips2012-05-091-0/+10
| | | | | | | | Closes SI-5210.
* | Restored portion of code removed in a7f68ce32c .Paul Phillips2012-05-091-0/+45
|/ | | | | | | | | | | | | | | A hole in the net discovered by retronym makes me put back the former special casing of module class type inference; there's no reason to get it wrong. It appears that TypeRef(pre1, sym1, Nil) SingleType(pre2, sym2) are not seen as equivalent if they have different prefixes even if the prefixes should be equivalent. For now I'm leaving it; in principle this patch should eventually be reverted after subtyping and/or the representation of singleton types advances to the point that it isn't necessary. Closes SI-5777.
* Fix for aliasing bug in reifier.Paul Phillips2012-05-081-0/+8
| | | | Closes SI-5769.
* Merge commit 'refs/pull/479/head'; commit 'refs/pull/480/head'; commit ↵Paul Phillips2012-05-061-0/+20
|\ | | | | | | 'refs/pull/481/head'; commit 'refs/pull/482/head'; commit 'refs/pull/483/head'; commit 'refs/pull/484/head'; commit 'refs/pull/485/head' into develop
| * Add missing methods to GenTraversableLike.Aleksandar2012-05-061-0/+20
| |
* | Test case closes SI-1785.Jason Zaugg2012-05-051-0/+7
|/
* Fix for implicit class / value class collision.Paul Phillips2012-05-031-0/+6
| | | | | | | | | | | | | | New this week, on SCALA. Implicit class: "Spin me up an implicit method with my name." Value class: "I need a companion object, pronto." Narrator: "All was well with this arrangement... UNTIL." What happens when these two wacky SIPs get together in the very same class? You'll laugh until, eventually, you cry! Weeknights at 9:30pm, only on SCALA. Closes SI-5667.
* Clarified the status of SI-13.Paul Phillips2012-05-031-31/+30
| | | | Through the oracle of pos/t1279a.scala.
* Moved passing tests from pending to files.Paul Phillips2012-05-033-0/+51
| | | | | | | | Most are pattern matcher bugs fixed by virtpatmat. A few are reifier, package object, or miscellaneous. I threw in an original test for SI-2337, to go with those for SI-1697, SI-3705, SI-4415, and SI-1357, all of which (in the interests of making sure this basket has all the eggs) I am closing.
*---. Merge commit 'refs/pull/467/head'; commit 'refs/pull/468/head'; commit ↵Paul Phillips2012-05-038-0/+118
|\ \ \ | | | | | | | | | | | | 'refs/pull/469/head'; commit 'refs/pull/470/head' into develop
| | * | SI-5703: normalize refined types moreAdriaan Moors2012-05-032-0/+6
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | to improve Array[T] java-interop with T[], normalize Object with Object{} to Object fix #SI-5688 by flattening refined types in parents updated check files to reflect flattening of refined types and updated position for refined types
| | *---. Merge commit 'refs/pull/457/head'; commit 'refs/pull/458/head'; commit ↵Paul Phillips2012-05-021-0/+15
| | |\ \ \ | |_|_|_|/ |/| | | | | | | | | 'refs/pull/459/head'; commit 'refs/pull/460/head'; commit 'refs/pull/461/head'; commit 'refs/pull/462/head'; commit 'refs/pull/463/head'; commit 'refs/pull/464/head'; commit 'refs/pull/465/head' into develop
| | | | * Test case for si-5198.Aleksandar Prokopec2012-05-021-0/+15
| |_|_|/ |/| | |
| | * | Merge commit 'refs/pull/457/head'; commit 'refs/pull/458/head'; commit ↵Paul Phillips2012-05-023-0/+10
| |/|\| |/| | | | | | | | | | | 'refs/pull/459/head'; commit 'refs/pull/460/head'; commit 'refs/pull/461/head'; commit 'refs/pull/462/head' into develop
| | | * SI-5542 closed by test caseAdriaan Moors2012-05-022-0/+4
| |_|/ |/| |
| | * SI-5729: TypeVar experimentals iff -XexperimentalAdriaan Moors2012-05-021-0/+6
| |/ |/| | | | | | | | | it used to also be enabled by -Yvirtpatmat, which is now on by default, but this type hackery is no longer necessary to bootstrap under the new pattern matching scheme, so let's only turn it on when people are feeling -Xexperimental
| * SI-5720: Qual block doesn't update sym ownerSom Snytt2012-05-022-0/+87
|/ | | | | | A one-line change to blockWithQualifier. The symptom is undefined tmp var symbols in the backend; lamba lift thinks the tmp var is free and adds it to anonfun ctors.
* Removed a few more @deprecated members.Paul Phillips2012-04-2811-21/+21
| | | | | The ones which remain I'm not removing on purpose, as I know from experience it's more trouble than it's yet worth.
*-. Merge commit 'refs/pull/443/head'; commit 'refs/pull/444/head' into developPaul Phillips2012-04-262-0/+33
|\ \
| | * SI-5702 Pattern parser halts on starSom Snytt2012-04-261-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In patterns, the parser halts when it sees stars. This means it does not handle infix notation for a case class named "*". This patch uses lookahead to decide whether to parse '_' '*' as a sequence pattern or as the start of infix. (For both normal and error cases, the tokens are always consumed immediately.) Error messages are improved for _* (as a help to learners) and slightly improved recovery helps the parse continue. The entry point for XML patterns is now distinct; otherwise, the change is local to pattern3-simplepattern; the entry point for simplepattern() is unchanged because it is commented "hook for IDE."
| * | SI-5690: no-selector match in function yields functionAdriaan Moors2012-04-261-0/+18
|/ / | | | | | | | | | | | | the implicit beta-reduction performed by typedFunction on a Function(.., Match(EmptyTree, ...)) must of course only be done when the selector actually is empty... (yes, typedMatchAnonFun needs to be cleaned up, I know)
* | fixes SI-5706Eugene Burmako2012-04-252-0/+11
| |
* | resurrects manifests in their pre-2.10 gloryEugene Burmako2012-04-2313-0/+310
| |
* | migrates stdlib and compiler to tagsEugene Burmako2012-04-2314-51/+51
|/ | | | | * all usages of ClassManifest and Manifest are replaced with tags * all manifest tests are replaced with tag tests
* Merge commit 'refs/pull/408/head'Paul Phillips2012-04-161-1/+0
|\
| * don't emit tiny switches: optimizer chokes on themAdriaan Moors2012-04-141-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | workaround for inliner bug in run/t3835 see SI-5672 for the optimizer bug tiny switches (2 cases or less) don't make sense anyway, so this is not a big deal the annotDepMethType.flags contained -Xexperimental, which causes Any* to be considered as a valid return type, before we weren't exposed to this, because the product methods used (tiny) switches; with this change, they went back to pattern matches in any case, the -Xexperimental was intended to turn on dependent method types, not Any* as valid type (I can only assume), and they are now on by default the other tests were affected by our refusal to emit tiny switches
* | Merge commit 'refs/pull/401/head'; commit 'refs/pull/402/head'; commit ↵Paul Phillips2012-04-142-0/+0
|\ \ | |/ |/| | | 'refs/pull/403/head'; commit 'refs/pull/404/head'; commit 'refs/pull/405/head' into develop
| * implements reification of tough typesEugene Burmako2012-04-142-0/+0
| |
| |
| \
*-. \ Merge commit 'refs/pull/391/head'; commit 'refs/pull/390/head' into developPaul Phillips2012-04-1413-12/+17
|\ \ \
| * | | virtpatmat on by default; chicken out: -XoldpatmatAdriaan Moors2012-04-1412-12/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | some tests (unreachability, exhaustivity, @switch annotation checking) are still run under -Xoldpatmat, but that will change before we go into RC mode (then the test/ partest of this commit will be reverted) removed irrelevant dependency on patmat
| * | | synth PartialFunction in uncurryAdriaan Moors2012-04-141-0/+6
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | due to interaction with the CPS plugin, can't synth PartialFun during typer (the types don't work out: in PartialFun[T, U @cps[V]], U @cps[V] does not conform to Any, and we can't move the annot from the type arg directly to applyOrElse's result, since then it won't override anything) thus, we face the pain of mangling labeldefs again resetLocalAttrsKeepLabels can't use leaveAlone don't cast matcherror throw, uncurry gets confused uncurry: cast selector valdef's rhs to avoid skolem mismatch NOTE: I'm not happy about this code, but I don't know how to make the clean way (typedMatchAnonFun) compatible with the CPS plugin one avenue to explor would be to introduce PartialFunCPS, which is transformed into a regular PartialFun when T @cps[U] is turned into ControlContext[T, U]
* / | restores some disabled macro tests, makes checkFeature synchronous when used ↵Eugene Burmako2012-04-142-0/+57
|/ / | | | | | | for macros
* | Fixed tests to account for SIP 18Martin Odersky2012-04-132-2/+4
| |
* | Added languageFeature annotation (was missing before). Resolved problem with ↵Martin Odersky2012-04-132-2/+2
|/ | | | late loading of nested classes in Definitions. Resolved handling of deprecated idents `then` and `macro`. Massaged test flags.
* Next generation of macrosEugene Burmako2012-04-128-17/+12
| | | | | | | | | | | | | | | | | | | | | | Implements SIP 16: Self-cleaning macros: http://bit.ly/wjjXTZ Features: * Macro defs * Reification * Type tags * Manifests aliased to type tags * Extended reflection API * Several hundred tests * 1111 changed files Not yet implemented: * Reification of refined types * Expr.value splicing * Named and default macro expansions * Intricacies of interaction between macros and implicits * Emission of debug information for macros (compliant with JSR-45) Dedicated to Yuri Alekseyevich Gagarin
* 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.
* 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)
* Fix for SI-3272.Paul Phillips2012-04-021-0/+8
| | | | | | | | "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.
* 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.
* 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.
* Overhaul of JavaConver{sions,ters}.Paul Phillips2012-03-211-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initially motivated by SI-5580, then just motivated. I broke up the opaquely named JavaConversions and JavaConverters into the following traits encapsulating some permutation of { to java, to scala, bidirectional } { wrappers, decorators } I named everything consistently in terms of either Wrappers or Decorators. Decorators install those asJava/asScala methods onto collections of the right kind; Wrappers hide the process. JavaConversions then reduces to an object which (ill-advisedly) extends both WrapAsJava and WrapAsScala. And JavaConverters is an object extending DecorateAsScala and DecorateAsJava. However other more clearly named vals exist in the newly created scala.collection.convert package object. val decorateAsJava = new DecorateAsJava { } val decorateAsScala = new DecorateAsScala { } val decorateAll = new DecorateAsJava with DecorateAsScala { } val wrapAsJava = new WrapAsJava { } val wrapAsScala = new WrapAsScala { } val wrapAll = new WrapAsJava with WrapAsScala { } So for instance to import asScala decorators, and only those: scala> import scala.collection.convert.decorateAsScala._ import scala.collection.convert.decorateAsScala._ scala> new java.util.ArrayList[String].asScala groupBy (x => x) res0: scala.collection.immutable.Map[String,scala.collection.mutable.Buffer[String]] = Map() I propose we put those vals or a subset of them in the scala package object rather than way down in scala.collection.convert.
* Restore irrefutability commits.Paul Phillips2012-03-203-0/+54
| | | | This reverts commit d8ba5d091e5641553b438ef9930a6023a2709dcd.
* Fix for stability failure.Paul Phillips2012-03-201-0/+37
| | | | | | | Pattern matcher! Totally unrelated to irrefutability, the pattern matcher at some point stopped sorting its lookup switch cases, and the butterfly's wings flapped enough to swap two cases. Now they're sorted in ascending order like they're supposed to be.
* Revert irrefutability commits.Paul Phillips2012-03-203-54/+0
| | | | | Temporary reversion of irrefutability commits in interests of stable milestone. Expect to restore shortly.
* [vpm] fix half of my existential troublesAdriaan Moors2012-03-201-0/+35
| | | | | | | no need for the clunky repackExistential pack the type of each case instead, since the skolems we've created shouldn't last beyond the case anyway this way we don't end up with fresh, incompatible, skolems for every case, but a neatly packed existential
* [vpm] typer synths Function{} for empty-sel matchAdriaan Moors2012-03-202-0/+9
| | | | | | | | | | | | | | | | | typedMatchAnonFun is called from typedFunction when the function's body is a match this is work-in-progres: the compiler currently won't bootstrap under -Yvirtpatmat see also the pending test make sure to use the right context in typeFunction when the body is a Match when typer is set up for type checking a Function, the current owner is the symbol for the function, but we'll type check a Block(List(ClassDef(cd)), New(cd)) when the function is a match, and the function symbol is nowhere to be found, so go to outer context in patmatvirt: - simplified default case gen (no need for a Casegen instance) - using CASE | SYNTHETIC to detect generated matches (for switches) and avoid typing them endlessly more uniform, and necessary for new-style anon Function class instance gen for matches
* [vpm] test file for regression on old patmatAdriaan Moors2012-03-202-0/+9
| | | | it's a warning on new patmat -- TODO: dig deeper