File tree Expand file tree Collapse file tree 2 files changed +17
-17
lines changed Expand file tree Collapse file tree 2 files changed +17
-17
lines changed Original file line number Diff line number Diff line change @@ -93,6 +93,8 @@ proc constructsValue*(n: Cursor): bool =
9393 of CastX , ConvX , HconvX , DconvX :
9494 inc n
9595 skip n
96+ of DerefX , HDerefX :
97+ inc n
9698 of BaseobjX :
9799 inc n
98100 skip n
@@ -846,7 +848,7 @@ proc trEnsureMove(c: var Context; n: var Cursor; e: Expects) =
846848 tr c, n, e
847849 skipParRi n
848850 else :
849- let m = " not the last usage of: " & asNimCode (n )
851+ let m = " not the last usage of: " & asNimCode (arg )
850852 c.dest.buildTree ErrT , info:
851853 c.dest.addSubtree n
852854 c.dest.add strToken (pool.strings.getOrIncl (m), info)
Original file line number Diff line number Diff line change @@ -148,15 +148,14 @@ block:
148148 assert y == 1
149149 foo ()
150150
151- # TODO :
152- # block:
153- # proc foo =
154- # var x = @[1, 2, 3]
155- # let y = ensureMove x[0] # move
156- # assert y == 1
157- # # when not defined(js):
158- # # assert x == @[0, 2, 3]
159- # foo()
151+ block :
152+ proc foo =
153+ var x = @ [1 , 2 , 3 ]
154+ let y = ensureMove x[0 ] # move
155+ assert y == 1
156+ # when not defined(js):
157+ # assert x == @[0, 2, 3]
158+ foo ()
160159
161160block :
162161 proc foo =
@@ -167,11 +166,10 @@ block:
167166 # assert x == @[0, 2, 3]
168167 foo ()
169168
170- # TODO :
171- # block:
172- # proc foo =
173- # var x = @["1", "2", "3"]
174- # let y = ensureMove x[0] # move
175- # assert y == "1"
176- # foo()
169+ block :
170+ proc foo =
171+ var x = @ [" 1" , " 2" , " 3" ]
172+ let y = ensureMove x[0 ] # move
173+ assert y == " 1"
174+ foo ()
177175
You can’t perform that action at this time.
0 commit comments