Make Field constructor functions generic #8

Merged
danieljsummers merged 2 commits from v-four-rc5 into main 2024-09-18 13:36:15 +00:00

F# can upcast types to obj if those types are used in place. However, a string seq (IEnumerable<string> in C#) cannot be upcast to an obj seq (IEnumerable<object>) without mapping each item in the sequence. Making the Field constructor functions generic will allow them to take any object type, and these functions handle the conversion to obj (for In and InArray; others work transparently).

F# can upcast types to `obj` if those types are used in place. However, a `string seq` (`IEnumerable<string>` in C#) cannot be upcast to an `obj seq` (`IEnumerable<object>`) without mapping each item in the sequence. Making the `Field` constructor functions generic will allow them to take any object type, and these functions handle the conversion to `obj` (for `In` and `InArray`; others work transparently).
danieljsummers added 2 commits 2024-09-18 13:35:56 +00:00
Probably only needed for In/InArray, but implemented for all
danieljsummers self-assigned this 2024-09-18 13:36:02 +00:00
danieljsummers merged commit 740767661c into main 2024-09-18 13:36:15 +00:00
danieljsummers deleted branch v-four-rc5 2024-09-18 13:36:15 +00:00
Sign in to join this conversation.
No description provided.