Ejemplo n.º 1
0
        public static void MethodWithRefAndOutParameter(ref int *refParam, out int *outParam)
        {
            // REPORTED false negative https://youtrack.jetbrains.com/issue/RSRP-427414:
            ReSharper.TestValueAnalysisUnsafe(refParam, refParam == null);

            refParam = null /*Expect:AssignNullToNotNullAttribute[MRef]*/;
            outParam = null /*Expect:AssignNullToNotNullAttribute[MOut]*/;
        }
Ejemplo n.º 2
0
 public static void Method(int *a)
 {
     ReSharper.TestValueAnalysisUnsafe(a, a == null /*Expect:ConditionIsAlwaysTrueOrFalse[MIn]*/);
 }
Ejemplo n.º 3
0
 public static void MethodWithCanBeNull([CanBeNull] int *a)
 {
     ReSharper.TestValueAnalysisUnsafe(a /*Expect:AssignNullToNotNullAttribute*/, a == null);
 }