diff options
author | Jo-Philipp Wich <jo@mein.io> | 2020-09-15 22:26:07 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2020-09-15 22:26:07 +0200 |
commit | 52ac5c3f4b086415dedcff90ddec871f970335cc (patch) | |
tree | 9781349a1a8d56ddaa83bbcc0f28e98ff96cd231 /tests/00_syntax | |
parent | 072262b0530e692db714316f26bc679401128c22 (diff) |
eval: only set "this" scope for functions being object members
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'tests/00_syntax')
-rw-r--r-- | tests/00_syntax/11_misc_literals | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/00_syntax/11_misc_literals b/tests/00_syntax/11_misc_literals index 8a654e1..4b33a78 100644 --- a/tests/00_syntax/11_misc_literals +++ b/tests/00_syntax/11_misc_literals @@ -9,7 +9,8 @@ The "false" keyword represents a false boolean value: false -- End -- -- Testcase -- -The "this" keyword refers to the current function context: {{ type(this) }} +{% local t = { f: function() { return this; } } %} +The "this" keyword refers to the current function context: {{ type(t.f()) }} The "null" keyword represents the null value: {{ "" + null }} The "true" keyword represents a true boolean value: {{ true }} The "false" keyword represents a false boolean value: {{ false }} |