www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12124] New: Never be used static opCall should be reported

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

           Summary: Never be used static opCall should be reported
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: diagnostic
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: k.hara.pg gmail.com


--- Comment #0 from Kenji Hara <k.hara.pg gmail.com> 2014-02-09 18:57:56 PST ---
From:
https://github.com/D-Programming-Language/dmd/pull/3221#issuecomment-34595032

By fixing issue 12070, this code never asserts in runtime.

struct S
{
    this(int) {}
    static S opCall()
    {
        assert(0);
    }
}
void main()
{
    auto s = S();
}

To avoid silent code breaking, compiler should report message that static
opCall is never used.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 09 2014
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12124


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull


--- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2014-02-09 19:23:26 PST ---
https://github.com/D-Programming-Language/dmd/pull/3240

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 09 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12124



--- Comment #2 from github-bugzilla puremagic.com 2014-02-16 02:03:44 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/98aeddcffd1f6826b2e332af951a32da05bcdfe0
fix Issue 12124 - Never be used static opCall should be reported

https://github.com/D-Programming-Language/dmd/commit/be71f00450e8c189ec0db224a2c978de97d41161
Merge pull request #3240 from 9rnsr/fix12124

Issue 12124 - Never be used static opCall should be reported

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 16 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12124


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

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


-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 16 2014
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12124



--- Comment #3 from github-bugzilla puremagic.com 2014-02-16 02:45:09 PST ---
Commit pushed to 2.065 at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/79ae211e71cf0937523010e39f7f0981e9550904
Merge pull request #3240 from 9rnsr/fix12124

Issue 12124 - Never be used static opCall should be reported

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 16 2014