Commit 22eca70c authored by sparonuz's avatar sparonuz
Browse files

BUGFIX: here a return was due

parent a1c92065
......@@ -295,6 +295,11 @@ def find_proper_procedure_from_interface(interface, current_block, vault, called
# because there's already an existing version within the same interface with a different precision
# In case only a procedure coincides with the dimensions, return it
# dimensions_of_procedures = [[[v.dimension, v.position] for v in [_v for _v in p.variables if _v.is_dummy_argument]]
# for p in interface.procedures]
# dimensions_of_procedures.sort(key=lambda x: x[1] if len(x) >1 else x)
# dimensions_of_procedures = [[dim[0] for dim in dof] for dof in dimensions_of_procedures]
dimensions_of_procedures = [[v.dimension for v in [_v for _v in p.variables if _v.is_dummy_argument]]
for p in interface.procedures]
have_the_same_dimensions = [dims == argument_dimensions for dims in dimensions_of_procedures]
......@@ -313,6 +318,7 @@ def find_proper_procedure_from_interface(interface, current_block, vault, called
interface = match_argument_info_and_interface(argument_types, interface,
argument_dimensions=argument_dimensions,
keyword_arguments=keyword_arguments, vault=vault)
return interface
except AssertionError:
if check and not alternative_procedures:
# In case there wasn't a match with the interface, check if through a variable cast it can work
......@@ -325,12 +331,12 @@ def find_proper_procedure_from_interface(interface, current_block, vault, called
for t in types_to_test:
try:
m = match_argument_info_and_interface(
t,
interface,
argument_dimensions=argument_dimensions,
keyword_arguments=keyword_arguments,
vault=vault,
)
t,
interface,
argument_dimensions=argument_dimensions,
keyword_arguments=keyword_arguments,
vault=vault,
)
matches.append(m)
# break
except AssertionError:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment