Skip to content

Commit

Permalink
Added note about type parameters in ifaces.
Browse files Browse the repository at this point in the history
Specficially, the type parameters should be left off of the function
signatures in both the iface and the impl if they are already in the
iface declaration.
  • Loading branch information
Havvy committed Jul 14, 2012
1 parent e430a69 commit c5b23c3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions doc/tutorial.md
Expand Up @@ -2504,6 +2504,10 @@ needed because it could also, for example, specify an implementation
of `seq<int>`—the `of` clause *refers* to a type, rather than defining
one.

Note that functions do not explicitly have the type parameters that
are provided by the iface. It will cause a compile-time error if you
include them in the iface or impl.

## Casting to an interface type

The above allows us to define functions that polymorphically act on
Expand Down

0 comments on commit c5b23c3

Please sign in to comment.