YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
11 stars 4 forks source link

Checking Constructor Function Inheritance Through One Function #5749

Open NanoSharkGames opened 2 weeks ago

NanoSharkGames commented 2 weeks ago

Is your feature request related to a problem?

I sometimes write a method which accept a constructor function as a parameter. I cannot use is_instanceof to check if the first parameter is:

Describe the solution you'd like

I'd like either:

In either of the above options, I'd like the function to return false if the parameter is not a struct or constructor.

Describe alternatives you've considered

Making a function myself, which recursively calls static_get() to check for constructor function inheritance

Additional context

No response