On Fri, May 13, 2011 at 3:14 AM, Don Clugston <[email protected]>wrote:

> On 13 May 2011 00:12, Max Samukha <[email protected]> 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.
>
> Regression was introduced in 2.038. Shouldn't block this release.
>

whoa


> _______________________________________________
> dmd-beta mailing list
> [email protected]
> http://lists.puremagic.com/mailman/listinfo/dmd-beta
>
_______________________________________________
dmd-beta mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/dmd-beta

Reply via email to