Commit Graph

3 Commits

Author SHA1 Message Date
Pavel Yaskevich
f462521078 [ConstraintSystem] Refactor arg/param matching to handle autoclosures
Make sure that presence of `@autoclosure` attribute handled
in one place - `matchCallArguments`, which makes it possible
to remove the rest of (now redundant) autoclosure related
logic scattered throughout solver.
2018-11-10 11:59:28 -08:00
Erik Eckstein
39bb14b094 change mangling prefix from $S to $s
This is the final ABI mangling prefix

rdar://problem/38471478
2018-09-19 13:55:11 -07:00
Pavel Yaskevich
8316353e07 [CSSolver] Increment score when performing certain function conversions
Increase solution score when performing function conversions where only
one side has `@autoclosure`. That is going to help pick the best overload
when only difference lays in presence of such attribute.

e.g.

```swift
func foo(_: @autoclosure () -> Int) {}
func foo(_: () -> Int) {}
```

If the argument is itself `@autoclosure` it's preferable to use overload
with `@autoclosure` attribute, otherwise `() -> Int` should be used.

Resolves: rdar://problem/37160679
2018-02-06 18:55:10 -08:00