You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #15526 we changed the behaviour of setting a property within its own didSet or willSet observer, such that we only perform direct accesses on self in Swift 5 mode.
However this means that code like this will now infinitely recurse:
structS {
vari = 0 {
didSet {
vars = selfs.i = 5
}
}
}
vars = S()
s.i = 2
Ideally we should diagnose this with a warning.
The text was updated successfully, but these errors were encountered:
Additional Detail from JIRA
md5: af2b015f850708c51b08de1e32e3029e
Issue Description:
In #15526 we changed the behaviour of setting a property within its own
didSet
orwillSet
observer, such that we only perform direct accesses on self in Swift 5 mode.However this means that code like this will now infinitely recurse:
Ideally we should diagnose this with a warning.
The text was updated successfully, but these errors were encountered: