www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10405] New: redundant "expression has no effect" error when returning non-void in void function

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10405

           Summary: redundant "expression has no effect" error when
                    returning non-void in void function
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: henning still-hidden.de


--- Comment #0 from Henning Pohl <henning still-hidden.de> 2013-06-18 08:31:38
PDT ---
void main() {
    return 10;
}

-------
main.d(2): Error: long has no effect in expression (10)
main.d(2): Error: cannot return non-void from void function
-------

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 18 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10405


Henning Pohl <henning still-hidden.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic, pull


--- Comment #1 from Henning Pohl <henning still-hidden.de> 2013-06-18 08:37:12
PDT ---
https://github.com/D-Programming-Language/dmd/pull/2210

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 18 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10405



--- Comment #2 from github-bugzilla puremagic.com 2013-06-19 04:59:02 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/e51a5b9a9576cb7e9a4d964c1b9a7373fbd65124
fix issue 10405 - redundant "expression has no effect" error when
returning non-void in void function

https://github.com/D-Programming-Language/dmd/commit/3527e7d9a7b8d12c7159ec759e76413b2ffe7236
Merge pull request #2210 from hpohl/10405

fix issue 10405 - redundant "expression has no effect" error when returning
non-void in void function

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 19 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10405


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 19 2013