Skip to content

Commit

Permalink
Don't show ObjectTpeJava upper bound in TypeBounds.toString
Browse files Browse the repository at this point in the history
  • Loading branch information
lrytz committed May 13, 2019
1 parent 348a14c commit 68b6b62
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/reflect/scala/reflect/internal/Types.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1542,7 +1542,7 @@ trait Types
case _ => lo <:< that && that <:< hi
}
private def emptyLowerBound = typeIsNothing(lo) || lo.isWildcard
private def emptyUpperBound = typeIsAny(hi) || hi.isWildcard
private def emptyUpperBound = typeIsAny(hi) || hi.eq(definitions.ObjectTpeJava) || hi.isWildcard
def isEmptyBounds = emptyLowerBound && emptyUpperBound

override def safeToString = scalaNotation(_.toString)
Expand Down
6 changes: 3 additions & 3 deletions test/files/neg/abstract-report2.check
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Missing implementations for 13 members. Stub implementations follow:
def removeAll(x$1: java.util.Collection[_]): Boolean = ???
def retainAll(x$1: java.util.Collection[_]): Boolean = ???
def size(): Int = ???
def toArray[T <: Object](x$1: Array[T with Object]): Array[T with Object] = ???
def toArray[T](x$1: Array[T with Object]): Array[T with Object] = ???
def toArray(): Array[Object] = ???

class Foo extends Collection[Int]
Expand All @@ -29,7 +29,7 @@ Missing implementations for 13 members. Stub implementations follow:
def removeAll(x$1: java.util.Collection[_]): Boolean = ???
def retainAll(x$1: java.util.Collection[_]): Boolean = ???
def size(): Int = ???
def toArray[T <: Object](x$1: Array[T with Object]): Array[T with Object] = ???
def toArray[T](x$1: Array[T with Object]): Array[T with Object] = ???
def toArray(): Array[Object] = ???

class Bar extends Collection[List[_ <: String]]
Expand All @@ -47,7 +47,7 @@ Missing implementations for 13 members. Stub implementations follow:
def removeAll(x$1: java.util.Collection[_]): Boolean = ???
def retainAll(x$1: java.util.Collection[_]): Boolean = ???
def size(): Int = ???
def toArray[T <: Object](x$1: Array[T with Object]): Array[T with Object] = ???
def toArray[T](x$1: Array[T with Object]): Array[T with Object] = ???
def toArray(): Array[Object] = ???

class Baz[T] extends Collection[T]
Expand Down

0 comments on commit 68b6b62

Please sign in to comment.