Skip to content

Commit e2bde4f

Browse files
committed
Allow passing arrays of some types if size matches
Only for numerical types
1 parent 0011f44 commit e2bde4f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

symbols/typecast.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ def make_node(cls, new_type, node, lineno):
6363

6464
# TODO: Create a base scalar type
6565
if isinstance(node, SymbolVARARRAY):
66+
if new_type.size == node.type_.size and TYPE.string not in (new_type, node.type_):
67+
return node
68+
6669
syntax_error(lineno, "Array {} type does not match parameter type".format(node.name))
6770
return None
6871

0 commit comments

Comments
 (0)