public void CapturingInvocationOfMethodWithoutNoCaptureIsIgnored() => _verifier .Source ( @" using System; class C { private readonly int _field = 42; void CallSite() => Invoke( () => _field ); T Invoke<T>( Func<T> func ) => func(); } " ) .ShouldHaveNoDiagnostics();
public void ClassWithNoDescendantsGetsSealed() => _verifier .Source("public class C {}") .ShouldHaveFix("public sealed class C {}");