| --- |
| title: WrongTypeArgCount |
| layout: article |
| --- |
| <!-- Copyright 2023 The Go Authors. All rights reserved. |
| Use of this source code is governed by a BSD-style |
| license that can be found in the LICENSE file. --> |
| |
| <!-- Code generated by generrordocs.go; DO NOT EDIT. --> |
| |
| ``` |
| WrongTypeArgCount occurs when a type or function is instantiated with an |
| incorrect number of type arguments, including when a generic type or |
| function is used without instantiation. |
| |
| Errors involving failed type inference are assigned other error codes. |
| |
| Example: |
| type T[p any] int |
| |
| var _ T[int, string] |
| |
| Example: |
| func f[T any]() {} |
| |
| var x = f |
| ``` |
| |