Wrong addres operator return

PetSerAl PetSerAl at gmail.com
Sat Oct 6 22:07:12 PDT 2007


import std.stdio;

class a
{
	void f()
	{
		writefln(typeid(typeof(this)));
	}
}

class b:a
{
	void delegate() g()
	{
		return &(a.f);
	}
	void f()
	{
		writefln(typeid(typeof(this)));
	}
}

class c:b
{
	void f()
	{
		writefln(typeid(typeof(this)));
	}
}

int main(char[][] args)
{
	b v=new c;
	v.g()();
	return 0;
}


This program write "main.c" not "main.a"


More information about the Digitalmars-d-bugs mailing list