Skip to content

Commit 43dbdcc

Browse files
committed
Add changelog entry for redeclaration behaviour change
1 parent bbfed7d commit 43dbdcc

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,24 @@ CHANGELOG
2424
Swift 5.0
2525
---------
2626

27+
* [SR-7251][]:
28+
29+
In Swift 5 mode, attempting to declare a static property with the same name as a
30+
nested type is now always correctly rejected. Previously, it was possible to
31+
perform such a redeclaration in an extension of a generic type.
32+
33+
For example:
34+
```swift
35+
struct Foo<T> {}
36+
extension Foo {
37+
struct i {}
38+
39+
// compiler error: Invalid redeclaration of 'i'
40+
// (prior to Swift 5, this did not produce an error)
41+
static var i: Int { return 0 }
42+
}
43+
```
44+
2745
* [SR-4248][]:
2846

2947
In Swift 5 mode, when casting an optional value to a generic placeholder type,
@@ -7199,3 +7217,4 @@ Swift 1.0
71997217
[SR-2394]: <https://bugs.swift.org/browse/SR-2394>
72007218
[SR-2608]: <https://bugs.swift.org/browse/SR-2608>
72017219
[SR-4248]: <https://bugs.swift.org/browse/SR-4248>
7220+
[SR-7251]: <https://bugs.swift.org/browse/SR-7251>

0 commit comments

Comments
 (0)