Skip to content

Commit

Permalink
Add extra type constraint in test helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
MattThompson committed Nov 18, 2024
1 parent e411a33 commit e40a26d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Tests/Helpers.fs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ let createSimpleDeployment parameters =

let convertTo<'T> = Serialization.toJson >> Serialization.ofJson<'T>

let farmerToMs<'T when 'T: null> (serializationSettings: Newtonsoft.Json.JsonSerializerSettings) data =
let farmerToMs<'T when 'T: null and 'T not struct> (serializationSettings: Newtonsoft.Json.JsonSerializerSettings) data =

Check failure on line 23 in src/Tests/Helpers.fs

View workflow job for this annotation

GitHub Actions / build

Unexpected identifier in type constraint. Expected ':', ':>' or other token.

Check failure on line 23 in src/Tests/Helpers.fs

View workflow job for this annotation

GitHub Actions / build

Unexpected identifier in type constraint. Expected ':', ':>' or other token.
data
|> Serialization.toJson
|> fun json -> SafeJsonConvert.DeserializeObject<'T>(json, serializationSettings)
Expand Down

0 comments on commit e40a26d

Please sign in to comment.