synmantic check for variable redeclaration