aboutsummaryrefslogtreecommitdiff
path: root/src/scope.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/scope.c')
-rw-r--r--src/scope.c10
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