Skip to content

Commit

Permalink
test: add test cases for local not-in-heap types
Browse files Browse the repository at this point in the history
Follow up review in CL 597535.

Updates golang#54846

Change-Id: Idf586552a22bbc6710c0888f046df0a5d1f0ce4a
Reviewed-on: https://go-review.googlesource.com/c/go/+/597537
Reviewed-by: Cherry Mui <[email protected]>
Reviewed-by: Keith Randall <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Auto-Submit: Cuong Manh Le <[email protected]>
  • Loading branch information
cuonglm authored and gopherbot committed Jul 24, 2024
1 parent b73875f commit 72cc769
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/fixedbugs/notinheap.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

0 comments on commit 72cc769

Please sign in to comment.