-
Notifications
You must be signed in to change notification settings - Fork 667
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support checking synthetic stubs for Kotlin default argument
Summary: # Context: Kotlin support default arguments. To implement that in bytecode, `kotlinc` synthesizes a stub with a `$default` suffix in its name to supply the default argument value to the actual method. The synthesized stub does not carry the same param annotation from its callee. Out of the box, our Typedef annotation checker doesn't properly cover this case. # Solution The `SynthAccessorPatcher` can patch the param annotation for the `$default` stub similar to what it does to the synthetic accessor. Here we simply remove the guard that excludes the `$default` stubs from the checker logic. We also added new tests to cover both the calls to the `$default` stubs as well as the calls from the `$default` stubs. Reviewed By: itang00 Differential Revision: D51904548 fbshipit-source-id: cd3cecb390dceca1bee986d89840374675a817f0
- Loading branch information
1 parent
e0f1dab
commit 24d6824
Showing
3 changed files
with
320 additions
and
289 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.