native
native copied to clipboard
Import prefixes should have `$` in them not to conflict with names.
For example, we're importing 'package:jni' as jni, and so we can not use jni.xyz inside a method that is also called jni.
Although rare, java method names can contain underscores, so we should use $ and make sure it doesn't conflict with our type parameters (which also use $).
Isn't the import name added to renaming context, (causing the method name to be renamed)?
Isn't the import name added to renaming context, (causing the method name to be renamed)?
No, I didn't change the renaming logic, it has been like this. Plus, I think it's a good idea to stay true to the method names as these are used by the end user and import prefixes are generated. In this case, if a method name is ffi we should strive to keep it as ffi (instead of say – ffi0).