ngs-lang / ngs

Next Generation Shell (NGS)
https://ngs-lang.org/
GNU General Public License v3.0
1.4k stars 43 forks source link

inspect(init) fails with StackOverflow #638

Open ilyash-b opened 1 year ago

ilyash-b commented 8 months ago

Cause: inspect_meta() in

    doc %STATUS - internal
    doc Internal method. Please do not use.
    doc For Type, NativeMethod, UserDefinedMethod
    doc %RET - Arr of Str
    F inspect(path:Arr, x) {
        guard x =~ AnyOf(Type, NativeMethod, UserDefinedMethod)
        ["${_inspect_path_to_str(path)} - ${x.Str()}"] + inspect_meta(path + [Lit('.meta()')], x)
    }

Generally, inspect() fails to detect loops