예제 #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]*/;
        }
예제 #2
0
 public static void Method(int *a)
 {
     ReSharper.TestValueAnalysisUnsafe(a, a == null /*Expect:ConditionIsAlwaysTrueOrFalse[MIn]*/);
 }
예제 #3
0
 public static void MethodWithCanBeNull([CanBeNull] int *a)
 {
     ReSharper.TestValueAnalysisUnsafe(a /*Expect:AssignNullToNotNullAttribute*/, a == null);
 }