@@ -165,7 +165,11 @@ public extension NSAttributeDescription {
165165 if let hashModifier { versionHashModifier = hashModifier }
166166 if let defaultValue { self . defaultValue = defaultValue }
167167 isOptional = valueType is any AnyOptional . Type
168+
169+ assert ( valueTransformerName == nil )
170+ valueTransformerName = nil
168171 if valueType != Any . self { self . valueType = valueType }
172+
169173 setOptions ( options)
170174 }
171175}
@@ -177,7 +181,6 @@ private extension NSAttributeDescription {
177181 allowsExternalBinaryDataStorage = false
178182 isIndexedBySpotlight = false
179183 isTransient = false
180- valueTransformerName = nil
181184 if #available( iOS 15 . 0 , macOS 12 . 0 , tvOS 15 . 0 , watchOS 8 . 0 , * ) {
182185 allowsCloudEncryption = false
183186 }
@@ -193,8 +196,10 @@ private extension NSAttributeDescription {
193196 case . ephemeral: isTransient = true
194197
195198 case . transformableByName( let name) :
199+ assert ( valueTransformerName == nil )
196200 valueTransformerName = name
197201 case . transformableByType( let type) :
202+ assert ( valueTransformerName == nil )
198203 valueTransformerName = NSStringFromClass ( type)
199204
200205 case . allowsCloudEncryption: // FIXME: restrict availability
0 commit comments