Change return type of next_bool(random) from void to bool

This commit is contained in:
cpiernikowski
2024-03-27 23:10:54 +01:00
committed by Christoffer Lerno
parent 3b9babe745
commit 18b4fce1ca

View File

@@ -48,7 +48,7 @@ fn int rand(int max) @builtin
/**
* @require is_random(random)
**/
macro void next_bool(random)
macro bool next_bool(random)
{
return random.next_byte() & 1;
}
@@ -94,4 +94,4 @@ macro @random_value_to_bytes(#function, char[] bytes)
bytes = bytes[$byte_size..];
}
unreachable();
}
}