File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed
Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -280,7 +280,9 @@ def tryCorrectVDeclType (ty : IRType) (e : Expr) : M IRType :=
280280 match e with
281281 | .fap f _ => do
282282 let decl ← getDecl f
283- return decl.resultType
283+ match decl.name with
284+ | ``String.Pos.next | ``Array.size => dbg_trace "strrrrike" ; return .tagged
285+ | _ => return decl.resultType
284286 | .pap .. => return .object
285287 | .uproj .. => return .usize
286288 | .ctor .. | .reuse .. | .ap .. | .lit .. | .sproj .. | .proj .. | .reset .. =>
Original file line number Diff line number Diff line change 1+ /--
2+ trace: [ Compiler.IR ] [ result ]
3+ def test (x_1 : @& obj) : tobj :=
4+ let x_2 : tagged := Array.size ◾ x_1;
5+ let x_3 : tobj := Nat.add x_2 x_2;
6+ ret x_3
7+ def test._boxed (x_1 : obj) : tobj :=
8+ let x_2 : tobj := test x_1;
9+ dec x_1;
10+ ret x_2
11+ ---
12+ info: strrrrike
13+ -/
14+ #guard_msgs in
15+ set_option trace.compiler.ir.result true in
16+ def test (xs : Array Int) :=
17+ let size := xs.size
18+ size + size
You can’t perform that action at this time.
0 commit comments