This is an automatically generated mail to inform you that tests are now available in t/spec/S02-builtin_data_types/array.t
commit 062319f3e4bbfa3cd2a051ed4a96dd0f537d07da Author: moritz <mor...@c213334d-75ef-0310-aa23-eaa082d1ae64> Date: Sat Jul 24 17:49:51 2010 +0000 [t/spec] test that .[] is defined oin Any, and .[0] returns self for scalars. Tests RT #58372 git-svn-id: http://svn.pugscode.org/p...@31810 c213334d-75ef-0310-aa23-eaa082d1ae64 diff --git a/t/spec/S02-builtin_data_types/array.t b/t/spec/S02-builtin_data_types/array.t index 7f38341..6a7752d 100644 --- a/t/spec/S02-builtin_data_types/array.t +++ b/t/spec/S02-builtin_data_types/array.t @@ -2,7 +2,7 @@ use v6; use Test; -plan 96; +plan *; #L<S02/Mutable types/Array> @@ -329,4 +329,17 @@ my @array2 = ("test", 1, Mu); is [][].elems, 0, '[][] returns empty list/array'; } +# RT #58372 +# by current group understanding of #perl6, postcircumifx:<[ ]> is actually +# defined in Any, so that .[0] is the identity operation for non-Positional +# types +{ + is 1[0], 1, '.[0] is identiity operation for scalars (Int)'; + is 'abc'[0], 'abc', '.[0] is identiity operation for scalars (Str)'; + nok 'abc'[1].defined, '.[1] on a scalar is not defined'; + dies_ok { Mu.[0] }, 'but Mu has no .[]'; +} + +done_testing; + # vim: ft=perl6