Hi all.
I'm new to this forum and before I post my question just want to make sure that this is the right place to ask questions like "Things broken after Xcode 6 Beta 6 release!". I know there's developer forum, but this place looks much nicer :)
Anyway, I'll go ahead and post this one, let me know if this does not belong here or something.
I have a strange new error with beta 6, the error message is like
.../Shared/Model/Rules.swift:310:9: Cannot invoke '&&' with an argument list of type '($T78, $T84)'
.../Shared/Model/Rules.swift:310:9: Expression was too complex to be solved in reasonable time; consider breaking up the expression into distinct sub-expressions
The code in question is this:
func ==(left: Rules, right: Rules) -> Bool { return left.numberOfPlayers == right.numberOfPlayers && left.numberOfCardsInDeck == right.numberOfCardsInDeck && left.pointSystem == right.pointSystem && left.numberOfCardsInHand == right.numberOfCardsInHand && left.cleanPoints == right.cleanPoints && left.playRobbers == right.playRobbers && left.maxPoints == right.maxPoints && left.canCallRoundEnd == right.canCallRoundEnd && left.canLayFaceDown == right.canLayFaceDown && left.callMolodkaAnyTime == right.callMolodkaAnyTime && left.buraWinsRound == right.buraWinsRound && left.moscowWinsRound == right.moscowWinsRound && left.numberOfCardsInMoscowCombo == right.numberOfCardsInMoscowCombo && left.bigMoscowRank == right.bigMoscowRan && left.smallMoscowRank == right.smallMoscowRank }
As you can see, there's nothing special, just a lengthy piece of code.
It works perfectly with beta 5, but with beta 6 I got an error.
Suddenly Swift compiler got weaker and can't handle long expressions.
I played around and commented some lines, in this example compiler will handle 10 lines nicely, and report an error on 11 or more.
func ==(left: Rules, right: Rules) -> Bool { return left.numberOfPlayers == right.numberOfPlayers && left.numberOfCardsInDeck == right.numberOfCardsInDeck && left.pointSystem == right.pointSystem && left.numberOfCardsInHand == right.numberOfCardsInHand && left.cleanPoints == right.cleanPoints && left.playRobbers == right.playRobbers && left.maxPoints == right.maxPoints && left.canCallRoundEnd == right.canCallRoundEnd && left.canLayFaceDown == right.canLayFaceDown && left.callMolodkaAnyTime == right.callMolodkaAnyTime // && left.buraWinsRound == right.buraWinsRound // && left.moscowWinsRound == right.moscowWinsRound // && left.numberOfCardsInMoscowCombo == right.numberOfCardsInMoscowCombo // && left.bigMoscowRank == right.bigMoscowRan // && left.smallMoscowRank == right.smallMoscowRank }
Of course I can break it into couple of shorter expressions, but it looks like a bug to me so far.