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

asRecord support for single-case discriminated unions #32

Open
spiffytech opened this issue Apr 6, 2015 · 1 comment
Open

asRecord support for single-case discriminated unions #32

spiffytech opened this issue Apr 6, 2015 · 1 comment

Comments

@spiffytech
Copy link

Please add support for asRecord deserializing fields into single-case discriminated unions. For example, I have a type Int6 = Int6 of int, which I just use for ints 0 <= i <= 5. When I try to deserialize my int32 database field through asRecord, I get:

System.ArgumentException: Object type System.Int32 cannot be converted to target type: sleep_log.DomainTypes+Int6

I make extensive use of single-case discriminated unions, so having asRecord see that e.g., my int32 database field corresponds to a T<int> record field would be super cool.

@mausch
Copy link
Owner

mausch commented Apr 7, 2015

Sounds good, wanna give it a try?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants