gracelang / minigrace

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

Valid exclusion rejected when inheriting from another module #304

Open apblack opened 5 years ago

apblack commented 5 years ago

When inheriting fromcollections.enumerable, an attempt to exclude method ++(_) is rejected with the SyntaxError "can't exclude ++(_) because it is not available in the used trait".

The method ++(_) is available on the superobject, so the error message is wrong. (The message is also wrong because it refers to a "used trait" rathre tnan an "inherited object".) I think that the error arrises because the compiler doesn't know that the method exists, because it doesn't have complete symbol table information in the gct.

Test known-failing/traitWithExclusion.grace fails because of this issue.

This issue may be related to #270