gracelang / minigrace

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

Types within Types #237

Closed apblack closed 5 years ago

apblack commented 7 years ago

Dynamic Type checking of types within types doesn't work. See https://github.com/gracelang/language/issues/124

apblack commented 6 years ago

This is partially implemented in commit c1084abfa895. By partially, I mean that it works for interface types, but not for types constructed with the type operators (+, -, &, and especially |)

The problem with doing it for the operator types is that these operators are currently implemented in Grace, and nested types cannot be implemented in Grace. See gracelang/language#124

apblack commented 5 years ago

I believe that this was a mistake, and should be reverted.

apblack commented 5 years ago

It's been reverted. Types are allowed only inside objects.