Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

fix parse array with the external const correctly #569

Merged

Conversation

sryoya
Copy link
Contributor

@sryoya sryoya commented Jun 8, 2021

Fixes #561 - Panic on array parsing if length is externally defined

It also fixes the following minor problems in TestParseArrayWithConstLength, a test function related to this feature.

  • It doesn't check all outputs to be asserted.
  • It doesn't initialize some of the fields in mockgen.fileParser, even though they are initialized in the production code. (Actually, it caused an unnecessary test error by test data I added)

@sryoya sryoya requested a review from codyoss as a code owner June 8, 2021 18:14
Copy link
Member

@codyoss codyoss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution, just a couple of minor nits.

mockgen/parse.go Show resolved Hide resolved
mockgen/parse.go Outdated Show resolved Hide resolved
@sryoya sryoya requested a review from codyoss June 11, 2021 00:49
@sryoya
Copy link
Contributor Author

sryoya commented Jun 11, 2021

Thanks for the review 🌵 I've either fixed or replied to your comments.

Copy link
Member

@codyoss codyoss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@codyoss codyoss merged commit aba2ff9 into golang:master Jun 11, 2021
@codyoss
Copy link
Member

codyoss commented Jun 11, 2021

@sryoya Thank you for your contribution! 🎆

@sryoya sryoya deleted the fix_parse_array_with_external_const_correctly branch June 11, 2021 21:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Panic on array parsing if length is externally defined
2 participants