Undefined identifier, is that intended ?

qznc qznc at web.de
Mon Dec 16 01:52:44 PST 2013


On Sunday, 15 December 2013 at 05:38:59 UTC, deadalnix wrote:
> I have this :
>
> import d.ast.identifier;
> alias AstCatchBlock = CatchBlock!(Identifier, AstStatement);
>
> Identifier is a class defined in d.ast.identifier. I get the 
> following error :
> Error: undefined identifier Identifier
>
> It seem dubious to me, but current version of DMD does this and 
> master as well. The behavior is consistent.
>
> When i declare the import at the top of the file, then it 
> works. Am I missing something or this is a bug ?

Do you import inside any scope? I had a similar problem recently, 
but was unable to reduce it into a small program. I had to move 
declarations out of unittest{}.


More information about the Digitalmars-d mailing list