Closed
Description
minimized code
type Foo
given myFoo1 as Foo { type X = Int } = ??? // error
type Bar = Foo { type X = Int }
given myFoo2 as Bar = ???
Compilation output
2 |given myFoo1 as Foo { type X = Int } = ???
| ^
| end of statement expected but '=' found
-- [E040] Syntax Error: Foo.scala:2:39 -----------------------------------------
2 |given myFoo1 as Foo { type X = Int } = ???
| ^^^
| ';' expected, but identifier found
-- Error: Foo.scala:2:16 -------------------------------------------------------
2 |given myFoo1 as Foo { type X = Int } = ???
| ^^^
| Foo is not a class type
expectation
given myFoo1 as Foo { type X = Int } = ???
myFoo1
should be handled as a given
alias and should compile the same way myFoo2
does.