File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
junit/src/test/scala/scala/collection/concurrent Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -27,8 +27,10 @@ trait Spec {
2727 def shouldEqual (other : Any ) = assert(a == other)
2828 }
2929
30- def evaluating [U ](body : => U ) = new {
31- def shouldProduce [T <: Throwable : ClassTag ]() = {
30+ trait HasShouldProduce [U ] { def shouldProduce [T <: Throwable : ClassTag ](): Unit }
31+
32+ def evaluating [U ](body : => U ): HasShouldProduce [U ] = new HasShouldProduce [U ] {
33+ override def shouldProduce [T <: Throwable : ClassTag ]() = {
3234 var produced = false
3335 try body
3436 catch {
Original file line number Diff line number Diff line change @@ -27,8 +27,10 @@ trait Spec {
2727 def shouldEqual (other : Any ) = assert(a == other)
2828 }
2929
30- def evaluating [U ](body : => U ) = new {
31- def shouldProduce [T <: Throwable : ClassTag ]() = {
30+ trait HasShouldProduce [U ] { def shouldProduce [T <: Throwable : ClassTag ](): Unit }
31+
32+ def evaluating [U ](body : => U ): HasShouldProduce [U ] = new HasShouldProduce [U ] {
33+ override def shouldProduce [T <: Throwable : ClassTag ]() = {
3234 var produced = false
3335 try body
3436 catch {
You can’t perform that action at this time.
0 commit comments