mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
For enum cases with associated values, their construction is modelled by a function. E.g. if you have
```swift
enum Foo {
case first(associated: Int)
}
```
then `Foo.first` is a function of type `(Int) -> Foo`. But if you write `Foo.first(associated: 2)` in source code, we consider this construct as a referenced, not a call. This causes us to miss renaming of associated value labels during local refactoring.
rdar://84061868
13 lines
146 B
Plaintext
13 lines
146 B
Plaintext
enum Foo {
|
|
case primary(with: Int)
|
|
case second
|
|
}
|
|
|
|
func test() {
|
|
let _ = Foo.primary(with: 1)
|
|
let _ = Foo.primary
|
|
let _ = Foo.second
|
|
}
|
|
|
|
|