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

fix header propagate bug #610

Merged
merged 1 commit into from
Jul 18, 2019
Merged

fix header propagate bug #610

merged 1 commit into from
Jul 18, 2019

Conversation

azavadil
Copy link
Contributor

@azavadil azavadil commented Jul 17, 2019

In the typeSwitch function assignVal should be set to val for int16 case.
For the int64 case assignVal = "v" is correct because ParseInt returns an int64. Hence, no type cast is necessary. However for the int16 case a type cast is necessary.

Here is a concrete example of generated code without this change

if v, err := strconv.ParseInt(key, 10, 16); err == nil {
    val := int16(v)
    in.Request.CityId = &v
}

and the error

cannot use &v (type *int64) as type *int16 in assignment

@CLAassistant
Copy link

CLAassistant commented Jul 17, 2019

CLA assistant check
All committers have signed the CLA.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 67.62% when pulling f39ab07 on header-propogate-bug into 8eac3ef on master.

@argouber argouber self-requested a review July 18, 2019 18:23
@argouber argouber merged commit 073a751 into master Jul 18, 2019
@ChuntaoLu ChuntaoLu deleted the header-propogate-bug branch July 8, 2020 17:24
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.

4 participants