Re: How to use [EnforceRange] with union types and enums

On 9/13/16 7:26 AM, Adam Bergkvist wrote:
> Is it valid to squeeze in the extended attribute in the typedef?

As the spec stands, it's not, though note the bug Anne linked to in his 
response.

The fundamental question is whether the range-enforcement is a property 
of the _type_ or of the _argument_.  It's mostly been treated as the 
latter, but this does lead to a slightly weird distinction between union 
and dictionary arguments in terms of how range-enforcement happens.

Maybe the right answer is to really make range-enforcement a property of 
the type, nix the [EnforceRange] thing entirely and just have an 
"enforced long" type and similar for other numeric types....

-Boris

Received on Tuesday, 13 September 2016 13:13:18 UTC