> On Dec 21, 2015, at 11:18 PM, Jens Persson <[email protected]> wrote:
> 
> Thanks!
> (As a side note related to overflow, I filed 
> https://bugs.swift.org/browse/SR-297 <https://bugs.swift.org/browse/SR-297> 
> demonstrating that a
> T : UnsignedIntegerType can be set to eg literal -1 without trapping the 
> overflow.)

Thanks! Yeah, we only ever handled overflow in concrete integer types. 
Compile-time diagnostics for protocol invariants would be another interesting 
thing to add. It might be possible by refactoring how IntegerLiteralConvertible 
interfaces with _BuiltinIntegerLiteralConvertible, making the diagnostics occur 
while narrowing Builtin.Int2048 to the literal type.

-Joe
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to