leftibot 85b357b721 Fix #398: Allow overriding [] operator with string index on Dynamic_Object subtypes
The built-in Dynamic_Object::get_attr was always winning dispatch over
user-defined [] overrides when a string index was used, because its C++
type signature (Dynamic_Object, const string&) scored numdiffs=0 while
ChaiScript-defined functions had higher numdiffs due to undefined type
info. The fix deprioritizes generic C++ Dynamic_Object functions when the
actual first argument is a specific subtype, and maps named ChaiScript
type parameters to Dynamic_Object type_info for correct dispatch scoring.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 17:58:51 -06:00
..
chaiscript Fix #398: Allow overriding [] operator with string index on Dynamic_Object subtypes 2026-04-11 17:58:51 -06:00