# M0026 type argument does not satisfy constraint (/docs/diagnostics/codes/m0026)

<Diagnostic code="M0026" />

For a ~T term, the underlying type of the argument must be T.

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

<div className="code-pair">

```go title="The mistake"
type Number interface{ ~int | ~float64 }
func Sum[T Number](xs []T) T

Sum([]float32{1})
```

```go title="Fixed"
type Number interface{ ~int | ~float32 | ~float64 } // [!code highlight]
func Sum[T Number](xs []T) T

Sum([]float32{1})
```

</div>

## The fix [#the-fix]

Use a type in the set, or widen the constraint.

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