| type S[T any] struct{ t T } |
| func (s *S[T]) String() string { |
| print(s) // @pointsto command-line-arguments.theSbool | command-line-arguments.theSint |
| print(x) // @types *int | *bool |
| m := make(map[string]chan *T) |
| print(x) // @pointstoquery <-(*x[i].a)[key] command-line-arguments.a | command-line-arguments.b |
| // os.Args is considered intrinsically allocated, |
| // but may also be set explicitly (e.g. on Windows), hence '...'. |
| print(os.Args) // @pointsto <command-line args> | ... |
| fmt.Println("Hello!", &theSint) |
| fmt.Println("World!", &theSbool) |
| f := Type[bool] // call through a variable |
| _ = Type[string] // not called so will not appear in Type's print. |
| // @calls (*fmt.pp).handleMethods -> (*command-line-arguments.S[int]).String[int] |
| // @calls (*fmt.pp).handleMethods -> (*command-line-arguments.S[bool]).String[bool] |
| // @calls command-line-arguments.Caller[int] -> (*command-line-arguments.S[int]).String[int] |
| // @calls command-line-arguments.Caller[bool] -> (*command-line-arguments.S[bool]).String[bool] |