diff options
Diffstat (limited to 'lib/codegen.py')
-rw-r--r-- | lib/codegen.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/codegen.py b/lib/codegen.py index d6dfe6e..b383f20 100644 --- a/lib/codegen.py +++ b/lib/codegen.py @@ -52,11 +52,11 @@ class MultipassDriver: # XXX right now we only verify whether both functions have the # same number of arguments. This breaks in many overloading cases. function_info = self.class_info.function[transition.name] - function_arguments = list() + for function_candidate in self.class_info.functions: + if function_candidate.name == transition.name and len(function_candidate.argument_types) == len(transition.arguments): + function_info = function_candidate - if len(transition.arguments) != len(function_info.argument_types): - # polymorphic function variant, TODO - pass + function_arguments = list() for i in range(len(transition.arguments)): function_arguments.append('{} {}'.format(function_info.argument_types[i], transition.arguments[i])) |