diff options
author | Martin Odersky <odersky@gmail.com> | 2014-06-26 13:17:24 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-06-26 13:17:24 +0200 |
commit | f823e422478232aa083f3510fa8ce4914ec99d53 (patch) | |
tree | 0c353efa00c894494b8fb1ba6abc02105eab2e1b /src/dotty/tools/dotc/core/TypeApplications.scala | |
parent | c1721485725bb1050730beb2055700d5fa17c4dd (diff) | |
download | dotty-f823e422478232aa083f3510fa8ce4914ec99d53.tar.gz dotty-f823e422478232aa083f3510fa8ce4914ec99d53.tar.bz2 dotty-f823e422478232aa083f3510fa8ce4914ec99d53.zip |
Bring LambdaClass inline with its doc comment.
Avoid special treating TermRef, as this is not demanded by the
comment and does not change any of the test outcomes.
Diffstat (limited to 'src/dotty/tools/dotc/core/TypeApplications.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/TypeApplications.scala | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/dotty/tools/dotc/core/TypeApplications.scala b/src/dotty/tools/dotc/core/TypeApplications.scala index 3452a499b..359be171d 100644 --- a/src/dotty/tools/dotc/core/TypeApplications.scala +++ b/src/dotty/tools/dotc/core/TypeApplications.scala @@ -48,8 +48,8 @@ class TypeApplications(val self: Type) extends AnyVal { * For a typeref referring to a class, the type parameters of the class. * For a typeref referring to an alias or abstract type, the type parameters of * its right hand side or upper bound. - * For a refinement type, the type parameters of its parent, unless there's a - * refinement with the same name. + * For a refinement type, the type parameters of its parent, unless the refinement + * re-binds the type parameter with a type-alias. * For any other non-singleton type proxy, the type parameters of its underlying type. * For any other type, the empty list. */ @@ -105,6 +105,7 @@ class TypeApplications(val self: Type) extends AnyVal { /** If type `tp` is equal, aliased-to, or upperbounded-by a type of the form * `LambdaXYZ { ... }`, the class symbol of that type, otherwise NoSymbol. + * symbol of that type, otherwise NoSymbol. * @param forcing if set, might force completion. If not, never forces * but returns NoSymbol when it would have to otherwise. */ @@ -114,8 +115,6 @@ class TypeApplications(val self: Type) extends AnyVal { if (sym.isLambdaTrait) sym else if (sym.isClass || sym.isCompleting && !forcing) NoSymbol else self.info.LambdaClass(forcing) - case self: TermRef => - NoSymbol case self: TypeProxy => self.underlying.LambdaClass(forcing) case _ => |