On Tue, May 17, 2016 at 5:46 AM, zh ao via swift-users <swift-users@swift.org> wrote: > It seams that I encountered bugs in function advancedBy(). > > do { > var str = "abcdefg" > var range = str.startIndex..<str.endIndex // 0..<7 > str += "hijklmn" > range.endIndex = str.endIndex // 0..<14 > let index = range.startIndex.advancedBy(10) > //fatal error: cannot increment endIndex > }
Hi, Thank you for the report. To me, this issue looks the same as https://bugs.swift.org/browse/SR-1487. 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 <griboz...@gmail.com>*/ _______________________________________________ swift-users mailing list swift-users@swift.org https://lists.swift.org/mailman/listinfo/swift-users