railsware / Sleipnir

BDD-style framework for Swift
http://railsware.com/blog/2014/07/04/bdd-style-testing-in-swift-with-sleipnir
MIT License
844 stars 48 forks source link

Can't compile any more #16

Open ghost opened 9 years ago

ghost commented 9 years ago

Can't add public extensions to generic types Array or Optional

Found this related issue on stackoverflow.

http://stackoverflow.com/questions/26387262/array-extension-called-from-other-module

How are others working around this?

I guess in my local copy I'll remove the public modifier and add some other helper methods.

Here is one of the 4 compile errors regarding this:

/Users/mgwelch/Documents/Projects/thirdparty/swiftz/sleipnir/Sleipnir/Sleipnir/Matchers/ShouldSyntax.swift:29:9: Extension of generic type 'Array<T>' from a different module cannot provide public declarations
ghost commented 9 years ago

Can't compile the Sample project either:

/Users/mgwelch/Documents/Projects/thirdparty/swiftz/sleipnir/Sample/Sample/LibrarySpec.swift:21:13: 'AnyObject?' does not have a member named 'shouldNot'

Nevermind. This is due to me commenting out the public shouldNot method of Optional.

atermenji commented 9 years ago

it seems that they've disabled public extensions on generic methods in the new language version. this is bad, cause it was the only way to implement 'should' syntax for expectations. I'll try to search for some solution next week, thanks for reporting this