Skip to content

Releases: jjv360/nim-classes

Version 0.3.17

13 Mar 14:44
Compare
Choose a tag to compare

Version 0.3.16

08 Mar 20:23
Compare
Choose a tag to compare
  • Rewritten to be easier to maintain
  • Fixed some {.base.} warnings
  • Support for destructors (native compiler only)

Version 0.2.15

29 Jan 21:47
Compare
Choose a tag to compare

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

26 Jan 08:40
Compare
Choose a tag to compare

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

24 Dec 13:51
Compare
Choose a tag to compare

Fix quoted method names not getting exported (ie setters)

Version 0.2.11

27 Dec 12:14
Compare
Choose a tag to compare

Fix bug with proxied class with comments on a method

Version 0.2.9

27 Dec 11:15
Compare
Choose a tag to compare

Fixed bug with inheritance when inbetween class does not implement a method

Version 0.2.8

27 Dec 10:15
Compare
Choose a tag to compare

Fixed a bug when the class definition is modified / proxied by another macro

Version 0.2.5

26 Dec 22:20
Compare
Choose a tag to compare

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

12 Jun 11:36
Compare
Choose a tag to compare

Fixed warnings about base pragma