Skip to content

Basic Key Path Edit

Latest
Compare
Choose a tag to compare
@0xLeif 0xLeif released this 21 Aug 22:14
· 2 commits to master since this release
c2ac906

Basic Example

XCTAssertEqual((DumbStruct() + \.string - "Hello!").string, "Hello!")
XCTAssertEqual((DumbClass() + \.string - "Hello!").string, "Hello!")

Struct Example

let dumb = DumbStruct()
        
dumb + \.string - "Hello!"
        
XCTAssertEqual(dumb.string, "Hello, World!")

Class Example

let dumb = DumbClass()
        
dumb + \.string - "Hello!"
        
XCTAssertEqual(dumb.string, "Hello!")