nicklockwood / Expression

A cross-platform Swift library for evaluating mathematical expressions at runtime
MIT License
822 stars 50 forks source link

There's now Foundation.Expression #52

Open nighthawk opened 1 month ago

nighthawk commented 1 month ago

The day has come and this year there's a new addition to Foundation: Foundation.Expression.

That leads to a number of name clashes and for example the test suite doesn't compile due to:

'Expression' is ambiguous for type lookup in this context Found this candidate (Foundation.Expression)

What makes this tricky is that this library itself is called Expression, so you can't disambiguate by say replacing Expression.Error with Expression.Expression.Error.

@nicklockwood Any suggestions for how to best tackle this? Should this library be renamed?

nicklockwood commented 1 month ago

I've added a NumericExpression typealias that you can use as a workaround (see updated README on the develop branch)

nighthawk commented 1 month ago

Great, thank you very much, that works.