diff options
author | Martin Odersky <odersky@gmail.com> | 2015-01-14 19:04:47 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-01-14 19:09:34 +0100 |
commit | 19234838329aabfe202a2fbf46470528baebd83c (patch) | |
tree | a7b0193e7a20fb2a480d1c2b5839ad76979f05ca /src/dotty/tools/dotc/core/Types.scala | |
parent | c0b75098f66d4611683bc308d7f6127e6c6e433b (diff) | |
download | dotty-19234838329aabfe202a2fbf46470528baebd83c.tar.gz dotty-19234838329aabfe202a2fbf46470528baebd83c.tar.bz2 dotty-19234838329aabfe202a2fbf46470528baebd83c.zip |
Allow to merge TypeBounds and ClassInfos in |, &
There seems to be no reason why we should not merge
a class and an abstract type that has the class within
its bounds. I.e. Assume
class A { type T }
class B { class T }
Then (A | B) # T should be legal and refer to type T,
and (A & B) # T should be legal and refer to class T.
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Types.scala | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index 0363a8c70..8249e5a4c 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -2151,6 +2151,7 @@ object Types { } } + /** TODO Some docs would be nice here! */ case class PolyParam(binder: PolyType, paramNum: Int) extends ParamType { type BT = PolyType def copyBoundType(bt: BT) = PolyParam(bt, paramNum) |