diff options
author | Martin Odersky <odersky@gmail.com> | 2013-11-25 12:20:22 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-11-25 12:20:22 +0100 |
commit | 6d3415d23ffcb9db63452d11fd38fdcd8e8b7438 (patch) | |
tree | b5e825d173fc4083435253e32e7aeb2dd93a08f6 /src/dotty/tools/dotc/core/Types.overflow | |
parent | 45ea511ec8ef12e0a192e4f4925923e75ef9ae3a (diff) | |
download | dotty-6d3415d23ffcb9db63452d11fd38fdcd8e8b7438.tar.gz dotty-6d3415d23ffcb9db63452d11fd38fdcd8e8b7438.tar.bz2 dotty-6d3415d23ffcb9db63452d11fd38fdcd8e8b7438.zip |
More Types polishing
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.overflow')
-rw-r--r-- | src/dotty/tools/dotc/core/Types.overflow | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/Types.overflow b/src/dotty/tools/dotc/core/Types.overflow index 45727fcc1..0474bc229 100644 --- a/src/dotty/tools/dotc/core/Types.overflow +++ b/src/dotty/tools/dotc/core/Types.overflow @@ -21,5 +21,15 @@ object Types { case pt: PolyType => pt.firstParamTypes case _ => Nil } + + /** `tp` is either a type variable or poly param. Returns + * Covariant if all occurrences of `tp` in this type are covariant + * Contravariant if all occurrences of `tp` in this type are contravariant + * Covariant | Contravariant if there are no occurrences of `tp` in this type + * EmptyFlags if `tp` occurs noon-variantly in this type + */ + def varianceOf(tp: Type): FlagSet = ??? + + } }
\ No newline at end of file |