## minimized code ```Scala scala> trait Bar { type Y } // defined trait Bar scala> trait Foo { type X } // defined trait Foo scala> given as Foo given (b: Bar) { type X = b.Y } 1 |given as Foo given (b: Bar) { type X = b.Y } | ^ | non-private type X in class Foo_given refers to private value b | in its type signature = Foo_given.this.b.Y scala> given as Foo given (val b: Bar) { type X = b.Y } 1 |given as Foo given (val b: Bar) { type X = b.Y } | ^^^ | an identifier expected, but 'val' found ``` Workaround: ```scala scala> given as Foo given (b: Bar) = new Foo { type X = b.Y } def Foo_given given (b: Bar): Foo ``` ## expectation I'd like to use the nicer syntax without the workaround.