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

RSRP-296056: 'Copy default value from base' inserts NaN instead of double.NaN

$
0
0
Reporter Vladimir Reshetnikov (nikov) Vladimir Reshetnikov (nikov)
Created Apr 19, 2012 2:01:21 AM
Updated Apr 19, 2012 2:03:11 AM
Priority Normal
Type Bug
Fix versions No Fix versions
State Submitted
Assignee Unassigned
Subsystem No subsystem
Affected versions No Affected versions
Fixed in build No Fixed in build
class A
{
    public virtual void Foo(double x = double.NaN)
    {
    }
}

class B : A
{
    public override void Foo(double x) // Copy default value from base
    {
    }
}


Actual result:

class A
{
    public virtual void Foo(double x = double.NaN)
    {
    }
}

class B : A
{
    public override void Foo(double x = NaN) // error CS0103: The name 'NaN' does not exist in the current context
    {
    }
}


Expected:

class A
{
    public virtual void Foo(double x = double.NaN)
    {
    }
}

class B : A
{
    public override void Foo(double x = double.NaN) // OK
    {
    }
}

Viewing all articles
Browse latest Browse all 106942

Trending Articles



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