Merge pull request #1073 from adriaanm/ticket-6183

SI-6183 don't crash on type error in outer test
Merge pull request #1087 from hubertp/2.10.x-issue/5687

Fixes SI-5687.
Better pattern matcher error message.

For the common case when someone hasn't quite grokked
the significance of lower case in a pattern match.  I'd
like to make all the unreachables errors, not warnings,
but there may be a bug or two to clear out first.

class A {
  def badEquals(x: Any, y: Any) = x match {
    case y => true
    case _ => false
  }
}

a.scala:3: warning: patterns after a variable pattern cannot match (SLS 8.1.1)
If you intended to match against parameter y of method badEquals, you must use backticks, like: case `y` =>
    case y => true
         ^
a.scala:4: warning: unreachable code due to variable pattern 'y' on line 3
    case _ => false
              ^
two warnings found
Merge pull request #1064 from adriaanm/ticket-6145

SI-6145 lax typing of args to synthetic case-labels
Merge pull request #1088 from adriaanm/ticket-6205

SI-6205 make pt fully defined before inferTypedPattern
Merge pull request #1060 from adriaanm/ticket-5739b

SI-5739 (bis) vals for subpatterns when -g:patmatvars
Fix SI-6208.  mutable.Queue now returns mutable.Queue for collection methods rather than MutableList.
Moved inline logic before pickler.

The test case failed due to separate compilation. The problem was
that we don't pickle the fact that the field was made public.

Original patch by @odersky. Cleaned up by me. Changes I made:

  * removed stale test-case
  * reduced whitespace changes

Supersedes #1089.

Review by @odersky and @moors.
an important fixup for macro universe API

It seems that this.type doesn't cut it for stuff declared in a trait.
Downgrading this.type to Symbol and Type correspondingly in
SymbolContextApi and TreeContextApi.
SI-5756 correctly reifies local module classes

Unlike module classes that are going to be pickled (which are reified
as `<their module reification>.moduleClass), module classes of
local modules need to be reified as symbol defs.

Otherwise we get a stack overflow:
1) Local modules are deemed to be free terms,
2) All free symbols are reified together with their type signature (so that they
   can be a) inspected by anyone interested, b) compiled at runtime),
3) Reifying a type signature of a module involves reifying its module class,
4) Reifying a module class involves reifying a module and calling its module class,
<ad infinitum>

This stack overflow doesn't happen for locatable modules, because they don't need
to have their type signatures reified (these signatures can later be loaded from
pickles if it becomes necessary).
SI-6204 reifier no longer causes cyclic errors

When reifying certain trees/types reifier might decide that it needs to
introduce auxiliary symbols to represent non-locatable components of types

For example, when reifying a refined type we need to reify the symbols
that correspond to its members (aka RefinedType.decls). Since these symbols
are not stored in pickles, we can't do the usual staticClass(scala.Int) stuff,
and are forced to actually create corresponding symbols inside the reificode
(by "create" I mean literally create, by using newXXXSymbol methods).

It looks like a generally good idea to not only create those symbols naked,
but to also export their type signatures and annotations. However this brings
problems with type inference.

Say, a type of a method A depends on a type tag. To get a type of a type tag,
the compiler needs to expand the corresponding macro (when the macro is being
expanded, symbol A is marked as LOCKED). While reification macro expands,
it might want to reify certain symbol definitions (as explained above). If one
of these definitions is a class that contains method A, we're in trouble,
since reifying the corresponding ClassInfoType will eventually call A.info,
which will produce a cyclic reference error, because A is LOCKED.

An obvious solution is to check whether a reified symbol definition is locked.
If the symbol is locked, then the reifier bails (e.g. by reifying NoType
instead of the actual type signature of the symbol).

Being obvious this solution is also incorrect as illustrated by SI-6204.
Sure we can check whether a symbol itself is locked, but we cannot check
whether or not we reify someone who refers to the locked symbol.

As of such I'm telling the reifier to bail whenever it needs to reify a symbol
definition for a symbol that is not yet complete. Therefore reification
can no longer cause inference of method result types, which eliminates the
underlying problem.

This is a harsh measure, but taking into account that we have an RC planned
within a week, stability trumps completeness.
Renamed elem to head and next to tail

both head and tail are now O(1) with very low overhead like you would expect for a list-like data structure
Create a HashSet1 in case ks1 contains just one entry

Create HashSetCollision1 only if there is more than one element
SI-6184 don't introduce dummies in checkableType

this should fix the crash in asSeenFrom that resulted from calling
baseTypeSeq on a type that had an unbound type parameter in it

also, simplify widenToClass
Allow skipping the xz archives

Using 'ant -Darchives.skipxz=true'
accommodates reflection meeting feedback
SI-6022 refactor to clean up model of variable equality modulo <:

this commit does a functionality-preserving refactoring
SI-6022 cleaner model of variable equality modulo <:

a more conservative "excludes": no need to reason about types

(TODO: check we don't get any spurious unreachability errors
 in the eclipse build, which is a good canary for this kind of thing)
Add missing cases in tail return transform

Disabled warnings that no longer apply because of tail returns.
Add several test cases.
Merge pull request #1095 from gkossakowski/inliner-access-levels

Moved inline logic before pickler.