[Dlang-internal] Issue 7616: intentional or fix welcome?

Walter Bright newshound2 at digitalmars.com
Thu Dec 20 01:19:23 UTC 2018


On 12/19/2018 3:29 PM, Neia Neutuladh wrote:
> I have a PR ready to test for issue 7616: aggregates don't inherit pure
> nothrow from outer scope. I would like some indication, before I spend a
> few hours testing it, whether a fix would be accepted.
> 
> https://issues.dlang.org/show_bug.cgi?id=7616
> 
> The current behavior:
> 
> pure nothrow @nogc:
> int global;
> struct Foo
> {
>    void foo() { global++; throw new Exception; }
> }
> 
> Foo.foo is not pure, nothrow, or @nogc.
> 
> The spec does not specify any way in which pure, nothrow, or @nogc
> attribute propagation should differ from other attributes like @safe.
> 
> In this case, is the spec correct, or is the compiler correct? If the spec
> is correct, I'll finish my PR and submit it.
> 

It's a good idea, but it will probably break a lot of code :-(


More information about the Dlang-internal mailing list