I'm trying to implement a "static" function in Nim by doing this:
# File: OtherObject.nim
type OtherObject* = ref object of RootObj
proc mystatic*(_: typedesc[OtherObject]) = echo "Hi"
# File: test.nim
import OtherObject
OtherObject.mystatic()
But it fails with this error:
Error: type mismatch: got <>
but expected one of:
proc mystatic(_: typedesc[OtherObject])
But it doesn't fail if I rename OtherObject.nim
to otherObject.nim
... what is the significance of file names starting with a capital letter? (This is on Nim 1.4.0 on Windows).