Source file src/cmd/vet/testdata/nilfunc/nilfunc.go

     1  // Copyright 2013 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 nilfunc
     6  
     7  func F() {}
     8  
     9  func Comparison() {
    10  	if F == nil { // ERROR "comparison of function F == nil is always false"
    11  		panic("can't happen")
    12  	}
    13  }
    14  

View as plain text