Make context available in TreeTransform.prepareForXX methods
Merge pull request #88 from dotty-staging/try/hygienic-desugaring

Try/hygienic desugaring
Merge pull request #87 from gzm0/context-in-prep-transform

Make context available in TreeTransform.prepareForXX methods
Tests t01xx and t02xx

Test t0288 moved to disabled due to lack of Java interop.
Test t0273 fixed by relaxing double def condition: We only regard two
definitions that define the same name and have exactly the same signature
as double definitions. Previously, signatures that defined the same parameters
were also excluded.
Fix of t0438 - lambdas and eta expansion

Two fixes were needed

1) When typing a function value (x1: T1, ..., xN: Tn) => e, don't unconditionally issue an error
   if the expected function type arity is different from N. Instead, issue an error only
   if one of the types T1, ..., Tn is absent. The idea is that only then we need to
   consult the expected type for the parameter type. This allows to fix the problem later
   by an implicit conversion applied to the function value.

2) When eta-expanding, do not automtically take the arity of the expected function value as the
   arity of the generated lambda. Instead, take the method's arity, and copy method parameters
   into the lambda in case the arities are different.
Fix of t0504: _root_ not found

_root_ is now entered into an enclosing context.
Fix of t0591: implicitly

A debug assertion in implicitSearch gave a false alarm and was removed.
More tests

Added more tests which all pass, except for tests in disabled and pending.

t0694 went from pos to neg, because the kind of alias type used in t0695 is no longer supported.
Fix of t0786: view bounds

Previously, only implicit method types were eligible as views. This is too strict,
as it rules out view bounds. We now also consider types that derive from Function1.
The reason for not allowing any type is that this would cause us to check many more
types for applicability when an implicit view is searched.
Fix of t0774: empty file

Was previously wrapped in a

    package <empty>

but the resulting tree had no position, which caused a Typer assertion. If now
represented as EmptyTree.
More tests

which all pass.
Fix of t0625 - compare method types

Method type comparison via <:< yielded false if the signatures of the two method types differed.
This is too strict, because methods can have the same parametyers but different result types and still
be in a subtype relationship. We now onyl demand that the sighatures have the same parameters.
Fix of t1056 - PartialFunction

type T was not recorgnized as a SAM type because a case was missing in zeroParamClass.
Fix of t112606A - path dependent types

Needed an extra case in isSubType.
Fix of t1123 - Unit discarding

Need to do unit discarding also in selection prototypes.
More tests
Fix for t1292 - legal prefixes

The original test is now in error because the type Meta in the prefix Meta#Event
is not stable and contains an abstract member Slog.

Even after removing Slog, the test in pos was still in error because the bound type parameters
were incorrectly recognized as abstract members. This has been fixed by the changes to Types.
Fix of t1280 - type of self

The type of self name "x" was taken to be the thisType of the current owner.
But the current owner was a local dummy of the class in question, so the ThisType
was NoPrefix. Inserting an enclosingClass fixes the problem.
Fix of t1236: higher-kinded

(and also of t0625, which reappeared).

Several fixes were made. In summary:

1. Naming and representation of KigherKinded traits changed. It's now $HigherKinded$NIP where
the letters after the second $ indicate variance (N)egative, (I)nvariant, (P)ositive. The HKtraits
themselves are always non-variant in their parameters.

2. When deriving refined types over higher-kinded types, the variance of a type alias
is the variance of the new type constructor.

3. isSubTypeHK was changed, as was the position from where it is called.

4. appliedTo also works for PolyTypes.
More tests, currently disabled

Mostly Java interop tests which are not yet supported. The test infrastructure for Java ocmpilation and the java parser from Scala are still missing.