Giant blob of minor changes
[dotfiles/.git] / .config / coc / extensions / coc-go-data / tools / pkg / mod / golang.org / x / tools@v0.0.0-20201028153306-37f0764111ff / go / pointer / testdata / issue9002.go
diff --git a/.config/coc/extensions/coc-go-data/tools/pkg/mod/golang.org/x/tools@v0.0.0-20201028153306-37f0764111ff/go/pointer/testdata/issue9002.go b/.config/coc/extensions/coc-go-data/tools/pkg/mod/golang.org/x/tools@v0.0.0-20201028153306-37f0764111ff/go/pointer/testdata/issue9002.go
new file mode 100644 (file)
index 0000000..b7c2c61
--- /dev/null
@@ -0,0 +1,17 @@
+package main
+
+func main() {
+       // Regression test for golang issue 9002.
+       //
+       // The two-result "value,ok" receive operation generated a
+       // too-wide constraint loading (value int, ok bool), not bool,
+       // from the channel.
+       //
+       // This bug manifested itself in an out-of-bounds array access
+       // when the makechan object was the highest-numbered node, as in
+       // this program.
+       //
+       // In more realistic programs it silently resulted in bogus
+       // constraints.
+       _, _ = <-make(chan int)
+}