IDefinition exprType = expressionNode.resolveType(project);
if (exprType != null)
{
if (!SemanticUtils.isValidTypeConversion(expectedType, exprType, project, builder.getCompilationUnit().isInvisible()))
{
ICompilerProblem problem = new ImplicitCoercionToUnrelatedTypeProblem(
expressionNode, exprType.getBaseName(), expectedType.getBaseName());
builder.addProblem(problem);
}
}
}