Index: src/org/eclipse/jdt/core/tests/dom/ASTConverterTest2.java =================================================================== RCS file: /home/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTest2.java,v retrieving revision 1.156 diff -u -r1.156 ASTConverterTest2.java --- src/org/eclipse/jdt/core/tests/dom/ASTConverterTest2.java 25 May 2005 16:29:41 -0000 1.156 +++ src/org/eclipse/jdt/core/tests/dom/ASTConverterTest2.java 15 Jun 2005 16:07:51 -0000 @@ -42,7 +42,7 @@ } static { -// TESTS_NAMES = new String[] {"test0573"}; + TESTS_NAMES = new String[] {"test0575"}; // TESTS_NUMBERS = new int[] { 606 }; } public static Test suite() { @@ -5316,6 +5316,28 @@ } } + /* + * Ensures that 2 different method bindings with the same return type are not "isEqualTo(...)". + * (regression test for bug 99978 MalformedTreeException on Inline Method) + */ + public void test0575() throws JavaModelException { + ICompilationUnit workingCopy = null; + try { + workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/); + String contents = + "public class X {\n" + + " /*start1*/String foo(String o) {}/*end1*/\n" + + " /*start2*/String foo(Object o) {}/*end2*/\n" + + "}"; + IBinding[] firstBatch = resolveBindings(contents, workingCopy); + IBinding[] secondBatch = resolveBindings(contents, workingCopy); + assertTrue("2 different method type bindings should not be equals", !firstBatch[0].isEqualTo(secondBatch[1])); + } finally { + if (workingCopy != null) + workingCopy.discardWorkingCopy(); + } + } + public void test0606() throws JavaModelException { ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0606", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ ASTNode result = runConversion(sourceUnit, true);