Compiler version
3.1.0
Minimized example
trait Foo:
def foo: Int
trait Bar:
def bar: Int
given (Foo & Bar) with
def foo = 1
def bar = 2
Output
compilation error
Foo & Bar is not a class type
Expectation
I think something like
Intersection type cannot be used with given
would be clearer