Skip to content

Forced metafunction resolver to check arity on monoarity functions#324

Open
WoodchuckXL wants to merge 1 commit into
Morpho-lang:devfrom
WoodchuckXL:iss322
Open

Forced metafunction resolver to check arity on monoarity functions#324
WoodchuckXL wants to merge 1 commit into
Morpho-lang:devfrom
WoodchuckXL:iss322

Conversation

@WoodchuckXL

Copy link
Copy Markdown

Fix for issue #322.
This forces the metafunction resolution compiler to add a step to the beginning of the multiple dispatch resolver of all mono-arity functions(functions whose implementations all take the same number of arguments) which ensures that the function was passed the correct number of arguments. This check was already in place for multi-arity functions so this fix just affects the mono-arity case.

Note
This fix has the side effect of rendering an error inside the matrix class obsolete, this is because this class would manually check the types of its arguments, but with multiple dispatch fixed, the error will be caught before it ever reaches the matrix class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant