[dmd-beta] dmd 1.068 and 2.053 beta
Max Samukha
maxsamukha at gmail.com
Thu May 12 15:25:47 PDT 2011
On Fri, May 13, 2011 at 1:12 AM, Max Samukha <maxsamukha at gmail.com> wrote:
> Assigning function pointers is not type-checked:
>
> import std.stdio;
>
> alias void function(byte a) foo_t;
> void foo(int x) { writeln(x); }
> foo_t foo_p = &foo;
>
> void main(string[] args)
> {
> foo_p(42);
> }
>
> The code compiles and the program outputs -1075219670. Is it a known
> regression? Very severe bug, in my opinion.
>
>
>
Forgot to mention that I tested with the latest dmd 2 beta on 32-bit linux.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/dmd-beta/attachments/20110513/143591d2/attachment.html>
More information about the dmd-beta
mailing list