mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
I will remove the `syntactic-rename` refactoring action in a follow-up commit. Clients should always ask for rename ranges and perform the rename by themselves instead of asking for a renamed file.
22 lines
866 B
Plaintext
22 lines
866 B
Plaintext
@propertyWrapper
|
|
struct Wrapper<T> {
|
|
var wrappedValue: T
|
|
/*split:def*/<keywordBase>init</keywordBase>(<arglabel index=0>initialValue</arglabel><param index=0></param>: T, <arglabel index=1>fieldName</arglabel><param index=1></param>: String, <arglabel index=2>special</arglabel><param index=2></param>: Bool = false) {
|
|
wrappedValue = initialValue
|
|
}
|
|
}
|
|
let /*someValue:def*/someValue = "some"
|
|
struct User {
|
|
@/*split:call*/Wrapper(<callarg index=1>fieldName</callarg><callcolon index=1>: </callcolon>"bar")
|
|
var bar = 10
|
|
|
|
@/*split:call*/Wrapper(<callarg index=1>fieldName</callarg><callcolon index=1>: </callcolon>{
|
|
return /*someValue*/someValue
|
|
}(), <callarg index=2>special</callarg><callcolon index=2>: </callcolon>true)
|
|
var complex: Int = {
|
|
return /*someValue*/someValue.starts(with: "b") ? 43 : 0
|
|
}()
|
|
}
|
|
|
|
|