gracelang / minigrace

Self-hosting compiler for the Grace programming language
39 stars 22 forks source link

RHS of Type Definition isn't Required to be Type Expression #289

Closed IsaacOscar closed 4 years ago

IsaacOscar commented 5 years ago

According to the grammar, the RHS of a type-declaration must be a TypeExpression or InterfaceLiteral, however the following code does not cause a syntax-error:

type X = object{}

Despite object{} not being a TypeExpression.

apblack commented 4 years ago

This issue is now resolved. A test for it was added to t179 in commit b3ee21d3.