Skip to content

Move some pending tests to neg/ #3800

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions tests/neg-no-optimise/t7868.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
object A {
def unapply(n: Int): Option[Int] = Some(n)

def run = (0: Short) match {
case A(_) => // error: this case is unreachable since class Short is not a subclass of class Int
case _ =>
}

def run2 = (0: Short) match {
case x: Int => // error: this case is unreachable since class Short is not a subclass of class Int
case _ =>
}
}
4 changes: 2 additions & 2 deletions tests/pending/run/t8764.scala → tests/neg/t8764.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ case class IntOnly(i: Int, j: Int)

println("IntOnly: should return an unboxed int")
val a = IntOnly(1, 2)
val i: Int = a.productElement(0)
val i: Int = a.productElement(0) // error: found Any, required Int
println(s"Int: ${a.productElement(0).getClass}")

case class IntAndDouble(i: Int, d: Double)

println("IntAndDouble: should just box and return Anyval")
val b = IntAndDouble(1, 2.0)
val j: AnyVal = b.productElement(0)
val j: AnyVal = b.productElement(0) // error: found Any, required AnyVal
println(s"Double: ${b.productElement(1).getClass}")
println(s"Int: ${b.productElement(0).getClass}")
}
13 changes: 0 additions & 13 deletions tests/pending/run/t7868.scala

This file was deleted.

5 changes: 0 additions & 5 deletions tests/pending/run/t8764.check

This file was deleted.

1 change: 0 additions & 1 deletion tests/pending/run/t8764.flags

This file was deleted.