mirror of
https://github.com/golang/go
synced 2024-11-24 02:10:11 -07:00
40254ec0db
It's not a predeclared type, but a type defined in "unsafe" package. Fixes #44830 Change-Id: If39815b1070059b608be8231dfac9b7f3307cb15 Reviewed-on: https://go-review.googlesource.com/c/go/+/313349 Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
20 lines
372 B
Go
20 lines
372 B
Go
// run
|
|
|
|
// Copyright 2021 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 (
|
|
"reflect"
|
|
"unsafe"
|
|
)
|
|
|
|
func main() {
|
|
t := reflect.TypeOf(unsafe.Pointer(nil))
|
|
if pkgPath := t.PkgPath(); pkgPath != "unsafe" {
|
|
panic("unexpected t.PkgPath(): " + pkgPath)
|
|
}
|
|
}
|