Skip to content

Conversation

@xedin
Copy link
Contributor

@xedin xedin commented Dec 5, 2025

…upported by a performance hack

Handle the following situation:

struct S {
   func test() {}
   static func test(_: S) {}
}

Calling S.test(s) where s has a type S without any other context
should prefer a complete call to a static member over a partial
application of an instance once based on the choice of the base type.

The behavior is consistent for double-applies as well i.e.
S.test(s)() if static method produced a function type it would be
preferred.

Resolves: rdar://165862285

@xedin xedin requested a review from slavapestov December 5, 2025 21:11
@xedin xedin requested a review from hborla as a code owner December 5, 2025 21:11
@xedin xedin force-pushed the rdar-165862285 branch 2 times, most recently from 96e3a3c to 125c3f6 Compare December 5, 2025 21:23
…upported by a performance hack

Handle the following situation:

```swift
struct S {
   func test() {}
   static func test(_: S) {}
}
```

Calling `S.test(s)` where `s` has a type `S` without any other context
should prefer a complete call to a static member over a partial
application of an instance once based on the choice of the base type.

The behavior is consistent for double-applies as well i.e.
`S.test(s)()` if static method produced a function type it would be
preferred.

Resolves: rdar://165862285
@xedin
Copy link
Contributor Author

xedin commented Dec 5, 2025

@swift-ci please test

1 similar comment
@xedin
Copy link
Contributor Author

xedin commented Dec 7, 2025

@swift-ci please test

@xedin
Copy link
Contributor Author

xedin commented Dec 8, 2025

@swift-ci please test macOS platform

@xedin
Copy link
Contributor Author

xedin commented Dec 8, 2025

@swift-ci please test Windows

@xedin
Copy link
Contributor Author

xedin commented Dec 8, 2025

@swift-ci please test Windows platform

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants