Michael Klement
Michael Klement
@TSlivede :) I've [unindented](https://en.wiktionary.org/wiki/unindent) the paragraph, and I've also added our (later) concern about the suggestion expressed therein.
Good catch; minimal repro: ```powershell PS> & { param($1a) $1a } -1a foo -1a # !! Parameter name wasn't recognized as such, treated as positional argument. ``` As an aside:...
Not working (I've carefully matched the amount of information contained in your comment in my response.)
@scriptingstudio, please note the first example in the OP, which _does_ work: `@{ 42 = 'foo' }.42` - the issue at hand is that with _member-access enumeration_ it doesn't.
To put it differently: the promise of member-access enumeration is that: ```powershell (@{ 42 = 'foo1' }, @{ 42 = 'foo2' }).42 # !! BROKEN ``` is shorthand for: ```...
This issue is about the behavior of the member-access operator, `.` - it doesn't matter what .NET type it operates on, and that with hashtables, as a syntactic convenience, it...
@jhoneill, I think you swapped the two scenarios: ```powershell $h = @{ 42 = 'foo1' } ; $h.42 # -> 'foo1': property "name" type ([int]) matches the type of the...
As an aside: while switching to `[pscustomobject]` avoids this particular problem - `$o = [pscustomobject] @{ '42' = 'foo1' } ; $o.42` works without needing to quote the property name...
@jhoneill, that is very curious - the behavior on the right side is what I expect and see consistently; I have no explanation for the left side. Can you consistently...
Thanks - just dot-sourcing a script with these commands does _not_ surface the issue for me. Either way, it seems clear that we're dealing with a separate bug.