From 175a83c2de436b0e84f232fd44d264fb2c79fb14 Mon Sep 17 00:00:00 2001 From: quantimnot <54247259+quantimnot@users.noreply.github.com> Date: Fri, 21 Apr 2023 06:06:20 -0400 Subject: refact: Remove assertion effect hiding workaround (#21472) refact: Remove asseertion effect hiding workaround There was a code comment to remove after bootstrapping with `nim >= 1.4.0`. Co-authored-by: quantimnot Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com> --- lib/std/assertions.nim | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'lib') diff --git a/lib/std/assertions.nim b/lib/std/assertions.nim index a249d7751..3dca644ad 100644 --- a/lib/std/assertions.nim +++ b/lib/std/assertions.nim @@ -38,12 +38,7 @@ proc raiseAssert*(msg: string) {.noinline, noreturn, nosinks.} = proc failedAssertImpl*(msg: string) {.raises: [], tags: [].} = ## Raises an `AssertionDefect` with `msg`, but this is hidden ## from the effect system. Called when an assertion failed. - # trick the compiler to not list `AssertionDefect` when called - # by `assert`. - # xxx simplify this pending bootstrap >= 1.4.0, after which cast not needed - # anymore since `Defect` can't be raised. - type Hide = proc (msg: string) {.noinline, raises: [], noSideEffect, tags: [].} - cast[Hide](raiseAssert)(msg) + raiseAssert(msg) template assertImpl(cond: bool, msg: string, expr: string, enabled: static[bool]) = when enabled: -- cgit 1.4.1-2-gfad0