diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-05-12 13:50:06 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-05-12 13:50:06 -0400 |
| commit | d143c72b2267883c229a09cc27bbeafcf2c3fd70 (patch) | |
| tree | 90312f0e4ee553e0588dc3c45f955b5184bf3778 /environment.c | |
| parent | a20f522fd61698282d3e01931260c588dd7f40b1 (diff) | |
WIP, but functional interfaces
Diffstat (limited to 'environment.c')
| -rw-r--r-- | environment.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/environment.c b/environment.c index ec9ec5d5..f19b7498 100644 --- a/environment.c +++ b/environment.c @@ -321,9 +321,13 @@ binding_t *get_namespace_binding(env_t *env, ast_t *self, const char *name) return struct_->env ? get_binding(struct_->env, name) : NULL; } case EnumType: { - auto enum_ = Match(cls_type, StructType); + auto enum_ = Match(cls_type, EnumType); return enum_->env ? get_binding(enum_->env, name) : NULL; } + case InterfaceType: { + auto interface = Match(cls_type, InterfaceType); + return interface->env ? get_binding(interface->env, name) : NULL; + } case TypeInfoType: { auto info = Match(cls_type, TypeInfoType); return info->env ? get_binding(info->env, name) : NULL; |
