lampepfl/dotty — pull request #284 by olhotak (2014-12-13 21:04:35+00:00)
Title: fixes to handle AnnotatedTypes transparently like the types that they wrap

This PR contains several fixes so that an AnnotatedType(annot, tpe) is handled just like the wrapped type tpe in stripTypeVar, dealias, and Tree.denot.

I am somewhat unsure about the last commit fa62cff: it duplicates the cases for NamedType and ThisType. It would be easier to just write `tpe.stripAnnots match {` in the outer match, but this does not compile because at that point, the type of tpe is T, not Type. I also considered a recursive method containing the match that would be called again on the tpe unwrapped from the AnnotatedType. But that would not be any simpler than what I currently have, and I am concerned about performance. Suggestions welcome.

@DarkDimius @odersky please review.