- Fix bug with @jump miscompile

- Remove "panic" text from unreachable() when safe mode is turned off.
This commit is contained in:
Christoffer Lerno
2024-06-22 23:20:23 +02:00
parent e02f73417c
commit f2e5c5e9b9
7 changed files with 83 additions and 11 deletions

View File

@@ -143,7 +143,9 @@ fn void panicf(String fmt, String file, String function, uint line, args...)
**/
macro void unreachable(String string = "Unreachable statement reached.", ...) @builtin @noreturn
{
$if env::COMPILER_SAFE_MODE:
panicf(string, $$FILE, $$FUNC, $$LINE, $vasplat());
$endif;
$$unreachable();
}