intel / device-modeling-language

Mozilla Public License 2.0
92 stars 47 forks source link

Leverage location when typechecking method overrides #261

Closed lwaern-intel closed 8 months ago

lwaern-intel commented 8 months ago

This fixes an issue when leveraging typeof: that a method signature using it would lead to incorrect compile-time errors if the method is overridden.

Ran into this while doing simple regs work. This PR alone should be an uncontroversial fix, however, I am looking warily at other uses of eval_type where None is passed as the location. Most of it is trait-related, which should really only be able to leverage top-level stuff -- however, today, they can't even do that, as they have no access to even dev. That question however should be left to a different PR.

syssimics commented 8 months ago

Verification #13057064: pass