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
Copy file name to clipboardExpand all lines: test/expr/postfix/dot/init_ref_delegation.swift
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -272,10 +272,10 @@ func foo<T: C>(_ x: T, y: T.Type) where T: P {
272
272
varci4= x.init(proto:"") // expected-error{{'init' is a member of the type; use 'type(of: ...)' to initialize a new object of the same dynamic type}} {{13-13=type(of: }} {{14-14=)}}
273
273
274
274
varz= x
275
-
z.init(required:0) // expected-error {{'init' is a member of the type; use assignment to initalize the value instead}} {{4-4= = }}
276
-
z.init(x:0) // expected-error {{'init' is a member of the type; use assignment to initalize the value instead}} {{4-4= = }}
277
-
z.init() // expected-error {{'init' is a member of the type; use assignment to initalize the value instead}} {{4-4= = }}
278
-
z.init(proto:"") // expected-error {{'init' is a member of the type; use assignment to initalize the value instead}} {{4-4= = }}
275
+
z.init(required:0) // expected-error {{'init' is a member of the type; use assignment to initialize the value instead}} {{4-4= = }}
276
+
z.init(x:0) // expected-error {{'init' is a member of the type; use assignment to initialize the value instead}} {{4-4= = }}
277
+
z.init() // expected-error {{'init' is a member of the type; use assignment to initialize the value instead}} {{4-4= = }}
278
+
z.init(proto:"") // expected-error {{'init' is a member of the type; use assignment to initialize the value instead}} {{4-4= = }}
279
279
280
280
varci1a= z.init(required:0) // expected-error {{'init' is a member of the type; use 'type(of: ...)' to initialize a new object of the same dynamic type}} {{14-14=type(of: }} {{15-15=)}}
281
281
varci2a= z.init(x:0) // expected-error {{'init' is a member of the type; use 'type(of: ...)' to initialize a new object of the same dynamic type}} {{14-14=type(of: }} {{15-15=)}}
@@ -520,7 +520,7 @@ struct Y {
520
520
letx2:X
521
521
522
522
init(){
523
-
x.init() // expected-error {{'init' is a member of the type; use assignment to initalize the value instead}} {{6-6= = }}
523
+
x.init() // expected-error {{'init' is a member of the type; use assignment to initialize the value instead}} {{6-6= = }}
524
524
foo(x.init()) // expected-error {{'init' is a member of the type; use 'type(of: ...)' to initialize a new object of the same dynamic type}} {{9-9=type(of: }} {{10-10=)}}
y.x.init() // expected-error {{'init' is a member of the type; use assignment to initalize the value instead}} {{8-8= = }}
540
+
y.x.init() // expected-error {{'init' is a member of the type; use assignment to initialize the value instead}} {{8-8= = }}
541
541
y2.x2.init() // expected-error {{'init' is a member of the type; use 'type(of: ...)' to initialize a new object of the same dynamic type}} {{5-5=type(of: }} {{10-10=)}}
0 commit comments