From: Cuong Manh Le Date: Thu, 11 Jul 2024 06:32:27 +0000 (+0700) Subject: test: add test cases for local not-in-heap types X-Git-Tag: go1.24rc1~1414 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=72cc7699f856f4ff64420c91a54cb9eac2542384;p=gostls13.git test: add test cases for local not-in-heap types 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 Reviewed-by: Keith Randall LUCI-TryBot-Result: Go LUCI Auto-Submit: Cuong Manh Le --- diff --git a/test/fixedbugs/notinheap.go b/test/fixedbugs/notinheap.go index bb13456211..c94f2d6b10 100644 --- a/test/fixedbugs/notinheap.go +++ b/test/fixedbugs/notinheap.go @@ -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" +}