mirror of
https://github.com/golang/go
synced 2024-11-18 02:04:45 -07:00
3f2cb493e5
Reuse the same mechanisms for handling universal builtins like len to handle unsafe.Sizeof, etc. Allows us to drop package unsafe's export data, and simplifies some code. Updates #17508. Change-Id: I620e0617c24e57e8a2d7cccd0e2de34608779656 Reviewed-on: https://go-review.googlesource.com/31433 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
11 lines
287 B
Go
11 lines
287 B
Go
// errorcheck
|
|
|
|
// Copyright 2011 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 1951
|
|
package foo
|
|
import "unsafe"
|
|
var v = unsafe.Sizeof // ERROR "not in function call|must be called"
|