www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 9954] New: Runtime wrong code with global interface var created in CTFE

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

           Summary: Runtime wrong code with global interface var created
                    in CTFE
           Product: D
           Version: D1 & D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: clugdbug yahoo.com.au


--- Comment #0 from Don <clugdbug yahoo.com.au> 2013-04-18 04:06:16 PDT ---
interface ITest105a {
    string test105a() const;
}

class Test105a: ITest105a {
    string test105a() const {return "test105a";}
}

interface ITest105b {
    string test105b() const;
}

class Test105b: Test105a, ITest105b {
    string test105b() const {return "test105b";}
}

ITest105a makeit() {
    return new Test105b;
}

const ITest105a t105ia = makeit();

void main() {
    assert(t105ia.test105a() == "test105a");
}
---
The bug is that t105ia is being created pointing to the Test105a part, instead
of pointing to Test105b.

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


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |CTFE, wrong-code
           Severity|normal                      |critical


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



--- Comment #1 from github-bugzilla puremagic.com 2013-04-22 13:12:52 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/414085f9bd7d8f99c94c34d713b4a7e619e7e10a
fix Issue 9954 - Runtime wrong code with global interface var created in CTFE

https://github.com/D-Programming-Language/dmd/commit/e1ac824f3d01df5f1d124295342cea008db5e8d7
Merge pull request #1920 from IgorStepanov/issue9954

fix Issue 9954 - Runtime wrong code with global interface var created in...

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


Don <clugdbug yahoo.com.au> 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: -------
Aug 22 2013