if(declaredType != null) {
return getFirstElementOrNull(declaredType.findTargetDefElements(mr, true));
}
IInitializer initializer = varDef.getDeclaredInitializer();
if(initializer instanceof IValueNode) {
IValueNode initializerR = (IValueNode) initializer;
return getFirstElementOrNull(initializerR.resolveTypeOfUnderlyingValue(mr));
}
return null; // TODO: create error element
}