Skip to content

Commit

Permalink
Merge pull request #1 from glessard/inout
Browse files Browse the repository at this point in the history
fix autoclosure capture issue
  • Loading branch information
Azoy authored Jun 14, 2024
2 parents aecceb8 + 7b0599c commit dbf90bd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Tests/FutureTests/Inout.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ final class FutureInoutTests: XCTestCase {
var x = 0
let y = Inout(&x)

XCTAssertEqual(y[], 0)
var v = y[]
XCTAssertEqual(v, 0)

y[] += 10

XCTAssertEqual(y[], 10)
v = y[]
XCTAssertEqual(v, 10)
XCTAssertEqual(x, 10)
}
}

0 comments on commit dbf90bd

Please sign in to comment.