/
githubmirror
/
go
Обзор
Документация
Войти
/
githubmirror
/
go
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/fixedbugs/issue24937.go
15 строк
305 B
Josh Bleecher Snyder
cmd/compile: avoid runtime call during switch string(byteslice)
21 апр 2018, 03:50
21 апр 2018, 03:50
566e3e0
Код
Авторство
О чём код?
// run // Copyright 2018 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() { x := []byte{'a'} switch string(x) { case func() string { x[0] = 'b'; return "b" }(): panic("FAIL") } }