Closed spolischook closed 3 years ago
This has the same root cause as #225
i.e. new named types created by the interpreter are emulated,
and their methods - in this case Direction.toString()
- are visible only by interpreted code.
It's also equally unfixable, at least until Go standard library provides a mechanism to create new named types at runtime and attach methods to them.
A partial workaround is to replace fmt.Print(East)
with fmt.Println(East.String())
[UPDATE] I have added this limitation to the relevant section in the main README.md.
Thanks for explanation
There is an example of code snippet that have different result of
go run
and gophernotes:gophernotes
example:go run
example: