October 07, 2007 Wrong addres operator return | ||||
---|---|---|---|---|
| ||||
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" |
Copyright © 1999-2021 by the D Language Foundation