eclipse-jdtls / eclipse-jdt-core-incubator

Eclipse Public License 2.0
8 stars 1 forks source link

Incorrectly mapped multi-FieldDeclaration, eg `String a, b;` #640

Closed mickaelistria closed 1 month ago

mickaelistria commented 1 month ago

Currently, the JavacConverter doesn't map String a, b; as a single FieldDeclaration with 2 VariableDeclarationFragments, but instead creates 2 FieldDeclarations (this is how Javac returns those). However, by checking the ranges, we could identify that case and create a proper JDT DOM with single FieldDeclaration. This causes TypeMismatchQuickFixTest.testTypeMismatchInAssignment3() to fail.

mickaelistria commented 1 month ago

A quick-fix will be submitted in the next minutes.