native icon indicating copy to clipboard operation
native copied to clipboard

Import prefixes should have `$` in them not to conflict with names.

Open HosseinYousefi opened this issue 2 years ago • 2 comments

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 $).

HosseinYousefi avatar Jun 28 '23 08:06 HosseinYousefi

Isn't the import name added to renaming context, (causing the method name to be renamed)?

mahesh-hegde avatar Jun 28 '23 14:06 mahesh-hegde

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).

HosseinYousefi avatar Jun 28 '23 16:06 HosseinYousefi