35 std::map<std::string, std::pair<PropWriteType, int>> prop_types;
37 for (
size_t i = 0; i < tokens.size(); ++i) {
38 const auto& token = tokens[i];
41 std::get<TokenPayloadPropStore>(token.payload);
42 const auto& prop_name = payload.prop_name;
43 const auto& prop_type = payload.type;
45 auto it = prop_types.find(prop_name);
46 if (it != prop_types.end()) {
47 auto& stored_type = it->second.first;
48 if (stored_type != prop_type) {
51 stored_type = prop_type;
52 it->second.second =
static_cast<int>(i);
56 "Inconsistent types used for property '{}'. "
57 "Previous type: {} (idx: {}), current type: {} "
61 enum_name(prop_type),
static_cast<int>(i)),
66 prop_types[prop_name] =
67 std::make_pair(prop_type,
static_cast<int>(i));