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

deps: update gox because fix issue-1761 #1791

Merged
merged 2 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions cl/compile_gop_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -964,13 +964,11 @@ d := Var(M)
const GopPackage = true

var a Var__0[int]
var b Var__1[map[string]interface {
}]
var b Var__1[map[string]interface{}]

func main() {
c := Gopx_Var_Cast__0[string]()
d := Gopx_Var_Cast__1[map[string]interface {
}]()
d := Gopx_Var_Cast__1[map[string]interface{}]()
}
`)
}
Expand Down
57 changes: 19 additions & 38 deletions cl/compile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -642,8 +642,7 @@ case interface{}(true):

func main() {
switch {
case interface {
}(true):
case interface{}(true):
}
}
`)
Expand Down Expand Up @@ -1086,11 +1085,9 @@ func foo(v interface{}) {
}
`, `package main

func bar(p *interface {
}) {
func bar(p *interface{}) {
}
func foo(v interface {
}) {
func foo(v interface{}) {
switch t := v.(type) {
case int, string:
bar(&v)
Expand All @@ -1117,11 +1114,9 @@ func foo(v interface{}) {
}
`, `package main

func bar(p *interface {
}) {
func bar(p *interface{}) {
}
func foo(v interface {
}) {
func foo(v interface{}) {
switch bar(nil); v.(type) {
case int, string:
bar(&v)
Expand All @@ -1139,8 +1134,7 @@ func foo(v interface{}) {
}
`, `package main

func foo(v interface {
}) {
func foo(v interface{}) {
x := v.(int)
y, ok := v.(string)
}
Expand Down Expand Up @@ -1655,8 +1649,7 @@ var y *uint32 = (*uint32)(nil)

var a = (*struct {
})(nil)
var b = interface {
}(nil)
var b = interface{}(nil)
var c = (func())(nil)
var x uint32 = uint32(0)
var y *uint32 = (*uint32)(nil)
Expand Down Expand Up @@ -1936,8 +1929,7 @@ z := []
func main() {
x := []float64{1, 3.4, 5}
y := []int{1}
z := []interface {
}{}
z := []interface{}{}
}
`)
gopClTest(t, `
Expand Down Expand Up @@ -3039,8 +3031,7 @@ func main() {

import "fmt"

func foo(format string, args ...interface {
}) (int, error) {
func foo(format string, args ...interface{}) (int, error) {
return fmt.Printf(format, args...)
}
func main() {
Expand All @@ -3058,8 +3049,7 @@ func main() {
}
`, `package main

func foo(format string, args ...interface {
}) (int, error) {
func foo(format string, args ...interface{}) (int, error) {
return 0, nil
}
func main() {
Expand Down Expand Up @@ -3092,8 +3082,7 @@ func TestFunc(t *testing.T) {
func main() {
}`, `package main

func foo(format string, a [10]int, args ...interface {
}) {
func foo(format string, a [10]int, args ...interface{}) {
}
func main() {
}
Expand Down Expand Up @@ -3387,8 +3376,7 @@ bar(fmt.Printf)

import "fmt"

func bar(foo func(string, ...interface {
}) (int, error)) {
func bar(foo func(string, ...interface{}) (int, error)) {
foo("Hello, %v!\n", "Go+")
}
func main() {
Expand Down Expand Up @@ -3429,13 +3417,11 @@ import (
func foo(x string) string {
return strings.NewReplacer("?", "!").Replace(x)
}
func printf(format string, args ...interface {
}) (n int, err error) {
func printf(format string, args ...interface{}) (n int, err error) {
n, err = fmt.Printf(format, args...)
return
}
func bar(foo func(string, ...interface {
}) (int, error)) {
func bar(foo func(string, ...interface{}) (int, error)) {
foo("Hello, %v!\n", "Go+")
}
func main() {
Expand Down Expand Up @@ -3471,8 +3457,7 @@ func main() {

import "fmt"

func foo(args ...interface {
}) {
func foo(args ...interface{}) {
fmt.Println(args...)
}
func main() {
Expand All @@ -3497,8 +3482,7 @@ import "fmt"
func main() {
foo("Hello", 123)
}
func foo(args ...interface {
}) {
func foo(args ...interface{}) {
fmt.Println(args...)
}
`)
Expand Down Expand Up @@ -3959,10 +3943,8 @@ println {}
import "fmt"

func main() {
fmt.Println([]interface {
}{})
fmt.Println(map[string]interface {
}{})
fmt.Println([]interface{}{})
fmt.Println(map[string]interface{}{})
}
`)
}
Expand Down Expand Up @@ -4024,8 +4006,7 @@ println(a)

import "fmt"

var a interface {
} = 100
var a interface{} = 100

func main() {
fmt.Println(a)
Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ go 1.18
require (
github.com/fsnotify/fsnotify v1.7.0
github.com/goplus/c2go v0.7.24-0.20240221044754-e542e30f9dbc
github.com/goplus/gox v1.14.13-0.20240221143457-e20cebf7f229
github.com/goplus/gox v1.14.13-0.20240305210108-429f12385afa
github.com/goplus/mod v0.13.8
github.com/qiniu/x v1.13.9
golang.org/x/tools v0.18.0
golang.org/x/tools v0.19.0
)

require (
github.com/json-iterator/go v1.1.12 // indirect
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
golang.org/x/mod v0.15.0 // indirect
golang.org/x/sys v0.17.0 // indirect
golang.org/x/mod v0.16.0 // indirect
golang.org/x/sys v0.18.0 // indirect
)

retract v1.1.12
15 changes: 8 additions & 7 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyT
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/goplus/c2go v0.7.24-0.20240221044754-e542e30f9dbc h1:HGH6KoedGQ+DikZ1n9cDkCpMjODHftxbPqEhb7zDz4I=
github.com/goplus/c2go v0.7.24-0.20240221044754-e542e30f9dbc/go.mod h1:m+2bOIErSOA4sxyrg0deb7RS6cnC3czzo7AaL9IZ+YE=
github.com/goplus/gox v1.14.13-0.20240221143457-e20cebf7f229 h1:zKgGmIvM7dvMEMF4Q5K51vo3aPqRf5GjPzlYMZhp7bk=
github.com/goplus/gox v1.14.13-0.20240221143457-e20cebf7f229/go.mod h1:6b6XYHmyiCevhwuEHcV/jzm7Z2FXLDBhuxgvkjceA+o=
github.com/goplus/gox v1.14.13-0.20240305210108-429f12385afa h1:YPCZaGJVDDY5nKErDQZcSekvKFC0104/mJPkEHvjkFA=
github.com/goplus/gox v1.14.13-0.20240305210108-429f12385afa/go.mod h1:Q1x9L9gugS3964fLAsgJWGBw+/5tZFrGgD7Klk8zdJc=
github.com/goplus/mod v0.13.8 h1:5PbALN7GjvpQidAx2qiE3x/Bgf+ZHPrVZ3C63dfjGrA=
github.com/goplus/mod v0.13.8/go.mod h1:7/8zsNzGWyB4Qojg+D7SxSgMzpcsDbZsbKo2SHy4Lwk=
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
Expand All @@ -30,8 +30,9 @@ golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliY
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8=
golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic=
golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
Expand All @@ -51,8 +52,8 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y=
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
Expand All @@ -69,6 +70,6 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ=
golang.org/x/tools v0.18.0/go.mod h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg=
golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw=
golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=