Skip to content

Commit

Permalink
Merge branch 'release/0.7.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
glassesneo committed Oct 21, 2023
2 parents 2ee0e02 + ef630da commit c2ca4b7
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## [v0.7.1] -2023-10-21
### Fixed
- Fixed the bug that constructors cannot be called

## [v0.7.0] -2023-8-27
### Added
- `class` macro can now generate multiple constructors
Expand Down Expand Up @@ -117,7 +121,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## v0.1.0 - 2021-8-1
- 🎉 First release!

[Unreleased]: https://github.com/Glasses-Neo/OOlib/compare/0.7.0...HEAD
[Unreleased]: https://github.com/Glasses-Neo/OOlib/compare/0.7.1...HEAD
[v0.7.1]: https://github.com/Glasses-Neo/OOlib/compare/0.7.0...0.7.1
[v0.7.0]: https://github.com/Glasses-Neo/OOlib/compare/0.6.1...0.7.0
[v0.6.1]: https://github.com/Glasses-Neo/OOlib/compare/0.6.0...0.6.1
[v0.6.0]: https://github.com/Glasses-Neo/OOlib/compare/0.5.0...0.6.0
Expand Down
2 changes: 1 addition & 1 deletion oolib.nimble
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Package

version = "0.7.0"
version = "0.7.1"
author = "Glasses-Neo"
description = "A nimble package for object-oriented programming"
license = "WTFPL"
Expand Down
5 changes: 3 additions & 2 deletions src/oolib/classes/distinct_class.nim
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import
std/algorithm,
std/macros,
./class_util

Expand Down Expand Up @@ -91,5 +92,5 @@ proc defineDistinctClass*(
result = defineType(signature)

defineConstructors(signature)
for constructor in signature.constructors:
result.add(constructor)
for constructor in signature.constructors.reversed:
result.insert 1, constructor
5 changes: 3 additions & 2 deletions src/oolib/classes/implement_class.nim
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import
std/algorithm,
std/macrocache,
std/macros,
std/sequtils,
Expand Down Expand Up @@ -272,7 +273,7 @@ proc defineImplementClass*(
result = defineType(signature)

defineConstructors(signature)
for constructor in signature.constructors:
result.add(constructor)
for constructor in signature.constructors.reversed:
result.insert 1, constructor

result.add defineConvertionProc(signature, tupleTy)
5 changes: 3 additions & 2 deletions src/oolib/classes/normal_class.nim
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import
std/algorithm,
std/macros,
std/sequtils,
./class_util
Expand Down Expand Up @@ -164,5 +165,5 @@ proc defineNormalClass*(
result = defineType(signature)

defineConstructors(signature)
for constructor in signature.constructors:
result.add(constructor)
for constructor in signature.constructors.reversed:
result.insert 1, constructor

0 comments on commit c2ca4b7

Please sign in to comment.