better example for long running type functions

This commit is contained in:
Junseo Yoo 2024-07-30 12:27:30 -07:00
parent 62cf504ba7
commit 40295408f1

View file

@ -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: 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 ```luau
type function neverending(t) 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 end
``` ```