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/decl/var/property_delegates.swift
+14Lines changed: 14 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -430,6 +430,20 @@ struct BadCombinations {
430
430
unowned var z: C by Wrapper // expected-error{{property 'z' with a delegate cannot also be unowned}}
431
431
}
432
432
433
+
@propertyDelegate
434
+
struct NonVisibleValueDelegate<Value>{
435
+
private var value: Value // expected-error{{private property 'value' cannot have more restrictive access than its enclosing property delegate type 'NonVisibleValueDelegate' (which is internal)}}
436
+
}
437
+
438
+
@propertyDelegate
439
+
struct NonVisibleInitDelegate<Value>{
440
+
var value: Value
441
+
442
+
private init(initialValue: Value){ // expected-error{{private initializer 'init(initialValue:)' cannot have more restrictive access than its enclosing property delegate type 'NonVisibleInitDelegate' (which is internal)}}
0 commit comments