Skip to content

Commit b6eddaa

Browse files
committed
Add tests
1 parent b0a3bb8 commit b6eddaa

File tree

5 files changed

+18
-2
lines changed

5 files changed

+18
-2
lines changed

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4938,8 +4938,6 @@ object Types {
49384938
}
49394939

49404940
def & (that: TypeBounds)(using Context): TypeBounds =
4941-
// if ((that.lo frozen_<:< this.lo) && (this.hi frozen_<:< that.hi)) this
4942-
// else if ((this.lo frozen_<:< that.lo) && (that.hi frozen_<:< this.hi)) that
49434941
if ((this.lo frozen_<:< that.lo) && (that.hi frozen_<:< this.hi)) that
49444942
else if ((that.lo frozen_<:< this.lo) && (this.hi frozen_<:< that.hi)) this
49454943
else TypeBounds(this.lo | that.lo, this.hi & that.hi)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
class Impl extends Intf:
2+
override def test(x: Object | Null*): Unit = ???
3+
4+
class Impl2 extends Intf:
5+
override def test(x: Object*): Unit = ???
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
interface Intf {
2+
void test(Object... x);
3+
}

tests/explicit-nulls/pos/i13486.scala

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
class MyPrintStream extends java.io.PrintStream(??? : java.io.OutputStream):
2+
override def printf(format: String | Null, args: Array[? <: Object | Null])
3+
: java.io.PrintStream | Null = ???
4+
5+
class MyPrintStream2 extends java.io.PrintStream(??? : java.io.OutputStream):
6+
override def printf(format: String, args: Array[? <: Object])
7+
: java.io.PrintStream = ???

tests/explicit-nulls/pos/i13608.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import scala.util.control.NoStackTrace
2+
3+
case class ParseException(line: Int, character: Int, message: String) extends NoStackTrace

0 commit comments

Comments
 (0)