Do not ignore type node when used in a variable declaration with assign. The source node in a assign node can be the 2nd or the 3rd (the 2nd being the type).
13 lines
134 B
Go
13 lines
134 B
Go
package main
|
|
|
|
import "fmt"
|
|
|
|
func main() {
|
|
var a int64 = 64
|
|
fmt.Printf("a: %v %T", a, a)
|
|
fmt.Println()
|
|
}
|
|
|
|
// Output:
|
|
// a: 64 int64
|