September 04, 2006 Buggy DStress test cases | ||||
---|---|---|---|---|
| ||||
mangleof_14_b, _14_c and _14_d are expected to fail to compile They are assigning a char [] to an int. (in early releases they caused segfaults). The other mangleof_14 cases fail because x.mangleof[2] does not work. You can however write (x.mangleof)[2] |
September 07, 2006 Re: Buggy DStress test cases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Don Clugston Attachments: | Don Clugston schrieb am 2006-09-04: > mangleof_14_b, _14_c and _14_d are expected to fail to compile > They are assigning a char [] to an int. > (in early releases they caused segfaults). Thanks, fixed. > The other mangleof_14 cases fail because > > x.mangleof[2] > > does not work. You can however write > > (x.mangleof)[2] That is a DMD bug. The code below works - even though it uses x.mangleof[2]. # import std.stdio; # # struct S{ # } # # class C{ # } # # int main(){ # S s; # C c = new C(); # writefln("instance:\t%s\t%s", s.mangleof[1], c.mangleof[1]); # writefln("type:\t%s\t%s", S.mangleof[1], C.mangleof[1]); # # return 0; # } Thomas |
Copyright © 1999-2021 by the D Language Foundation