mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[gardening] Fix "a" vs. "an" issues.
This commit is contained in:
@@ -654,7 +654,7 @@ public:
|
||||
}
|
||||
|
||||
// FIXME: If the unsubstituted payload type is empty, but not
|
||||
// resilient, we treat the case as an no-payload case.
|
||||
// resilient, we treat the case as a no-payload case.
|
||||
//
|
||||
// This should be handled by IRGen emitting the enum strategy
|
||||
// explicitly.
|
||||
|
||||
@@ -236,7 +236,7 @@ if True:
|
||||
/// // Prints "nil, nil"
|
||||
///
|
||||
/// You can access individual array elements through a subscript. The first
|
||||
/// element of an nonempty array is always at index zero. You can
|
||||
/// element of a nonempty array is always at index zero. You can
|
||||
/// subscript an array with any integer from zero up to, but not including,
|
||||
/// the count of the array. Using a negative number or an index equal to or
|
||||
/// greater than `count` triggers a runtime error. For example:
|
||||
|
||||
@@ -85,7 +85,7 @@ extension Collection {
|
||||
///
|
||||
/// You can use the predicate to find an element of a type that doesn't
|
||||
/// conform to the `Equatable` protocol or to find an element that matches
|
||||
/// particular criteria. Here's a example that finds a student name that
|
||||
/// particular criteria. Here's an example that finds a student name that
|
||||
/// begins with the letter "A":
|
||||
///
|
||||
/// let students = ["Kofi", "Abena", "Peter", "Kweku", "Akosua"]
|
||||
|
||||
@@ -389,7 +389,7 @@ extension SetAlgebra {
|
||||
/// square brackets. You can use an array literal anywhere a set is expected
|
||||
/// by the type context.
|
||||
///
|
||||
/// Here, an set of strings is created from an array literal holding only
|
||||
/// Here, a set of strings is created from an array literal holding only
|
||||
/// strings:
|
||||
///
|
||||
/// let ingredients: Set = ["cocoa beans", "sugar", "cocoa butter", "salt"]
|
||||
|
||||
@@ -4990,7 +4990,7 @@ var FooSubUnnamedEnumeratorA1: Int { get }
|
||||
key.name: "init(arrayLiteral:)",
|
||||
key.usr: "s:FEsPs10SetAlgebracFt12arrayLiteralGSawx7Element__x::SYNTHESIZED::c:@E@FooRuncingOptions",
|
||||
key.original_usr: "s:FEsPs10SetAlgebracFt12arrayLiteralGSawx7Element__x",
|
||||
key.doc.full_as_xml: "<Function><Name>init(arrayLiteral:)</Name><USR>s:FEsPs10SetAlgebracFt12arrayLiteralGSawx7Element__x</USR><Declaration>convenience init(arrayLiteral: Self.Element...)</Declaration><Abstract><Para>Creates a set containing the elements of the given array literal.</Para></Abstract><Parameters><Parameter><Name>arrayLiteral</Name><Direction isExplicit=\"0\">in</Direction><Discussion><Para>A list of elements of the new set.</Para></Discussion></Parameter></Parameters><Discussion><Para>Don’t directly call this initializer, which is used by the compiler when you use an array literal. Instead, create a new set using an array literal as its value by enclosing a comma-separated list of values in square brackets. You can use an array literal anywhere a set is expected by the type context.</Para><Para>Here, an set of strings is created from an array literal holding only strings:</Para><CodeListing language=\"swift\"><zCodeLineNumbered><![CDATA[let ingredients: Set = [\"cocoa beans\", \"sugar\", \"cocoa butter\", \"salt\"]]]></zCodeLineNumbered><zCodeLineNumbered><![CDATA[if ingredients.isSupersetOf([\"sugar\", \"salt\"]) {]]></zCodeLineNumbered><zCodeLineNumbered><![CDATA[ print(\"Whatever it is, it's bound to be delicious!\")]]></zCodeLineNumbered><zCodeLineNumbered><![CDATA[}]]></zCodeLineNumbered><zCodeLineNumbered><![CDATA[// Prints \"Whatever it is, it's bound to be delicious!\"]]></zCodeLineNumbered><zCodeLineNumbered></zCodeLineNumbered></CodeListing></Discussion></Function>",
|
||||
key.doc.full_as_xml: "<Function><Name>init(arrayLiteral:)</Name><USR>s:FEsPs10SetAlgebracFt12arrayLiteralGSawx7Element__x</USR><Declaration>convenience init(arrayLiteral: Self.Element...)</Declaration><Abstract><Para>Creates a set containing the elements of the given array literal.</Para></Abstract><Parameters><Parameter><Name>arrayLiteral</Name><Direction isExplicit=\"0\">in</Direction><Discussion><Para>A list of elements of the new set.</Para></Discussion></Parameter></Parameters><Discussion><Para>Don’t directly call this initializer, which is used by the compiler when you use an array literal. Instead, create a new set using an array literal as its value by enclosing a comma-separated list of values in square brackets. You can use an array literal anywhere a set is expected by the type context.</Para><Para>Here, a set of strings is created from an array literal holding only strings:</Para><CodeListing language=\"swift\"><zCodeLineNumbered><![CDATA[let ingredients: Set = [\"cocoa beans\", \"sugar\", \"cocoa butter\", \"salt\"]]]></zCodeLineNumbered><zCodeLineNumbered><![CDATA[if ingredients.isSupersetOf([\"sugar\", \"salt\"]) {]]></zCodeLineNumbered><zCodeLineNumbered><![CDATA[ print(\"Whatever it is, it's bound to be delicious!\")]]></zCodeLineNumbered><zCodeLineNumbered><![CDATA[}]]></zCodeLineNumbered><zCodeLineNumbered><![CDATA[// Prints \"Whatever it is, it's bound to be delicious!\"]]></zCodeLineNumbered><zCodeLineNumbered></zCodeLineNumbered></CodeListing></Discussion></Function>",
|
||||
key.offset: 1703,
|
||||
key.length: 65,
|
||||
key.fully_annotated_decl: "<decl.function.constructor><syntaxtype.keyword>convenience</syntaxtype.keyword> <syntaxtype.keyword>init</syntaxtype.keyword>(<decl.var.parameter><decl.var.parameter.argument_label>arrayLiteral</decl.var.parameter.argument_label>: <decl.var.parameter.type><ref.struct usr=\"c:@E@FooRuncingOptions\">FooRuncingOptions</ref.struct></decl.var.parameter.type>...</decl.var.parameter>)</decl.function.constructor>",
|
||||
|
||||
Reference in New Issue
Block a user