/
githubmirror
/
go
Обзор
Документация
Войти
/
githubmirror
/
go
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/fixedbugs/issue7310.go
15 строк
652 B
Robert Griesemer
go/types, types2: better error messages for copy built-in
11 мар 2025, 07:30
11 мар 2025, 07:30
2d097e3
Код
Авторство
О чём код?
// errorcheck // Copyright 2014 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. // Internal compiler crash used to stop errors during second copy. package main func main() { _ = copy(nil, []int{}) // ERROR "use of untyped nil|left argument must be a slice|argument must be a slice; have untyped nil" _ = copy([]int{}, nil) // ERROR "use of untyped nil|second argument must be slice or string|argument must be a slice; have untyped nil" _ = 1 + true // ERROR "mismatched types untyped int and untyped bool|incompatible types|cannot convert" }