Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/compile: improve compiler error message when accessing type instead of instance of type #6814
http://play.golang.org/p/54n3Rs7JHT If you have a function that has f which is a Foo, and try to reference Foo.Bar instead of f.Bar, you get the following error message: prog.go:10: Foo.Bar undefined (type Foo has no method Bar) [process exited with non-zero status] I can see where this is coming from, because it's valid syntax if you're trying to get a method, but I wonder if there could be a different error message when Foo has the field Bar as in this case Foo is trying to be used as a value.
Waiting on compiler changes of 1.4: https://groups.google.com/d/msg/golang-dev/daq9U6pEAE8/7OSkog_uNt0J