Skip to content

Commit 209ac19

Browse files
committed
Fix #686: Move testcase to neg/
The corresponding feature in scalac only ever worked under -Xexperimental and was dropped in scala/scala#3938
1 parent 3004af3 commit 209ac19

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

tests/pending/run/t8764.scala renamed to tests/neg/t8764.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ case class IntOnly(i: Int, j: Int)
33

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

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

1111
println("IntAndDouble: should just box and return Anyval")
1212
val b = IntAndDouble(1, 2.0)
13-
val j: AnyVal = b.productElement(0)
13+
val j: AnyVal = b.productElement(0) // error: found Any, required AnyVal
1414
println(s"Double: ${b.productElement(1).getClass}")
1515
println(s"Int: ${b.productElement(0).getClass}")
1616
}

tests/pending/run/t8764.check

Lines changed: 0 additions & 5 deletions
This file was deleted.

tests/pending/run/t8764.flags

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)