You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let _:ImplicitlyUnwrappedOptional<Int>=1 // expected-warning {{the spelling 'ImplicitlyUnwrappedOptional' is deprecated; use '!' after the type name}}{{8-36=}}{{39-39=!}}{{39-40=}}
4
+
let _:ImplicitlyUnwrappedOptional=1 // expected-warning {{the spelling 'ImplicitlyUnwrappedOptional' is deprecated}}
5
+
6
+
extensionImplicitlyUnwrappedOptional{} // expected-warning {{the spelling 'ImplicitlyUnwrappedOptional' is deprecated}}
7
+
8
+
func function(
9
+
_:ImplicitlyUnwrappedOptional<Int> // expected-warning {{the spelling 'ImplicitlyUnwrappedOptional' is deprecated; use '!' after the type name}}{{6-34=}}{{37-37=!}}{{37-38=}}
10
+
)->ImplicitlyUnwrappedOptional<Int>{ // expected-warning {{the spelling 'ImplicitlyUnwrappedOptional' is deprecated; use '!' after the type name}}{{6-34=}}{{37-37=!}}{{37-38=}}
11
+
return1
12
+
}
13
+
14
+
func genericFunction<T>(
15
+
iuo:ImplicitlyUnwrappedOptional<T> // expected-warning {{the spelling 'ImplicitlyUnwrappedOptional' is deprecated; use '!' after the type name}}{{8-36=}}{{37-37=!}}{{37-38=}}
16
+
)->ImplicitlyUnwrappedOptional<T>{ // expected-warning {{the spelling 'ImplicitlyUnwrappedOptional' is deprecated; use '!' after the type name}}{{6-34=}}{{35-35=!}}{{35-36=}}
17
+
return iuo
18
+
}
19
+
20
+
protocolP{
21
+
associatedtypeT
22
+
associatedtypeU
23
+
}
24
+
25
+
structS:P{
26
+
typealiasT=ImplicitlyUnwrappedOptional<Int> // expected-warning {{the spelling 'ImplicitlyUnwrappedOptional' is deprecated}}
27
+
typealiasU=Optional<ImplicitlyUnwrappedOptional<Int>> // expected-warning {{the spelling 'ImplicitlyUnwrappedOptional' is deprecated}}
28
+
29
+
subscript (
30
+
index:ImplicitlyUnwrappedOptional<Int> // expected-warning {{the spelling 'ImplicitlyUnwrappedOptional' is deprecated; use '!' after the type name}}{{12-40=}}{{43-43=!}}{{43-44=}}
31
+
)->ImplicitlyUnwrappedOptional<Int>{ // expected-warning {{the spelling 'ImplicitlyUnwrappedOptional' is deprecated; use '!' after the type name}}{{12-40=}}{{43-43=!}}{{43-44=}}
(i:ImplicitlyUnwrappedOptional<Int>) // expected-warning {{the spelling 'ImplicitlyUnwrappedOptional' is deprecated; use '!' after the type name}}{{9-37=}}{{40-40=!}}{{40-41=}}
42
+
->ImplicitlyUnwrappedOptional<Int>in // expected-warning {{the spelling 'ImplicitlyUnwrappedOptional' is deprecated}}
variuoClosureExplicit:ImplicitlyUnwrappedOptional<()->Void> // expected-warning {{the spelling 'ImplicitlyUnwrappedOptional' is deprecated; use '!' after the type name}}
Copy file name to clipboardExpand all lines: test/decl/class/override.swift
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -221,8 +221,10 @@ class IUOTestSubclass2 : IUOTestBaseClass {
221
221
// expected-note@-1 {{remove '!' to make the parameter required}} {{36-37=}}
222
222
// expected-note@-2 {{add parentheses to silence this warning}} {{27-27=(}} {{37-37=)}}
223
223
224
-
overridefunc oneB(x:ImplicitlyUnwrappedOptional<AnyObject>){} // expected-warning {{overriding instance method parameter of type 'AnyObject' with implicitly unwrapped optional type 'ImplicitlyUnwrappedOptional<AnyObject>'}}
225
-
// expected-note@-1 {{add parentheses to silence this warning}} {{25-25=(}} {{63-63=)}}
// expected-warning@-1 {{the spelling 'ImplicitlyUnwrappedOptional' is deprecated; use '!' after the type name}}{{25-53=}}{{62-62=!}}{{62-63=}}
226
+
// expected-warning@-2 {{overriding instance method parameter of type 'AnyObject' with implicitly unwrapped optional type 'ImplicitlyUnwrappedOptional<AnyObject>'}}
227
+
// expected-note@-3 {{add parentheses to silence this warning}} {{25-25=(}} {{63-63=)}}
226
228
227
229
overridefunc oneC(_:AnyObject!){} // expected-warning {{overriding instance method parameter of type 'AnyObject' with implicitly unwrapped optional type 'AnyObject!'}}
228
230
// expected-note@-1 {{remove '!' to make the parameter required}} {{34-35=}}
0 commit comments