Assignment of out-idexed arrays too lenient. (Was: Type system too gullible for soft casts of constants.)

Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3789

Reported by Martin Nilsson, IDA nilsson@pike.ida.liu.se

The following prompts a compilation error

void main() { array bar; bar=1; }

while the following only a warning.

void main() { array bar; bar=[array]1; }

This causes the following to pass in hilfe

> array bar; bar=16;
(1) Result: 16

but strangely enough not the following

> string bar; bar=16;
Compiler Error: 1:Bad type in assignment.
Compiler Error: 1:Expected: string
Compiler Error: 1:Got     : int(16..16)