Variable declared in type switch clauses should be inferred

The type of `r` below should be inferred and the `r.` should give a list of members of bytes.Buffer.

```
switch r := reader.(type) {
case bytes.Buffer:
	r.
}
```

Unfortunately, I cannot find a place to plug in a test. I will be very happy to contribute the test case. Could anyone give me some guidance on it?