Cast NSNumber operands to integer type before attempting an arithmetic operation

Description

Converts to:

And the compiler doesn’t like it.

To get the syntax right… it looks like this;

Environment

None

Activity

Show:
Alex Petuschak
February 5, 2018, 1:54 PM
Edited

Todd Ouzts <todd@scenario.com>
Scenario Software

2. The next biggest problem is with type-casting. That’s especially challenging in a CoreData app where the model editor gives you every choice of Number property except Int. Meanwhile, Swift defaults to Int. So now if you’re doing a lot of complex calculations with model properties and runtime variables, it takes forever to find the right combination of scoped typecasting to satisfy Swift. Again, not really your problem, but one inherent in Swift. For me, that’s another 1000 Fix-Its that rarely work.

Assignee

Alex Petuschak

Reporter

Alex Petuschak

Labels

Git Branch Name

None

GitHub Issue

None

Components

Fix versions

Priority

High
Configure