Closed AWS-Drew closed 3 years ago
Are you also importing Foundation in the same file? Foundation also defines an Expression type.
In the view controller I have 4 imports....uikit, charts, Darwin, and expression
Sent from my iPad
On Feb 26, 2021, at 1:17 PM, Nick Lockwood notifications@github.com wrote:
Are you also importing Foundation in the same file? Foundation also defines an Expression type.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
But I do have foundation called up in another file
Sent from my iPad
On Feb 26, 2021, at 1:22 PM, Drew Swenson n171ml@yahoo.com wrote:
In the view controller I have 4 imports....uikit, charts, Darwin, and expression
Sent from my iPad
On Feb 26, 2021, at 1:17 PM, Nick Lockwood notifications@github.com wrote:
Are you also importing Foundation in the same file? Foundation also defines an Expression type.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Finally figured it out. When cutting and pasting to try out the code, “Expression” was just not being recognized. However, when typing it in, the format was instantly recognized
Sent from my iPad
On Feb 26, 2021, at 1:17 PM, Nick Lockwood notifications@github.com wrote:
Are you also importing Foundation in the same file? Foundation also defines an Expression type.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
the sample code cut from the description: var bar = 7 // variable let expression = Expression("bas + baz(5) + rnd()", symbols: [ .variable("bar"): { in bar }, .function("baz", arity: 1): { args in args[0] as! Int + 1 }, .function("rnd", arity: 0): { in Double(arc4random()) } ])
Has this issue: "Type of expression is ambiguous without more context" "Expression" is imported