Re: [swift-users] Linux Swift: Strange bug found in a simple arithmetic

2016-09-07 Thread louislepegue via swift-users
Thanks A must reading, at least I understand that is a compiler bug that could happen with type conversion. Also, a workaround can be easily done. On this September 7, I hope that we will have a new release :-)  

Re: [swift-users] Linux Swift: Strange bug found in a simple arithmetic

2016-09-07 Thread Jon Shier via swift-users
It’s related to this: http://www.cocoawithlove.com/blog/2016/07/12/type-checker-issues.html Jon > On Sep 7, 2016, at 11:32 AM, Lou Zell via swift-users > wrote: > > Also hoping someone more knowledgeable can explain why these seemingly simple > cases do in fact take so long! :) > __

Re: [swift-users] Linux Swift: Strange bug found in a simple arithmetic

2016-09-07 Thread Ole Begemann via swift-users
Also hoping someone more knowledgeable can explain why these seemingly simple cases do in fact take so long! :) Matt Gallagher wrote an excellent article where he explained how seemingly simple expressions can sometimes cause an enormous amount of work for the type checker because it has so ma

Re: [swift-users] Linux Swift: Strange bug found in a simple arithmetic

2016-09-07 Thread Lou Zell via swift-users
Also hoping someone more knowledgeable can explain why these seemingly simple cases do in fact take so long! :) ___ swift-users mailing list swift-users@swift.org https://lists.swift.org/mailman/listinfo/swift-users

Re: [swift-users] Linux Swift: Strange bug found in a simple arithmetic

2016-09-07 Thread Lou Zell via swift-users
> > It's certainly an interesting compiler issue, probably to do with the type > analysis I've for sure hit this before and now see with a little help to the compiler the compile time drops dramatically:​ Float(abs(Double(0) - Double(0))) repl.swift:50:1: error: expression was too complex to be

Re: [swift-users] Linux Swift: Strange bug found in a simple arithmetic

2016-09-07 Thread louislepegue via swift-users
oups!  typo! the real test: let simpleTest = Float(abs(11 - -3) + abs(4.5 - -4))  //! print ("simpleTest:  \(simpleTest)") Le 07/09/2016 à 10:33, Alex Blewitt a écrit : On 7 Sep 2016, at 15:11, louislepegue via s

Re: [swift-users] Linux Swift: Strange bug found in a simple arithmetic

2016-09-07 Thread Alex Blewitt via swift-users
On 7 Sep 2016, at 15:11, louislepegue via swift-users wrote: > > let simpleTest = Float(abs(11 - -3) + abs(4.5 - -4)) //! > print ("simpleTest: \(Simpletest)") > Aside from the fact that the case-sensitivity of simpleTest is important, the delay is in the compilation of this script rather t

[swift-users] Linux Swift: Strange bug found in a simple arithmetic

2016-09-07 Thread louislepegue via swift-users
Hi This simple instruction can take more than 20 seconds to execute  and near 100% CPU on different Linux Swift version I tested. Also tested in compiled mode with the same result. let simpleTest = Float(abs(11 - -3) + abs(4.5 - -4))  //! print