diff options
| author | gingerBill <bill@gingerbill.org> | 2019-07-28 22:58:56 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2019-07-28 22:58:56 +0100 |
| commit | 2c5c8192f8fcb40fdef183c25a8d799f23f23439 (patch) | |
| tree | bc2baa8d13741dd8f7e56d5f770c091e6b9beaf2 /core/runtime | |
| parent | 162c87b1b810770f75920a51682a8f6b63adeba4 (diff) | |
Fix parsing for procedure literals expression statements; improve assert performance; other minor fixes
Diffstat (limited to 'core/runtime')
| -rw-r--r-- | core/runtime/core.odin | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/core/runtime/core.odin b/core/runtime/core.odin index 623f3725a..02578da3b 100644 --- a/core/runtime/core.odin +++ b/core/runtime/core.odin @@ -666,11 +666,13 @@ card :: proc(s: $S/bit_set[$E; $U]) -> int { @builtin assert :: proc(condition: bool, message := "", loc := #caller_location) -> bool { if !condition { - p := context.assertion_failure_proc; - if p == nil { - p = default_assertion_failure_proc; - } - p("Runtime assertion", message, loc); + proc(message: string, loc: Source_Code_Location) { + p := context.assertion_failure_proc; + if p == nil { + p = default_assertion_failure_proc; + } + p("Runtime assertion", message, loc); + }(message, loc); } return condition; } |