Closed SWW13 closed 3 years ago
Probably documentation issue.
Any Rust type can be used under any feature flag combination. The Rhai language has no types.
only_i64
only means that operators and functions for other numeric types are not built-in. You may build them yourself, though.
For example:
not only_i64
: u8 + u8
==> u8
result
only_i64
: u8 + u8
==> error: function not found for + (u8, u8)
And don't forget it is type_of
instead of typeof
... You're missing an underscore here. Not JavaScript.
Probably documentation issue.
I suspected that. Just wanted to make sure and have an issue so the documentation can be extended eventually.
And don't forget it is type_of instead of typeof... You're missing an underscore here. Not JavaScript.
Good catch, fixed that.
I suspected that. Just wanted to make sure and have an issue so the documentation can be extended eventually.
I'll add the appropriate warning into the documentation.
Closing this for now. Please feel free to reopen if the issue is not resolved.
The documentation for
only_i64
mentions that other integer type are disabled:But they can still be received from Rust functions (and also passed into Rust functions). Not sure if this is unintended or just a documentation issue.
Output: