diff options
| author | gingerBill <bill@gingerbill.org> | 2017-11-09 21:10:08 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2017-11-09 21:10:08 +0000 |
| commit | dbb070524ffde7d392c6776dae41ea440b0e84c6 (patch) | |
| tree | b8d162b7256cd0303ca3fd899d85009061981ac9 /src/check_stmt.cpp | |
| parent | 36b0b50ba4c01184389ce0522c47582e45eb8950 (diff) | |
Allow `nil` in a ternary statement
Diffstat (limited to 'src/check_stmt.cpp')
| -rw-r--r-- | src/check_stmt.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
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; } |