interface template problem
Regan Heath
regan at netwin.co.nz
Mon Feb 27 13:22:39 PST 2006
On Mon, 27 Feb 2006 18:42:52 +0000 (UTC), Philipp Heise
<Philipp_member at pathlink.com> wrote:
> i tried this with my interface template and it doesn't compile/work :
>
> interface XYZ(T) {
> ..
> public void foo(XYZ!(T) bar);
> ..
> }
>
> how can i achieve the desired effect ?
Can you post more code, my attempt at replicating the problem seems to
work:
import std.stdio;
interface XYZ(T) {
public void foo(XYZ!(T) bar);
}
class A : XYZ!(int) {
public void foo(XYZ!(int) bar) {
writef("a");
}
}
void main() {
A a = new A();
XYZ!(int) b;
a.foo(b);
}
Regan
More information about the Digitalmars-d
mailing list