You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This should work, you should be able to assign stdlib functions to variables. But it doesn't, it fails with an error about sin not being found.
This is because sin and other stdlib functions aren't kept in ProgramMemory, they're looked up in a separate namespace.
You should be able to use stdlib functions as normal KCL values, and pass them around in memory, use them as arguments to functions, etc.
An interesting consequence of this bug is that the MemoryFunction type, for storing Rust functions (i.e. KCL stdlib) in KCL memory, is never actually used.
The text was updated successfully, but these errors were encountered:
Here's a simple KCL program.
This should work, you should be able to assign stdlib functions to variables. But it doesn't, it fails with an error about
sin
not being found.This is because
sin
and other stdlib functions aren't kept in ProgramMemory, they're looked up in a separate namespace.You should be able to use stdlib functions as normal KCL values, and pass them around in memory, use them as arguments to functions, etc.
An interesting consequence of this bug is that the
MemoryFunction
type, for storing Rust functions (i.e. KCL stdlib) in KCL memory, is never actually used.The text was updated successfully, but these errors were encountered: