mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-30 15:02:18 +01:00
Don't always coerce to float when assigning to an unset parameter.
This commit is contained in:
parent
2c75f5b0da
commit
0467a101da
1 changed files with 2 additions and 1 deletions
|
@ -641,7 +641,8 @@ op(int what)
|
||||||
b.type = MN_INTEGER;
|
b.type = MN_INTEGER;
|
||||||
b.u.l = (zlong)b.u.d;
|
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.
|
* Different types, so coerce to float.
|
||||||
* It may happen during an assigment that the LHS
|
* It may happen during an assigment that the LHS
|
||||||
|
|
Loading…
Reference in a new issue