Open swift-ci opened 5 years ago
Not sure yet if this crash is due to the compiler or due to Combine, but let's find out.
import Combine
class Foo {
@Published var passW: String = ""
func doSth() {
passW = "1234"
$passW.sink {
print("value: \($0)")
}
}
}
let fo = Foo()
fo.doSth()
Did not obviously reproduce for me. nhatlee89 (JIRA User), is this in a playground or a project? Can you attach it?
Okay, it does reproduce in an iOS playground. So maybe it's playground-specific, or maybe I still haven't narrowed it down enough.
Aha, looks like @jirid has a fix for this already! (reviewed by @slavapestov) Let's get that into the 5.1 branch too once it goes in on master.
Attachment: Download
Environment
Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 1 | |Component/s | Compiler | |Labels | Bug, RunTimeCrash | |Assignee | None | |Priority | Medium | md5: 81f51f6edd5f3683bb9b910a85997c55Issue Description:
I am trying use combine framework on Xcode 11 beta(MacOS: 10.15 Beta (19A471t)) but got the error as the image below: