Community
Participate
Working Groups
I'm getting type binding problems for super method invocations within the initializer expression of a VariableDeclarationFragment, I am unsure if this occurs in general expressions. Below are some examples: [PVAVariableDeclarationAndUse] null rhs type in Initializer "ds=super.getDirectoryScanner(srcDir)" in file /home/thallora/src/jakarta-ant-1.5/src/main/org/apache/tools/ant/taskdefs/Copydir.java [PVAVariableDeclarationAndUse] null rhs type in Initializer "ds=super.getDirectoryScanner(dir)" in file /home/thallora/src/jakarta-ant-1.5/src/main/org/apache/tools/ant/taskdefs/Delete.java [PVAVariableDeclarationAndUse] null rhs type in Initializer "ds=super.getDirectoryScanner(srcDir)" in file /home/thallora/src/jakarta-ant-1.5/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java Here's the code snippit: void saveVariable(VariableDeclarationFragment node) { if (isNull(node, "null VariableDeclarationFragment passed to saveVariable()")) { return; } IVariableBinding variable = node.resolveBinding(); if (isNull(variable, "null variable in VariableDeclarationFragment \"" + node + "\"")) { return; } ITypeBinding type = variable.getType(); if (isNull(type, "null type in VariableDeclarationFragment \"" + node + "\"")) { return; } // declare the variable (it may already have been encountered) f_db.declareVariable(variable, type, toJEM(node)); * // since we are interested in this variable check the initializer * Expression initializer = node.getInitializer(); * if (initializer == null) { * return; // no initializer * } * ITypeBinding rhsType = initializer.resolveTypeBinding(); * if (isNull(rhsType, "null rhs type in Initializer \"" + node + "\"")) { * return; * } IVariableBinding rhsVar = expressionToVariable(initializer); if (rhsVar == null) { // some kind of expression we are not interested in return; } f_db.addToAssignmentSignature(type, rhsVar, rhsType, toJEM(node)); } I'm expected the expression type to be returned, hence it looks like a but in the type binder code. Thoughts? Take Care, Tim Halloran Carnegie Mellon University
I am spotting them in Assigments as well, hence this appears to be a general expression issue: [PVAVariableDeclarationAndUse] null rhs type in Assignment "e=super.getAnnotationIterator()" in file /home/thallora/src/eclipse20/plugins/org.eclipse.ui/Eclipse JFace Text/org/eclipse/jface/text/source/VisualAnnotationModel.java
dup of bug 22054 ?
Yes, looks like a duplicate, I missed it because it doesn't refer to the API, it is a more abstract report of the same problem (e.g., as seen through the refactoring user interface). Good catch Adam! Take Care, Tim Halloran Carnegie Mellon University *** This bug has been marked as a duplicate of 22054 ***