From f81dddc6d046f3eba69aae005bcbbb6216fb4b0e Mon Sep 17 00:00:00 2001 From: David <103842788+dagmendez@users.noreply.github.com> Date: Wed, 4 Oct 2023 17:11:16 +0200 Subject: [PATCH] Infix notation for PositiveInt --- .../com/fortyseven/common/configuration/refinedTypes.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/02-c-api/src/main/scala/com/fortyseven/common/configuration/refinedTypes.scala b/02-c-api/src/main/scala/com/fortyseven/common/configuration/refinedTypes.scala index bc0c593..0a181d3 100644 --- a/02-c-api/src/main/scala/com/fortyseven/common/configuration/refinedTypes.scala +++ b/02-c-api/src/main/scala/com/fortyseven/common/configuration/refinedTypes.scala @@ -211,7 +211,7 @@ object refinedTypes: * More info at [[https://docs.scala-lang.org/scala3/reference/metaprogramming/inline.html]] */ inline def apply(int: Int): PositiveInt = - inline if constValue[>[int.type, 0]] + inline if constValue[int.type >= 0] then int else error(codeOf(int) + " is negative. Int must be positive.")