Closed mallman closed 3 months ago
Thanks @mallman, please sign your patch so I can merge it (see the DCO link)
Thanks @mallman, please sign your patch so I can merge it (see the DCO link)
Done.
Any thoughts on how to fix the associated bug? Do you want to take that on yourself?
No idea yet. If you would like to take that over that would be great.
Fix invalid Java unit test assertion. C3 should not suggest ignored tokens as completions.
See issue #77 for related discussion.
This invalid assertion was hiding a bug in C3. How to fix that bug is up for discussion, but basically it appears that the implementation of the
followSetsByATN
global cache is problematic. This cache is based on the class name of the parser object, but it does not account for ignored tokens. Two instances ofCodeCompletionCore
will use the samefollowSetsByATN
entry for the same parser, even if they have different ignored tokens. How to fix this?The other language implementations of C3 may have the same problem. For example, it looks to me like the C# tests have the same invalid assertion. I'm not sure I want to touch that, though, because I'm not familiar with C#. So this PR just addresses the Java port.
I'm also wondering if this is related to #66 as well. @mike-lischke is the expert here.