December 15, 2013
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 ?
December 16, 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{}.