Reporter | 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 { } }