D - something strange again
- Friedrich (45/45) Jun 04 2003 See this code:
See this code: /* Generated header * File Name : link_test.d * * Created : 2003-06-04 11:20:12 frido * Author : Friedrich Dominicus * Time-stamp: <> */ class Link { int item; Link next; public void set_item(int val){ item = val; } public void set_next(Link val){ next = val; } public void set_next_2 (Link val) out { assert(next == val); } body { next = val; } this(){ next = null; } } int main (char[][] args){ Link el; el = new Link; el.set_item(1); el.set_next(null); printf("after set_next\n"); assert(null == null); printf("after assert\n"); el.set_next_2(null); return 0; } why does it crash in set_next_2? System: Debian Linux Regards Friedrich
Jun 04 2003