Skip to content

Commit 40fdae4

Browse files
committed
[docs] CToSwift: remove the import-as-member-subscript discussion
This fits in the model but was never implemented, so take it back out.
1 parent 6a0bc45 commit 40fdae4

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

docs/CToSwiftNameTranslation.md

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -370,19 +370,6 @@ extension Counter {
370370
}
371371
```
372372

373-
The getter/setter syntax also allows for subscripts by using the base name `subscript`.
374-
375-
```objc
376-
__attribute__((swift_name("getter:LinkedListOfInts.subscript(self:_:)")))
377-
int LinkedListGetAtIndex(const LinkedListOfInts *head, int index);
378-
```
379-
380-
```swift
381-
extension LinkedListOfInts {
382-
subscript(_ index: Int32) -> Int32 { get }
383-
}
384-
```
385-
386373
Finally, functions can be imported as initializers as well by using the base name `init`. These are considered "factory" initializers and are never inherited or overridable. They must not have a `self` parameter.
387374

388375
```objc

0 commit comments

Comments
 (0)