Skip to content

Conversation

@ryan-berger
Copy link
Contributor

Fix #1632

@kyleconroy
Copy link
Collaborator

Looks like there's a test failure. Sorry that it took a few days to run.

@ryan-berger
Copy link
Contributor Author

ryan-berger commented May 22, 2022 via email

@kyleconroy
Copy link
Collaborator

It looks like we already validate the arguments at a later spot. How about we just return early if there are no args to avoid the panic?

@ryan-berger
Copy link
Contributor Author

@kyleconroy Fixed.

I didn't see the nil/zero check initially but once you remove that from the visitor's code, it will output the correct error message.

I've also written a test just in case. Even though it doesn't really add much to coverage, it will at least serve as a regression test for future work.

Thanks for taking your time to maintain this!

@kyleconroy kyleconroy merged commit 895f4e1 into sqlc-dev:main May 23, 2022
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.

sqlc.(n?)arg panics when 0 arguments are passed in

2 participants