Skip to content

Fix expression to remove type-check compiler error in Xcode 12.5#58

Open
hungHatto wants to merge 2 commits into
suzuki-0000:masterfrom
hungHatto:bugfix/expression_xc12.5
Open

Fix expression to remove type-check compiler error in Xcode 12.5#58
hungHatto wants to merge 2 commits into
suzuki-0000:masterfrom
hungHatto:bugfix/expression_xc12.5

Conversation

@hungHatto

@hungHatto hungHatto commented May 12, 2021

Copy link
Copy Markdown

Issue

This issue is getting after Xcode 12.5 update

The issue is caused by the expression which needed to be break down into sub-expressions

Using release version : 4.0.1

The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions

sub-expressions_xcode12-5

Proposed solution

Replacing expression:

  return {
        return c * ($0 * $0 * $0 * $0 * $0 + 1.0) + b
  }(t / d - 1.0)

with

   return { (f: Float) in
            return c * (pow(f, 5) + 1.0) + b
    }(t / d - 1.0)

@Elamuruga

Elamuruga commented Sep 7, 2021

Copy link
Copy Markdown

@hungHatto just to fix this temporarily, you can use commit in your podfile.
Here is how to add the commit in your Pod file

pod 'CountdownLabel', :git => 'https://github.com/linkstreet/CountdownLabel.git'

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

Successfully merging this pull request may close these issues.

2 participants