From 19234838329aabfe202a2fbf46470528baebd83c Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Wed, 14 Jan 2015 19:04:47 +0100 Subject: 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. --- src/dotty/tools/dotc/core/Types.scala | 1 + 1 file changed, 1 insertion(+) (limited to 'src/dotty/tools/dotc/core/Types.scala') 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) -- cgit v1.2.3