CountdownLabel icon indicating copy to clipboard operation
CountdownLabel copied to clipboard

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

Open hungHatto opened this issue 3 years ago • 1 comments

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)

hungHatto avatar May 12 '21 09:05 hungHatto

@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'

Elamuruga avatar Sep 07 '21 05:09 Elamuruga