[core] For string-valued properties, do coercion rather than assertion

This commit is contained in:
John Firebaugh
2018-09-13 15:03:19 -07:00
committed by Chris Loer
parent 89b075f592
commit 2e93a9ddcf
9 changed files with 89 additions and 51 deletions

View File

@@ -74,7 +74,7 @@ std::unique_ptr<Expression> toColor(std::unique_ptr<Expression> value) {
}
std::unique_ptr<Expression> toString(std::unique_ptr<Expression> value) {
return compound("to-string", std::move(value));
return std::make_unique<Coercion>(type::String, vec(std::move(value)));
}
std::unique_ptr<Expression> get(const char* value) {