
26 Dec
2011
26 Dec
'11
4:57 p.m.
On 12/26/2011 03:17 PM, Antoine Latter wrote:
The error is warning you that the record update 'oct { b8 = bit }' can fail at run-time if 'oct' is None.
Since it looks like you've checked for that you shouldn't have a problem, but the compiler doesn't know that.
Thanks, that's what I thought but I wanted to make sure I wasn't missing something obvious.
If you decompose your type into 'Octet' without the 'None' case, and 'Maybe Octet' for the times when 'None' is appropriate, the compiler will have enough information to not give warnings like this.
I can't be the one to tell you if that is worth it or not.
I must have had a good reason to do it that way, right? =)