Fix calling generic local functions recursively (#15968)
There were two root causes here: 1) The rewriter was treating the difference between the symbol and `symbol.ConstructedFrom` as whether or not there were any type parameters remaining that may need substitution. This is invalid for recursive local functions. 2) The local function reference rewriter was including type parameters from the containing type in the list of parameters to substitute. This should happen iff the containing type is a lambda frame used to capture variables, which is not always the case for local functions (although it is always the case for lambdas). Fixes #15751
Showing
想要评论请 注册 或 登录