dmd 1.064 and 2.049 release

dsimcha dsimcha at yahoo.com
Fri Sep 17 14:05:05 PDT 2010


== Quote from osa (osa at aso.osa)'s article
> On 09/17/2010 03:22 PM, dsimcha wrote:
> > I agree the error message is obtuse, but I don't think this code is supposed to
> > work because foo is not a type.  This code does work:
> >
> > import std.traits;
> > void foo() {}
> > void main() {
> >       static assert( ! hasUnsharedAliasing!(typeof(foo)) );
> > }
> My bad. However, old code used to work with 2.048, with hasLocalAliasing.
> Now the next problem. I do not think there is unshared aliasing here:
> ----
> import std.traits;
> struct Foo
> {
>      void function() func;
> }
> void main()
> {
>      static assert( ! hasUnsharedAliasing!Foo, "struct Foo has unshared
> aliasing" );
> }
> ----
> but it fails to compile. As far as I understand, functions (unlike
> delegates) do not have any shared aliasing but hasUnsharedAliasing
> thinks they do.

This is a real bug.  Please file a bug report.  I'll look into it soon.


More information about the Digitalmars-d-announce mailing list