File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -8,21 +8,21 @@ Swift 5.5
8
8
9
9
* Type names are no longer allowed as an argument to a subscript parameter that expects a metatype type
10
10
11
- ``` swift
12
- struct MyValue {
13
- }
11
+ ``` swift
12
+ struct MyValue {
13
+ }
14
14
15
- struct MyStruct {
16
- subscript (a : MyValue.Type ) -> Int { get { ... } }
17
- }
15
+ struct MyStruct {
16
+ subscript (a : MyValue.Type ) -> Int { get { ... } }
17
+ }
18
18
19
- func test (obj : MyStruct) {
20
- let _ = obj[MyValue]
21
- }
22
- ```
19
+ func test (obj : MyStruct) {
20
+ let _ = obj[MyValue]
21
+ }
22
+ ```
23
23
24
- Accepting subscripts with ` MyValue ` as an argument was an oversight because ` MyValue ` requires explicit ` .self `
25
- to reference its metatype, so correct syntax would be to use ` obj[MyValue.self] ` .
24
+ Accepting subscripts with ` MyValue ` as an argument was an oversight because ` MyValue ` requires explicit ` .self `
25
+ to reference its metatype, so correct syntax would be to use ` obj[MyValue.self] ` .
26
26
27
27
* [ SE-0310] [ ] :
28
28
You can’t perform that action at this time.
0 commit comments