[swift-evolution] Explicity Size Clipping
Félix Cloutier
felixcca at yahoo.ca
Wed Jan 6 12:14:27 CST 2016
I don't understand. Can you show a code example?
Félix
> Le 6 janv. 2016 à 13:02:43, James Campbell via swift-evolution <swift-evolution at swift.org> a écrit :
>
> I have a overloaded method for a protocol that takes an Int or double.
>
> I have an issue with swift calling the Int version when passing in a UInt32 . Ideally I would prefer the compiler to detect I am about to do something which will cause an overflow and throw an error.
>
> I would then have to explicitly add a overloaded UInt32 method or explicitly convert it to Int like so "Int(uintVariable)".
>
> --
> Wizard
> james at supmenow.com <mailto:james at supmenow.com>
> +44 7523 279 698
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160106/01038232/attachment.html>
More information about the swift-evolution
mailing list