[SR-7340] Fix source location of "instance will be immediately deallocated" warning #49888
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
diagnostics QoI
Bug: Diagnostics Quality of Implementation
type checker
Area → compiler: Semantic analysis
Environment
Swift version 4.2-dev (LLVM 95345677bd, Clang daefc772c1, Swift 92931b7)
Target: x86_64-apple-darwin17.4.0
Additional Detail from JIRA
md5: 83fbbc091381dc40453aaec1a9d3d5d2
Issue Description:
In 14875 we introduced a new diagnostic for when an instance will be immediately deallocated when assigning to a weak/unowned variable.
However, for bindings, we currently give the source location as being at the start of the initializer expression:
Ideally the source location should be on the equals '=':
The text was updated successfully, but these errors were encountered: