From 67f4b4298d375acbcebc3f717fef8a177b9508f9 Mon Sep 17 00:00:00 2001 From: Jon Pretty Date: Tue, 8 Aug 2023 07:42:30 +0200 Subject: [PATCH] Turn on capture checking --- src/core/time.scala | 2 ++ src/core/timeapi.scala | 2 ++ src/core/timezone.scala | 2 ++ 3 files changed, 6 insertions(+) diff --git a/src/core/time.scala b/src/core/time.scala index 7dcbaae..924c785 100644 --- a/src/core/time.scala +++ b/src/core/time.scala @@ -30,6 +30,8 @@ import scala.quoted.* import java.util as ju import java.time as jt +import language.experimental.captureChecking + package calendars: given julian: RomanCalendar() with def leapYear(year: Y): Boolean = year%4 == 0 diff --git a/src/core/timeapi.scala b/src/core/timeapi.scala index 94f918e..7908ae1 100644 --- a/src/core/timeapi.scala +++ b/src/core/timeapi.scala @@ -18,6 +18,8 @@ package anticipation import aviation.* +import language.experimental.captureChecking + package timeApi: given aviationApi: (GenericInstant[Timing.Instant] & GenericDuration[Timing.Duration]) = new GenericInstant[Timing.Instant] with GenericDuration[Timing.Duration]: diff --git a/src/core/timezone.scala b/src/core/timezone.scala index a431fb7..ef5b5ab 100644 --- a/src/core/timezone.scala +++ b/src/core/timezone.scala @@ -28,6 +28,8 @@ import digression.* import scala.io.* +import language.experimental.captureChecking + object TzdbError: given AsMessage[Issue] = case Issue.CouldNotParseTime(time) => msg"could not parse time $time"