github.com/nspcc-dev/neo-go@v0.105.2-0.20240517133400-6be757af3eba/pkg/compiler/testdata/globalvar/nested1/main.go (about) 1 package nested1 2 3 import ( 4 "github.com/nspcc-dev/neo-go/pkg/compiler/testdata/globalvar/nested2" 5 alias "github.com/nspcc-dev/neo-go/pkg/compiler/testdata/globalvar/nested3" 6 ) 7 8 // Unused shouldn't produce any code if unused. 9 var Unused = 11 10 11 // A should produce call to f and should not be DROPped if C is used. It uses 12 // aliased package var as an argument to check analizator. 13 var A = f(alias.Argument) 14 15 // B should produce call to f and be DROPped if unused. It uses foreign package var as an argument 16 // to check analizator. 17 var B = f(nested2.Argument) 18 19 // C shouldn't produce any code if unused. It uses 20 var C = A + nested2.A + nested2.Unique 21 22 func f(i int) int { 23 return i 24 } 25 26 // F is used for nested calls check. 27 func F(i int) int { 28 return i 29 }