SI-7509 Avoid crasher as erronous args flow through NamesDefaults

The fix for SI-7238 caused this regression.

This commit marks taints whole Apply with an ErrorType if it
has an erroneous argument, so as to stop a later crash trying
to further process the tree.
SI-7486 Regressions in implicit search.

Revert e86832d7e8 and dd33e280e2.
Merge pull request #2588 from retronym/ticket/7509

SI-7509 Avoid crasher as erronous args flow through NamesDefaults
Merge pull request #2590 from paulp/issue/7486

SI-7486 Regressions in implicit search.
SI-7516 Revert "SI-7234 Make named args play nice w. depmet types"

This reverts commit 83c9c764b528a7a1c1d39c480d22c8e3a71d5a58.

The tests are shunted to 'pending'.

Why revert this seemingly innocous commit? 83c9c764 generates a ValDef whose
tpt TypeTree has no original; this contains a reference to the symbol for `d`.
resetAttrs and the retypecheck assigns a new symbol for d and leaves a the
reference to the prior symbol dangling. The real bug is the resetAttrs concept.
Merge pull request #2601 from retronym/ticket/7516

SI-7516 Revert "SI-7234 Make named args play nice w. depmet types"
SI-7517 Fix higher kinded type inference regression

 - Discovered in 2.10.2-RC1
 - Ostensibly regressed in 7e52fb910b, which conceptually reverted
   part of 0cde930b so that (mutable) TypeVars don't use structural equality.
 - But, does *not* fail if 7e52fb910b is cherry-picked directly after 0cde930b,
   suggesting that it shone a light on a behaviour change in some other commit
   in between the two.
 - Indeed, the true regression came in https://github.com/scala/scala/commit/e5da30b843#L5L3176
 - A targeted revert of e5da30b843 is undesirable, as we'd like SI-6846 to stay fixed

What's happening here? In the enclosed test case, higher kinded type
inference explores two possibilities:

    Composed.this.Split[A]
    K[[T]A[B[T]]]           // `Split[A]` dealiased

The difference in the flow of type inference can be seen from the diff
below. Notice how now we no longer register `?K.addBound(Composed.this.Split)`,
we instead only register `?K.addBound(K)`

```patch
--- sandbox/old.log 2013-05-30 00:27:34.000000000 +0200
+++ sandbox/new.log 2013-05-30 00:28:28.000000000 +0200
@@ -1,55 +1,114 @@
 ?K.unifyFull(Composed.this.Split[A])
   ?K.unifySpecific(Composed.this.Split[A])
-  ?K.addBound(Composed.this.Split)
     ?B.unifyFull(T)
       ?B.unifySpecific(T)
       `-> false
     ?B.unifyFull(Any)
       ?B.unifySpecific(Any)
       `-> false
   `-> false
   ?K.unifySpecific(L[[T]A[B[T]]])
-  ?K.addBound(L)
     ?B.unifyFull(B[T])
       ?B.unifySpecific(B[T])
       ?B.addBound(B)
       `-> true
     ?B.unifyFull(B[T])
       ?B.unifySpecific(B[T])
       ?B.addBound(B)
       `-> true
     ?B.unifyFull(B[T])
       ?B.unifySpecific(B[T])
       ?B.addBound(B)
       `-> true
     ?B.unifyFull(B[T])
       ?B.unifySpecific(B[T])
       ?B.addBound(B)
       `-> true
