mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Add type inference support for generic methods with type parameters (#16951)
This commit is contained in:
@@ -1227,6 +1227,12 @@ Describe "Type inference Tests" -tags "CI" {
|
||||
|
||||
$res.Count | Should -Be BaseType
|
||||
}
|
||||
|
||||
It 'Infers type of generic method invocation with type parameters' {
|
||||
$res = [AstTypeInference]::InferTypeOf( { [array]::Empty[int]() }.Ast)
|
||||
$res.Count | Should -Be 1
|
||||
$res.Name | Should -Be 'System.Int32[]'
|
||||
}
|
||||
}
|
||||
|
||||
Describe "AstTypeInference tests" -Tags CI {
|
||||
|
||||
Reference in New Issue
Block a user