Skip to content

Commit

Permalink
Fix top type for functions
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasstucki committed Jun 2, 2017
1 parent 77c363a commit e82f1eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/core/Definitions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ class Definitions {

private def topInSameUniverse(types: List[Type], relationship: => String)(implicit ctx: Context): Type = {
types match {
case first :: Nil => first.top
case first :: Nil => first.topType
case first :: rest => (first /: rest)(inSameUniverse((t1, _) => t1.topType, _, _, relationship, ctx.owner.pos))
case Nil => defn.AnyType
}
Expand Down

0 comments on commit e82f1eb

Please sign in to comment.