Fold and re-evaluate expr in tag discriminant.

This commit is contained in:
Graydon Hoare 2012-01-10 15:59:22 -08:00
parent 1dc3debdaf
commit 0e334c6839
2 changed files with 17 additions and 4 deletions

View file

@ -2117,8 +2117,8 @@ fn parse_item_tag(p: parser, attrs: [ast::attribute]) -> @ast::item {
// probably be doing." (See issue #1417)
alt syntax::ast_util::eval_const_expr(e) {
syntax::ast_util::const_int(val) {
// FIXME (#1417): check that value is in range
disr_val = val as int;
// FIXME: check that value is in range
}
}
if option::is_some