github.com/go-asm/go@v1.21.1-0.20240213172139-40c5ead50c48/abi/testdata/x.go (about)

     1  // Copyright 2021 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  package x
     6  
     7  import "github.com/go-asm/go/abi"
     8  
     9  func Fn0() // defined in assembly
    10  
    11  func Fn1() {}
    12  
    13  var FnExpr func()
    14  
    15  func test() {
    16  	_ = abi.FuncPCABI0(Fn0)           // line 16, no error
    17  	_ = abi.FuncPCABIInternal(Fn0)    // line 17, error
    18  	_ = abi.FuncPCABI0(Fn1)           // line 18, error
    19  	_ = abi.FuncPCABIInternal(Fn1)    // line 19, no error
    20  	_ = abi.FuncPCABI0(FnExpr)        // line 20, error
    21  	_ = abi.FuncPCABIInternal(FnExpr) // line 21, no error
    22  }