[go: up one dir, main page]

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

fix generates non-compilable code #371

Merged
merged 2 commits into from
Dec 31, 2019
Merged

fix generates non-compilable code #371

merged 2 commits into from
Dec 31, 2019

Conversation

ZergsLaw
Copy link
Contributor
@ZergsLaw ZergsLaw commented Dec 27, 2019

Fixes #370 .

Description

  • fixed bug

Submitter Checklist

  • Includes tests

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

1 similar comment
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@ZergsLaw ZergsLaw changed the title chore: fix bug bug: fix generates non-compilable code Dec 27, 2019
@ZergsLaw
Copy link
Contributor Author

@googlebot I signed it!

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

1 similar comment
@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@ZergsLaw ZergsLaw marked this pull request as ready for review December 27, 2019 17:12
@codyoss codyoss changed the title bug: fix generates non-compilable code fix generates non-compilable code Dec 27, 2019
g := generator{}

result := g.getArgNames(testCase.method)
if !testEqSliceStr(t, result, testCase.expected) {
Copy link
Member

Choose a reason for hiding this comment

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

I would recommend using reflect.DeepEquals here, but it seems like we have a name collision in that package. I will refactor this later

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, that's what I planned initially, but since there was a conflict of names, I decided not to touch upon it at the moment.

@codyoss
Copy link
Member
codyoss commented Dec 31, 2019

Thank you for your contribution! 🎆

@codyoss codyoss merged commit 817c00c into golang:master Dec 31, 2019
codyoss added a commit that referenced this pull request Jan 12, 2020
The reflect method should be renamed so it does not collide with
the reflect package name. As is, it makes import reflect in the
code non-idiomatic. Also renamed sourceMode to stay consistent.

Noticed this here: #371

Also, refactor slice equals method
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.

Generates non-compilable code
3 participants