On 8/14/15 1:36 PM, Jack Stouffer wrote:
Recently, I made the mistake of trying to reference an enum pointer in a
struct before it was set (see example below). I was wondering if it's
possible for DMD to catch this mistake at compile time, as this
currently compiles fine and segfaults on execution.

state *is* set to null, before your constructor is called. The access is not "before it was set".

Could the compiler *possibly* flag this as an error? It could, but it doesn't, and likely won't in the future.

-Steve

Reply via email to