Last active
August 29, 2015 14:12
-
-
Save ChristianKienle/22bfa174c390e551d810 to your computer and use it in GitHub Desktop.
Revisions
-
Christian Kienle revised this gist
Dec 30, 2014 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,8 @@ import Foundation class QueryResult {} // if I make this class public then the compiler says that generate has to be declared public. // If I make generate public I get a different error... // But QueryResult is a class which has to be public... it is part of my public API... public class Row {} class QueryResultGenerator : GeneratorType { -
Christian Kienle created this gist
Dec 30, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ import Foundation class QueryResult {} // if I make this class public then the compiler says that generate has to be declared public. If I make generate public I get a different error... But QueryResult is a class which has to be public... it is part of my public API... public class Row {} class QueryResultGenerator : GeneratorType { typealias Element = Row func next() -> Element? { return nil } } extension QueryResult : SequenceType { typealias GeneratorType = QueryResultGenerator func generate() -> GeneratorType { return QueryResultGenerator() } }