diff --git a/src/style-spec/expression/definitions/equals.js b/src/style-spec/expression/definitions/equals.js index 05be7369444..7503489dfd0 100644 --- a/src/style-spec/expression/definitions/equals.js +++ b/src/style-spec/expression/definitions/equals.js @@ -56,7 +56,7 @@ class Equals implements Expression { return context.error(`Expected at least one argument to be a string, number, boolean, or null, but found (${toString(lhs.type)}, ${toString(rhs.type)}) instead.`); } - if (checkSubtype(lhs.type, rhs.type) && checkSubtype(rhs.type, lhs.type)) { + if (lhs.type.kind !== rhs.type.kind && lhs.type.kind !== 'value' && rhs.type.kind !== 'value') { return context.error(`Cannot compare ${toString(lhs.type)} and ${toString(rhs.type)}.`); }