Fix build: annotate list-VM merge locals so .sorted infers its element
The generation-guard refactor moved the fetched.map{…}.sorted{…} chain into an
untyped `let merged`, dropping the type anchor the property assignment used to
provide. A multi-statement .map closure then leaves .sorted's $0 uninferred
(error: cannot infer type of closure parameter). Annotate merged in
OLTListViewModel and ONUListViewModel as [OLTStateDoc]/[ONUStateDoc].
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
203465913c
commit
7d8f1c7b2d
2 changed files with 2 additions and 2 deletions
|
|
@ -42,7 +42,7 @@ final class ONUListViewModel {
|
|||
// Registration lives on OLT-STATE, operator names on ONU-CFG. Both best-effort.
|
||||
let registration = (try? await connection.olt.registrationMap()) ?? [:]
|
||||
let names = (try? await connection.onu.nameMap()) ?? [:]
|
||||
let merged = fetched
|
||||
let merged: [ONUStateDoc] = fetched
|
||||
.map { onu in
|
||||
var onu = onu
|
||||
onu.resolvedLifecycle = registration[onu.id]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue