github.com/nspcc-dev/neo-go@v0.105.2-0.20240517133400-6be757af3eba/pkg/compiler/testdata/globalvar/main.go (about)

     1  package globalvar
     2  
     3  // Unused shouldn't produce any initialization code if it's not used anywhere.
     4  var Unused = 3
     5  
     6  // Default is initialized by default value.
     7  var Default int
     8  
     9  // A initialized by function call, thus the initialization code should always be emitted.
    10  var A = f()
    11  
    12  func f() int {
    13  	return 5
    14  }