-
Notifications
You must be signed in to change notification settings - Fork 562
gogen v1.22.0: revert overload-conflict #2699
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
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -1229,9 +1229,10 @@ func preloadFile(p *gogen.Package, ctx *blockCtx, f *ast.File, goFile string, ge | |||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| if d.Recv != nil { | ||||||||||||||||||||||||||||||
| var ok bool | ||||||||||||||||||||||||||||||
| recv, ok = d.Recv.List[0].Type.(*ast.Ident) | ||||||||||||||||||||||||||||||
| var recvType = d.Recv.List[0].Type | ||||||||||||||||||||||||||||||
| recv, ok = recvType.(*ast.Ident) | ||||||||||||||||||||||||||||||
| if !ok { | ||||||||||||||||||||||||||||||
| ctx.handleErrorf(d.Recv.List[0].Type.Pos(), d.Recv.List[0].Type.End(), "invalid recv type %v", ctx.LoadExpr(d.Recv.List[0].Type)) | ||||||||||||||||||||||||||||||
| ctx.handleErrorf(recvType.Pos(), recvType.End(), "invalid recv type %v", ctx.LoadExpr(recvType)) | ||||||||||||||||||||||||||||||
| break | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| ctx.lbinames = append(ctx.lbinames, recv) | ||||||||||||||||||||||||||||||
|
Comment on lines
+1232
to
1238
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. The variable
Suggested change
|
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
This file was deleted.
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.
Nit: idiomatic Go (and the style used elsewhere in this file, e.g. line 910) prefers
:=overvar x = exprwhen no explicit type annotation is needed.