aboutsummaryrefslogtreecommitdiff
path: root/src/parse.cff
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2022-08-22 13:07:20 +0200
committerlemon <lsof@mailbox.org>2022-08-22 13:07:20 +0200
commitc9bcf39a2ad78c7bc9cbfaab43e03771899cfa44 (patch)
treebd3c305a3d6b558fde1f04e9683d0f97bb4f8620 /src/parse.cff
parent135e66c64adf0ef5d2723c243d2f2f6a059ae753 (diff)
ir
Diffstat (limited to 'src/parse.cff')
-rw-r--r--src/parse.cff4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/parse.cff b/src/parse.cff
index 11c17cc..a1f0dd0 100644
--- a/src/parse.cff
+++ b/src/parse.cff
@@ -1609,8 +1609,8 @@ fn pexpostfix(P *Parser) Expr {
ty = ty.u.Ptr;
}
switch ty.u {
- case Slice;
- ex = { tok.loc, ty_usize, :SPtr(exprdup(P.alloc, ex)) };
+ case Slice sl;
+ ex = { tok.loc, mkptrtype(sl), :SPtr(exprdup(P.alloc, ex)) };
case else;
fatal(P, ex.loc, "invalid operand to `#len' (%t)", ex.ty);
}