[swift-users] Compile time tests
José Manuel Sánchez
buscarini at gmail.com
Fri Mar 31 02:44:55 CDT 2017
I don’t know if this has come before (I tried searching but it’s not easy with the mailing lists system); sorry in advance if that’s the case.
I’ve been using more generics lately, and I’ve come to a point where it would be really nice to check if my types are correctly specified so that a wrong combination isn’t possible because the compiler will not allow it. The problem is, I can’t do this using unit testing, because if everything is correct, the code won’t compile, and then the tests will fail. I’m guessing there’s currently no way to do this? I did some googling and I only found something like this for boost (compile-fail):
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-users