Skip to content

RCS1249 - Not working in some cases #1659

@glen-84

Description

@glen-84
httpClient.DefaultRequestHeaders.UserAgent.Add(
    new ProductInfoHeaderValue(
        new ProductHeaderValue(
            "Example",
            typeof(InitCommand).Assembly!.GetName()!.Version!.ToString())));
//                                      ^ Assembly is not null.
    if (expression.Parameters.Count != 1 ||
        expression.Parameters[0].Type != context.RuntimeTypes.Peek()!.Source)
//                            Stack.Peek() returns a non-null value ^
descriptor.Extend().Configuration.ParameterExpressionBuilders.Add(
    new CustomParameterExpressionBuilder<SomeState>(
        t => t.GetLocalState<SomeState>("foo")!));
//                                            ^ GetLocalState<SomeState> returns T (SomeState)
private readonly FieldInfo _sessionsField;

// ...

var sessionInfos = (_sessionsField!.GetValue(_sessionPool)
//                                ^
    as System.Collections.IDictionary)!.Values;
public IList<FieldInfo> RentFieldInfoList()
{
    var buffer = _buffers.Peek();
    List<FieldInfo>? list;

    while (!buffer.TryPop(out list))
    {
        buffer = s_fieldInfoPool.Get();
        _buffers.Push(buffer);
    }

    return list!;
//             ^ 'list' is not null here.
}
const string? valueSyntax = "92° 0' 0.000\" N"!;
//                                            ^
const string? valueSyntax = "182° 0' 0.000\" E"!;
//                                             ^
StringValueNode valueSyntax = new("179° 0' 0.000\" E")!;
//                                                    ^

etc.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions