Fix tests.

This commit is contained in:
Stephen Chung
2020-11-17 12:40:12 +08:00
parent 038e3c2554
commit df72d324ba
3 changed files with 6 additions and 11 deletions

View File

@@ -161,9 +161,10 @@ service::increment(x);
x == 43;
```
Any functions (usually _methods_) defined in the module with `#[rhai_fn(global)]`, as well as
all _type iterators_, are automatically exposed to the _global_ namespace, so iteration,
[getters/setters] and [indexers] for [custom types] can work as expected.
All functions (usually _methods_) defined in the module and marked with `#[rhai_fn(global)]`,
as well as all _type iterators_, are automatically exposed to the _global_ namespace, so
[iteration]({{rootUrl}}/language/for.md), [getters/setters] and [indexers] for [custom types]
can work as expected.
Therefore, in the example above, the `increment` method (defined with `#[rhai_fn(global)]`)
works fine when called in method-call style: