[Issue 15916] void makes a function impure + system

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Apr 12 11:15:39 PDT 2016


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

Mathias Lang <mathias.lang at sociomantic.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |mathias.lang at sociomantic.co
                   |                            |m
         Resolution|---                         |INVALID

--- Comment #1 from Mathias Lang <mathias.lang at sociomantic.com> ---
It is by design.
The compiler will perform attribute inference on `auto` returning functions and
templates, but not on function where the full prototype is provided.

Attribute inference for regular function would make it impossible to provide
the prototype of a function in a sane way (as you can provide `.di` files which
are D equivalent of headers).

Closing as invalid, feel free to head to the 'learn' forum if you have any more
question.

--


More information about the Digitalmars-d-bugs mailing list