From 40295408f18e2d44dfb8b91d98e8f863238ce825 Mon Sep 17 00:00:00 2001 From: Junseo Yoo Date: Tue, 30 Jul 2024 12:27:30 -0700 Subject: [PATCH] better example for long running type functions --- 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 8d2e07d..ca8f8fa 100644 --- a/docs/user-defined-type-functions.md +++ b/docs/user-defined-type-functions.md @@ -56,7 +56,9 @@ For the first iteration, the body of a type function will be sandboxed, and its There is also a problem of infinitely running type functions. For example, reducing this type function will halt analysis until the VM stack overflows: ```luau type function neverending(t) - return neverending(t) -- note: parentheses are used here because the runtime value of types is being passed in, rather than the static annotation of types + while true do + local a = 1 + end end ```