[dev.typeparams] import stmt changes from dev.go2go
Import logic for typechecking statements involving generics from the
dev.go2go branch. Notably, range type checking was simplified in
dev.go2go, resulting in the removal of the _InvalidChanRange error code.
Change-Id: I84c2665226c2b9b74e85f7fb6df257b0a292e5d3
Reviewed-on: https://go-review.googlesource.com/c/go/+/282120
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
Trust: Robert Griesemer <gri@golang.org>
Trust: Robert Findley <rfindley@google.com>