• A
    Refactor to remove LocalFunctionTypeParameterSymbol (#20340) · 888d7c5b
    Andy Gocke 提交于
    LocalFunctionTypeParameterSymbol isn't necessary as long as the functionality around type constraints can be moved into a shared base class between ordinary method symbols and local function symbols.
    In fact, it would be very useful to have a shared base symbol aside from MethodSymbol between local functions, lambdas, and other source method symbols. To this end, I've renamed SourceMemberMethodSymbol to SourceOrdinaryMethodSymbol (since it is just used for ordinary member-level methods), SourceMethodSymbol to SourceMemberMethodSymbol (since it is only used as a base class for member-level method-like functions like ordinary methods, constructors, property accessors, et al.), and added a new abstract class SourceMethodSymbol that is the root of both LocalFunctionSymbol and SourceMemberMethodSymbol. This lets us unify all source method-like symbols under a single base class, SourceMethodSymbol.
    The first three commits perform the refactoring, while the last commit actually removes LocalFunctionTypeParameterSymbol and moves the necessary functionality into SourceMethodSymbol. I expect more functionality to be moved over in subsequent PRs.
    
    Fixes #17244
    888d7c5b
SourceOrdinaryMethodSymbol.cs 46.2 KB