Open
Description
Low priority issue.
Test case:
type Foo
val x: Unit
tagged type Bar extends Foo
val x: Unit
Observed behavior: Clean compilation.
Expected behavior: Error because Foo isn't marked as extensible (a tagged type).
The generated CoreWyvernIL here also looks wrong:
seqexpr
var_23 : type { ... } = new var_23 : type { ... } =>
type Foo = type { ... }
type Bar = datatype extends var_23.Foo comprises []
Bar is marked as a datatype with comprises []
implying no types should be able to extend it, but it instead should be marked as extag
(openly extensible). Wyvern doesn't seem to be checking this comprises
info anyways since it compiles if you add a type Baz extends Bar