Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expression was too complex to be solved in reasonable time; consider breaking up the expression into distinct sub-expressions #35

Open
ghost opened this issue Apr 17, 2015 · 3 comments

Comments

@ghost
Copy link

ghost commented Apr 17, 2015

When trying to build my project using the Colours pod ( Swift version ) I'm facin the following error.

Expression was too complex to be solved in reasonable time; consider breaking up the expression into distinct sub-expressions

Like the message stated this is easily fixed by removing the one-liner and separating it over several lines.

        var deltaF: TransformBlock = { f in
            if  f > pow((6.0/29.0), 3.0) {
                return pow(f, 1.0/3.0)
            } else {
                return (1/3)*pow((29.0/6.0), 2.0) * f + 4/29.0
            }
            //return (f > pow((6.0/29.0), 3.0)) ? pow(f, 1.0/3.0) : (1/3)*pow((29.0/6.0), 2.0) * f + 4/29.0
        }
}

Colours.Swift line 148

http://puu.sh/hgVYY/4b02d52c59.png

@franklsf95
Copy link

Same here.

@ghost
Copy link
Author

ghost commented Oct 12, 2015

Same problem here.
This occurred after adding Objective-C bridging header file for another project.

@ghost ghost mentioned this issue Oct 12, 2015
@ghost
Copy link
Author

ghost commented Oct 13, 2015

Even with correction as presented on the first comment Xcode complain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant