Branch: Tag:

1999-12-05

1999-12-05 17:17:15 by Martin Stjernholm <mast@lysator.liu.se>

Some tests for indexing mappings with disjunct types.

Rev: src/testsuite.in:1.244

1: - test_true([["$Id: testsuite.in,v 1.243 1999/12/02 19:18:30 mirar Exp $"]]); + test_true([["$Id: testsuite.in,v 1.244 1999/12/05 17:17:15 mast Exp $"]]);      cond([[all_constants()->_verify_internals]],   [[
80:    return typeof(f(1)); ]],    "int")    + test_any([[mapping(object:string)|mapping(string:int) f; +  return typeof(f[class{}()]); ]], +  "string") +  + test_any([[mapping(object:string)|mapping(string:int) f; +  return typeof(f[""]); ]], +  "int") +  + test_any([[mapping(object:string)|mapping(string:int) f; +  return sort((typeof(f[0]) - " ")/"|")*"|"; ]], +  "int|string") +    test_compile_any([[    constant FOO = 0;    mapping(int:string) foo = ([FOO: "foo"]);