summaryrefslogtreecommitdiff
path: root/test/files/pos
Commit message (Collapse)AuthorAgeFilesLines
* changes some manual tree constructions in macro tests to quasiquotesEugene Burmako2013-10-185-7/+7
|
* deprecates raw tree manipulation facilities in macros.ContextEugene Burmako2013-10-184-6/+6
|
* Merge pull request #3030 from xeno-by/topic/fundep-viewsEugene Burmako2013-10-182-0/+16
|\ | | | | SI-3346 implicit parameters can now guide implicit view inference
| * SI-3346 implicit parameters can now guide implicit view inferenceEugene Burmako2013-10-112-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This simple patch makes it possible for implicit views to benefit from fundep-guided type inference, eliminating a nasty special case in implicit inference. Here are the changes that I had to apply to the tests (they exposed quite a number of interesting questions that I was happy to answer): 1) neg/t5845.scala now works, so I moved it to pos. That easily makes sense, because the test was just a canary to track previous state of things. 2) neg/divergent_implicit.scala, neg/t5578.scala and neg/t7519.scala changed their messages to less informative ones, because inapplicable implicit views now get disqualified early and therefore don't display their error messages to the user. This is an unfortunate but necessary byproduct of this change, and one can argue that the behavior is now completely consistent with implicit vals (that also don't explain why this or that implicit val got disqualified, but rather display a generic implicit value not found message). 3) scaladoc/implicits-chaining.scala and scaladoc/implicits-base.scala. Immediate culling of apriori inapplicable implicit views messes things up for Scaladoc, because it's interested in potentially applicable views, having infrastructure to track various constraints (type bounds, requirements for implicit parameters, etc) that guide applicability of views and then present it to the user. Therefore, when scaladoc is detected, implicit search reverts to the old behavior. 4) We still cannot have Jason's workaround to type constructor inference mentioned in comments to SI-3346, because it's not really about implicit parameters of implicit views, but about type inference flowing from the implicit parameter list to a preceding parameter list in order to affect inference of an implicit view. This is something that's still too ambitious.
* | Merge pull request #3045 from retronym/ticket/7688-4Jason Zaugg2013-10-181-0/+7
|\ \ | | | | | | Fix AsSeenFrom of ThisType from TypeVar prefix
| * | SI-7688 Fix AsSeenFrom of ThisType from TypeVar prefixJason Zaugg2013-10-171-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Restores behaviour for the AsSeenFrom before the refactoring in b457b6c477. This commit uniformly considered that a `TypeVar` prefix should not `matchesPrefixAndClass`; a condition that formerly was only applied if the type being viewed was a `TypeRef`. This condition was originally added in cc9e8eda3364d as a backstop for pos/t2797.scala. This commit leaves that backstop in place where it was, although it expresses it more directly by checking if `pre baseType clazz` is `NoType`, which was the case that cropped up in SI-2797: scala> type T = bc._1.type forSome { val bc: (AnyRef, AnyRef) } warning: there were 1 feature warning(s); re-run with -feature for details defined type alias T scala> val et = typeOf[T].dealias.asInstanceOf[ExistentialType] et: $r.intp.global.ExistentialType = bc._1.type forSome { val bc: (AnyRef, AnyRef) } scala> et.withTypeVars( { x => | println(x.prefix.typeSymbol) | println(x.prefix.typeSymbol.isSubClass(typeOf[Tuple2[_, _]].typeSymbol)) | println(x.prefix.baseType(typeOf[Tuple2[_, _]].typeSymbol)) | true | } , reflect.internal.Depth(0)) type bc.type true <notype> res98: Boolean = true
* | | Merge remote-tracking branch 'scala/master' into fix-merge-3018Grzegorz Kossakowski2013-10-142-11/+17
|\ \ \ | | | | | | | | | | | | | | | | Conflicts: src/compiler/scala/tools/nsc/typechecker/Typers.scala
| * | | SI-7902 Fix spurious kind error due to an unitialized symbolJason Zaugg2013-10-091-0/+17
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tracked down this error: <none> is invariant, but type Y2 is declared covariant <none>'s bounds<notype> are stricter than type X2's declared bounds >: Nothing <: Any, <none>'s bounds<notype> are stricter than type Y2's declared bounds >: Nothing <: Any to `Symbol#typeParams` returning `List(NoSymbol)` if the symbol was not initialized. This happends in the enclosed test for: // checkKindBoundsHK() hkArgs = List(type M3) hkParams = List(type M2) This commit forces the symbol of the higher-kinded type argument before checking kind conformance. A little backstory: The `List(NoSymbol)` arises from: class PolyTypeCompleter... { // @M. If `owner` is an abstract type member, `typeParams` are all NoSymbol (see comment in `completerOf`), // otherwise, the non-skolemized (external) type parameter symbols override val typeParams = tparams map (_.symbol) The variation that triggers this problem gets into the kind conformance checks quite early on, during naming of: private[this] val x = ofType[InSeq] The inferred type of which is forced during: def addDerivedTrees(typer: Typer, stat: Tree): List[Tree] = stat match { case vd @ ValDef(mods, name, tpt, rhs) if !noFinishGetterSetter(vd) => // If we don't save the annotations, they seem to wander off. val annotations = stat.symbol.initialize.annotations
| * / SI-7899 Don't infer by-name types during, e.g. eta-expansionJason Zaugg2013-10-071-11/+0
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given: def id[A](a: A): A = a def foo(f: (=> Int) => Int) = () foo(id) We eta-expanded `id` and inferred `A` to be `=> Int` to satisfy the expected type set forth by the formal parameter `f`. We really shouldn't go about inferring types that we can't *write*. Our attempt to do so led promptly into a `ClassCastException` in the enclosed test. This commit: - drops by-name-ness during `inferExprInstance` - tests that this results in a type error for the reported bug (neg/t7899) - tests that a method with a by-name parameter can still be eta expanded to match function with a corresponding by-name parameter (run/t7899) - discovers the same latent CCE in pos/t7584 - now that would be a type error - so we compensate by using placeholder functions rather than eta-expansion. - and move that that test to `run` for good measure.
* | Single Abstract Method support: java8 testAdriaan Moors2013-10-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | Inspired by test/files/run/t7398.scala and sammy_poly. Added some notes to original tests. Elaborating on that note: we don't yet desugar `f(a)` to `f.sam(a)`, like we do for regular functions: `f(a)` becomes `f.apply(a)`. It seems pleasingly symmetrical and is easy to implement, but not sure it's a good idea...
* | Extract SerialVersionUIDAnnotation. Make SAM body synthetic.Adriaan Moors2013-10-082-0/+10
| | | | | | | | Addressing review feedback.
* | Single Abstract Method support: synthesize SAMsAdriaan Moors2013-10-047-2/+32
|/ | | | | | | | | | Under `-Xexperimental`, `typedFunction` invokes `synthesizeSAMFunction` when the expected type for the function literal (`pt`) is not the built-in `FunctionN` type of the expected arity, but `pt` does have a SAM with the expected number of arguments. PS: We'll require `import language.sam` instead of `-Xexperimental`, as soon as the SIP is ready and there are more tests.
* SI-6680 unsoundness in gadt typing.Paul Phillips2013-10-012-1/+30
| | | | | | | Introduces -Xstrict-inference to deal with the significant gap between soundness and what presently compiles. I'm hopeful that it's TOO strict, because it finds e.g. 75 errors compiling immutable/IntMap.scala, but it might be that bad.
* Merge remote-tracking branch 'origin/2.10.x' into merge/2.10.x-to-master-2Jason Zaugg2013-09-271-0/+30
|\ | | | | | | | | | | | | | | | | | | Conflicts: bincompat-backward.whitelist.conf bincompat-forward.whitelist.conf build.xml src/compiler/scala/tools/nsc/typechecker/RefChecks.scala src/library/scala/concurrent/Future.scala src/reflect/scala/reflect/internal/Types.scala
| * Merge pull request #2919 from retronym/ticket/7815Jason Zaugg2013-09-231-0/+30
| |\ | | | | | | SI-7815 Dealias before deeming method type as dependent
| | * SI-7815 Dealias before deeming method type as dependentJason Zaugg2013-09-071-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To enable eta-expansion of method types seen from a prefix that renders the result type as independent from the parameter symbols. The enclosed test shows that we dealias types before checking dependence, and that we do this deeply (e.g. type arguments are also dealised.) An existing test, neg/error_dependentMethodTpeConversionToFunction, confirms that bona-fide dependent methods are still prohibited from eta expansion.
* | | Revert "Merge pull request #2957 from paulp/pr/parser-improvements"François Garillot2013-09-241-5/+0
| | | | | | | | | | | | | | | This reverts commit 884e1ce762d98b29594146d37b85384581d9ba96, reversing changes made to f6fcc4431f272c707d49de68add532c452dd4b0f.
* | | SI-7864 Harden "looks like an interpolated String" warningJason Zaugg2013-09-222-0/+6
| | | | | | | | | | | | | | | We can't rely on the qualifier of an `Apply` having a non-null symbol in general.
* | | SI-7854, SI-6768 better parsing/positioning in parserPaul Phillips2013-09-181-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The parser hole I found while working on the generated positions serves as the umbrella for a host of improvements. Upgraded positions assigned during some specific challenging situations mostly involving the creation of synthetic trees, e.g. for comprehensions and closures. While doing so improved some error messages. Eliminated some of the most glaring duplication in the parser. It's written like there is some payoff associated with being spectacularly imperative. Not so far.
* | | Merge pull request #2961 from paulp/pr/whitespaceJason Zaugg2013-09-18263-604/+590
|\ \ \ | | | | | | | | Cull extraneous whitespace.
| * | | Cull extraneous whitespace.Paul Phillips2013-09-18263-604/+590
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One last flurry with the broom before I leave you slobs to code in your own filth. Eliminated all the trailing whitespace I could manage, with special prejudice reserved for the test cases which depended on the preservation of trailing whitespace. Was reminded I cannot figure out how to eliminate the trailing space on the "scala> " prompt in repl transcripts. At least reduced the number of such empty prompts by trimming transcript code on the way in. Routed ConsoleReporter's "printMessage" through a trailing whitespace stripping method which might help futureproof against the future of whitespace diseases. Deleted the up-to-40 lines of trailing whitespace found in various library files. It seems like only yesterday we performed whitespace surgery on the whole repo. Clearly it doesn't stick very well. I suggest it would work better to enforce a few requirements on the way in.
* | | | Merge pull request #2955 from retronym/ticket/7853Paul Phillips2013-09-183-0/+50
|\ \ \ \ | |/ / / |/| | | SI-7853 Regression in explicit outer
| * | | SI-7853 A less ad-hoc place to call memberTypeJason Zaugg2013-09-181-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than localizing the fix to the outerAccessor, this commit pushed the call to `memberType` into *all* usages of `newValDef` and `newDefDef`. The TPT of `applyOrElse` in synthetized partial functions must be set explicitly to pass the pos/t7853-partial-function.scala. Otherwise, the as-seen-from ends up cloning the type parameter `B1` of `applyOrElse` as it transforms (questionably) its bound from `List[Int @unchecked]` to `List[Int]`. Partial Function synthesis was already a delicate area, and this makes things more explicit which could be counted as an improvement.
| * | | SI-7853 An unsatisfying fix regression in explicit outerJason Zaugg2013-09-182-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The attempt to placate pos/t4970.scala in 55c6fd4 roused another dragon. We've got two levers here: the type of the symbol of the outer accessor, and the type of its DefDef. They have been historically out of sync due to the vaguaries of finalResultType (which is far less vague since 671e6e03c7), but the finicky operation of ExplicitOuter now has a hard time when we try to bring them into line. This stuff is notoriously difficult to understand because the trees you see from `-Xprint` show a tpt derived from the method symbol's info, and discards the actual tpt in the tree. Rather than letting `DefDef(acc)` call `TypeTree(sym)` and use `sym.tpe_*.finalResultType`, this commit computes the member type of the accessor from the current class and explicitly uses that as the return type of the outer accessor def. We should try to push this a little deeper. I tried to put it into `def TypeTree`, but that broke, among others, run/concurrent-stream.scala. Maybe `def DefDef` and `def ValDef`? But a localised fix is the right start as it addresses the regression in a minimal fashion to get the IDE building again.
* | | | SI-7847 Static forwarders for case apply/unapplyJason Zaugg2013-09-162-0/+15
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These were excluded in f901816b3f because at the time they were compiler fiction and translated to calls to the case class constructor or accessors. But since they are now bona-fide methods (albeit still occasionally bypassed as an optimization), we can expose them conveniently to our Java brethren. The cut-and-pastiness of GenBCode starts to hinder maintenance. Here's a report of further duplication that we have to fix up post haste: https://gist.github.com/retronym/6334389
* | | Merge pull request #2884 from retronym/ticket/3832Jason Zaugg2013-09-152-14/+0
|\ \ \ | | | | | | | | SI-1909 SI-3832 SI-7007 SI-7223 Improved handling of larval objects
| * | | SI-1909 Move tests from pos to runJason Zaugg2013-09-112-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we're in the neighbourhood of VerifyErrors, it's better to run the code. This change is leading up to a fix for SI-3832, which regressed with fix for SI-1909.
* | | | Corrects behavior of finalResultType.Paul Phillips2013-09-132-2/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The implementation had come to depend on finalResultType accidentally doing things beyond its charter - in particular, widening types. After hunting down and fixing the call sites depending on the bugs, I was able to rewrite the method to do only what it's supposed to do. I threw in a different way of writing it entirely to suggest how some correctness might be obtained in the future. It's a lot harder for a method written like this to break.
* | | | Merge pull request #2928 from retronym/merge/2.10.x-to-masterGrzegorz Kossakowski2013-09-121-0/+10
|\ \ \ \ | | | | | | | | | | merge 2.10.x to master
| * \ \ \ Merge remote-tracking branch 'origin/2.10.x' into merge/2.10.x-to-masterJason Zaugg2013-09-101-0/+10
| |\ \ \ \ | | |/ / / | |/| / / | | |/ / | | | | Conflicts: src/compiler/scala/tools/nsc/transform/ExtensionMethods.scala
| | * / SI-7818 Cast our way out of extended existential angstJason Zaugg2013-09-061-0/+10
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `substituteSymbols` is not sophisticated enough to operate on `TypeSkolem`-s which are based on one of the "from" symbols. The pertinant usage of `substituteSymbols` for this bug in in `Extender`. Recapping on that transform: // orig class C[T](...) extends AnyVal { def foo[U] = <rhs> } // transform class C[T] extends AnyVal { ... } object C { def foo$extension[T', U'] = <rhs'> } Where `<rhs'>` has been subtituted with, among other things, `[T, U] ~> [T', U']`. In this case our expected type contains a new type parameter (of the extension method), whereas the type of the RHS contains an existential skolem still pinned to the corresponding class type parameter. tree.tpe = Observable1#7037[_$1#12344] <_$1#12344>.info = <: T#7040 pt = Observable1#7037[T#15644] The limitation of substution is lamented in the comments of `adaptMismatchedSkolems`, which faces the harder version of the issue where the skolems are in the expected type. But, we're in the "easy" case with the skolems in the tree's type; we can cast our way out of the problem. See also f335e447 / ed915c54.
* | / SI-7834 Type equivalence of C.this and C.super.Paul Phillips2013-09-111-0/+6
|/ / | | | | | | | | | | | | | | | | | | | | | | | | Foo.this.x and Foo.super.x were roughly unrelated in the eyes of isSubType. I implemented conformance as described in the comment: This is looking for situations such as B.this.x.type <:< B.super.x.type. If it's a ThisType on the lhs and a SuperType on the right, and they originate in the same class, and the 'x' in the ThisType has in its override chain the 'x' in the SuperType, then the types conform. I think this is overly conservative but it's way ahead of where it was.
* | Merge pull request #2855 from adriaanm/modularize-xml-parsersv2.11.0-M5Grzegorz Kossakowski2013-09-0617-295/+0
|\ \ | | | | | | Modularize: xml & parser-combinators
| * | Prepare removal of scala-xml, scala-parser-combinatorsAdriaan Moors2013-08-2717-295/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Every test deleted here has found its way to the respective repositories of scala-xml and scala-parser-combinators, where they will continue to be tested with partest. The modified tests became independent of these modules, as they should've been from the start.
* | | Merge remote-tracking branch 'scala/2.10.x' into merge-2.10.xGrzegorz Kossakowski2013-09-053-0/+84
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | Conflicts: bincompat-backward.whitelist.conf bincompat-forward.whitelist.conf src/reflect/scala/reflect/internal/SymbolTable.scala src/reflect/scala/reflect/internal/util/WeakHashSet.scala src/reflect/scala/reflect/runtime/JavaMirrors.scala
| * | Merge pull request #2876 from retronym/ticket/7782Jason Zaugg2013-09-042-0/+50
| |\ \ | | | | | | | | SI-7782 Derive type skolems at the ground level
| | * | SI-7782 Derive type skolems at the ground levelJason Zaugg2013-08-272-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than at the current value of `skolemizationLevel`, which could be influenced by an in-flight existential subtype computation. This method is called in `PolyTypeCompleter`, which could be constructed by the lazy type completer of the enclosing class. So currently it is closing over a mutable variable; hence the Heisenbug. This issue was exposed by the changes in b74c33eb860, which was introduced in Scala 2.10.1.
| * | | SI-4760 Parser handles block-ending importSom Snytt2013-08-301-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't molest the RBRACE. Updated with additional parse tests suggested by @retronym. "What are you lazy?" Yes, I must be lazy. Can't ScalaCheck or Par-Test generate these tests automatically? That seems like a reasonable expectation.
* | | | Merge pull request #2886 from gkossakowski/merge-2.10.xJason Zaugg2013-08-309-0/+101
|\ \ \ \ | | | | | | | | | | Merge 2.10.x into master
| * | | | Merge remote-tracking branch 'scala/2.10.x'Grzegorz Kossakowski2013-08-299-0/+101
| |\| | | | | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After the merge, the test/run/t7733 started to fail on Jenkins. I tried to reproduce it locally but I couldn't so I think it's system dependent failure. Per @retronym's suggestion I moved it to pending to not block the whole merge. Conflicts: bincompat-backward.whitelist.conf bincompat-forward.whitelist.conf src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala src/compiler/scala/tools/nsc/typechecker/Macros.scala src/compiler/scala/tools/nsc/typechecker/Namers.scala src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala src/compiler/scala/tools/nsc/typechecker/RefChecks.scala src/compiler/scala/tools/nsc/util/MsilClassPath.scala src/compiler/scala/tools/reflect/ToolBoxFactory.scala src/reflect/scala/reflect/internal/ClassfileConstants.scala src/reflect/scala/reflect/internal/Importers.scala src/reflect/scala/reflect/internal/Trees.scala src/reflect/scala/reflect/runtime/JavaMirrors.scala test/files/run/macro-duplicate/Impls_Macros_1.scala test/files/run/t6392b.check test/files/run/t7331c.check
| | * | Merge pull request #2860 from retronym/merge/2.10.2-to-2.10.xJames Iry2013-08-2610-35/+69
| | |\ \ | | | |/ | | |/| Merge/2.10.2 to 2.10.x
| | | * SI-7486 More tests for cycles triggered by implicit searchJason Zaugg2013-08-212-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Moved an existing test from `pending` to `pos`. Not sure why it was moved to `pending` in the first place. Adds a new test distilled from building Scalaz with 2.10.3-RC1.
| | | * Merge remote-tracking branch 'origin/2.10.2' into merge/2.10.2-to-2.10.xJason Zaugg2013-08-2110-43/+61
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Better late than never. Conflicts: src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala
| | * | | SI-942 A test case, five years adrift.Jason Zaugg2013-08-232-0/+8
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | I'm looking at the changes made in 47f35b587, which prevented cyclic errors in class file parsing. That fix is insufficient for, or otherwise complicit in, SI-7778, for which I've enclosed a pending test.
| | * | SI-7716 Exclude patmat synthetics from bounds checkingJason Zaugg2013-08-161-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consider this pattern match translation, that occurs *before* refchecks: scala> val e: java.lang.Enum[_] = java.util.concurrent.TimeUnit.SECONDS scala> e match { case x => x } <console>:9: error: type arguments [_$1] do not conform to class Enum's type parameter bounds [E <: Enum[E]] e match { case x => x } ^ [[syntax trees at end of refchecks]] // <console> package $line5 { case <synthetic> val x1: Enum[_$1] = $line3.$read.$iw.$iw.e; case4(){ matchEnd3(x1) }; matchEnd3(x: Enum[_$1]){ x } RefChecks turns a blind eye to the non-conformant type `Enum[_$1]` in the label defs because of `65340ed4ad2e`. (Incidentally, that is far too broad, as I've noted in SI-7756.) This commit extends this exception to cover the synthetic ValDef `x1`. Commit log watchers might notice the similarities to SI-7694.
| | * | Merge pull request #2829 from adriaanm/ticket-7014James Iry2013-08-143-0/+21
| | |\ \ | | | | | | | | | | SI-7014 Annot arg may refer to annotated class's member
| | | * | SI-7014 Annot arg may refer to annotated class's memberAdriaan Moors2013-08-133-0/+21
| | | | | | | | | | | | | | | | | | | | This only reduces the crasher to a warning.
| | * | | SI-7694 Add @uncheckedBounds to the libraryJason Zaugg2013-08-131-0/+40
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Followup to the previous commit that added the compiler support for opting out of bounds checking. With both pieces, we can test that the temporaries introduced by the named/default arguments transform don't trigger bounds violations.
* | / / SI-7785 Preserve TypeVar suspension through TypeMapsJason Zaugg2013-08-271-0/+34
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During `findMember`, TypeVars in `this` are placed into suspended animation. This is to avoid running into recursive types when matching members to those in base classes. However, the mechanism used to do this is superficial, and doesn't work when TypeVars are copied by TypeMaps. This seems to crop up when using `AppliedTypeVar` with higher-kinded type vars. In the enclosed test case, the cyclic type led to a SOE in CommonOwnerMap. This commit allows a TypeVar to delegate its `suspended` attribute to the TypeVar from which it was copied. This is done in `TypeVar#applyArgs`, which is called by: // TypeMap#mapOver case tv@TypeVar(_, constr) => if (constr.instValid) this(constr.inst) else tv.applyArgs(mapOverArgs(tv.typeArgs, tv.params)) We should review the other places this is called to make sure that it make sense to link in this way: Types#appliedType TypeVar#normalize
* | | Merge branch 'master' into patmatPaul Phillips2013-08-201-0/+4
|\ \ \ | | | | | | | | | | | | | | | | | | | | Conflicts: src/compiler/scala/tools/nsc/Global.scala src/compiler/scala/tools/nsc/transform/patmat/MatchTranslation.scala