+  ?K.addBound(L)
   `-> true
 ?K.unifyFull(Composed.this.Split[A])
   ?K.unifySpecific(Composed.this.Split[A])
-  ?K.addBound(Composed.this.Split)
     ?B.unifyFull(x)
       ?B.unifySpecific(x)
       `-> false
   `-> false
   ?K.unifySpecific(L[[T]A[B[T]]])
+    ?B.unifyFull(B[T])
+      ?B.unifySpecific(B[T])
+      ?B.addBound(B)
+      `-> true
+    ?B.unifyFull(B[T])
+      ?B.unifySpecific(B[T])
+      ?B.addBound(B)
+      `-> true
+    ?B.unifyFull(B[T])
+      ?B.unifySpecific(B[T])
+      ?B.addBound(B)
+      `-> true
+    ?B.unifyFull(B[T])
+      ?B.unifySpecific(B[T])
+      ?B.addBound(B)
+      `-> true
   ?K.addBound(L)
+  `-> true
+?K.unifyFull(Composed.this.Split[A])
+  ?K.unifySpecific(Composed.this.Split[A])
+    ?B.unifyFull(T)
+      ?B.unifySpecific(T)
+      `-> false
+    ?B.unifyFull(Any)
+      ?B.unifySpecific(Any)
+      `-> false
+  `-> false
+  ?K.unifySpecific(L[[T]A[B[T]]])
     ?B.unifyFull(B[T])
       ?B.unifySpecific(B[T])
       ?B.addBound(B)
       `-> true
     ?B.unifyFull(B[T])
       ?B.unifySpecific(B[T])
       ?B.addBound(B)
       `-> true
     ?B.unifyFull(B[T])
       ?B.unifySpecific(B[T])
       ?B.addBound(B)
       `-> true
     ?B.unifyFull(B[T])
       ?B.unifySpecific(B[T])
       ?B.addBound(B)
       `-> true
+  ?K.addBound(L)
+  `-> true
+?K.unifyFull(Composed.this.Split[A])
+  ?K.unifySpecific(Composed.this.Split[A])
+    ?B.unifyFull(x)
+      ?B.unifySpecific(x)
+      `-> false
+  `-> false
+  ?K.unifySpecific(L[[T]A[B[T]]])
+    ?B.unifyFull(B[T])
+      ?B.unifySpecific(B[T])
+      ?B.addBound(B)
+      `-> true
+    ?B.unifyFull(B[T])
+      ?B.unifySpecific(B[T])
+      ?B.addBound(B)
+      `-> true
+    ?B.unifyFull(B[T])
+      ?B.unifySpecific(B[T])
+      ?B.addBound(B)
+      `-> true
+    ?B.unifyFull(B[T])
+      ?B.unifySpecific(B[T])
+      ?B.addBound(B)
+      `-> true
+  ?K.addBound(L)
+  `-> true
+?K.unifyFull(L[A])
+  ?K.unifySpecific(L[A])
+  ?K.addBound(L)
+  `-> true
+?K.unifyFull(L[A])
+  ?K.unifySpecific(L[A])
+  ?K.addBound(L)
   `-> true
```
Merge pull request #2607 from retronym/ticket/7517

SI-7517 Fix higher kinded type inference regression
SI-7532 Fix regression in Java inner classfile reader

395e90a modified the detection of top-level classes in
ClassfileParser in two ways:
  1. used `Name#containsChar` rather than `toString.indexOf ...` (good!)
  2. decoded the name before doing this check (bad!)

That code is actually only run for non-Scala classfiles, whose
names don't need decoding. Attempting to do so converted `R$attr`
to `R@tr`, which no longer contains a '$', and was wrongly treated
as a top level class.

This commit reverts the use of `decodedName`, and inlines the method
to its only call site for clarity.
Merge pull request #2608 from retronym/ticket/7532

SI-7532 Fix regression in Java inner classfile reader
SI-7020 Determinism for pattern matcher warnings

Use LinkedHashSet for the DPLL algorithm for determistic
counter example generation.

