[svn:parrot] r41548 - trunk/t/compilers/imcc/syn
chromatic at svn.parrot.org
chromatic at svn.parrot.org
Tue Sep 29 08:19:56 UTC 2009
Author: chromatic
Date: Tue Sep 29 08:19:55 2009
New Revision: 41548
URL: https://trac.parrot.org/parrot/changeset/41548
Log:
[t] Added TODO test for exception when redeclaring a lexical in the same sub.
Modified:
trunk/t/compilers/imcc/syn/clash.t
Modified: trunk/t/compilers/imcc/syn/clash.t
==============================================================================
--- trunk/t/compilers/imcc/syn/clash.t Tue Sep 29 07:28:01 2009 (r41547)
+++ trunk/t/compilers/imcc/syn/clash.t Tue Sep 29 08:19:55 2009 (r41548)
@@ -1,5 +1,5 @@
#!perl
-# Copyright (C) 2001-2008, Parrot Foundation.
+# Copyright (C) 2001-2009, Parrot Foundation.
# $Id$
use strict;
@@ -8,7 +8,7 @@
use Test::More;
use Parrot::Config;
-use Parrot::Test tests => 16;
+use Parrot::Test tests => 17;
pir_output_is( <<'CODE', <<'OUT', "if/unless" );
.sub test :main
@@ -261,6 +261,30 @@
ok
OUT
+pir_error_output_like( <<'CODE', <<'OUT', 'lexical redeclared in sub', todo => 'TT #1073' );
+.sub 'main' :main
+ .lex 'foo', $P0
+ $P1 = box 'ok 1'
+ store_lex 'foo', $P1
+
+ $P2 = find_lex 'foo'
+ say $P2
+
+ .lex 'bar', $P3
+ $P4 = box 'ok 2'
+ store_lex 'bar', $P4
+
+ $P5 = find_lex 'bar'
+ say $P5
+
+ .lex 'foo', $P6
+ $P7 = box 'ok 3'
+ store_lex 'foo', $P7
+.end
+CODE
+/Lexical 'foo' already declared/
+OUT
+
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
More information about the parrot-commits
mailing list