Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/vet: Update canonical method check for new xml.Marshaler/Unmarshaler interfaces #6540

Closed
dominikh opened this issue Oct 7, 2013 · 2 comments

Comments

@dominikh
Copy link
Member

@dominikh dominikh commented Oct 7, 2013

Before filing a bug, please check whether it has been fixed since the
latest release. Search the issue tracker and check that you're running the
latest version of Go:

Run "go version" and compare against
http://golang.org/doc/devel/release.html  If a newer version of Go exists,
install it and retry what you did to reproduce the problem.

Thanks.

What steps will reproduce the problem?
If possible, include a link to a program on play.golang.org.
1. Download http://play.golang.org/p/5AGYi95HzX
2. Run go vet on it
3.

What is the expected output?
foo.go:14: method UnmarshalXML(wrong int) should have signature
UnmarshalXML(*xml.Decoder, xml.StartElement) error

What do you see instead?
foo.go:10: method MarshalXML(e *xml.Encoder, start xml.StartElement) error should have
signature MarshalXML() ([]byte, error)

Which compiler are you using (5g, 6g, 8g, gccgo)?


Which operating system are you using?


Which version are you using?  (run 'go version')


Please provide any additional information below.
The MarshalXML signature it checks is that of the interface that was removed before Go
1.0, UnmarshalXML isn't checked at all.
@dominikh

This comment has been minimized.

Copy link
Member Author

@dominikh dominikh commented Oct 7, 2013

@robpike

This comment has been minimized.

Copy link
Contributor

@robpike robpike commented Oct 7, 2013

Comment 2:

Status changed to Fixed.

@dominikh dominikh added fixed labels Oct 7, 2013
@golang golang locked and limited conversation to collaborators Jun 25, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.