Repository: dotnet/roslyn
File: src/Compilers/CSharp/Portable/Symbols/Source/SourceMemberContainerSymbol_ImplementationChecks.cs (C#)

Code before:
            {
                var baseParameter = baseParameters[i];
                var overrideParameter = overrideParameters[i + overrideParameterOffset];
                if (baseParameter.RefKind != overrideParameter.RefKind)
                {
                    reportMismatchInParameterType(diagnostics, baseMethod, overrideMethod, overrideParameter, topLevel: true, (baseParameter, extraArgument));
                }
            }
        }

        internal static void CheckCallerUnsafeMismatch<TArg>(
            Symbol? implementedMember,
            Symbol? overridingMember,
            ErrorCode errorCode,
            TArg arg,
            Func<TArg, Location> overridingMemberLocation,
            BindingDiagnosticBag diagnostics)
        {
            if (overridingMember is null)
            {
                return;
            }

            var leastOverriddenMember = implementedMember ?? overridingMember.GetLeastOverriddenMember(overridingMember.ContainingType);
            if (overridingMember.CallerUnsafeMode == CallerUnsafeMode.Explicit && leastOverriddenMember.CallerUnsafeMode == CallerUnsafeMode.None)
            {
                diagnostics.Add(errorCode, overridingMemberLocation(arg), overridingMember, leastOverriddenMember);
            }
        }
#nullable disable

        private static bool PerformValidNullableOverrideCheck(
            CSharpCompilation compilation,
            Symbol overriddenMember,
            Symbol overridingMember)
        {
            // Don't do any validation if the nullable feature is not enabled or
            // the override is not written directly in source
            return overriddenMember is object &&
                   overridingMember is object &&
                   compilation is object &&
                   compilation.IsFeatureEnabled(MessageID.IDS_FeatureNullableReferenceTypes);
        }

        internal static void CheckValidNullableEventOverride<TArg>(
            CSharpCompilation compilation,
            EventSymbol overriddenEvent,
            EventSymbol overridingEvent,
            BindingDiagnosticBag diagnostics,
            Action<BindingDiagnosticBag, EventSymbol, EventSymbol, TArg> reportMismatch,
            TArg extraArgument)

Review comment (suggestion):
>overridingMember.ContainingType [](http://example.com/codeflow?start=103&length=31)

```this```? #Closed

Code after:
            {
                var baseParameter = baseParameters[i];
                var overrideParameter = overrideParameters[i + overrideParameterOffset];
                if (baseParameter.RefKind != overrideParameter.RefKind)
                {
                    reportMismatchInParameterType(diagnostics, baseMethod, overrideMethod, overrideParameter, topLevel: true, (baseParameter, extraArgument));
                }
            }
        }

        internal static void CheckCallerUnsafeMismatch<TArg>(
            Symbol? implementedMember,
            Symbol? overridingMember,
            ErrorCode errorCode,
            TArg arg,
            Func<TArg, Location> overridingMemberLocation,
            BindingDiagnosticBag diagnostics)
        {
            if (overridingMember is null)
            {
                return;
            }

            Debug.Assert(implementedMember is not null || overridingMember.IsDefinition);

            var leastOverriddenMember = implementedMember ?? overridingMember.GetLeastOverriddenMember(overridingMember.ContainingType);
            if (overridingMember.CallerUnsafeMode == CallerUnsafeMode.Explicit && leastOverriddenMember.CallerUnsafeMode == CallerUnsafeMode.None)
            {
                diagnostics.Add(errorCode, overridingMemberLocation(arg), overridingMember, leastOverriddenMember);
            }
        }
#nullable disable

        private static bool PerformValidNullableOverrideCheck(
            CSharpCompilation compilation,
            Symbol overriddenMember,
            Symbol overridingMember)
        {
            // Don't do any validation if the nullable feature is not enabled or
            // the override is not written directly in source
            return overriddenMember is object &&
                   overridingMember is object &&
                   compilation is object &&
                   compilation.IsFeatureEnabled(MessageID.IDS_FeatureNullableReferenceTypes);
        }

        internal static void CheckValidNullableEventOverride<TArg>(
            CSharpCompilation compilation,
            EventSymbol overriddenEvent,
            EventSymbol overridingEvent,
            BindingDiagnosticBag diagnostics,