| 891 | ValueSchema ValueSchema::es6map(const ValueSchema& keySchema, const ValueSchema& valueSchema) { |
| 892 | return ValueSchema(ValueSchemaInnerTypeES6Map, 0, 0, makeShared<ES6MapSchema>(keySchema, valueSchema)); |
| 893 | } |
| 894 | |
| 895 | ValueSchema ValueSchema::es6set(const ValueSchema& keySchema) { |
| 896 | return ValueSchema(ValueSchemaInnerTypeES6Set, 0, 0, makeShared<ES6SetSchema>(keySchema)); |
| 897 | } |
| 898 | |
| 899 | ValueSchema ValueSchema::outcome(const ValueSchema& valueSchema, const ValueSchema& errorSchema) { |
| 900 | return ValueSchema(ValueSchemaInnerTypeOutcome, 0, 0, makeShared<OutcomeSchema>(valueSchema, errorSchema)); |
| 901 | } |
| 902 | |
| 903 | ValueSchema ValueSchema::proto(const std::string_view* classNamePartsBegin, const std::string_view* classNamePartsEnd) { |
| 904 | return ValueSchema( |
| 905 | ValueSchemaInnerTypeProto, 0, 0, makeShared<ProtoSchema>(classNamePartsBegin, classNamePartsEnd)); |
| 906 | } |
| 907 | |
| 908 | static void checkNotNull(const void* ptr) { |
| 909 | SC_ABORT_UNLESS(ptr != nullptr, "Nested type is null"); |
| 910 | } |
| 911 | |
| 912 | void ValueSchema::sanityCheck() const { |
| 913 | // Ticket: 1974 |
| 914 | // Temporary check to try to figure out the root cause of what's happening |
| 915 | // in the JIRA above. It seems like the _ptr can become null while the type |
| 916 | // is set to something that expects a valid ptr. |
| 917 |
nothing calls this directly
no test coverage detected