Before, the test compiled with:

    [info] v2.10.2 => /Users/jason/usr/scala-v2.10.2-0-g60d462e
    test/files/neg/t7020.scala:3: warning: match may not be exhaustive.
    It would fail on the following inputs: List((x: Int forSome x not in (1, 2, 4, 5, 6, 7))), List(_, _)
      List(5) match {
          ^
    test/files/neg/t7020.scala:10: warning: match may not be exhaustive.
    It would fail on the following inputs: List((x: Int forSome x not in (1, 2, 4, 5, 6, 7))), List(_, _)
      List(5) match {
          ^
    test/files/neg/t7020.scala:17: warning: match may not be exhaustive.
    It would fail on the following inputs: List((x: Int forSome x not in (1, 2, 4, 6, 7)), _), List(1, _), List(2, _), List(4, _), List(5, _), List(6, _), List(7, _), List(??, _)
      List(5) match {
          ^
    test/files/neg/t7020.scala:24: warning: match may not be exhaustive.
    It would fail on the following input: List(_, _)
      List(5) match {
          ^
SI-7694 @uncheckedBounds, an opt-out from type bounds checking

Synthetic defs introduced by transforms like named/default arguments,
ANF (in scala-async) often introduce a type tree (the tpt of the temporary)
that are based on the types of expressions. These types are scrutinized in
RefChecks to check that type parameter bounds are satisfied.

However, the type of the expression might be based on slack a LUB that
fails to capture constraints between type parameters.

This slackness is noted in `mergePrefixAndArgs`:

    // Martin: I removed this, because incomplete. Not sure there is a
    // good way to fix it. For the moment we just err on the conservative
    // side, i.e. with a bound that is too high.

The synthesizer can now opt out of bounds by annotating the type as follows:

   val temp: (<expr.tpe> @uncheckedBounds) = expr

This facility is now used in named/default arguments for the temporaries
used for the reciever and arguments.

The annotation is hidden under scala.reflect.internal, rather than in
the more prominent scala.annotation.unchecked, to reflect the intention
that it should only be used in tree transformers.

The library component of this change and test case will be included in the
next commit. Why split like this? It shows that the 2.10.3 compiler will
work with 2.10.2 scala-reflect.jar.
SI-7694 Add @uncheckedBounds to the library

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.
Merge pull request #2826 from retronym/ticket/7020-2.10.x

SI-7020 Determinism for pattern matcher warnings
Merge pull request #2828 from adriaanm/rebase-2771

[Rebase #2771] SI-7694 @uncheckedBounds, an opt-out from type bounds checking
SI-7014 Annot arg may refer to annotated class's member

This only reduces the crasher to a warning.
Merge pull request #2829 from adriaanm/ticket-7014

SI-7014 Annot arg may refer to annotated class's member
[nomaster] macro expansions are now auto-duplicated

The fix still requires macro developers to be careful about sharing trees
by references, because attributed DefTrees will still bring trouble.

However this is an improvement, because it doesn't make matters worse
and automatically fixes situations similar to one in the test.

A much more thorough discussion with a number of open questions left:
http://groups.google.com/group/scala-internals/browse_thread/thread/492560d941b315cc

Was fixed ages ago in master in one of the paradise backports.
Never got to 2.10.x, but it's very useful, so I'm backporting it now.
SI-7752 Don't disambiguate type parameters of overloaded alts

These are passed through from `InferencerContextErrors#applyErrorMsg`
to `withDisambiguation` as the `locals` parameter, which is promptly
ignored. This looks to be an unintended change in 39938bcc299.

Without this patch, the enclosed test case enters a pathalogical
disambiguation session, that not only flirts with unpleasant big-O
complexities, but also flails about appending "(in method foo)"
only to find that *all* occurences of the same-named type parameter
come from some method named "foo".

    [snipping error message 40 seconds in the making]
    method foo), O(in method foo)(in method foo)(in method foo)(in method foo)(in method foo)(in method foo)(in method foo)(in method foo), P(in method foo)(in method foo)(in method foo)(in method foo)(in method foo)(in method foo)(in method foo)(in method foo), Q(in method foo)(in method foo)(in method foo)(in method foo)(in method foo)(in method foo)(in method foo)(in method foo)(in method foo)(in method foo)(in method foo)(in method foo)(in method foo)(in method foo), R(in method foo)(in method foo)(in method foo)(in method foo)(in method foo)(in method foo)(in method foo)(in method foo)(in method foo)(in method foo)(in method foo)(in method foo), S(in method foo)(in method foo)(in method foo)(in method foo)(in method foo)(in method foo)(in method foo)(in method foo), T, U(in method foo)(in method foo)(in method foo)(in method foo)(in method foo)(in method foo)(in method foo)(in method foo), V)
     cannot be applied to (Int)
      foo((1))
Merge pull request #2834 from retronym/ticket/7752

SI-7752 Don't disambiguate type parameters of overloaded alts