Skip to content

Spurious "not GC-safe" warning #7847

@mooskagh

Description

@mooskagh

Code:

import os
import ospaths
import parsetoml

proc GetConfigFileName() : string =
  return joinPath(getAppDir(), "lc0client.toml")

proc ReadConfig() : TomlTableRef =
  return parseFile(GetConfigFileName())

Check with:

$ nim check --verbosity:2 a.nim

Unreasonable warning:

a.nim(9, 19) Warning: not GC-safe: 'parseFile(GetConfigFileName())' [GcUnsafe]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions