From d9c6537bf0a6832cd3b95b6b438d8f65b6994e94 Mon Sep 17 00:00:00 2001 From: Anatolii Kmetiuk Date: Tue, 25 Jun 2019 13:10:08 +0200 Subject: [PATCH] Use standard syntax for `if` in macro docs --- docs/docs/reference/metaprogramming/macros.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/reference/metaprogramming/macros.md b/docs/docs/reference/metaprogramming/macros.md index 05d1c8cc6f52..2f4ceef39620 100644 --- a/docs/docs/reference/metaprogramming/macros.md +++ b/docs/docs/reference/metaprogramming/macros.md @@ -37,7 +37,7 @@ prints it again in an error message if it evaluates to `false`. ${ assertImpl('expr) } def assertImpl(expr: Expr[Boolean]) = '{ - if !($expr) then + if (!$expr) throw new AssertionError(s"failed assertion: ${${ showExpr(expr) }}") }