Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

39 lines
525 B
C#

using System;
namespace BugReport
{
class Program
{
public static int Main()
{
A a = new A();
a.Counter++;
if (a.Counter != null)
return 1;
++a.Counter;
if (a.Counter != null)
return 2;
a.Counter = 0;
a.Counter++;
if (a.Counter != 1)
return 3;
++a.Counter;
if (a.Counter != 2)
return 4;
Console.WriteLine ("OK");
return 0;
}
}
class A {
private int? _counter;
public int? Counter {
get { return _counter; }
set { _counter = value; }
}
}
}