Quantcast
Channel: YouTrackReSharper (RSRP) - Bug and Issue Tracker
Viewing all articles
Browse latest Browse all 106942

RSRP-218843: Create Method overlooks unsafe context

$
0
0
Reporter Alex Berezoutsky (fergard) Alex Berezoutsky (fergard)
Created Feb 24, 2011 2:46:18 PM
Updated Mar 27, 2012 5:03:10 PM
Priority Major
Type Bug
Fix versions 7.0
State Open
Assignee Alexey Kuptsov (alexey.kuptsov)
Subsystem No subsystem
Affected versions 5.1.3
Fixed in build No Fixed in build
Create Overload works incorrectly for unsafe content:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            Int32[] p = new int[100];
            F(p);
        }

        unsafe private static void F(int[] ints)
        {

            fixed (int* p = ints)
            {
                p[0] = p[1] + p[2];
                F(p, 1); // method to be created
            }
        }

    }
}

Result:
		private static void F(int* ints, int i)
		{
			throw new NotImplementedException();
		}

Viewing all articles
Browse latest Browse all 106942

Trending Articles