1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-09-28 06:49:49 +02:00

Don't always coerce to float when assigning to an unset parameter.

This commit is contained in:
Bart Schaefer 2001-07-08 00:30:43 +00:00
parent 2c75f5b0da
commit 0467a101da

View File

@ -641,7 +641,8 @@ op(int what)
b.type = MN_INTEGER;
b.u.l = (zlong)b.u.d;
}
} else if (a.type != b.type && what != COMMA) {
} else if (a.type != b.type && what != COMMA &&
(a.type != MN_UNSET || what != EQ)) {
/*
* Different types, so coerce to float.
* It may happen during an assigment that the LHS