This is because when you return an array (and possibly any other collection) from a function, PowerShell puts each element of the array into the pipeline. Thus, GetType() is not actually called in an empty array, but its elements (which are missing).
Inspiration may be to return an array to another array :).
function fn1{return ,@()} (fn1).GetType()
Now Powershell will go into the pipeline elements of this "parent" array, which, as it turns out, contains only one element: your empty array. Note that you cannot achieve this with return @(@()) , because external @() only ensures that the returned result will be the array that it already is.
source share