github.com/riscv/riscv-go@v0.0.0-20200123204226-124ebd6fcc8e/misc/cgo/errors/issue16591.go (about) 1 // Copyright 2016 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // Issue 16591: Test that we detect an invalid call that was being 6 // hidden by a type conversion inserted by cgo checking. 7 8 package p 9 10 // void f(int** p) { } 11 import "C" 12 13 type x *C.int 14 15 func F(p *x) { 16 C.f(p) // ERROR HERE 17 }