Scalar indexing out of bounds returns nothing instead of $null - by Derp McDerp

Status : 

 


1
0
Sign in
to vote
ID 808144 Comments
Status Active Workarounds
Type Bug Repros 0
Opened 11/8/2013 7:44:33 PM
Access Restriction Public

Description

v3 added indexing on scalars but indexing out of bounds returns nothing instead of $null:

(1)[10] |% { 'a' } { "b$_" } { 'c' } # a c
@(1)[10] |% { 'a' } { "b$_" } { 'c' }  # a b c
@{a=1}['b'] |% { 'a' } { "b$_" } { 'c' } # a b c
@{a=1}.b |% { 'a' } { "b$_" } { 'c' }  # a b c

Which is inconsistent with the rest of the language.
Sign in to post a comment.