diff --git a/doc/go1.15.html b/doc/go1.15.html index 727175539d..43fc14f168 100644 --- a/doc/go1.15.html +++ b/doc/go1.15.html @@ -157,6 +157,32 @@ TODO the language.

+

New warning for impossible interface conversions

+ +

+ The vet tool now warns about type assertions from one interface type + to another interface type when the type assertion will always fail. + This will happen if both interface types implement a method with the + same name but with a different type signature. +

+ +

+ There is no reason to write a type assertion that always fails, so + any code that triggers this vet check should be rewritten. +

+ +

+ This new vet check is enabled by default when using go test. +

+ +

+ We are considering prohibiting impossible interface type assertions + in a future release of Go. + Such a language change would not be backward compatible. + We are using this vet check as a first trial step toward changing + the language. +

+

Runtime