Skip to content

Commit

Permalink
struct: fix for nim >= 1.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vitreo12 committed May 28, 2022
1 parent e805a9a commit d9da9f5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions omni_lang/omni_lang/core/lang/omni_struct.nim
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,8 @@ macro struct*(struct_name : untyped, code_block : untyped) : untyped =
obj_bracket_expr : NimNode

var
var_names = nnkStmtList.newTree()
fields_untyped = nnkStmtList.newTree()
var_names = nnkStmtListExpr.newTree()
fields_untyped = nnkStmtListExpr.newTree()
fields_typed : seq[NimNode]
var_inits = nnkStmtList.newTree()

Expand Down
5 changes: 5 additions & 0 deletions omni_lang/omni_lang/tests/test96.nim
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
struct Helo:
a int

init:
helo = Helo()

0 comments on commit d9da9f5

Please sign in to comment.