Expecting IMethodSymbol.ContainingSymbol to be an ITypeSymbol is causing a type cast exception for local methods that require dataflow analysis (https://github.com/dotnet/linker/issues/3106), and it makes more sense to use ContainingType. I haven't been able to repro the issue (I've had problems building asp.net), but it seems pretty clear this is the fix.
Expecting IMethodSymbol.ContainingSymbol to be an ITypeSymbol is causing a type cast exception for local methods that require dataflow analysis (https://github.com/dotnet/linker/issues/3106), and it makes more sense to use ContainingType. I haven't been able to repro the issue (I've had problems building asp.net), but it seems pretty clear this is the fix.