diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2016-01-22 23:24:09 -0700 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2016-01-22 23:24:09 -0700 |
| commit | bfceb186319f52011762129c879abbe27eaa0161 (patch) | |
| tree | c6d875f2168c925ec6ffa15412be849c4a35c55d /src/analyze.cpp | |
| parent | e269caae02778c5b15a101c42d2d2d5150af59c8 (diff) | |
| download | zig-bfceb186319f52011762129c879abbe27eaa0161.tar.gz zig-bfceb186319f52011762129c879abbe27eaa0161.zip | |
character literal returns a number literal
Diffstat (limited to 'src/analyze.cpp')
| -rw-r--r-- | src/analyze.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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); |
