Skip to content

Commit e9c5569

Browse files
authored
Merge pull request #2699 from xushiwei/q
gogen v1.22.0: revert overload-conflict
2 parents ffda7bf + 279a20c commit e9c5569

File tree

6 files changed

+6
-47
lines changed

6 files changed

+6
-47
lines changed

cl/_testgop/overload-conflict/in.xgo

Lines changed: 0 additions & 7 deletions
This file was deleted.

cl/_testgop/overload-conflict/out.go

Lines changed: 0 additions & 9 deletions
This file was deleted.

cl/compile.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1229,9 +1229,10 @@ func preloadFile(p *gogen.Package, ctx *blockCtx, f *ast.File, goFile string, ge
12291229
}
12301230
if d.Recv != nil {
12311231
var ok bool
1232-
recv, ok = d.Recv.List[0].Type.(*ast.Ident)
1232+
var recvType = d.Recv.List[0].Type
1233+
recv, ok = recvType.(*ast.Ident)
12331234
if !ok {
1234-
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))
1235+
ctx.handleErrorf(recvType.Pos(), recvType.End(), "invalid recv type %v", ctx.LoadExpr(recvType))
12351236
break
12361237
}
12371238
ctx.lbinames = append(ctx.lbinames, recv)

cl/internal/overload/conflict/overload.go

Lines changed: 0 additions & 26 deletions
This file was deleted.

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ require (
88
github.com/fsnotify/fsnotify v1.9.0
99
github.com/goccy/go-yaml v1.19.2
1010
github.com/goplus/cobra v1.9.15 //xgo:class
11-
github.com/goplus/gogen v1.21.5
11+
github.com/goplus/gogen v1.22.0
1212
github.com/goplus/lib v0.3.1
1313
github.com/goplus/mod v0.20.0
1414
github.com/qiniu/x v1.16.5

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ github.com/goccy/go-yaml v1.19.2 h1:PmFC1S6h8ljIz6gMRBopkjP1TVT7xuwrButHID66PoM=
44
github.com/goccy/go-yaml v1.19.2/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA=
55
github.com/goplus/cobra v1.9.15 h1:KoR19rR22R6Z/P3acdT7lCJLX+k09HV0Qt50U/Kse2c=
66
github.com/goplus/cobra v1.9.15/go.mod h1:p4LhfNJDKEpiGjGiNn0crUXL5dUPA5DX2ztYpEJR34E=
7-
github.com/goplus/gogen v1.21.5 h1:RRgdN1NV2dw/PRAYMmN9N9r3B999h763pyHJ/7O3D8A=
8-
github.com/goplus/gogen v1.21.5/go.mod h1:Y7ulYW3wonQ3d9er00b0uGFEV/IUZa6okWJZh892ACQ=
7+
github.com/goplus/gogen v1.22.0 h1:clM2eMVWQZz7tYUU/u9xwKFCBLcyVbcstzdiZrgRdfA=
8+
github.com/goplus/gogen v1.22.0/go.mod h1:Y7ulYW3wonQ3d9er00b0uGFEV/IUZa6okWJZh892ACQ=
99
github.com/goplus/lib v0.3.1 h1:Xws4DBVvgOMu58awqB972wtvTacDbk3nqcbHjdx9KSg=
1010
github.com/goplus/lib v0.3.1/go.mod h1:SgJv3oPqLLHCu0gcL46ejOP3x7/2ry2Jtxu7ta32kp0=
1111
github.com/goplus/mod v0.20.0 h1:vCONoomlfNLwfv5BDxqQTzaat3hHNaHLAovtkhJPwgw=

0 commit comments

Comments
 (0)