Fixed
Status Update
Comments
tn...@google.com <tn...@google.com> #2
Fixed for 3.2 alpha 6 by Change-Id: I33a69b3b48610b1847b93475f0b20bb0c3008f09 . Thanks for the report (and the nice reproducible case!)
No update yet.
Description
Mac OS X 10.13.3
gradle version: 4.4
agp version: 3.1.0-beta3
kotlin version: 1.2.21
compileSdkVersion 27
targetSdkVersion 27
minSdkVersion 19
Repro steps:
1) Create a new project using blank activity with kotlin supported
2) Modify MainActivity.kt to have a top-level (ie. outside of the class) 'internal' function
3) Annotate the internal function with VisibleForTesting
4) Use the internal function within the MainActivity class
Notice the warning in the usage of the method, which shouldn't be there. Running lint also incorrectly flags the usage.
I've attached an example project that demonstrates the file-scope allowed by kotlin ('createOtherApi'), and the @VisibleForTesting issue ('createApi').