Files
moxa/_test/method10.go
Marc Vertes 63732d4326 fix: set type correctly for variable declaration with assignment (#59)
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).
2019-01-28 16:00:15 +01:00

14 lines
125 B
Go

package main
type T int
func (t T) foo() { println("foo", t) }
func main() {
var t T = 2
t.foo()
}
// Output:
// foo 2