@@ -7,8 +7,7 @@ import scala.async.TreeInterrogation
77
88class UncheckedBoundsSpec {
99 @ Test def insufficientLub_SI_7694 () {
10- suppressingFailureBefore2_10_3 {
11- eval( s """
10+ eval( s """
1211 object Test {
1312 import _root_.scala.async.run.toughtype._
1413 import _root_.scala.async.internal.AsyncId.{async, await}
@@ -17,12 +16,10 @@ class UncheckedBoundsSpec {
1716 }
1817 }
1918 """ , compileOptions = s " -cp ${toolboxClasspath} " )
20- }
2119 }
2220
2321 @ Test def insufficientLub_SI_7694_ScalaConcurrent () {
24- suppressingFailureBefore2_10_3 {
25- eval( s """
22+ eval( s """
2623 object Test {
2724 import _root_.scala.async.run.toughtype._
2825 import _root_.scala.async.Async.{async, await}
@@ -33,25 +30,6 @@ class UncheckedBoundsSpec {
3330 }
3431 }
3532 """ , compileOptions = s " -cp ${toolboxClasspath} " )
36- }
3733 }
3834
39- private def suppressingFailureBefore2_10_3 (body : => Any ) {
40- try {
41- body
42- } catch {
43- case x : Throwable =>
44- // @uncheckedBounds was only introduced in 2.10.3/ 2.11.0-M5, so avoid reporting this test failure in those cases.
45- scala.util.Properties .versionNumberString match {
46- case " 2.10.0" | " 2.10.1" | " 2.10.2" | " 2.11.0-M4" => // ignore, the @uncheckedBounds doesn't exist yet
47- case _ =>
48- val annotationExists =
49- reflect.runtime.currentMirror.staticClass(" scala.reflect.internal.annotations.uncheckedBounds" ) == reflect.runtime.universe.NoSymbol
50- if (annotationExists)
51- Assert .fail(" @uncheckedBounds not found in scala-reflect.jar" )
52- else
53- Assert .fail(s " @uncheckedBounds exists, but it didn't prevent this failure: $x" )
54- }
55- }
56- }
5735}
0 commit comments