diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2023-03-26 02:01:04 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2023-03-26 02:21:50 +0200 |
| commit | 373728f324b82d305748cfe3c853053fe2a9f761 (patch) | |
| tree | 92e50af6527e981bcbf6c0fe6c44622bd3861cc7 /src/scope.c | |
| parent | cc3cf3353f23dd2f87412d42f8c3d52f873711dd (diff) | |
| download | ek-373728f324b82d305748cfe3c853053fe2a9f761.tar.gz ek-373728f324b82d305748cfe3c853053fe2a9f761.zip | |
struct member naming
Diffstat (limited to 'src/scope.c')
| -rw-r--r-- | src/scope.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/scope.c b/src/scope.c index f422b9f..721a31e 100644 --- a/src/scope.c +++ b/src/scope.c @@ -572,13 +572,15 @@ int implements(struct scope *scope, assert(arg_type); if (param_type->_type.kind == AST_TYPE_ALIAS) { - if (implements(scope, arg_type, param_type->_type.alias.actual)) - return 0; + assert(param_type->_type.next == NULL); + return implements(scope, arg_type, + param_type->_type.alias.actual); } if (arg_type->_type.kind == AST_TYPE_ALIAS) { - if (implements(scope, arg_type->_type.alias.actual, param_type)) - return 0; + assert(arg_type->_type.next == NULL); + return implements(scope, arg_type->_type.alias.actual, + param_type); } /* TODO: do aliases and templates have to be converted to types? Are |
