2 ms·
eventually, within the context of the `go vet` tool, the http://godoc.org/code.google.com/p/go.tools/go/types http://godoc.org/code.google.com/p/go.tools/go/typ
by f2f 13y ago
eventually, within the context of the `go vet` tool, the http://godoc.org/code.google.com/p/go.tools/go/types http://godoc.org/code.google.com/p/go.tools/go/types package may be used to analyze interface conversions ("I said I expected interface type A, but I'm using it as interface type B", which is unusual for go programs). i think that answers "yes" to your second question, but I'm not on the go team, so take my opinion with a grain of salt.
short of disallowing interface-to-interface casts, it is indicative of an error and should be vetted as such. the particular case I described earlier was covered by the Go 1.0 guarantee, so it had to be documented rather than fixed.
- pcwalton 13y agoHmm. Seems hard to do soundly in the presence of higher order control flow (e.g. pass the interface to a closure in a global variable—will the closure downcast it to another interface you didn't expect?)