Make nil equivalent type to string and userdata
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2019-09-01 17:10:03 +02:00
parent 2fbe1fdf09
commit 01e5441d62

View File

@@ -42,6 +42,11 @@ namespace Porygon{
}
virtual bool operator ==(const shared_ptr<const ScriptType>& b) const{
if (_class == TypeClass::Nil){
auto bClass = b->_class;
if (bClass == TypeClass::UserData || bClass == TypeClass::String || bClass == TypeClass::All)
return true;
}
return _class == b->_class;
}