← Back to index
|
Original Bugzilla link
Bug 9954 – Runtime wrong code with global interface var created in CTFE
Status
RESOLVED
Resolution
FIXED
Severity
critical
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-04-18T04:06:00Z
Last change time
2015-06-09T05:10:45Z
Keywords
CTFE, wrong-code
Assigned to
nobody
Creator
clugdbug
Comments
Comment #0
by clugdbug — 2013-04-18T04:06:16Z
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.
Comment #1
by github-bugzilla — 2013-04-22T13:12:52Z
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...