2013-08-22 10:27:55 -06:00
|
|
|
// +build ignore
|
|
|
|
|
|
|
|
package main
|
|
|
|
|
2013-10-01 07:46:33 -06:00
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"os"
|
|
|
|
)
|
2013-08-22 10:27:55 -06:00
|
|
|
|
|
|
|
type S int
|
|
|
|
|
|
|
|
var theS S
|
|
|
|
|
|
|
|
func (s *S) String() string {
|
|
|
|
print(s) // @pointsto main.theS
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func main() {
|
2013-10-31 08:24:00 -06:00
|
|
|
// os.Args is considered instrincally allocated,
|
|
|
|
// but may also be set explicitly (e.g. on Windows), hence '...'.
|
|
|
|
print(os.Args) // @pointsto <command-line args> | ...
|
2013-08-22 10:27:55 -06:00
|
|
|
fmt.Println("Hello, World!", &theS)
|
|
|
|
}
|
|
|
|
|
|
|
|
// @calls main.main -> fmt.Println
|
|
|
|
// @calls (*fmt.pp).handleMethods -> (*main.S).String
|