summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* changes some manual tree constructions in macro tests to quasiquotesEugene Burmako2013-10-1834-100/+85
|
* deprecates raw tree manipulation facilities in macros.ContextEugene Burmako2013-10-1841-89/+114
|
* Merge pull request #3030 from xeno-by/topic/fundep-viewsEugene Burmako2013-10-1828-19/+313
|\ | | | | SI-3346 implicit parameters can now guide implicit view inference
| * SI-3346 implicit parameters can now guide implicit view inferenceEugene Burmako2013-10-1128-19/+313
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 #3041 from gkossakowski/merge-2.10.xJason Zaugg2013-10-185-4/+35
|\ \ | | | | | | Merge 2.10.x into master
| * \ Merge remote-tracking branch 'scala/2.10.x' into merge-2.10.xGrzegorz Kossakowski2013-10-165-4/+35
| |\ \ | | | | | | | | | | | | | | | | | | | | Conflicts: build.number test/files/neg/classmanifests_new_deprecations.check
| | * \ Merge pull request #2985 from retronym/ticket/7783Jason Zaugg2013-10-035-10/+33
| | |\ \ | | | | | | | | | | Don't issue deprecation warnings for inferred TypeTrees
| | | * | SI-7783 Don't issue deprecation warnings for inferred TypeTreesJason Zaugg2013-09-275-10/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Deprecation checks in RefChecks were looking into all TypeTrees to find references to deprecated type aliases. However, when the compiler infers a type argument or type of a member it creates a TypeTree (with a null original) that was also leading to warnings. I ran into this problem often when upgrading a build from SBT 0.12 to 0.13: a plugin I was using used the deprecated type alias, and I suffered transitively when I used methods from its API. This commit disables the checks for inferred TypeTree-s.
* | | | | Merge pull request #3048 from adriaanm/sammy_testsJason Zaugg2013-10-183-0/+95
|\ \ \ \ \ | | | | | | | | | | | | Test cases for SAM restrictions.
| * | | | | Test cases for SAM restrictions.Jason Zaugg2013-10-173-0/+95
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only one seems to indicate something new: ((x: Int) => 0): NonClassType I believe that we shouldn't pursue SAM translation for that case, and fallthrough to Function1. That would allow for an implicit view to finish the job.
* | | | | 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 pull request #3016 from xeno-by/topic/vampiresJason Zaugg2013-10-154-0/+61
|\ \ \ \ \ | | | | | | | | | | | | [master] assorted fixes for vampire macros
| * | | | | no longer warns on calls to vampire macrosEugene Burmako2013-10-044-0/+61
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As eloquently elaborated and cleverly named by Travis Brown, macros defined in structural types are useful: http://meta.plasm.us/posts/2013/07/12/vampire-methods-for-structural-types/. However, since such macros are on the intersection of a number of language features, as usual, there are bugs. This commit fixes an unwanted interaction of macros defined in structural types with the scala.language.reflectiveCalls guard. Since macro calls aren't going to be carried to runtime, there's no need to warn about them.
* | | | | Merge pull request #3037 from gkossakowski/fix-merge-3018v2.11.0-M6Grzegorz Kossakowski2013-10-1415-3/+154
|\ \ \ \ \ | | | | | | | | | | | | [resubmit] Experimental Single Abstract Method support (sammy meets world)
| * \ \ \ \ Merge remote-tracking branch 'scala/master' into fix-merge-3018Grzegorz Kossakowski2013-10-1449-83/+292
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/compiler/scala/tools/nsc/typechecker/Typers.scala
| * | | | | | Single Abstract Method support: java8 testAdriaan Moors2013-10-084-1/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | | Don't pursue SAM translation after an arity mismatch.Jason Zaugg2013-10-083-0/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change: scala> trait T { def apply(a: Int): Int } defined trait T scala> ((x: Int, y: Int) => 0): T <console>:9: error: object creation impossible, since method apply in trait T of type (a: Int)Int is not defined ((x: Int, y: Int) => 0): T ^ After the change, these cases report the same errors as they do *without* -Xexperimental.
| * | | | | | 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.
* | | | | | Merge pull request #3038 from retronym/topic/by-name-revertGrzegorz Kossakowski2013-10-143-0/+26
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | SI-7899 Allow by-name inference under -Yinfer-by-name
| * | | | | SI-7899 Allow by-name inference under -Yinfer-by-nameJason Zaugg2013-10-143-0/+26
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As usual, the hole has been exploited in the wild. While you can't abstract over by-name-ness without running into the ClassCastException or an un-applied Function0, there are cases like the enclosed test where you can tiptoe around those cases. I've proposed a small change to Scalaz to avoid tripping over this problem: https://github.com/scalaz/scalaz/pull/562/files But this commit I've also added a transitional flag, -Yinfer-by-name, that they could use to back-publish older versions without code changes. It is also an insurance policy for other projects that might be exploiting the same hole.
* | | | | Merge pull request #3032 from retronym/ticket/7239-testPaul Phillips2013-10-122-0/+16
|\ \ \ \ \ | | | | | | | | | | | | SI-7239 A bonus test case from [scala-user]
| * | | | | SI-7239 A bonus test case from [scala-user]Jason Zaugg2013-10-112-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Thanks to Ilya Denisov for another sample [1] that progressed with the fix for SI-7239, 174334b. [1] https://groups.google.com/forum/#!topic/scala-user/8rZeCeiTYDo
* | | | | | Merge pull request #3024 from retronym/ticket/7895Paul Phillips2013-10-1228-45/+171
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-7895 Error reporting: avoid cascading, truncation
| * | | | | | SI-7985 Typecheck args after failure to typecheck functionJason Zaugg2013-10-0910-7/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `missing1.foo(missing2)` now reports `missing1` and `missing2` as not found. Previously, only the first was reported. The arguments are typed with an expected type ErrorType. We propagate this through as the inferred type of anonymous function parameters to avoid issuing cascading "missing parameter type" errors in code like: scala> Nil.mapp(x => abracadabra) <console>:8: error: value mapp is not a member of object Nil Nil.mapp(x => abracadabra) ^ <console>:8: error: not found: value abracadabra Nil.mapp(x => abracadabra) ^ This was in response to unwanted changes in the output of existing neg tests; no new test is added. Similarly, we refine the errors in neg/t6436b.scala by to avoid cascaded errors after: type mismatch; found: StringContext, required: ?{def q: ?}
| * | | | | | SI-7895 Issue all buffered errors after silent mode.Jason Zaugg2013-10-098-6/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than just the first. For example, `foo(wizzle, wuzzle, woggle)` should report all three not-found symbols.
| * | | | | | SI-7895 Avoid cascade of "symbol not found" in pattern matchesJason Zaugg2013-10-0910-32/+18
| | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | If we can't type check the `Foo` in `case Foo(a, b) => (a, b)`, we should enter error symbols for `a` and `b` to avoid further errors being reported in the case body.
* | | | | | Merge pull request #3025 from retronym/ticket/7902Paul Phillips2013-10-121-0/+17
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | SI-7902 Fix spurious kind error due to an unitialized symbol
| * | | | | 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
* | | | | Merge pull request #3020 from paulp/pr/overriding-pairsJason Zaugg2013-10-0913-27/+56
|\ \ \ \ \ | |/ / / / |/| | | | Generalize OverridingPairs to SymbolPairs.
| * | | | Generalize OverridingPairs to SymbolPairs.Paul Phillips2013-10-0513-27/+56
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Increases your chance of knowing what is going on in OverridingPairs. Introduces some new abstractions which I hope for your own sakes you will put to use in some way: RelativeTo: operations relative to a prefix SymbolPair: two symbols being compared for something, and the enclosing class where the comparison is being performed Fixed a minor bug with access by accident by way of more principled pair analysis. See run/private-override.scala. Upgraded the error message issued on certain conflicts to give the line numbers of both conflicting methods, as opposed to just one and you go hunting.
* / / / SI-7899 Don't infer by-name types during, e.g. eta-expansionJason Zaugg2013-10-075-11/+32
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge pull request #3005 from paulp/pr/7886Paul Phillips2013-10-0326-53/+193
|\ \ \ | | | | | | | | SI-7886 unsoundness in pattern matcher.
| * | | SI-6680 unsoundness in gadt typing.Paul Phillips2013-10-0121-48/+160
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | SI-7886 unsoundness in pattern matcher.Paul Phillips2013-10-015-5/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I tracked down what was behind the issue described here: // TODO: fix the illegal type bound in pos/t602 -- type inference // messes up before we get here: /*override def equals(x$1: Any): Boolean = ... // Span[Any] --> Any is not a legal type argument for Span! val o5: Option[com.mosol.sl.Span[Any]] = */ ...which led straight to the unsoundness seen in neg/t7886. It is dangerous to have an expected type of "Any" because the type system will blithely ignore kind errors, since "Any" can absorb anything. The consequence in this instance was that inferring the case constructor for a type like Foo[T <: Bound] if done with expected type Any, this would come up with Foo[Any]. I altered it to use expected type Foo[T], which lets the dummy type parameter survive to carry the bound forward and restores sense to the inference. The before/after output for -Xprint:patmat on pos/t602.scala is: 15c15 < if (x1.isInstanceOf[com.mosol.sl.Span[Any]]) --- > if (x1.isInstanceOf[com.mosol.sl.Span[K]]) 17c17 < <synthetic> val x2: com.mosol.sl.Span[Any] = \ (x1.asInstanceOf[com.mosol.sl.Span[Any]]: com.mosol.sl.Span[Any]); --- > <synthetic> val x2: com.mosol.sl.Span[K] = \ (x1.asInstanceOf[com.mosol.sl.Span[K]]: com.mosol.sl.Span[K]); 19,20c19,20 < val low$0: Option[Any] = x2.low; < val high$0: Option[Any] = x2.high; --- > val low$0: Option[K] = x2.low; > val high$0: Option[K] = x2.high; A file in the library depended (needlessly) on the unsoundness. It was easy to fix but reminds us this may affect existing code.
* | | | Merge pull request #3013 from retronym/topic/unspec-fix-windowsAdriaan Moors2013-10-032-5/+5
|\ \ \ \ | | | | | | | | | | Rework cff8b569 to heal the windows build.
| * | | | Rework cff8b569 to heal the windows build.Jason Zaugg2013-10-032-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - change newTermName to fix negative length names rather than reject them - restore the old logic in unspecializedName for names that result from AnyRef specialized type parameters. Why does fix the windows build? I remain none the wiser.
* | | | | Merge pull request #2965 from retronym/ticket/7859Grzegorz Kossakowski2013-10-038-26/+125
|\ \ \ \ \ | | | | | | | | | | | | SI-7859 Value classes may wrap a non-public member
| * | | | | SI-7859 Value classes may wrap a non-public memberJason Zaugg2013-09-298-26/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We allow value class constructors to be non-public, so to be regular, we should also allow the same for the param accessor. This commit uses the 'makeNotPrivate' machinery to ensure that the backend can generate the requisite unboxing calls. This commit: - refactors the code that enforced the restrictions, improving a few error messages and positions. The remaining restrictions needed some rewording in light of this change. - allows value classes to have non-public, val parameters. private[this] / protected[this] are still disallowed as value classes don't have a concept of `this`, and because trying to accomdate then would complicate the implementation. This means that `class C(x: Int) extends AnyVal` is not allowed, the user still must write `private val x: Int` or `val x: Int`. - Outlaw `class C()()(val x: Int) extends AnyVal` to curtail any bugs that might lurk in such a formulation. The tests: - Show that the privacy is respected in the typer phase, under joint and separate compilation. We don't want a repeat performance of SI-6601. - Show that code that needs compiler-generated unboxes works under both compilation scenarios - Checks that the remaining restrictions are enforced and well communicated.
* | | | | | macro bundles are now usable in replEugene Burmako2013-10-022-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One of the previous commits relaxed the top-level restriction for bundles, turning it into a requirement of staticness (i.e. bundles nested in static objects are also okay now). This means that we can now define bundles in repl. Almost. There's still a little problem remaining that arises from the fact that when compiling a line of input, repl doesn't automatically import all previously defined symbols, but rather uses an heuristic to scan the input and guess what symbols need to be imported. Unfortunately for bundles, this heuristic fails, because when scanning a macro definition that looks like `def foo = macro Macros.foo`, it thinks that it's only necessary to import a term symbol called Macros (a vanilla way of defining macro impls), but not a type symbol called Macros (a new way of writing macro impls in bundles). This commit fixes the problem by making the repl look for both term and type symbols corresponding to the identifiers used in macro definitions.
* | | | | | clearly establishes what macro bundles areEugene Burmako2013-10-0220-3/+169
| |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously it was enough to just extend scala.reflect.macros.Macro, which created some loopholes, but now scalac enforces that bundles: 1) Are static (not necessarily top-level, but just static) 2) Are traits (objects shouldn't be bundles anyway, and classes bring complications with their ctors which require special treatment in generated classes, so why support them if they don't bring anything new to the table?) 3) Are monomorphic (again, this brings unnecessary complications wrt auxiliary code generation, so I don't see merit in supporting polymorphic bundles, whatever that a polymorphic bundle could mean) 4) Don't provide concrete implementation for Macro.c (if they do then what is the point?)
* | | | | Removing unused code.Paul Phillips2013-10-022-8/+4
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | Most of this was revealed via -Xlint with a flag which assumes closed world. I can't see how to check the assumes-closed-world code in without it being an ordeal. I'll leave it in a branch in case anyone wants to finish the long slog to the merge.
* | | | Merge pull request #2991 from xeno-by/topic/unapply-copierEugene Burmako2013-09-303-0/+34
|\ \ \ \ | | | | | | | | | | transformers no longer ignore UnApply.fun
| * | | | transformers no longer ignore UnApply.funEugene Burmako2013-09-263-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Second time's the charm. I remember trying to do exactly the same somewhen around 2.10.0-M4, but then some continuations tests were failing. Luckily, today everything went smoothly. Please note that this fix changes the way that SI-5465 manifests itself. Previously it produced type errors, now it simply crashes the compiler. Therefore I had to attach the try/catch FatalError clause to invocations of toolbox methods, so that compiler crashes get caught and translated to ToolBoxErrors. Also fixes SI-7871, and that clears the way for implementing quasiquotes with conventional macros rather than relying on a special case in typer.
* | | | | Some refinement of -Xlint interpolation warning.Paul Phillips2013-09-272-1/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I had covered a few more cases working on this recently. The warnings in several more cases involving polymorphism, currying, and selects vs. idents receive more refined handling.
* | | | | Merge pull request #2909 from soc/SI-7629-deprecate-view-boundsJason Zaugg2013-09-276-0/+30
|\ \ \ \ \ | | | | | | | | | | | | SI-7629 Deprecate view bounds
| * | | | | SI-7629 Deprecate view boundsSimon Ochsenreither2013-09-256-0/+30
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | This introduces a warning(/error with -Xfuture) with a general migration advice. The IDE can use the warning to offer a quick fix with the specific refactoring necessary.
* | | | | Merge pull request #2992 from retronym/ticket/7877Jason Zaugg2013-09-272-0/+20
|\ \ \ \ \ | | | | | | | | | | | | Only look for unapplies in term trees
| * | | | | SI-7877 Only look for unapplies in term treesJason Zaugg2013-09-272-0/+20
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since Scala 2.10.2, the enclosed test case has crashed in the backend. Before, we correctly rejected this pattern match. My bisection landed at a merge commit f16f4ab157, although both parents were good. So I don't quite trust that. I do think the regression stems from the changes to allow: case rx"AB(.+)" => Examples of this are in run/t7715.scala. This commit limits the search for extractors to cases where the function within the Apply is a term tree.