fix(repl): Print out Char as the "character" instead of code point integer in the repl
Fix
Fix value range
@@ -444,7 +444,7 @@ impl<'a, 't> InternalPrinter<'a, 't> {
match **self.typ {
Type::Builtin(BuiltinType::Int) => arena.text(format!("{}", i)),
Type::Builtin(BuiltinType::Char) =>
- if i < ::std::u32::MAX as isize {
+ if 0 <= i && i <= ::std::u32::MAX as isize {
match ::std::char::from_u32(i as u32) {
Some('"') => arena.text(format!("'{}'", '"')),
Some(c) => arena.text(format!("'{}'", c.escape_default())),
