From c9bcf39a2ad78c7bc9cbfaab43e03771899cfa44 Mon Sep 17 00:00:00 2001 From: lemon Date: Mon, 22 Aug 2022 13:07:20 +0200 Subject: ir --- src/parse.cff | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/parse.cff') 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); } -- cgit v1.2.3