GNU bug report logs - #60765
CC Mode 5.35.2 (Java//l); Java incorrect type recognition

Previous Next

Package: cc-mode;

Reported by: Po Lu <luangruo <at> yahoo.com>

Date: Fri, 13 Jan 2023 01:33:02 UTC

Severity: normal

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 60765 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 60765 <at> debbugs.gnu.org
Subject: Re: bug#60765: CC Mode 5.35.2 (Java//l); Java incorrect type
 recognition
Date: Tue, 17 Jan 2023 13:14:51 +0800
Alan Mackenzie <acm <at> muc.de> writes:

>> Insert the following text into a Java mode buffer:
>
>> class Foo
>> {
>>   public void
>>   viewLayout (int left, int top, int right, int bottom)
>>   {
>>     int rectWidth, rectHeight;
>
>>     synchronized (this)
>>       {
>> 	rect.left = left;
>> 	rect.top = top;
>> 	rect.right = right;
>> 	rect.bottom = bottom;
>>       }
>
>
>>     EmacsNative.sendConfigureNotify (this.handle,
>> 				     System.currentTimeMillis (),
>> 				     left, top, rectWidth,
>> 				     rectHeight);
>>   }
>> }
>
>> go to the line immediately above EmacsNative.sendConfigureNotify.  Then,
>> type:
>
>>   TAB r e c t W i d t h;
>
>> `rectHeight' and `viewLayout' will appear in c-found-types.  Thanks.
>
> Yes.  With the "unsafe-maybe" mechanism added to CC Mode late last year,
> this was a fairly simple bug to fix.  I've taken the liberty of
> committing the fix to the emacs-29 branch with:
>
> commit c1d32d9a20dc94d403725c288d168451b916c034 (HEAD -> emacs-29, origin/emacs-29, origin/HEAD)
> Author: Alan Mackenzie <acm <at> muc.de>
> Date:   Mon Jan 16 17:44:44 2023 +0000
>
>     CC Mode: Prevent ids in temporary "declarators" getting into c-found-types
>
> , though I haven't yet closed the bug.  I'd be grateful if you could
> update your emacs-29 branch with this fix, run your real Java code in
> it, and confirm that the bug is indeed fixed.  Thanks!
>

Thanks, this seems to work here.




This bug report was last modified 2 years and 129 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.