]> Cypherpunks repositories - gostls13.git/commitdiff
test: add test cases for local not-in-heap types
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Thu, 11 Jul 2024 06:32:27 +0000 (13:32 +0700)
committerGopher Robot <gobot@golang.org>
Wed, 24 Jul 2024 00:11:49 +0000 (00:11 +0000)
Follow up review in CL 597535.

Updates #54846

Change-Id: Idf586552a22bbc6710c0888f046df0a5d1f0ce4a
Reviewed-on: https://go-review.googlesource.com/c/go/+/597537
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>

test/fixedbugs/notinheap.go

index bb13456211104d97985b7a1efe4102c9b7922c78..c94f2d6b1094309b8e5c277ab787ba60c601d1b1 100644 (file)
@@ -29,3 +29,9 @@ type okay3 func(x nih) nih
 type okay4 interface {
        f(x nih) nih
 }
+
+func f() {
+       type embed7 map[nih]int // ERROR "incomplete \(or unallocatable\) map key not allowed"
+       type embed8 map[int]nih // ERROR "incomplete \(or unallocatable\) map value not allowed"
+       type emebd9 chan nih    // ERROR "chan of incomplete \(or unallocatable\) type not allowed"
+}