Skip to content

Commit e82f1eb

Browse files
committed
Fix top type for functions
1 parent 77c363a commit e82f1eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/core/Definitions.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,7 @@ class Definitions {
762762

763763
private def topInSameUniverse(types: List[Type], relationship: => String)(implicit ctx: Context): Type = {
764764
types match {
765-
case first :: Nil => first.top
765+
case first :: Nil => first.topType
766766
case first :: rest => (first /: rest)(inSameUniverse((t1, _) => t1.topType, _, _, relationship, ctx.owner.pos))
767767
case Nil => defn.AnyType
768768
}

0 commit comments

Comments
 (0)