File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed
branches/rxwei-patch-1/test/decl/var Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -1015,7 +1015,7 @@ refs/tags/swift-DEVELOPMENT-SNAPSHOT-2018-08-18-a: b10b1fce14385faa6d44f6b933e95
1015
1015
refs/heads/rdar-43033749-fix-batch-mode-no-diags-swift-5.0-branch: a14e64eaad30de89f0f5f0b2a782eed7ecdcb255
1016
1016
refs/heads/revert-19006-error-bridging-integer-type: 8a9065a3696535305ea53fe9b71f91cbe6702019
1017
1017
refs/heads/revert-19050-revert-19006-error-bridging-integer-type: ecf752d54b05dd0a20f510f0bfa54a3fec3bcaca
1018
- refs/heads/rxwei-patch-1: 626b93cca20fe4b70fbc7cd4ba0495ddc2deac17
1018
+ refs/heads/rxwei-patch-1: c195fdcc5c0419e72c81918cebea7650091c57b8
1019
1019
refs/heads/shahmishal-patch-1: e58ec0f7488258d42bef51bc3e6d7b3dc74d7b2a
1020
1020
refs/heads/typelist-existential: 4046359efd541fb5c72d69a92eefc0a784df8f5e
1021
1021
refs/tags/swift-4.2-DEVELOPMENT-SNAPSHOT-2018-08-20-a: 4319ba09e4fb8650ee86061075c74a016b6baab9
Original file line number Diff line number Diff line change @@ -944,6 +944,16 @@ struct Foo<T> { // expected-note {{arguments to generic parameter 'T' ('W' and '
944
944
get { return 42 }
945
945
set { }
946
946
}
947
+
948
+ subscript( x x: Int ) -> Int {
949
+ get { return 42 }
950
+ set { }
951
+ }
952
+
953
+ subscript( q q: String , a: Int ) -> Bool {
954
+ get { return false }
955
+ set { }
956
+ }
947
957
}
948
958
949
959
@propertyWrapper
@@ -1021,13 +1031,19 @@ struct MissingPropertyWrapperUnwrap {
1021
1031
1022
1032
self . x [ " ultimate question " ] // expected-error {{referencing subscript 'subscript(_:)' requires wrapper 'Foo<Int>'}} {{10-10=_}}
1023
1033
self . x [ " ultimate question " ] = 42 // expected-error {{referencing subscript 'subscript(_:)' requires wrapper 'Foo<Int>'}} {{10-10=_}}
1034
+
1035
+ self . x [ x: 42 ] // expected-error {{referencing subscript 'subscript(x:)' requires wrapper 'Foo<Int>'}} {{10-10=_}}
1036
+ self . x [ x: 42 ] = 0 // expected-error {{referencing subscript 'subscript(x:)' requires wrapper 'Foo<Int>'}} {{10-10=_}}
1037
+
1038
+ self . x [ q: " ultimate question " , 42 ] // expected-error {{referencing subscript 'subscript(q:_:)' requires wrapper 'Foo<Int>'}} {{10-10=_}}
1039
+ self . x [ q: " ultimate question " , 42 ] = true // expected-error {{referencing subscript 'subscript(q:_:)' requires wrapper 'Foo<Int>'}} {{10-10=_}}
1024
1040
}
1025
1041
}
1026
1042
1027
1043
struct InvalidPropertyDelegateUse {
1028
1044
@Foo var x : Int = 42 // expected-error {{extra argument 'initialValue' in call}}
1029
1045
1030
1046
func test( ) {
1031
- self . x. foo ( ) // expected-error {{alue of type 'Int' has no member 'foo'}}
1047
+ self . x. foo ( ) // expected-error {{value of type 'Int' has no member 'foo'}}
1032
1048
}
1033
1049
}
You can’t perform that action at this time.
0 commit comments