Never suggest fake overrides as results of expects-matching
See KT-48291 for example. The rationale behind the change is that in "findExpectForActual" we want to find a candidate to be a counterpart for the current (actual) declaration. Fake overrides can not be a sensible counterpart in that regard (you can't, nor you should, provide actual for expect which is FAKE_OVERRIDE) ^KT-48291 Fixed
This commit is contained in:
committed by
TeamCityServer
parent
724194dec0
commit
699eb47834
+1
-1
@@ -87,7 +87,7 @@ object ExpectedActualResolver {
|
||||
}
|
||||
|
||||
candidates.filter { declaration ->
|
||||
actual != declaration && declaration.isExpect
|
||||
actual != declaration && declaration.kind != CallableMemberDescriptor.Kind.FAKE_OVERRIDE && declaration.isExpect
|
||||
}.groupBy { declaration ->
|
||||
// TODO: optimize by caching this per actual-expected class pair, do not create a new substitutor for each actual member
|
||||
val substitutor =
|
||||
|
||||
Reference in New Issue
Block a user