diff options
| author | s-ol <s+removethis@s-ol.nu> | 2021-11-11 15:18:21 +0000 |
|---|---|---|
| committer | s-ol <s+removethis@s-ol.nu> | 2025-03-02 14:24:49 +0000 |
| commit | edc3f1103f1c2f2ae128c8fb7e810ab0b3733b50 (patch) | |
| tree | 8668d63196a66c3ca88c5ddd8a19c1dbccbf12e9 | |
| parent | fix (! sig) bugs (diff) | |
| download | alive-edc3f1103f1c2f2ae128c8fb7e810ab0b3733b50.tar.gz alive-edc3f1103f1c2f2ae128c8fb7e810ab0b3733b50.zip | |
auto-name Op and Builtin classes for better debugging
| -rw-r--r-- | alv/result/const.moon | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/alv/result/const.moon b/alv/result/const.moon index 78fa25b..e4367e7 100644 --- a/alv/result/const.moon +++ b/alv/result/const.moon @@ -189,6 +189,11 @@ class Constant extends Result -- @tparam table args table with keys `value` and `meta` -- @treturn Constant @meta: (args) -> + if args.meta and args.meta.name and + type(args.value) == "table" and + args.value and args.value.__class and args.value.__parent + args.value.__name = args.meta.name + with Constant.wrap args.value .meta = args.meta if args.meta |
