I need to restrict a Scala method parameter so that it implements both a trait and a structural subtype. How can I do this?

```
trait Foo
// ...
def someMethod[A <: Foo xxx { def close() }](resource: A)(block: A => Unit) {
  // ...
}

```

What do I put in place of `xxx`? I tried both `extends` and `with`, but got syntax errors.

Can it be done using a `type` definition for the structural subtype?