Releases: jjv360/nim-classes
Version 0.3.17
Version 0.3.16
- Rewritten to be easier to maintain
- Fixed some
{.base.}
warnings - Support for destructors (native compiler only)
Version 0.2.15
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...
Version 0.2.14
Fix an issue with calling MyClass.init()
from within the class if the constructor was autogenerated or if the init()
definition comes after the function which calls it
Version 0.2.13
Fix quoted method names not getting exported (ie setters)
Version 0.2.11
Fix bug with proxied class with comments on a method
Version 0.2.9
Fixed bug with inheritance when inbetween class does not implement a method
Version 0.2.8
Fixed a bug when the class definition is modified / proxied by another macro
Version 0.2.5
Added support for singletons, which are the same as normal classes but have a shared()
accessor. Usage:
# Create a singleton class
singleton MySingleton:
var v1 = 7
method init() = echo "Singleton accessed for the first time!"
# Access the class, which also triggers init() the first time only
echo MySingleton.shared.v1
Version 0.2.1
Fixed warnings about base pragma