# M0014 does not implement interface (/docs/diagnostics/codes/m0014)

<Diagnostic code="M0014" />

## The mistake and the fix [#the-mistake-and-the-fix]

<div className="code-pair">

```go title="The mistake"
type Shape interface{ Area() float64 }
type Square struct{ s float64 }
func (q *Square) Area() float64 { return q.s * q.s }

var s Shape = Square{2}
```

```go title="Fixed"
var s Shape = &Square{2} // *Square has Area // [!code highlight]
```

</div>

## The fix [#the-fix]

Add the missing method, fix its signature, or pass a pointer when the method has a pointer receiver.

See also [all error codes](/docs/diagnostics/codes) and [marmot explain](/docs/commands/explain).