/
githubmirror
/
go
Обзор
Документация
Войти
/
githubmirror
/
go
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/fixedbugs/issue33062.go
33 строки
568 B
Cherry Zhang
test: add a test for gccgo bug #33062.
12 июл 2019, 01:30
12 июл 2019, 01:30
e0739d1
Код
Авторство
О чём код?
// run // Copyright 2019 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. // Issue 33062: gccgo generates incorrect type equality // functions. package main type simpleStruct struct { int string } type complexStruct struct { int simpleStruct } func main() { x := complexStruct{1, simpleStruct{2, "xxx"}} ix := interface{}(x) y := complexStruct{1, simpleStruct{2, "yyy"}} iy := interface{}(y) if ix != ix { panic("FAIL") } if ix == iy { panic("FAIL") } }