On Nov 10, 2011, at 7:42 AM, David Rajchenbach-Teller wrote:
- How do you compile the following extract?
fn call_fooT(x: T) {
x.foo();
}
You don't. If you wanted to write `call_foo()`, you would probably write:
iface has_foo { fn foo(); }
fn call_foo(x: has_foo) {
On 11/11/2011 07:29 AM, Niko Matsakis wrote:
In principle, it might be nice to allow something like bounded polymorphism:
fn call_fooT:has_foo(x: T) {
x.foo();
}
Without subtyping, it would make less sense. Perhaps it corresponds
to
passing the vtable that converts a `T`