Add type inference support for generic methods with type parameters (#16951)

This commit is contained in:
MartinGC94
2022-05-27 11:17:53 -07:00
committed by GitHub
parent 2fa20974cc
commit e7f705adef
2 changed files with 66 additions and 8 deletions
@@ -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 {