#include "Script.hpp" bool ScriptType::CanBeIndexedWith(ScriptType *indexer) { // String type is the only simple script type we want to return _class == TypeClass::String && indexer->_class == TypeClass::Number && !((NumericScriptType*)indexer)->IsFloat(); } shared_ptr ScriptType::GetIndexedType(ScriptType *indexer) { if (_class == TypeClass::String){ return make_shared(TypeClass::String); } return make_shared(TypeClass::Error); }