Given the following script:
function f {
[CmdletBinding()]Param()
Write-Verbose 'f: Start'
$t = New-Object 'System.Collections.ArrayList'
Write-Verbose $t.GetType().Name
return $t
}
$things = New-Object 'System.Collections.ArrayList'
$things.GetType().Name
$things = f -verbose
$things.GetType().Name
Why wouldn't the $things
be-of-type ArrayList
at the final line?