We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9920e23 commit 052433aCopy full SHA for 052433a
compiler/src/dotty/tools/dotc/core/Types.scala
@@ -182,9 +182,9 @@ object Types {
182
* - XYX.Any if XYZ extends scala.Phantom and this type is upper bounded XYZ.Any
183
* - scala.Any otherwise
184
*/
185
- final def topType(implicit ctx: Context): TypeRef = this match {
+ final def topType(implicit ctx: Context): TypeRef = widen match {
186
case tp: ClassInfo if isPhantomClass(tp.classSymbol) => tp.prefix.select(tpnme.Any).asInstanceOf[TypeRef]
187
- case tp: TypeProxy => tp.superType.topType
+ case tp: TypeProxy if tp.superType ne this => tp.superType.topType
188
case tp: AndOrType => tp.tp1.topType
189
case _ => defn.AnyType
190
}
0 commit comments