Skip to content

Commit 9a05c9e

Browse files
committed
Add test for usage of deprecated inherited init
1 parent f5e363d commit 9a05c9e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/attr/attr_availability.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,6 +1029,14 @@ struct UnavailableAccessors {
10291029
}
10301030
}
10311031

1032+
class BaseDeprecatedInit {
1033+
@available(*, deprecated) init(bad: Int) { }
1034+
}
1035+
1036+
class SubInheritedDeprecatedInit: BaseDeprecatedInit { }
1037+
1038+
_ = SubInheritedDeprecatedInit(bad: 0) // expected-warning {{'init(bad:)' is deprecated}}
1039+
10321040
// Should produce no warnings.
10331041
enum SR8634_Enum: Int {
10341042
case a

0 commit comments

Comments
 (0)