Skip to content

Commit b732319

Browse files
committed
[NFC] Fixed and added property wrapper tests.
1 parent c9b53ec commit b732319

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/decl/var/property_wrappers.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,8 +1096,10 @@ struct TestComposition {
10961096
@WrapperD<WrapperE, Int, String> @WrapperE var p3: Int?
10971097
@WrapperD<WrapperC, Int, String> @WrapperC var p4: Int?
10981098
@WrapperD<WrapperC, Int, String> @WrapperE var p5: Int // expected-error{{generic parameter 'Value' could not be inferred}}
1099-
// expected-note@-1 {{explicitly specify the generic arguments to fix this issue}}
1100-
// expected-error@-2 {{composed wrapper type 'WrapperE<Int>' does not match former 'wrappedValue' type 'WrapperC<Value>'}}
1099+
// expected-note@-1 {{explicitly specify the generic arguments to fix this issue}}
1100+
// expected-error@-2 {{composed wrapper type 'WrapperE<Int>' does not match the type of 'WrapperD<WrapperC<_>, Int, String>'.wrappedValue, which is 'WrapperC<Value>'}}
1101+
1102+
@Wrapper<String> @Wrapper var value: Int // expected-error{{composed wrapper type 'Wrapper<Int>' does not match the type of 'Wrapper<String>'.wrappedValue, which is 'String'}}
11011103

11021104
func triggerErrors(d: Double) { // expected-note 6 {{mark method 'mutating' to make 'self' mutable}} {{2-2=mutating }}
11031105
p1 = d // expected-error{{cannot assign value of type 'Double' to type 'Int?'}} {{8-8=Int(}} {{9-9=)}}

0 commit comments

Comments
 (0)