struct Preview: View { private static let NAME = "Test" @Query(filter: #Predicate<Item> { $0.name == Preview.NAME}) private var items: [Item] var body: some View { MyView(name: Preview.NAME, items: items) } }
Compile error occurs: key path cannot refer to static member 'NAME' How can a (static) constant be referred in member closure?