public <U extends IValue, V extends IValue> Result<U> setAnnotation(String annoName, Result<V> anno, Environment env) {
Type annoType = env.getAnnotationType(getType(), annoName);
if (getType() != getTypeFactory().nodeType()) {
if (getType() != getTypeFactory().nodeType() && annoType == null) {
throw new UndeclaredAnnotation(annoName, getType(), ctx.getCurrentAST());
}
if (!anno.getType().isSubtypeOf(annoType)){
throw new UnexpectedType(annoType, anno.getType(), ctx.getCurrentAST());
}
}