/
githubmirror
/
go
Обзор
Документация
Войти
/
githubmirror
/
go
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/fixedbugs/issue17645.go
16 строк
475 B
Robert Griesemer
cmd/compile: use "cannot use %s as %s value in %s: %s" error message
29 сен 2022, 01:28
29 сен 2022, 01:28
7997e5f
Код
Авторство
О чём код?
// errorcheck // Copyright 2016 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 type Foo struct { X int } func main() { var s []int var _ string = append(s, Foo{""}) // ERROR "cannot use append\(s, Foo{…}\) .* as string value in variable declaration" "cannot use Foo{…} .* as int value in argument to append" "cannot use .* as int value in struct literal" }