Branch: Tag:

2010-01-21

2010-01-21 14:38:31 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Added test for compiler fatal from LysLysKOM 18285732.
Thanks to Mirar for the testcase.

Rev: src/testsuite.in:1.887

1:   START_MARKER - test_true([["$Id: testsuite.in,v 1.886 2009/11/30 14:02:34 grubba Exp $"]]); + test_true([["$Id: testsuite.in,v 1.887 2010/01/21 14:38:31 grubba Exp $"]]);      // This triggered a bug only if run sufficiently early.   test_compile_any([[#pike 7.2]])
2809:    return Y()->foo;   ]], "middle")    + test_any([[ +  // Test symbol lookup in multi-pass. +  // LysLysKOM 18285732 +  // An old pike will fail with the fatal +  // "Identifier out of range, loc->parent_identifer=-1!" +  // during __INIT(). +  +  class A +  { +  static string foo = "bar"; +  }; +  +  string to_compile=#" +  constant fum = \"gazonk\"; +  +  class B() +  { +  inherit A; +  string fi() +  { +  return fum?1:0; +  } +  } +  "; +  +  add_constant("A",A); +  compile_string(to_compile); +  add_constant("A"); +  return 0; + ]], 0) +    test_any([[string gurk="bozo"; string b(int x) { return (x?b(x-1)+gurk:""); }; return b(5)]],[["bozo"*5]])      dnl this should really work...