On Sun, 2 Jan 2005 19:35:08 +0100 (CET), Martin Nilsson (DivX Networks) @ Pike (-) developers forum 10353@lyskom.lysator.liu.se wrote: | The type checker thinks that you have made an error when you are looking | for a string in array(int).
search(({ 23, 2 }), 2);
(4) Result: 1
search(({ 23, 2 }), 3);
Compiler Error: 1:Bad argument 2 to search. Compiler Error: 1:Expected: function(string, string | int, void | int : int) | function(array((0=mixed)), 0, void | int : int) | function(mapping((1=mixed):(2=mixed)), 2, void | 1 : 1) | !(function(!array, mixed, void | int : mixed) | function(!mapping, mixed, void | int : mixed)) & function(mapping | array, mixed, void | int : zero) Compiler Error: 1:Got : function(array(int(2..2) | int(23..23)), int(3..3) : void | mixed)