Skip to content

Commit

Permalink
Remove workaround for issue 9057
Browse files Browse the repository at this point in the history
In #5500, issue 14666 has been properly fixed by adding mechanism of
deferred semantic2 running for imported modules. Now, the workaround for issue 9057 in `todt.c` is
unnecessary anymore.
  • Loading branch information
9rnsr committed Apr 24, 2016
1 parent 3aadc07 commit f1e5436
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/todt.c
Original file line number Diff line number Diff line change
Expand Up @@ -784,14 +784,7 @@ static void membersToDt(AggregateDeclaration *ad, DtBuilder& dtb,
if (init->isVoidInitializer())
continue;

/* Because of issue 14666, function local import does not invoke
* semantic2 pass for the imported module, and surprisingly there's
* no opportunity to do it today.
* As a workaround for the issue 9057, have to resolve forward reference
* in `init` before its use.
*/
if (vd->semanticRun < PASSsemantic2done && vd->_scope)
vd->semantic2(vd->_scope);
assert(vd->semanticRun >= PASSsemantic2done);

ExpInitializer *ei = init->isExpInitializer();
Type *tb = vd->type->toBasetype();
Expand Down

0 comments on commit f1e5436

Please sign in to comment.