# M0027 cannot infer type argument (/docs/diagnostics/codes/m0027)

<Diagnostic code="M0027" />

Give the type argument explicitly.

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

<div className="code-pair">

```go title="The mistake"
func Zero[T any]() T

x := Zero()
```

```go title="Fixed"
x := Zero[int]() // [!code highlight]
```

</div>

## The fix [#the-fix]

Write the type arguments in brackets after the function name.

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