Skip to content

Commit

Permalink
bugfix: unrespected type hint for index variable
Browse files Browse the repository at this point in the history
  • Loading branch information
brendanfh committed Jan 19, 2025
1 parent 7ef6f27 commit 57bfcd5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions core/operations.onyx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ __for_expansion :: macro (_s: [] $T, $flags: __For_Expansion_Flags, $body: Code)
defer i += 1

v := data[i]
#unquote body(v, i) #skip_scope(2)
#unquote body(v, ~~i) #skip_scope(2)
}
}

Expand All @@ -74,10 +74,9 @@ __for_expansion :: macro (_s: [] $T, $flags: __For_Expansion_Flags, $body: Code)
defer i += 1

v := &data[i]
#unquote body(v, i) #skip_scope(2)
#unquote body(v, ~~i) #skip_scope(2)
}
}
//

#overload
__for_expansion :: macro (_r: range, $flags: __For_Expansion_Flags, $body: Code) where (body.capture_count == 1) {
Expand Down

0 comments on commit 57bfcd5

Please sign in to comment.