Thread overview
[Issue 8631] New: illegal overrides accepted
Sep 08, 2012
timon.gehr@gmx.ch
Sep 09, 2012
Maxim Fomin
Jan 04, 2013
Maxim Fomin
Jan 04, 2013
Max Samukha
Jan 09, 2013
Kenji Hara
Jan 19, 2013
Walter Bright
September 08, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8631

           Summary: illegal overrides accepted
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: timon.gehr@gmx.ch


--- Comment #0 from timon.gehr@gmx.ch 2012-09-08 14:38:07 PDT ---
DMD 2.060:
class OVIC{
    int foo()immutable{ return 2; }
    int foo()const{ return 2; }
}
class OVIbICSC: OVIC{
    override int foo()immutable{ return 2; }
    override int foo()const shared{ return 2; }
    override int foo()const{ return 2;}
}

The first two child methods override the same parent method, but DMD does not detect this.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 09, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8631


Maxim Fomin <maxim@maxim-fomin.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |maxim@maxim-fomin.ru


--- Comment #1 from Maxim Fomin <maxim@maxim-fomin.ru> 2012-09-08 22:46:33 PDT ---
Why it is a bug?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 04, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=8631


Maxim Fomin <maxim@maxim-fomin.ru> changed:

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


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 04, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=8631


Max Samukha <samukha@voliacable.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |samukha@voliacable.com
         Resolution|INVALID                     |


--- Comment #2 from Max Samukha <samukha@voliacable.com> 2013-01-04 10:14:33 PST ---
(In reply to comment #1)
> Why it is a bug?

Why is it not a bug?

Actually, the first and third methods in the derived class override the base methods. The "const shared" method doesn't override anything. It is an additional entry in vtbl.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 09, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=8631


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

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


--- Comment #3 from Kenji Hara <k.hara.pg@gmail.com> 2013-01-08 19:37:38 PST ---
https://github.com/D-Programming-Language/dmd/pull/1450

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



--- Comment #4 from github-bugzilla@puremagic.com 2013-01-19 11:47:58 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/0bfc49f23744a6bf92fa36e5e925b65635e4d5d4 fix Issue 8631 - illegal overrides accepted

https://github.com/D-Programming-Language/dmd/commit/199fc70dcb1d03adc674d613ced0e9b8b5c83aa3 Merge pull request #1450 from 9rnsr/fix8631

Issue 8631 - illegal overrides accepted

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


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
                 CC|                            |bugzilla@digitalmars.com
         Resolution|                            |FIXED


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