<i>Mixed-in destructors aren't called</i> status still Open with 3 other changes
by
.
D 2018-07-19T09:03:30.331
J icomment Simpler\sexample:\r\n\r\noo::class\screate\sA\s{destructor\s{puts\sa;next}}\r\noo::class\screate\sC\s{destructor\s{puts\sc}}\r\n\r\nC\screate\sc\r\noo::objdefine\sc\smixin\s-append\sA\r\nc\sdestroy\r\n\r\n#\soutput:\sc\r\n\r\nThe\sdestructor\sdefined\sin\sA\sis\snever\scalled.\s\sThis\sseems\ssuspicious\s..\sthough\r\nnote\sa\sconstructor\sdefined\sin\sA\swill\snever\sbe\scalled,\sso\smaybe\sit's\scorrect\sby\r\nsymmetry.\s\sShould\sbe\sdocumented\sand\scovered\swith\sa\stest\seither\sway.\r\n\r\nNote\sthat\syou\scan\sachieve\sthe\sdesired\seffect\sa\sdifferent\sway:\r\n\r\noo::define\sA\smethod\sdestroy\s{}\s{puts\saa;\snext}
J login aspect
J mimetype text/plain
K 29aa1c7b13a6c04400ba1c113d53201f483095f1
U aspect
Z f3cd948cc5fca546f503e977ac2138a7