Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
dev
-
None
-
8c451bba7 (dev), 39297011b (6.5), e8147ec5b (6.6), f5866fb27 (tqtc/lts-6.2)
Description
Just call:
Reflect.ownKeys(Math)
That's cheeky but its not the only "special" object. For example if you are just trying to figure out the "keys" for Math you can just do:
Object.keys(Math)
as that returns []
But the same is true for:
Object.keys(console)
[]
But you can use:
Reflect.ownKeys(console)
[debug,log,info,...]
So Reflect "can" work for special objects
{{}}
But in the case of:
Reflect.ownKeys(Math)
Qt will Assert in debug mode and crash will a nullptr dereference otherwise.