blob: c19b248b51c64ebdf2da56c4d9dad78a43f2fa6f [file] [log] [blame]
// 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")
}
}