/
githubmirror
/
go
Обзор
Документация
Войти
/
githubmirror
/
go
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/fixedbugs/issue67190.go
24 строки
391 B
Cuong Manh Le
cmd/compile: fix mis-compilation when switching over channels
03 июл 2024, 21:07
03 июл 2024, 21:07
5f50b1e
Код
Авторство
О чём код?
// 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") } }