-
Notifications
You must be signed in to change notification settings - Fork 524
Support reference types in goal app method
#3275
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -534,10 +534,9 @@ func ParseMethodSignature(methodSig string) (name string, argTypes []string, ret | |
| argsEnd := -1 | ||
| depth := 0 | ||
| for index, char := range methodSig { | ||
| switch char { | ||
| case '(': | ||
| if char == '(' { | ||
| depth++ | ||
| case ')': | ||
| } else if char == ')' { | ||
|
Comment on lines
+537
to
+539
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm perfectly happy with this change, but FYI, if you really like switch version, you can use labels to break out of the outer for loop.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, that's good to know, but I'll stick with the if statement for now |
||
| if depth == 0 { | ||
| err = fmt.Errorf("Unpaired parenthesis in method signature: %s", methodSig) | ||
| return | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately there's a bit of code duplication between these 3 branches. Without generics I can't think of a good way to compress this