From bfceb186319f52011762129c879abbe27eaa0161 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Fri, 22 Jan 2016 23:24:09 -0700 Subject: character literal returns a number literal --- src/analyze.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/analyze.cpp') diff --git a/src/analyze.cpp b/src/analyze.cpp index 95896d9a2f..9c9df599dd 100644 --- a/src/analyze.cpp +++ b/src/analyze.cpp @@ -3648,7 +3648,8 @@ static TypeTableEntry *analyze_expression(CodeGen *g, ImportTableEntry *import, return_type = analyze_string_literal_expr(g, import, context, expected_type, node); break; case NodeTypeCharLiteral: - return_type = g->builtin_types.entry_u8; + return_type = resolve_expr_const_val_as_unsigned_num_lit(g, node, expected_type, + node->data.char_literal.value); break; case NodeTypeBoolLiteral: return_type = resolve_expr_const_val_as_bool(g, node, node->data.bool_literal.value); -- cgit v1.2.3