/
githubmirror
/
go
Обзор
Документация
Войти
/
githubmirror
/
go
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/syntax/chan1.go
17 строк
384 B
Ian Lance Taylor
test: match gofrontend error messages
28 ноя 2020, 05:31
28 ноя 2020, 05:31
b94346e
Код
Авторство
О чём код?
// errorcheck // Copyright 2010 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 var c chan int var v int func main() { if c <- v { // ERROR "cannot use c <- v as value|send statement used as value" } } var _ = c <- v // ERROR "unexpected <-|send statement used as value"