The reason is that the _scope of the AlignDeclarartion does not get set.
Comment #2 by uplink.coder — 2016-09-29T01:30:23Z
The hacky fix for this looks like this:
--- a/src/dstruct.d
+++ b/src/dstruct.d
@@ -299,7 +299,8 @@ extern (C++) class StructDeclaration : AggregateDeclaration
if (semanticRun == PASSinit)
{
protection = sc.protection;
-
+ if (sc && sc.aligndecl && !sc.aligndecl._scope && sc.parent._scope)
+ sc.aligndecl._scope = sc.parent._scope;
alignment = sc.alignment();
Comment #3 by code — 2016-10-08T21:03:48Z
When filing regressions for master please use the current development version as tag so we can more easily see which release is affected.
Comment #4 by dlang-bugzilla — 2016-10-08T23:43:09Z
(In reply to Martin Nowak from comment #3)
> When filing regressions for master please use the current development
> version as tag so we can more easily see which release is affected.
I don't think beta 1 was out at that point?
Comment #5 by code — 2016-10-14T19:54:32Z
(In reply to uplink.coder from comment #1)
> The reason is that the _scope of the AlignDeclarartion does not get set.
Yes, setScope isn't called for declarations in functions b/c there are no forward references in functions, hence no scope for early lookups is needed.
Comment #6 by github-bugzilla — 2016-10-15T05:48:13Z