Skip to content

Commit

Permalink
fix Issue 13757 - [CTFE] extern(C) alias declaration does not work in…
Browse files Browse the repository at this point in the history
… CTFE
  • Loading branch information
9rnsr committed Nov 20, 2014
1 parent 5c087d7 commit 552397a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/interpret.c
Expand Up @@ -2636,7 +2636,8 @@ class Interpreter : public Visitor
{
Dsymbol *s = (*ad->decl)[0];
if (s->isAggregateDeclaration() ||
s->isTemplateDeclaration())
s->isTemplateDeclaration() ||
s->isAliasDeclaration())
{
result = NULL;
return; // static (template) struct declaration. Nothing to do.
Expand Down
10 changes: 10 additions & 0 deletions test/compilable/interpret3.d
Expand Up @@ -4829,6 +4829,16 @@ static assert({
return true;
}());

/**************************************************
13757 extern(C) alias declaration
**************************************************/

static assert({
alias FP1 = extern(C) int function();
alias extern(C) int function() FP2;
return true;
}());

/**************************************************
6522 opAssign + foreach ref
**************************************************/
Expand Down

0 comments on commit 552397a

Please sign in to comment.