[swift-dev] operator overloads

Dmitri Gribenko gribozavr at gmail.com
Thu Dec 17 13:24:16 CST 2015


On Thu, Dec 17, 2015 at 11:20 AM, Rafkind, Jon via swift-dev
<swift-dev at swift.org> wrote:
> How does the Swift compiler determine which method or operator to call given a set of overloads at a given call site? This question may conflate two issues: method overloads and operator overloads, but it seems at least superficially that they are related. Somehow they end up using different rules as I will demonstrate shortly.

This looks like a bug to me, would you mind filing it on
https://bugs.swift.org/ ?

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/


More information about the swift-dev mailing list