[Issue 3831] writeln of a delegate typeid

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jun 7 14:45:47 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=3831



--- Comment #2 from bearophile_hugs at eml.cc 2010-06-07 14:45:46 PDT ---
Another example, with functions too:

import std.stdio: writeln;

int foo(float x) { return 0; }

void main() {
    writeln(typeid(typeof(foo))); // int()

    int bar(float x) { return 0; }
    writeln(typeid(typeof(bar))); // int()

    int delegate(float) baz = (float x) { return 0; };
    writeln(typeid(typeof(baz))); // int delegate()
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list