From 7f4d4bdb3f8c4ac0c368074c111d5455ea6c8ade Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 26 Sep 2016 19:42:51 -0400 Subject: fix crash when doing binary not on integer literal closes #201 --- src/analyze.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/analyze.cpp') diff --git a/src/analyze.cpp b/src/analyze.cpp index e17e1b4526..da01234844 100644 --- a/src/analyze.cpp +++ b/src/analyze.cpp @@ -6037,12 +6037,10 @@ static TypeTableEntry *analyze_prefix_op_expr(CodeGen *g, ImportTableEntry *impo *expr_node); if (expr_type->id == TypeTableEntryIdInvalid) { return expr_type; - } else if (expr_type->id == TypeTableEntryIdInt || - expr_type->id == TypeTableEntryIdNumLitInt) - { + } else if (expr_type->id == TypeTableEntryIdInt) { return expr_type; } else { - add_node_error(g, *expr_node, buf_sprintf("invalid binary not type: '%s'", + add_node_error(g, node, buf_sprintf("unable to perform binary not operation on type '%s'", buf_ptr(&expr_type->name))); return g->builtin_types.entry_invalid; } -- cgit v1.2.3