Bug 1037 – regression: wrong code generation for static getters

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Linux
Creation time
2007-03-07T17:08:00Z
Last change time
2015-06-09T01:31:23Z
Assigned to
dvdfrdmn
Creator
thomas-dloop

Comments

Comment #0 by thomas-dloop — 2007-03-07T17:08:20Z
# class MyClass{ # static int _i; # # static int prop(){ # return _i; # } # # static void prop(int i){ # _i=i; # } # } # # int main(){ # MyClass c = new MyClass(); # c.prop = true ? MyClass.prop : MyClass.prop; # if(0 != c.prop){ # assert(0); # } # c.prop = 7; # if(7 != c.prop){ # assert(0); # } # return 0; # } gdmd-0.23 -O bug_e2ir_141_B.d -oftest && ./test Error: AssertError Failure run/bug_e2ir_141_B.d(33) test case: http://dstress.kuehne.cn/run/bug_e2ir_141_B.d
Comment #1 by dvdfrdmn — 2007-07-21T09:09:46Z
Fixed as of svn r130 / release 0.24 by an earlier fix or DMD merge.