diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2018-02-28 15:03:47 -0800 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2018-03-01 16:03:00 -0800 |
commit | fa95ea76edcd0a2783b291c4e2cd7e998250ed0b (patch) | |
tree | 639c5076ce3bac9f41d03b5b009c442e84e455ff | |
parent | 936d92a4111dbc4c04eaacd7b96f957f8c9445f8 (diff) | |
download | qtlocation-mapboxgl-fa95ea76edcd0a2783b291c4e2cd7e998250ed0b.tar.gz |
Infer type assertions for object
Cross-ports https://github.com/mapbox/mapbox-gl-js/pull/6243.
-rw-r--r-- | src/mbgl/style/expression/parsing_context.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mbgl/style/expression/parsing_context.cpp b/src/mbgl/style/expression/parsing_context.cpp index 0215982209..880772d926 100644 --- a/src/mbgl/style/expression/parsing_context.cpp +++ b/src/mbgl/style/expression/parsing_context.cpp @@ -147,7 +147,7 @@ ParseResult ParsingContext::parse(const Convertible& value, TypeAnnotationOption }; const type::Type actual = (*parsed)->getType(); - if ((*expected == type::String || *expected == type::Number || *expected == type::Boolean) && actual == type::Value) { + if ((*expected == type::String || *expected == type::Number || *expected == type::Boolean || *expected == type::Object) && actual == type::Value) { if (typeAnnotationOption == includeTypeAnnotations) { parsed = { std::make_unique<Assertion>(*expected, array(std::move(*parsed))) }; } |