Skip to content

Commit 2975237

Browse files
committed
Add a ChangeLog entry for the removal of the single-Any-parameter hack
1 parent 4ee4124 commit 2975237

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@ Swift 5.1
2626

2727
* Key path expressions can now include references to tuple elements.
2828

29+
* Single-parameter functions accepting values of type `Any` are no
30+
longer preferred over other functions.
31+
32+
```swift
33+
func foo(_: Any) { print("Any") }
34+
func foo<T>(_: T) { print("T") }
35+
foo(0) // prints "Any" in Swift < 5.1, "T" in Swift 5.1
36+
```
37+
2938
Swift 5.0
3039
---------
3140

0 commit comments

Comments
 (0)