WWDC 204 Tutorial - didChange property of Store file causes error on Mac 10.14

I am following the video for the "Introducing SwiftUI Building your First App" video and am around the 40 minute mark where he has just added the Store swift file. The line didChange.send() gets a fatal error: "Cannot invoke 'send' with no arguments." Did anyone have a similar issue and get through it? Or understand the send function and know if there's a parameter I can pass?


I have checked my code multiple times but it is identical up to this point, and I have been running and rebuilding the app to my iOS 13 device every step of the way. I hope this isn't a random bug because I'm running Xcode on 10.14.



RoomStore.swift

-----

import SwiftUI

import Combine


class RoomStore : BindableObject {

var rooms: [Room] {

didSet {

didChange.send() ! Cannot invoke 'send' with no arguments

}

}


init(rooms: [Room] = []) {

self.rooms = rooms

}


var didChange = PassthroughSubject<Void, Never>()

}

didChange.send(Void())


Credit: https://stackoverflow.com/a/56488058

WWDC 204 Tutorial - didChange property of Store file causes error on Mac 10.14
 
 
Q