[Issue 17911] UDA to scope cause Error
https://issues.dlang.org/show_bug.cgi?id=17911 Walter Bright changed: What|Removed |Added Severity|regression |enhancement --- Comment #5 from Walter Bright --- The { } attribute syntax is not supported for local variables: void bar() { const { int a = 3; } } It's never been supported, so it's not a regression. Marked as enhancement request. --
[Issue 17911] UDA to scope cause Error
https://issues.dlang.org/show_bug.cgi?id=17911 --- Comment #4 from Timoses--- I apologize in case I have reported the bug incorrectly. Indeed, I mean Andrea Fontana's version. The following clarifies a bit more perhaps: -- struct F { @(1) // works! { @(2) int a; // has UDA's (1, 2) @("string") int b; // has UDA's (1, "string") } } void func() { @(1) // compilation error { @(2) int a; // has UDA's (1, 2) @("string") int b; // has UDA's (1, "string") } } void main() { struct G { @(1) // works! { @(2) int a; // has UDA's (1, 2) @("string") int b; // has UDA's (1, "string") } } } - I'm not sure whether attribution of local variables makes any sense anyhow. Does it? If that were the case the error message coule be more descriptive. --
[Issue 17911] UDA to scope cause Error
https://issues.dlang.org/show_bug.cgi?id=17911 Mike Franklinchanged: What|Removed |Added Hardware|x86_64 |All OS|Windows |All --
[Issue 17911] UDA to scope cause Error
https://issues.dlang.org/show_bug.cgi?id=17911 Andrea Fontanachanged: What|Removed |Added Status|RESOLVED|REOPENED Resolution|WORKSFORME |--- --
[Issue 17911] UDA to scope cause Error
https://issues.dlang.org/show_bug.cgi?id=17911 Andrea Fontanachanged: What|Removed |Added CC||trik...@gmail.com --- Comment #3 from Andrea Fontana --- Probably this is the problem he found: https://run.dlang.io/is/zim8Z0 --
[Issue 17911] UDA to scope cause Error
https://issues.dlang.org/show_bug.cgi?id=17911 Mike Franklinchanged: What|Removed |Added Status|NEW |RESOLVED CC||slavo5...@yahoo.com Resolution|--- |WORKSFORME --- Comment #2 from Mike Franklin --- I cannot reproduce this in either Linux (2.080) or Windows (2.079). You can also see that it works fine at https://run.dlang.io/is/v6SW8Q Please reopen and supply a complete module with precise compiler flags to reproduce the symptoms if the problem persists. --
[Issue 17911] UDA to scope cause Error
https://issues.dlang.org/show_bug.cgi?id=17911 Walter Brightchanged: What|Removed |Added CC||bugzi...@digitalmars.com --- Comment #1 from Walter Bright --- Why is this marked as a regression? Which compiler version did it work on? --