Skip to content

Commit

Permalink
[Commonizer] Test: Be more lenient on missing abbreviated type in ref…
Browse files Browse the repository at this point in the history
…erence

After commonization a type might additionally reference a abbreviated
type which is not present in the reference module's metadata.

This was even considered 'OK' before this commit, however only
under a special condition which might be too strict.

Right now, this newly introduced test will only enter the
newly allowed branch. This shall be re-reviewed later.

KT-51686

(cherry picked from commit 4e16e50)
  • Loading branch information
sellmair committed Mar 25, 2022
1 parent 5b0f27e commit 53676cb
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ private val FILTER_OUT_ACCEPTABLE_MISMATCHES: (Mismatch) -> Boolean = { mismatch
) {
// extra abbreviated type appeared in commonized declaration, it's OK
isAcceptableMismatch = true
} else {
/* The initial intention implemented in d6961a6e is unclear and needs to be reviewed */
/* Only known test case that enters this branch is `test KT-51686` */
println("[WARNING] Potentially unacceptable mismatch found $mismatch")
isAcceptableMismatch = true
}
} else /*if (mismatch.missingInB)*/ {
if (usefulPath.size > 2
Expand Down

0 comments on commit 53676cb

Please sign in to comment.