Initial commit: Go 1.23 release state
This commit is contained in:
24
test/fixedbugs/issue67190.go
Normal file
24
test/fixedbugs/issue67190.go
Normal file
@@ -0,0 +1,24 @@
|
||||
// run
|
||||
|
||||
// Copyright 2024 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package main
|
||||
|
||||
func main() {
|
||||
ch1 := make(chan struct{})
|
||||
var ch2 <-chan struct{} = ch1
|
||||
|
||||
switch ch1 {
|
||||
case ch2:
|
||||
default:
|
||||
panic("bad narrow case")
|
||||
}
|
||||
|
||||
switch ch2 {
|
||||
case ch1:
|
||||
default:
|
||||
panic("bad narrow switch")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user