Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generator should disallow input parameters with size mechanism: 'passed-in', #1116

Closed
marcoskirsch opened this issue Nov 12, 2019 · 0 comments · Fixed by #1123
Closed

Generator should disallow input parameters with size mechanism: 'passed-in', #1116

marcoskirsch opened this issue Nov 12, 2019 · 0 comments · Fixed by #1123

Comments

@marcoskirsch
Copy link
Member

In PR #1104 it was noted that the generator could create slightly non-sensical code whenever an input parameter has its size as "mechanism: passed-in" (see comment).

That's because "passed-in" only makes sense for output parameters. We should add a check with a clear error message to the code-generator.

@texasaggie97 suggests

You could change codegen_helper.py line 331 to:
assert p['size']['mechanism'] != 'fixed-size' and p['size']['mechanism'] != 'passed-in'

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

Successfully merging a pull request may close this issue.

2 participants