From b87e39c578e011f94df92a1b1b7496aba151ea2d Mon Sep 17 00:00:00 2001 From: Junseo Yoo Date: Tue, 2 Jul 2024 10:03:56 -0700 Subject: [PATCH] added globals/libraries to a list of illegal constructs --- docs/user-defined-type-functions.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/user-defined-type-functions.md b/docs/user-defined-type-functions.md index 791e97c..2dd4f69 100644 --- a/docs/user-defined-type-functions.md +++ b/docs/user-defined-type-functions.md @@ -57,7 +57,9 @@ We have considered implementing a user-configurable execution limit based on tim * `while` / `repeat` loops * invoking other type functions / regular functions / lambdas * we will not (and probably never) allow type functions to call regular functions for the sake of sandboxing the runtime and analysis. -* referring to locals in the outer scope +* referring to locals / globals in the outer scope +* global functions: `getfenv`, `setfenv`, `pcall`, `xpcall`, `require` +* libraries: `coroutine`, `debug`, `string.gsub` Note: we are aware that for loops can cause infinite runtime. For the time being, we will not be handling this case. In the event that a developer accidentally creates an infinitely long type function, they will need to fix the type function and restart the analysis.