Use correct type parameter binder for local functions (#24108)
This looks like simple oversight. The binder being used for type parameters was retrieved from the binder factory since we didn't explicitly pass one. For members this is correct since the binder factory can be queried for top-level binders. This is not correct for local functions because they use method body binders, which are not accessible from the binder factory. Mostly, this doesn't matter. The exception is when you try to speculatively bind an attribute on a type parameter. Here, you need an in-method binder and VS will crash if it's the wrong binder. This was uncommon since attributes on type parameters are not permitted in local functions, but VS should not crash. Fixes #17814
Showing
想要评论请 注册 或 登录