Skip to content
New issue

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

Unexpected Stryker Warnings Occuring with Nullable DateTime #2801

Closed
jameswiseman76rlg opened this issue Dec 18, 2023 · 0 comments · Fixed by #2915
Closed

Unexpected Stryker Warnings Occuring with Nullable DateTime #2801

jameswiseman76rlg opened this issue Dec 18, 2023 · 0 comments · Fixed by #2915
Assignees
Labels
🐛 Bug Something isn't working

Comments

@jameswiseman76rlg
Copy link

Describe the bug

Getting a bunch of warnings on our .NET4.6 project:

[15:48:34 WRN] Stryker.NET encountered a compile error in \Defect\InvestmentControl.Api\Features\AccountInstructionHistory\AccountInstructionsHistory.cs (at 140:85) with message: 'DateTime?' does not contain a definition for 'Date' and no accessible extension method 'Date' accepting a first argument of type 'DateTime?' could be found (are you missing a using directive or an assembly reference?) (Source code: Date)

[15:48:34 WRN] Safe Mode! Stryker will try to continue by rolling back all mutations in method. This should not happen, please report this as an issue on github with the previous error message.

[15:48:34 WRN] Stryker.NET encountered a compile error in \Defect\InvestmentControl.Api\Features\AccountInstructionHistory\AccountInstructionsHistory.cs (at 144:71) with message: Argument 2: cannot convert from 'System.DateTime?' to 'System.DateTime' (Source code: effectiveDate)

[15:48:34 WRN] Safe Mode! Stryker will try to continue by rolling back all mutations in method. This should not happen, please report this as an issue on github with the previous error message.

[15:48:34 WRN] Stryker.NET encountered a compile error in \Defect\InvestmentControl.Api\Features\AccountInstructionHistory\AccountInstructionsHistory.cs (at 145:61) with message: Argument 2: cannot convert from 'System.DateTime?' to 'System.DateTime' (Source code: effectiveDate)

[15:48:34 WRN] Safe Mode! Stryker will try to continue by rolling back all mutations in method. This should not happen, please report this as an issue on github with the previous error message.

[15:48:34 WRN] Stryker.NET encountered a compile error in \Defect\InvestmentControl.Api\Features\AccountInstructionHistory\AccountInstructionsHistory.cs (at 146:94) with message: Argument 3: cannot co nvert from 'System.DateTime?' to 'System.DateTime' (Source code: effectiveDate)

[15:48:34 WRN] Safe Mode! Stryker will try to continue by rolling back all mutations in method. This should not happen, please report this as an issue on github with the previous error message.

[15:48:34 WRN] Stryker.NET encountered a compile error in \Defect\InvestmentControl.Api\Features\AccountInstructionHistory\AccountInstructionsHistory.cs (at 147:81) with message: Argument 3: cannot convert from 'System.DateTime?' to 'System.DateTime' (Source code: effectiveDate)

[15:48:34 WRN] Safe Mode! Stryker will try to continue by rolling back all mutations in method. This should not happen, please report this as an issue on github with the previous error message.

The following repo exposes this issue:
jameswiseman76/StrykerNullWarning (github.com)

Desktop (please complete the following information):

  • OS: [e.g. Windows]
  • Type of project [framework]
  • Framework Version [e.g. 4.6]
  • Stryker Version [e.g. beta 3.12.0]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working
Projects
None yet
2 participants