From dbb070524ffde7d392c6776dae41ea440b0e84c6 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Thu, 9 Nov 2017 21:10:08 +0000 Subject: Allow `nil` in a ternary statement --- src/check_stmt.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/check_stmt.cpp') diff --git a/src/check_stmt.cpp b/src/check_stmt.cpp index 9f6609f0f..d0783d4f4 100644 --- a/src/check_stmt.cpp +++ b/src/check_stmt.cpp @@ -997,20 +997,20 @@ void check_stmt_internal(Checker *c, AstNode *node, u32 flags) { goto skip_expr; } - convert_to_typed(c, &x, y.type, 0); + convert_to_typed(c, &x, y.type); if (x.mode == Addressing_Invalid) { goto skip_expr; } - convert_to_typed(c, &y, x.type, 0); + convert_to_typed(c, &y, x.type); if (y.mode == Addressing_Invalid) { goto skip_expr; } - convert_to_typed(c, &x, default_type(y.type), 0); + convert_to_typed(c, &x, default_type(y.type)); if (x.mode == Addressing_Invalid) { goto skip_expr; } - convert_to_typed(c, &y, default_type(x.type), 0); + convert_to_typed(c, &y, default_type(x.type)); if (y.mode == Addressing_Invalid) { goto skip_expr; } @@ -1321,7 +1321,7 @@ void check_stmt_internal(Checker *c, AstNode *node, u32 flags) { continue; } - convert_to_typed(c, &y, x.type, 0); + convert_to_typed(c, &y, x.type); if (y.mode == Addressing_Invalid) { continue; } -- cgit v1.2.3