change unreachable{} to @unreachable()

instead of a container init expression, it's a builtin
function call.
This commit is contained in:
Andrew Kelley
2016-09-13 16:46:27 -04:00
parent ea2f6594ce
commit 06f2f4d64b
13 changed files with 89 additions and 81 deletions

View File

@@ -485,8 +485,8 @@ pub fn main(args: [][]u8) -> %void {
const c = @cImport(@cInclude("stdlib.h"));
export fn compare_fn(a: ?&const c_void, b: ?&const c_void) -> c_int {
const a_int = (&i32)(a ?? unreachable{});
const b_int = (&i32)(b ?? unreachable{});
const a_int = (&i32)(a ?? @unreachable());
const b_int = (&i32)(b ?? @unreachable());
if (*a_int < *b_int) {
-1
} else if (*a_int > *b_int) {