Skip to content

Version 0.2.15

Compare
Choose a tag to compare
@jjv360 jjv360 released this 29 Jan 21:47
· 4 commits to master since this release

Workaround for an issue where Nim will duplicate method definitions if they have a typedesc param. Example code that fails to build (only on native, JS seems fine):

type MyObj = ref object of RootObj
method myFunction(_: typedesc[MyObj]) = discard
MyObj.myFunction()
MyObj.myFunction()     # <-- Calling it twice fails

The workaround is to just use proc's for static functions, since they aren't inheritable anyway...