On Thursday, 26 July 2018 at 16:52:31 UTC, Ali Çehreli wrote:
[snip]
It doesn't but the scope itself is legal in a nested scope; so,
'const' should not remove the scope either.
> It works at the
> global level just fine.
It must be because one cannot introduce a nested scope at the
global scope:
// illegal
{
double bar;
}
void main() {
// legal
{
double bar;
}
}
Ali
We seem to be getting caught in scopes, when const: fails just as
much as const {} does. The spec suggests that both of those work
for all attributes including UDAs, when it only works on a
limited subset outside of global scope.