modernc.org/gc@v1.0.1-0.20240304020402-f0dba7c97c2b/testdata/errchk/test/fixedbugs/issue13777.dir/burnin.go (about)

     1  package burnin
     2  
     3  type sendCmdFunc func(string)
     4  
     5  func sendCommand(c string) {}
     6  
     7  func NewSomething() {
     8  	// This works...
     9  	// var sendCmd sendCmdFunc
    10  	// sendCmd = sendCommand
    11  
    12  	// So does this...
    13  	//sendCmd := sendCmdFunc(sendCommand)
    14  
    15  	// This fails...
    16  	sendCmd := sendCommand
    17  
    18  	_ = sendCmd
    19  }