aboutsummaryrefslogtreecommitdiff
path: root/src/compiler/decl.zc
diff options
context:
space:
mode:
authorGravatar zinc <zinc@downsta.ir> 2026-10-15 15:01:29 +0330
committerGravatar zinc <zinc@downsta.ir> 2026-10-15 15:01:29 +0330
commit5aaf70abdda0026a7b4d647746a109d94b25f7a0 (patch)
tree6e2448d5133ed2afba58dc66762400827c890c3b /src/compiler/decl.zc
parentstd.Io.print/println take any mix of printable arguments (compiler expands pe... (diff)
analyzer: a .u (declared or inferred) function can't return a borrowed parameter or a value derived from one; fixtures
Diffstat (limited to 'src/compiler/decl.zc')
-rw-r--r--src/compiler/decl.zc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/decl.zc b/src/compiler/decl.zc
index 6bc8245..e2c3613 100644
--- a/src/compiler/decl.zc
+++ b/src/compiler/decl.zc
@@ -435,7 +435,7 @@ int fndef(int chk, int rty, int ret, int n) {
fixall(sfix[s], here); sfix[s] = 0;
fn_begin(chk, ret);
lt = lt_begin(sval[s], sname[s], lfl); xc_fn = sname[s];
- finsym = s; finfer = !ret;
+ finsym = s; finfer = !ret; ret_borrowed = 0;
effect_current = effect_record(s); rt.fill_w(effect_current, 0, 50); effect_current[0] = 1; if (!chk || stubgen) effect_current[0] = 2; effect_current[1] = np;
i = 0; while (i < np) { if (pt[i] == 2) { effect_current[2 + i] = EF_CONSUME; effect_current[26 + i] = EF_CONSUME; } i++; }
if (typed && explicit_rty) fty = rty;