﻿# V8024\. Redundant type assertion\. The type of a variable already embeds the type that is checked using type assertion\.

The analyzer has detected a redundant type check\. 

The example:

```cpp
func foo(rwc io.ReadWriteCloser) io.Reader {
  ....
  return rwc.(io.Reader)
}
```

Checking the `rwc.io.Reader` type makes no sense, since the [`io.ReadWriteCloser`](https://pkg.go.dev/io#ReadWriteCloser) type of the `rwc` parameter, embeds the [`io.Reader`](https://pkg.go.dev/io#Reader) interface\.

The fixed code:

```cpp
func foo(rwc io.ReadWriteCloser) io.Reader {
  ....
  return rwc
}
```

Checking whether an expression has the empty interface type \(`interface{}` or `any`\) also makes no sense, since every type embeds such an interface\. The example:

```cpp
func foo(rwc io.ReadWriteCloser) interface {} {
  ....
  return rwc.(interface{})
}
```

The fixed code:

```cpp
func f(rwc io.ReadWriteCloser) interface {} {
  ....
  return rwc
}
```