Add check to ensure serialization code only added when underlying value can be serialized.
Build and Test Module / build-and-test (push) Successful in 6s Details
Build and Test Module / build-and-test-with-asdf-library (push) Successful in 11s Details

This commit is contained in:
Andrew Lalis 2026-06-14 13:54:10 -04:00
parent 416e0b220f
commit 8abb3a2c42
1 changed files with 32 additions and 28 deletions

View File

@ -88,6 +88,9 @@ struct Optional(T) {
version (Have_asdf) { version (Have_asdf) {
import asdf; import asdf;
static if (
__traits(compiles, deserialize!T(Asdf.init))
) {
/** /**
* Deserializes an optional value from raw ASDF data. This function * Deserializes an optional value from raw ASDF data. This function
* is defined to allow for automatic deserialization of Optionals when * is defined to allow for automatic deserialization of Optionals when
@ -121,6 +124,7 @@ struct Optional(T) {
} }
} }
} }
}
} }
/** /**