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

RSRP-175429: Generated code should include 'unsafe' modifier if the code is unsafe and is not already under another 'unsafe' modifier

$
0
0
Reporter Vladimir Reshetnikov (nikov) Vladimir Reshetnikov (nikov)
Created Apr 2, 2010 8:10:58 PM
Updated Nov 26, 2011 11:51:06 AM
Priority Normal
Type Bug
Fix versions 6.1
State Open
Assignee Alexander Shvedov (shvedov)
Subsystem Generate Action
Affected versions No Affected versions
Fixed in build No Fixed in build
class A<T>
{
    public virtual void Foo(T x = default(T)) {  }
}

unsafe class B : A<int*[]> { }

class C : B
{
    // Generate overriding members
}


Actual result:

class C : B
{
    public override void Foo(int*[] x = null) // error CS0214: Pointers and fixed size buffers may only be used in an unsafe context
    {
        throw new NotImplementedException();
    }
}


Expected result:

class C : B
{
    public unsafe override void Foo(int*[] x = null)
    {
        throw new NotImplementedException();
    }
}

Viewing all articles
Browse latest Browse all 106942

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>