<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 21, 2015, at 11:18 PM, Jens Persson <<a href="mailto:jens@bitcycle.com" class="">jens@bitcycle.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Thanks!<div class="">(As a side note related to overflow, I filed <a href="https://bugs.swift.org/browse/SR-297" class="">https://bugs.swift.org/browse/SR-297</a> demonstrating that a</div><div class="">T : UnsignedIntegerType can be set to eg literal -1 without trapping the overflow.)</div></div></div></blockquote></div><br class=""><div class="">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.</div><div class=""><br class=""></div><div class="">-Joe</div></body></html>