gracelang / minigrace

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

Where Clauses are Ignored #271

Open apblack opened 5 years ago

apblack commented 5 years ago

As of e4fed17b60, minigrace parses where clauses qualifying type parameters. It even puts the where expressions in the parse tree. But it doesn't do anything with them (although a dialect might).

I think that the right behaviour would be to check the where clauses dynamically each time that the method (or type definition) with the qualified type parameter(s) is instantiated with one or more type arguments. This is parallel to the way that the types of ordinary parameters are checked when they are instantiated with arguments.