Skip to content

Commit

Permalink
Merge pull request #1796 from xushiwei/q
Browse files Browse the repository at this point in the history
don't define GopPackage for main package goplus/gogen#401
  • Loading branch information
xushiwei committed Mar 8, 2024
2 parents 0c3ccb1 + 4cab925 commit 27e61bc
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 32 deletions.
21 changes: 0 additions & 21 deletions cl/compile_gop_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,6 @@ println 10 * a
import "fmt"
const GopPackage = true
type foo struct {
}
Expand Down Expand Up @@ -292,8 +290,6 @@ var d = a.mul(c)
import "fmt"
const GopPackage = true
type foo struct {
}
Expand Down Expand Up @@ -331,8 +327,6 @@ println add("Hello", "World")
import "fmt"
const GopPackage = true
func add__0(a int, b int) int {
return a + b
}
Expand Down Expand Up @@ -367,7 +361,6 @@ println mul(1.2, 3.14)
import "fmt"
const GopPackage = true
const Gopo_mul = "mulInt,mulFloat"
func mulInt(a int, b int) int {
Expand Down Expand Up @@ -628,8 +621,6 @@ n.onKey ["a"], nil, key => {
n.onKey 100, 200
`, `package main
const GopPackage = true
type Mesh struct {
}
Expand Down Expand Up @@ -782,8 +773,6 @@ a += b
a += c
`, `package main
const GopPackage = true
var a Vector3
var b int
var c float64
Expand Down Expand Up @@ -850,8 +839,6 @@ i.onKey ["1","2"], key => {
import "fmt"
const GopPackage = true
func main() {
n := &N[int]{}
n.OnKey__0("1", func() {
Expand Down Expand Up @@ -894,8 +881,6 @@ n.test
n.test 100
`, `package main
const GopPackage = true
func main() {
Test__0()
Test__1(100)
Expand Down Expand Up @@ -931,8 +916,6 @@ func main() {
func TestMixedOverloadNamed(t *testing.T) {
gopMixedClTest(t, "main", `package main
const GopPackage = true
type M = map[string]any
type basetype interface {
Expand Down Expand Up @@ -961,8 +944,6 @@ c := Var(string)
d := Var(M)
`, `package main
const GopPackage = true
var a Var__0[int]
var b Var__1[map[string]interface{}]
Expand Down Expand Up @@ -1205,8 +1186,6 @@ tbl.col string, "foo"
tbl.col int, 100
`, `package main
const GopPackage = true
var tbl *Table
func main() {
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ 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.20240305210108-429f12385afa
github.com/goplus/mod v0.13.8
github.com/goplus/gox v1.14.13-0.20240308130321-6ff7f61cfae8
github.com/goplus/mod v0.13.9-0.20240305182112-59522d2cc81d
github.com/qiniu/x v1.13.9
golang.org/x/tools v0.19.0
)
Expand Down
9 changes: 4 additions & 5 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ 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.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/goplus/gox v1.14.13-0.20240308130321-6ff7f61cfae8 h1:8k8q34xFRhvbh7AETX4+pp+BSMmf1Nyt8xa3/as/qZo=
github.com/goplus/gox v1.14.13-0.20240308130321-6ff7f61cfae8/go.mod h1:Q1x9L9gugS3964fLAsgJWGBw+/5tZFrGgD7Klk8zdJc=
github.com/goplus/mod v0.13.9-0.20240305182112-59522d2cc81d h1:QwGi092U1kLvSJ38xFnv98vygtOYrpMJmX+S+leQKLc=
github.com/goplus/mod v0.13.9-0.20240305182112-59522d2cc81d/go.mod h1:MibsLSftGmxaQq78YzUzNviyFwB9RtpMaoscufvEKH4=
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc=
Expand All @@ -30,7 +30,6 @@ 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/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=
Expand Down
4 changes: 0 additions & 4 deletions x/typesutil/info_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1488,8 +1488,6 @@ d := Var(M)
`, `
package main
const GopPackage = true
type M = map[string]any
type basetype interface {
Expand Down Expand Up @@ -1550,8 +1548,6 @@ d := Gopx_Var_Cast__1[M]
`, `
package main
const GopPackage = true
type M = map[string]any
type basetype interface {
Expand Down

0 comments on commit 27e61bc

Please sign in to comment.