Open
Description
(Parent issue #44897)
When a promotion attempt fails, it would be nice to provide the user with pointers to both the line of code that attempted the promotion and the line of code that made the promotion fail, e.g. in this code:
f(int? i, int? j) {
if (i == null) return; // (1)
i = j; // (2)
i.isEven; // (3)
}
it would be nice for the error message generated at (3) to point to both (1) (the site of the promotion attempt) and (2) the site of the code that defeated promotion). Currently we only point at (2).