MCPcopy Create free account
hub / github.com/AutoHotkey/AutoHotkey / CanSetBase

Method CanSetBase

source/script_object.cpp:968–974  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

966
967
968bool Object::CanSetBase(Object *aBase)
969{
970 auto new_native_base = (!aBase || aBase->IsNativeClassPrototype())
971 ? aBase : aBase->GetNativeBase();
972 return new_native_base == GetNativeBase() // Cannot change native type.
973 && !aBase->IsDerivedFrom(this); // Cannot create loops.
974}
975
976
977ResultType Object::SetBase(Object *aNewBase, ResultToken &aResultToken)

Callers

nothing calls this directly

Calls 3

GetNativeBaseMethod · 0.80
IsDerivedFromMethod · 0.80

Tested by

no test coverage detected