Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix Issue 12201 - Crash on forward reference import within mixed in t…
…emplate
  • Loading branch information
9rnsr committed Feb 19, 2014
1 parent 0d01545 commit b536fd6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/import.c
Expand Up @@ -416,6 +416,7 @@ Dsymbol *Import::search(Loc loc, Identifier *ident, int flags)
if (!pkg)
{
load(NULL);
mod->importAll(NULL);
mod->semantic();
}

Expand Down
13 changes: 13 additions & 0 deletions test/compilable/fwdref12201.d
@@ -0,0 +1,13 @@
// REQUIRED_ARGS: -o-
// PERMUTE_ARGS:

template T()
{
imports.fwdref12201a.FILE* fp;
}

struct S
{
mixin T;
import imports.fwdref12201a;
}
1 change: 1 addition & 0 deletions test/compilable/imports/fwdref12201a.d
@@ -0,0 +1 @@
alias int FILE;

0 comments on commit b536fd6

Please sign in to comment.