Added consteval tests

This commit is contained in:
OleStrohm 2022-08-07 18:22:18 +02:00
parent 2f84b6e2e5
commit ad0a6bf1a3
6 changed files with 46 additions and 11 deletions

View file

@ -203,7 +203,7 @@ pub fn eval_const(
Ok(ComputedExpr::Enum(
get_name(variant, ctx),
variant,
Literal::Int(value + 1, Some(BuiltinInt::I128)),
Literal::Int(value, Some(BuiltinInt::I128)),
))
}
_ => Err(ConstEvalError::IncompleteExpr),