Files
swift-mirror/test/Sema/diag_self_assign.swift
Slava Pestov d5febdb791 Sema: Fix diagnoseSelfAssignment() with computed properties
This check did not handle MemberRefExprs with an InOutExpr base,
giving it inconsistent behavior:

- With a class, we would diagnose self-assignment of computed
  properties

- With a struct, accesses to computed properties would build a
  MemberRefExpr with an InOutExpr base, so self-assignments
  were *not* diagnosed.

Let's tweak the check to consistently diagnose self-assignments
to stored properties only, instead of the emergent behavior
as described above.
2020-09-26 00:02:42 -04:00

5.0 KiB