Files
swift-mirror/test/refactoring/SyntacticRename/FindRangeOutputs/property-wrapper-split/someValue.swift.expected
Nathan Hawes c547e6885e [test] Add more index/refactoring/cursor-info tests for property wrappers
Make sure they handle the case when a property wrapper type's constructor is
called with the first argument coming from the var initializer, and the rest
from the custom attribute's argument.
2019-06-26 18:37:47 -07:00

22 lines
548 B
Plaintext

@propertyWrapper
struct Wrapper<T> {
var wrappedValue: T
/*split:def*/init(initialValue: T, fieldName: String, special: Bool = false) {
wrappedValue = initialValue
}
}
let /*someValue:def*/<base>someValue</base> = "some"
struct User {
@/*split:call*/Wrapper(fieldName: "bar")
var bar = 10
@/*split:call*/Wrapper(fieldName: {
return /*someValue*/<base>someValue</base>
}(), special: true)
var complex: Int = {
return /*someValue*/<base>someValue</base>.starts(with: "b") ? 43 : 0
}()
}