]> Cypherpunks repositories - gostls13.git/commit
govet: check canonical dynamic method signatures
authorRuss Cox <rsc@golang.org>
Wed, 19 Oct 2011 20:06:16 +0000 (16:06 -0400)
committerRuss Cox <rsc@golang.org>
Wed, 19 Oct 2011 20:06:16 +0000 (16:06 -0400)
commitb0ec32db117a750d6259a601b37d5bd89ff44a2b
treec15f43d01e2d95ae26f0a4c9152dff5485a17a2c
parentb4d6b71e169f48009948174cfc2478892ccb757d
govet: check canonical dynamic method signatures

Adds check that, for example, a Scan method taking
a first argument of type fmt.ScanState has the correct
signature to satisfy fmt.Scanner.

Similarly, a ReadByte should return byte, os.Error.

These are important to check because various pieces
of code (fmt, gob, json, flate) do dynamic checks
for these methods, so code with incorrect signatures
would not be flagged at compile time.

These become even more important to check when
rune is introduced.

R=r
CC=golang-dev
https://golang.org/cl/5305044
src/cmd/govet/govet.go