Skip to content

Fixed Typo in /docs/tools/Arrays.rst #54

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 3, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/Arrays.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Goals
2. It should be possible to receive an ``NSArray`` from Cocoa,
represent it as an ``Array<AnyObject>``, and pass it right back to
Cocoa as an ``NSArray`` in O(1) and with no memory allocations.

3. Arrays should be usable as stacks, so we want amortized O(1) append
and O(1) popBack. Together with goal #1, this implies a
``std::vector``\ -like layout, with a reserved tail memory capacity
Expand Down Expand Up @@ -141,7 +141,7 @@ Bridging Rules and Terminology for all Types
* For a type ``T`` that is not `bridged verbatim`_,

- if ``T`` conforms to ``BridgedToObjectiveC`` and either

- ``T`` does not conform to ``_ConditionallyBridgedToObjectiveC``
- or, ``T._isBridgedToObjectiveC()``

Expand Down Expand Up @@ -182,7 +182,7 @@ conforms to ``_BridgedToObjectiveC``:
* **Implicit conversions** between ``Array`` types

- **Implicit upcasting** implicitly converts ``Derived[]`` to
``Base[]`` in O(1).
``Base[]`` in O(1).
- **Implicit bridging** implicitly converts ``X[]`` to
``X._ObjectiveCType[]`` in O(N).

Expand All @@ -202,7 +202,7 @@ conforms to ``_BridgedToObjectiveC``:
For example, when a user writes a Swift method taking ``NSView[]``,
it is exposed to Objective-C as a method taking ``NSArray``, which
is force-converted to ``NSView[]`` when called from Objective-C.

- **Forced downcasting** converts ``AnyObject[]`` to ``Derived[]`` in
O(1)
- **Forced bridging back** converts ``AnyObject[]`` to ``X[]`` in O(N).
Expand Down Expand Up @@ -250,7 +250,7 @@ buffer; it will be copied upon its first mutation:

.. _deferred:

Deferrred Checking for Forced Downcasts
Deferred Checking for Forced Downcasts
.......................................
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The number of '.' needs to match the length of the header on the preceding line.


In forced downcasts, if any element fails to have dynamic type ``Derived``,
Expand Down