aboutsummaryrefslogtreecommitdiff
path: root/src/compiler/expr.zc
diff options
context:
space:
mode:
authorGravatar zinc <zinc@downsta.ir> 2026-10-14 15:54:17 +0330
committerGravatar zinc <zinc@downsta.ir> 2026-10-14 15:54:17 +0330
commit0e110746d91d48c9a40440ab8807c5e6d23a3b1c (patch)
tree1308367c756220e9a47f13c4211570f9d63df3bd /src/compiler/expr.zc
parentcapture_scan: restore panic after the dry scan, so a bad literal in a functio... (diff)
unary: u*x, m*x, d*x are not recasts when the tag names a visible local (spec 1.6.3)
Diffstat (limited to 'src/compiler/expr.zc')
-rw-r--r--src/compiler/expr.zc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/expr.zc b/src/compiler/expr.zc
index bcb92da..c0e9c91 100644
--- a/src/compiler/expr.zc
+++ b/src/compiler/expr.zc
@@ -1510,7 +1510,7 @@ int postfix_tail(int c) {
// --, and any unary operator a program added (- ! ~ built in).
int unary() {
int c, un, t, place, constant, value; word storage, dependency;
- if (tk == T_ID && (tv == s_u || tv == s_m || tv == s_d)) { // u*x, d*x, m*x: recast only when * is glued
+ if (tk == T_ID && (tv == s_u || tv == s_m || tv == s_d) && findloc(tv) < 0) { // u*x, d*x, m*x: recast only when * is glued and the tag is not a local's name
peek();
if (pk_tk == T_OP && pk_tv == s_star && pq_gl[0]) {
t = S_M; if (tv == s_u) t = S_U; if (tv == s_d) t = S_D;