Closed SeeminglyScience closed 6 years ago
Method resolution should infer generic arguments from the expression tree. Currently if generic arguments aren't specified explicitly with the generic keyword resolution will fail.
generic
The work around is to use generic:
$delegate = [psdelegate]{ generic ([array]::Empty(), [int]) } $delegate.Invoke().GetType() # IsPublic IsSerial Name BaseType # -------- -------- ---- -------- # True True Int32[] System.Array $delegate = [psdelegate]{ generic ([tuple]::Create(10, 'string'), [int], [string]) } $delegate.Invoke() # Item1 Item2 Length # ----- ----- ------ # 10 string 2
Method resolution should infer generic arguments from the expression tree. Currently if generic arguments aren't specified explicitly with the
generic
keyword resolution will fail.The work around is to use
generic
: