mirror of
https://github.com/morluto/rea
synced 2026-10-27 22:45:19 -04:00
6b7d429491
Decode direct Objective-C class names separately from nominal descriptors, retain indirect class bindings as partial facts, and preserve readable protocol and witness evidence when related bytes are unavailable. Validated with 98 focused tests, check:ci, docs:check, and named-schema CLI/MCP replays of compiler-produced imported-class and struct fixtures plus an inert kind-3 control. The fixtures were inspected statically, never executed. Fixes #5738
14 lines
390 B
TypeScript
14 lines
390 B
TypeScript
/** Expected format-boundary failures from bounded Swift metadata reads. */
|
|
export const expectedSwiftMetadataReadFailure = (
|
|
cause: unknown,
|
|
): string | null => {
|
|
if (cause instanceof RangeError) return cause.message;
|
|
if (
|
|
cause instanceof TypeError &&
|
|
"code" in cause &&
|
|
cause.code === "ERR_ENCODING_INVALID_ENCODED_DATA"
|
|
)
|
|
return cause.message;
|
|
return null;
|
|
};
|