explicitly indicate type of `nil` in LC db `disposeSafe` (#5305)

In Nim 2.0, compiler fails to infer the type of `nil` within the
`disposeSafe` template. Avoid that problem by explicitly indicating it.
This commit is contained in:
Etan Kissling 2023-08-17 19:46:58 +02:00 committed by GitHub
parent 13f436bc24
commit 072ec1f0d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -57,10 +57,10 @@ type
## SyncCommitteePeriod -> altair.SyncCommittee
## Stores finalized `SyncCommittee` by sync committee period.
template disposeSafe(s: untyped): untyped =
template disposeSafe(s: var SqliteStmt): untyped =
if distinctBase(s) != nil:
s.dispose()
s = nil
s = typeof(s)(nil)
proc initLegacyLightClientHeadersStore(
backend: SqStoreRef,