more string tests and bugfix

This commit is contained in:
Ari Lazier 2015-11-18 12:40:25 -08:00
parent c2e5a268a6
commit f69dc9c081
1 changed files with 3 additions and 0 deletions

View File

@ -267,6 +267,9 @@ struct ValueGetter<String, TableGetter> {
if (value.type == parser::Expression::Type::Argument) { if (value.type == parser::Expression::Type::Argument) {
return args.string_for_argument(std::stoi(value.s)); return args.string_for_argument(std::stoi(value.s));
} }
if (value.type != parser::Expression::Type::String) {
throw std::runtime_error("Attempting to compare String property to a non-String value");
}
return value.s; return value.s;
} }
}; };