github.com/flyinox/gosm@v0.0.0-20171117061539-16768cb62077/misc/cgo/errors/issue18452.go (about)

     1  // Copyright 2017 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 18452: show pos info in undefined name errors
     6  
     7  package p
     8  
     9  import (
    10  	"C"
    11  	"fmt"
    12  )
    13  
    14  func a() {
    15  	fmt.Println("Hello, world!")
    16  	C.function_that_does_not_exist() // line 16
    17  	C.pi                             // line 17
    18  }