struct Foo {
var bar: String
// warning or removed according to unneeded_synthesized_initializer
init(bar: String) {
self.bar = bar
}
// or any other macros, such as canImport
#if DEBUG
init(data: CGFloat) {
self.bar = "\(data)"
}
#endif
}
/// compile error if autocorrect
let foo = Foo(bar: "bar")
New Issue Checklist
Describe the bug
Environment