You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: base-test/org.eclipse.jdt.groovy.core.tests.builder/src/org/eclipse/jdt/core/groovy/tests/search/DGMInferencingTests.java
+17
Original file line number
Diff line number
Diff line change
@@ -1012,6 +1012,23 @@ public void testDGMClosure25() {
1012
1012
assertExprType(contents, "bar", "Bar"); // not "java.lang.Object"
1013
1013
}
1014
1014
1015
+
@Test
1016
+
publicvoidtestDGMClosure26() {
1017
+
createJavaUnit("TreeNode",
1018
+
"public abstract class TreeNode<TN extends TreeNode<?>>\n" +
Copy file name to clipboardExpand all lines: base-test/org.eclipse.jdt.groovy.core.tests.builder/src/org/eclipse/jdt/core/groovy/tests/search/InferencingTests.java
+1-1
Original file line number
Diff line number
Diff line change
@@ -1790,7 +1790,7 @@ public void testSuperInterfaceMethod3() {
Copy file name to clipboardExpand all lines: base-test/org.eclipse.jdt.groovy.core.tests.compiler/src/org/eclipse/jdt/groovy/core/tests/xform/TypeCheckedTests.java
+3-3
Original file line number
Diff line number
Diff line change
@@ -5731,15 +5731,15 @@ public void testTypeChecked10651() {
5731
5731
String[] sources = {
5732
5732
"Main.groovy",
5733
5733
"@groovy.transform.TypeChecked\n" +
5734
-
"void test(NodeType node) {\n" +
5734
+
"void test(TreeNode node) {\n" +
5735
5735
" node.each { child ->\n" +
5736
5736
" test(child)\n" +
5737
5737
" }\n" +
5738
5738
"}\n" +
5739
5739
"test()\n",
5740
5740
5741
-
"NodeType.java",
5742
-
"public abstract class NodeType<T extends NodeType<?>> implements Iterable<T> {\n" +
5741
+
"TreeNode.java",
5742
+
"public abstract class TreeNode<TN extends TreeNode<?>> implements Iterable<TN> {\n" +
Copy file name to clipboardExpand all lines: base/org.eclipse.jdt.groovy.core/src/org/eclipse/jdt/groovy/search/TypeInferencingVisitorWithRequestor.java
+6-4
Original file line number
Diff line number
Diff line change
@@ -979,10 +979,8 @@ public void visitClosureExpression(final ClosureExpression node) {
979
979
if (node.isParameterSpecified()) {
980
980
Parameter[] parameters = node.getParameters();
981
981
for (inti = 0, n = parameters.length; i < n; i += 1) {
982
-
// only change the parameter's type if it's not declared explicitly
983
-
if (parameters[i].isDynamicTyped() && inferredParamTypes[i] != null &&
0 commit comments