@@ -2377,23 +2377,17 @@ internal func _tryToAppendKeyPaths<Result: AnyKeyPath>(
2377
2377
let typedRoot = unsafeDowncast ( root, to: KeyPath< Root, Value> . self )
2378
2378
let typedLeaf = unsafeDowncast ( leaf,
2379
2379
to: KeyPath< Value, AppendedValue> . self )
2380
- let result = _appendingKeyPaths ( root: typedRoot, leaf: typedLeaf)
2380
+ var result : AnyKeyPath = _appendingKeyPaths ( root: typedRoot,
2381
+ leaf: typedLeaf)
2382
+ _processOffsetForAppendedKeyPath ( appendedKeyPath: & result,
2383
+ root: root, leaf: leaf)
2381
2384
return unsafeDowncast ( result, to: Result . self)
2382
2385
}
2383
2386
return _openExistential ( leafValue, do: open3)
2384
2387
}
2385
2388
return _openExistential ( rootValue, do: open2)
2386
2389
}
2387
- var returnValue : AnyKeyPath = _openExistential ( rootRoot, do: open)
2388
- _processOffsetForAppendedKeyPath (
2389
- appendedKeyPath: & returnValue,
2390
- root: root,
2391
- leaf: leaf
2392
- )
2393
- if let returnValue = returnValue as? Result {
2394
- return returnValue
2395
- }
2396
- return nil
2390
+ return _openExistential ( rootRoot, do: open)
2397
2391
}
2398
2392
2399
2393
@usableFromInline
@@ -3490,7 +3484,6 @@ internal struct InstantiateKeyPathBuffer: KeyPathPatternVisitor {
3490
3484
break
3491
3485
}
3492
3486
case . outOfLine( let offset) :
3493
- isPureStruct. append ( false )
3494
3487
let header = RawKeyPathComponent . Header ( storedWithOutOfLineOffset: kind,
3495
3488
mutable: mutable)
3496
3489
pushDest ( header)
@@ -3515,7 +3508,6 @@ internal struct InstantiateKeyPathBuffer: KeyPathPatternVisitor {
3515
3508
pushDest ( header)
3516
3509
pushDest ( offset)
3517
3510
case . unresolvedIndirectOffset( let pointerToOffset) :
3518
- isPureStruct. append ( false )
3519
3511
// Look up offset in the indirectly-referenced variable we have a
3520
3512
// pointer.
3521
3513
_internalInvariant ( pointerToOffset. pointee <= UInt32 . max)
0 commit comments