Repository: goplus/gop
Pull request #2021 (2024-11-22 15:09:42)

mini spec: Predeclared identifiers


Patch:
diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml
index 1647fd4c..ab059676 100644
--- a/.github/workflows/go.yml
+++ b/.github/workflows/go.yml
@@ -48,7 +48,7 @@ jobs:
       run: go test -v -coverprofile="coverage.txt" -covermode=atomic ./...
 
     - name: Codecov
-      uses: codecov/codecov-action@v5
+      uses: codecov/codecov-action@v4
       with:
         token: ${{ secrets.CODECOV_TOKEN }}
         slug: goplus/gop
diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml
index a90318a7..6f10496b 100644
--- a/.github/workflows/release-build.yml
+++ b/.github/workflows/release-build.yml
@@ -19,7 +19,7 @@ jobs:
         python .github/workflows/check_goreleaser_config.py
 
     - name: Install Snapcraft
-      uses: samuelmeuli/action-snapcraft@v3
+      uses: samuelmeuli/action-snapcraft@v2
 
     - name: Checkout tag
       run: |
diff --git a/doc/spec-mini.md b/doc/spec-mini.md
index c09b2edf..d215cccf 100644
--- a/doc/spec-mini.md
+++ b/doc/spec-mini.md
@@ -1773,8 +1773,61 @@ The _blank identifier_ is represented by the underscore character `_`. It serves
 
 ### Predeclared identifiers
 
+The following identifiers are implicitly declared in the [universe block]():
+
+```go
+Types:
+	any bigint bigrat bool byte comparable
+	complex64 complex128 error float32 float64
+	int int8 int16 int32 int64 rune string
+	uint uint8 uint16 uint32 uint64 uintptr
+
+Constants:
+	true false iota
+
+Zero value:
+	nil
+
+Functions:
+	append cap clear close complex copy delete echo imag len
+	make max min new panic print printf println real recover // TODO(xsw): more
+```
+
+### Exported identifiers
+
+TODO
+
+### Uniqueness of identifiers
+
+TODO
+
+### Constant declarations
+
+TODO
+
+### Iota
+
+TODO
+
+### Type declarations
+
+TODO
+
+#### Alias declarations
+
+TODO
+
+#### Type definitions
+
+TODO
+
+### Variable declarations
+
 TODO
 
+### Short variable declarations
+
+TODO
 
 ### Function declarations
 
diff --git a/go.mod b/go.mod
index 4a815a6b..3a5d2782 100644
--- a/go.mod
+++ b/go.mod
@@ -4,7 +4,7 @@ go 1.18
 
 require (
 	github.com/fsnotify/fsnotify v1.8.0
-	github.com/goplus/gogen v1.16.3-0.20241112142719-46167891a7ee
+	github.com/goplus/gogen v1.16.2-0.20241108030022-38cdc04c7425
 	github.com/goplus/llgo v0.9.7
 	github.com/goplus/mod v0.13.12
 	github.com/qiniu/x v1.13.10
diff --git a/go.sum b/go.sum
index 41a6e1a4..f5a4f1c3 100644
--- a/go.sum
+++ b/go.sum
@@ -1,7 +1,7 @@
 github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M=
 github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
-github.com/goplus/gogen v1.16.3-0.20241112142719-46167891a7ee h1:lwV/kdyMI18qF70vd+ur2/rAdmoA+Zy+c/btdDiiYt8=
-github.com/goplus/gogen v1.16.3-0.20241112142719-46167891a7ee/go.mod h1:6TQYbabXDF9LCdDkOOzHmfg1R4ENfXQ3XpHa9RhTSD8=
+github.com/goplus/gogen v1.16.2-0.20241108030022-38cdc04c7425 h1:sbzi0nY672ZJJCaNVez31tryu0otBL/5WfZ6UQ61M4I=
+github.com/goplus/gogen v1.16.2-0.20241108030022-38cdc04c7425/go.mod h1:6TQYbabXDF9LCdDkOOzHmfg1R4ENfXQ3XpHa9RhTSD8=
 github.com/goplus/llgo v0.9.7 h1:LRF2Fq9ts4QrVxOPZufexalbIoJ1oiBERjCWQ45wxbg=
 github.com/goplus/llgo v0.9.7/go.mod h1:5Fs+08NslqofJ7xtOiIXugkurYOoQvY02ZkFNWA1uEI=
 github.com/goplus/mod v0.13.12 h1:Trwk6j3i9VvBuW6/9ZxmkoFlEL2v3HKQu0Na1c6DAdw=


Test patch:
diff --git a/cl/compile_gop_test.go b/cl/compile_gop_test.go
index 04742bf2..be836b38 100644
--- a/cl/compile_gop_test.go
+++ b/cl/compile_gop_test.go
@@ -1597,36 +1597,3 @@ func main() {
 }
 `)
 }
-
-func TestEmbedField(t *testing.T) {
-	gopClTest(t, `package main
-
-type Info struct {
-	id int
-}
-type T struct {
-	Info
-	id string
-}
-func demo(t *T) {
-	t.id = "0"
-}
-func main() {
-}
-`, `package main
-
-type Info struct {
-	id int
-}
-type T struct {
-	Info
-	id string
-}
-
-func demo(t *T) {
-	t.id = "0"
-}
-func main() {
-}
-`)
-}