D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 4526 - dmd crash with writeln of functions
Summary: dmd crash with writeln of functions
Status: RESOLVED INVALID
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86 Windows
: P2 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-28 14:49 UTC by bearophile_hugs
Modified: 2010-07-28 15:25 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description bearophile_hugs 2010-07-28 14:49:50 UTC
D2 code, compiled with dmd 2.047:


import std.stdio;
void main() {
    string a();
    writeln(typeid(typeof(a)));
    string function() b;
    writeln(typeid(typeof(b)));
}


By the way, what's the point in allowing/keeping ugly and error-prone function literals in D2?

It's better for D2 to keep/allow only _one_ standard, clean and readable syntax for functions pointers (and one for delegates, if necessary). Keeping C function pointer syntax or something similar in D2 causes troubles.
Comment 1 bearophile_hugs 2010-07-28 15:25:51 UTC
Closed because Brad Roberts has correctly noted this is a bug report and an enchantment request in one.