RazvanN <> changed:

           What    |Removed                     |Added
                 CC|                            |

--- Comment #1 from RazvanN <> ---
(In reply to Ali Cehreli from comment #0)
> struct S {
>     alias a this;
>     enum a = 1;
> }
> $ dmd deneme.d -c
> Segmentation fault
> Interestingly, when the lines inside struct S are swapped then it compiles
> fine.
> Ali

This happens with declarations for which the type must be deduced. Note that
replacing enum with auto results in segmentation fault (or assert error on my
machine - you probably do not have the latest version of dmd). That is due to
the fact that when semantic is performed an the alias this AST node, the type
of the enum variable is not known. Calling semantic on the symbol fixes the



Reply via email to