hawkw / decaf

like Java, but less so
hawkweisman.me/decaf
Other
18 stars 4 forks source link

Class overrides go unchecked #47

Closed ArcticLight closed 9 years ago

ArcticLight commented 10 years ago

Classes need to verify that the type of their superclass overrides is the same. This involves (with the currently correctly happening ScopeTree) checking that each entry it can find within its LOCAL SCOPE (I.e. using contains()) either A: Does not exist in the parent scope, or B: is in the parent scope or higher (via chainContains() _on the parent scope_) AND is of precisely the same type (must be the exact same class, exact method signature, or exact datatype).

Note: Decaf supports neither overloading nor any real type of class-inheritence-based shadowing, so it is sufficient to match exactness of inherited values and not worry about anything else inheritence-related.

hawkw commented 9 years ago

Fixed as of 5a15f17