diff options
author | Martin Odersky <odersky@gmail.com> | 2016-07-11 17:02:16 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-07-11 17:47:23 +0200 |
commit | 6d7bc4996d6ad2095442ebc43f59307448226fd7 (patch) | |
tree | 7cee580a3dce11cb59d232c435e90660f3dee6ea /src/dotty/tools/dotc/core/TypeParamInfo.scala | |
parent | a200695677237922fdf6f995c690cb0108ec2fc4 (diff) | |
download | dotty-6d7bc4996d6ad2095442ebc43f59307448226fd7.tar.gz dotty-6d7bc4996d6ad2095442ebc43f59307448226fd7.tar.bz2 dotty-6d7bc4996d6ad2095442ebc43f59307448226fd7.zip |
Address reviewers comments
Diffstat (limited to 'src/dotty/tools/dotc/core/TypeParamInfo.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/TypeParamInfo.scala | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/core/TypeParamInfo.scala b/src/dotty/tools/dotc/core/TypeParamInfo.scala index 6bec2e0e0..1d79e4204 100644 --- a/src/dotty/tools/dotc/core/TypeParamInfo.scala +++ b/src/dotty/tools/dotc/core/TypeParamInfo.scala @@ -9,7 +9,9 @@ import Types.{Type, TypeBounds} */ trait TypeParamInfo { - /** Is this the info of a type parameter? Might be wrong for symbols */ + /** Is this the info of a type parameter? Will return `false` for symbols + * that are not type parameters. + */ def isTypeParam(implicit ctx: Context): Boolean /** The name of the type parameter */ @@ -19,10 +21,16 @@ trait TypeParamInfo { def paramBounds(implicit ctx: Context): TypeBounds /** The info of the type parameter as seen from a prefix type. - * This can be different from `memberInfo` if the binding - * is a type symbol of a class. + * For type parameter symbols, this is the `memberInfo` as seen from `prefix`. + * For type lambda parameters, it's the same as `paramBounds` as + * `asSeenFrom` has already been applied to the whole type lambda. */ def paramBoundsAsSeenFrom(pre: Type)(implicit ctx: Context): TypeBounds + + /** The parameter bounds, or the completer if the type parameter + * is an as-yet uncompleted symbol. + */ + def paramBoundsOrCompleter(implicit ctx: Context): Type /** The variance of the type parameter */ def paramVariance(implicit ctx: Context): Int |