https://issues.dlang.org/show_bug.cgi?id=19706

Eduard Staniloiu <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #1 from Eduard Staniloiu <[email protected]> ---
If you change the return type of your function to `auto`, pragma will output
the expected `tuple("pure", "nothrow", "@nogc", "@safe")` function attributes.

What is more interesting is that even if you don't change the return type, you
can safely call the function in a `@safe` function and the deduction is correct

```
struct S
{
  static int fImpl(Ret)() { return Ret.init; }
  @safe void bar() { fImpl!int(); }
}
```

Will compile just fine

--

Reply via email to