Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
Infer type assertions for object
Browse files Browse the repository at this point in the history
  • Loading branch information
jfirebaugh committed Mar 2, 2018
1 parent d5829d0 commit 15ba70b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mbgl/style/expression/parsing_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))) };
}
Expand Down

0 comments on commit 15ba70b

Please sign in to comment.