File tree 2 files changed +8
-4
lines changed
junit/src/test/scala/scala/collection/concurrent
2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -27,8 +27,10 @@ trait Spec {
27
27
def shouldEqual (other : Any ) = assert(a == other)
28
28
}
29
29
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 ]() = {
32
34
var produced = false
33
35
try body
34
36
catch {
Original file line number Diff line number Diff line change @@ -27,8 +27,10 @@ trait Spec {
27
27
def shouldEqual (other : Any ) = assert(a == other)
28
28
}
29
29
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 ]() = {
32
34
var produced = false
33
35
try body
34
36
catch {
You can’t perform that action at this time.
0 commit comments