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

Not compatible with Xcode 12 beta5 #179

Open
leiguang opened this issue Aug 24, 2020 · 4 comments
Open

Not compatible with Xcode 12 beta5 #179

leiguang opened this issue Aug 24, 2020 · 4 comments

Comments

@leiguang
Copy link

leiguang commented Aug 24, 2020

error: the compiler is unable to type-check this expression.
solution: explicitly declare the type of Modi { (modi: CGFloat) in ... }

WX20200824-161248@2x

@diakobits
Copy link

@leiguang Do you found the solution ?
i have this problem too

@alex955
Copy link

alex955 commented Oct 15, 2020

same

@radeonxray
Copy link

My work around:
I moved randomFloat-constant outside of the generateRealisticCharSet-func (and removed the duplicate in generateCharSetFromImages), updated the randomFloat to self.randomFloat.

@maticla
Copy link

maticla commented Jan 6, 2021

simply split the expression to multiple parts:

let randomFloat: (CGFloat) -> CGFloat = { modi in
        let temp = (0 - modi) + CGFloat(arc4random())
        let temp2 = CGFloat(UINT32_MAX) * (modi * 2)
        return temp / temp2
}

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

5 participants