Skip to content

Commit

Permalink
Merge pull request #26 from alaviss/devel-fix
Browse files Browse the repository at this point in the history
uniontraits: explicitly convert nil to UnionTy
  • Loading branch information
alaviss authored Aug 29, 2022
2 parents 34b7d7d + 6b77c51 commit e47850e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion union.nimble
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Package

version = "0.1.1"
version = "0.1.2"
author = "Leorize"
description = "Anonymous unions in Nim"
license = "MIT"
Expand Down
4 changes: 2 additions & 2 deletions union/uniontraits.nim
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ func getUnionType*(n: NimNode): UnionTy =
if typ.inherits.sameType(bindSym"Union"):
UnionTy(typ)
else:
nil
UnionTy(nil)
else:
nil
UnionTy(nil)

func isUnionTy*(n: NimNode): bool =
## Returns whether `n` type is an Union.
Expand Down

0 comments on commit e47850e

Please sign in to comment.