2012-02-16 21:49:59 -07:00
|
|
|
// errorcheck
|
2011-02-28 15:16:44 -07:00
|
|
|
|
2016-04-10 15:32:26 -06:00
|
|
|
// Copyright 2011 The Go Authors. All rights reserved.
|
2011-02-28 15:16:44 -07:00
|
|
|
// 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() {
|
|
|
|
var x unsafe.Pointer
|
2020-12-09 21:14:07 -07:00
|
|
|
println(*x) // ERROR "invalid indirect.*unsafe.Pointer|cannot indirect"
|
2011-03-27 13:10:50 -06:00
|
|
|
var _ = (unsafe.Pointer)(nil).foo // ERROR "foo"
|
2011-02-28 15:16:44 -07:00
|
|
|
}
|