Ahh, good catch. This is indeed a bug. Your fix makes the code run and display the expected output, but it has the nasty side effect that any listener to the airport info can also change it. ATC won't like that.
How about this
// Controllers create new station with private set capability
// and public get capability
new airportInfo in {
new set in {
stationFactory!("Weather is nice", *airportInfo, *set)
}
|
// Listener tunes in to receive latest message
airportInfo!(*stdout)
}
Ahh, good catch. This is indeed a bug. Your fix makes the code run and display the expected output, but it has the nasty side effect that any listener to the airport info can also change it. ATC won't like that.
How about this