Skip to content

Commit 28c8f73

Browse files
committed
Make sure simple lookups of locals work too.
1 parent b67c3b8 commit 28c8f73

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

t/qast/qast.t

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use QRegex;
22

3-
plan(19);
3+
plan(20);
44

55
# Following a test infrastructure.
66
sub compile_qast($qast) {
@@ -219,3 +219,19 @@ is_qast(
219219
),
220220
"Is cabbage what you pay the taxi driver?",
221221
'local with type str');
222+
223+
is_qast(
224+
QAST::Block.new(
225+
QAST::Op.new(
226+
:op('bind'),
227+
QAST::Var.new( :name('a'), :scope('local'), :decl('var'), :returns(int) ),
228+
QAST::IVal.new(:value(12))
229+
),
230+
QAST::Op.new(
231+
:op('add_i'),
232+
QAST::Var.new( :name('a'), :scope('local') ),
233+
QAST::IVal.new(:value(13))
234+
)
235+
),
236+
25,
237+
'local int bound to a value then used in addition');

0 commit comments

Comments
 (0)