diff options
| author | Yuki Nishidate <30839669+yknishidate@users.noreply.github.com> | 2024-12-29 02:22:00 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-28 17:22:00 +0000 |
| commit | c4429bc33450be32ed82358c3974da58e5ec25ab (patch) | |
| tree | be20e7a4192d8a285e4f4136980686ac4a768179 /docs/user-guide/06-interfaces-generics.md | |
| parent | 478be540a6f93ffcb552e496c41fe1c278ae054e (diff) | |
Fix tiny typos (#5944)
Diffstat (limited to 'docs/user-guide/06-interfaces-generics.md')
| -rw-r--r-- | docs/user-guide/06-interfaces-generics.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/user-guide/06-interfaces-generics.md b/docs/user-guide/06-interfaces-generics.md index 7a4248442..a07ccc6b7 100644 --- a/docs/user-guide/06-interfaces-generics.md +++ b/docs/user-guide/06-interfaces-generics.md @@ -429,7 +429,7 @@ struct MultiArrayFloatContainer : IFloatContainer } ``` -In summary, an `asssociatedtype` requirement in an interface is similar to other types of requirements: a method requirement means that an implementation must provide a method matching the interface signature, while an `associatedtype` requirement means that an implementation must provide a type in its scope with the matching name and interface constraint. In general, when defining an interface that is producing and consuming an object whose actual type is implementation-dependent, the type of this object can often be modeled as an associated type in the interface. +In summary, an `associatedtype` requirement in an interface is similar to other types of requirements: a method requirement means that an implementation must provide a method matching the interface signature, while an `associatedtype` requirement means that an implementation must provide a type in its scope with the matching name and interface constraint. In general, when defining an interface that is producing and consuming an object whose actual type is implementation-dependent, the type of this object can often be modeled as an associated type in the interface. ### Comparing Generics to C++ Templates @@ -823,7 +823,7 @@ interface IEnumerator<T> interface IEnumerable<T> { - assoicatedtype Enumerator : IEnumerator<T>; + associatedtype Enumerator : IEnumerator<T>; Enumerator getEnumerator(); } ``` |
