[FIR] Make MemberWithScope a data class

Previously, there was a contract that each callable symbol in the chain
  of `processDirectOverriddenWithBaseScope` will be unique. And if some
  symbol is accessible from multiple scopes, then only last of them will
  be returned as a component of `MemberWithScope`. So there actually was
  no such thing as "pair of two different MemberWithScope with the same
  symbol and different scopes"

After the change of `processDirectOverriddenWithBaseScope` contract (see
  previous commits) each scope returns `MemberWithScope` for some symbol
  with the previous scope in the hierarchy even if it contains the same
  symbol as the current scope

So now scope is actually a part of `MemberWithScope`, which should be
  considered as part of equality. Otherwise, we can skip some part of
  the overridden hierarchy, because we will start to consider symbol as
  visited after its first occurrence (in opposite to the previous behavior,
  when only the last scope was returned)
This commit is contained in:
Dmitriy Novozhilov
2023-12-05 13:24:06 +02:00
committed by Space Team
parent 385bff3be1
commit bc95c5d142
4 changed files with 31 additions and 23 deletions
@@ -30,4 +30,4 @@ fun test_1(x: String?) {
fun test_2(x: String?) {
trickyRequireNotNull(x)
x.length
}
}