Skip to content

xUnit1026 (Unused parameter) fires on fixed statement #1969

@Gnbrkm41

Description

@Gnbrkm41

https://github.com/dotnet/corefx/pull/38701/files#diff-91724393075e1a7718d3521655506742R86

In the following test code:

        public static unsafe void Ctor_CharPtr_Int_Int(char[] valueArray, int startIndex, int length, string expected)
        {
            fixed (char* value = valueArray)
            {
                Assert.Equal(expected, new string(value, startIndex, length));
            }
        }

valueArray is marked as unused even though it is used in the fixed statement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Analyzershttps://github.com/xunit/xunit.analyzersBugA fault in an existing featureExternalThe issue is caused by an external party

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions