Files
moxa/_test/time15.go
Marc Vertes b25ee3f809 interp: fix method lookup on aliased types
In aliased type declarations, when the target type was imported from
an external package rather than declared locally, the aliased type was
overwritten by target, loosing ability to lookup methods on the aliased
type. Aliasing on imported types is now properly detected and handled.

Fixes #971.
2020-11-30 15:44:04 +01:00

16 lines
182 B
Go

package main
import "time"
type TimeValue time.Time
func (v *TimeValue) decode() { println("in decode") }
func main() {
var tv TimeValue
tv.decode()
}
// Output:
// in decode