I cant reproduce this issue in a small test case, but my FPCJVM project wont compile without the fix below.
The error message is:
Compile Project, OS: java, CPU: jvm, Target: cheetah: Exit code 1, Errors: 1, Hints: 1
ideformeditors.pas(70,6) Error: Duplicate identifier "__fpc_virtualclassmethod_pv_t38"
ideformeditors.pas(70,6) Hint: Identifier already defined in unit UELEMENTATTRIBUTES at line 50
For 2 months I've been resolving this issue but writing more code. ie: When you add more methods or properties to a class, the problem goes away. But, recently I had to start adding dummy methods/properties. Eventually my library was impossible to compile.
EDIT: What happen was, if I got the error in a lower class, after adding a method, the error would move to a higher class. Adding a method there would then move the error somewhere else. It was crazy stuff.
Anyway, this morning I looked at the 3.0.2rc1 compiler code, and traced the problem to jvm_wrap_virtual_class_method() in pjvm.pas.
I changed line 651: (pjvm.pas)
OLD: symtablestack.top.insert(typ);
NEW: symtablestack.top.insert(typ, False);
My code now compiles without issue. Testing this against: 200+ classes / ~28000 lines of code
Im unsure if the trunk provides another fix, since It caused more issues.