// 故意编译失败:同一个变量不能同时以 inout 传入两次。 // 复现:swiftc Diagnostics/OverlappingInout.swift func addBoth(_ lhs: inout Int, _ rhs: inout Int) { lhs += 1 rhs += 1 } var value = 0 addBoth(&value, &value) print(value)