/
githubmirror
/
go
Обзор
Документация
Войти
/
githubmirror
/
go
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/fixedbugs/issue21221.go
18 строк
365 B
Matthew Dempsky
cmd/compile: fix constant pointer comparison failure
10 апр 2018, 02:19
10 апр 2018, 02:19
fe77a54
Код
Авторство
О чём код?
// 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 import "unsafe" func main() { if unsafe.Pointer(uintptr(0)) != unsafe.Pointer(nil) { panic("fail") } if (*int)(unsafe.Pointer(uintptr(0))) != (*int)(nil) { panic("fail") } }