mirror of
https://github.com/traefik/yaegi.git
synced 2026-06-01 18:37:56 +00:00
This supports type spec assign types which disallows the attachment of methods onto the alias type as per the Go spec. Fixes #1154
13 lines
148 B
Go
13 lines
148 B
Go
package main
|
|
|
|
var Foo *int
|
|
|
|
func (f Foo) Bar() int {
|
|
return 1
|
|
}
|
|
|
|
func main() {}
|
|
|
|
// Error:
|
|
// 5:1: cannot define new methods on non-local type int
|