We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simple usage of DateTime constructor
public static DateTime DateTimeConstructor() { var res = new DateTime(2022, 1, 1); return res; }
generates the test with expected NullReferenceException
Before exception is generated (in ILInterpreter member x.Raise) ipstack:
ILInterpreter member x.Raise
[0] Instruction (54, System.UInt64 System.DateTime.DateToTicks(System.Int32, System.Int32, System.Int32)) [1] Instruction (4, System.Void System.DateTime..ctor(this, System.Int32, System.Int32, System.Int32)) [2] Instruction (7, System.DateTime IntegrationTests.Environment.DateTimeConstructor())
The latest frame points to if ((uint)day > days[month] - days[month - 1]) where array days is loaded from a static member :
if ((uint)day > days[month] - days[month - 1])
private static readonly uint[] s_daysToMonth365 = { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 }; private static readonly uint[] s_daysToMonth366 = { 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 }; <...> uint[] days = IsLeapYear(year) ? s_daysToMonth366 : s_daysToMonth365;
Possible reason for false NullReferenceException are uninitialized statics.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Simple usage of DateTime constructor
generates the test with expected NullReferenceException
Before exception is generated (in
ILInterpreter member x.Raise
)ipstack:
The latest frame points to
if ((uint)day > days[month] - days[month - 1])
where array days is loaded from a static member :
Possible reason for false NullReferenceException are uninitialized statics.
The text was updated successfully, but these errors were encountered: