Dumping test fail
Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3013
Reported by Martin Nilsson, IDA nilsson@pike.ida.liu.se
testsuite: Test 569 (shift 2) failed.
1: mixed a() {
2: class Test
3: {
4: class Resolver (array c)
5: {
6: mixed resolv (string id)
7: {
8: if (id == "c") return c;
9: }
10: }
11:
12: class Codec
13: {
14: mixed fooof (string name) {return all_constants()[name];}
15: function objectof = fooof;
16: function functionof = fooof;
17: function programof = fooof;
18:
19: string nameof (mixed what)
20: {
21: if (string name = search (all_constants(), what)) return name;
22: return ([])[0];
23: }
24: }
25:
26: mixed main()
27: {
28: array c = ({"subres"});
29: object o = compile (
30: #"string res() {return `+(@c());}
31: string subres() {return \"foo\";}",
32: Resolver (c))();
33: for (int i = 0; i < sizeof (c); i++)
34: if (stringp (c[i])) c[i] = o[c[i] ];
35: #ifdef DEBUG
36: #define D ,1
37: #else
38: #define D
39: #endif
40: function e=encode_value;
41: function d=decode_value;
42: return d (e (o, Codec() D), Codec() D)->res();
43: }
44: };
45: return Test()->main();
46: ; }
47: mixed b() { return "foo"; }
Error: Failed to encode object.
testsuite: Test 569 (shift 2):42: main()