|
1 | 1 | let values = [Result<Void>]() |
| 2 | +let initialized = [Result<Void>](unsafeUninitializedCapacity: 1) { _, count in |
| 3 | + count = 0 |
| 4 | +} |
2 | 5 |
|
3 | 6 | --- |
4 | 7 |
|
@@ -45,6 +48,79 @@ sourceFile |
45 | 48 | pattern: |
46 | 49 | identifierPattern |
47 | 50 | identifier: identifier "values" |
| 51 | + codeBlockItem |
| 52 | + item: |
| 53 | + variableDecl |
| 54 | + attributes: |
| 55 | + modifiers: |
| 56 | + bindingSpecifier: let |
| 57 | + bindings: |
| 58 | + patternBinding |
| 59 | + initializer: |
| 60 | + initializerClause |
| 61 | + equal: = |
| 62 | + value: |
| 63 | + functionCallExpr |
| 64 | + leftParen: ( |
| 65 | + rightParen: ) |
| 66 | + arguments: |
| 67 | + labeledExpr |
| 68 | + colon: : |
| 69 | + label: identifier "unsafeUninitializedCapacity" |
| 70 | + expression: |
| 71 | + integerLiteralExpr |
| 72 | + literal: integerLiteral "1" |
| 73 | + additionalTrailingClosures: |
| 74 | + calledExpression: |
| 75 | + arrayExpr |
| 76 | + elements: |
| 77 | + arrayElement |
| 78 | + expression: |
| 79 | + genericSpecializationExpr |
| 80 | + expression: |
| 81 | + declReferenceExpr |
| 82 | + baseName: identifier "Result" |
| 83 | + genericArgumentClause: |
| 84 | + genericArgumentClause |
| 85 | + arguments: |
| 86 | + genericArgument |
| 87 | + argument: |
| 88 | + identifierType |
| 89 | + name: identifier "Void" |
| 90 | + leftAngle: < |
| 91 | + rightAngle: > |
| 92 | + leftSquare: [ |
| 93 | + rightSquare: ] |
| 94 | + trailingClosure: |
| 95 | + closureExpr |
| 96 | + leftBrace: { |
| 97 | + rightBrace: } |
| 98 | + signature: |
| 99 | + closureSignature |
| 100 | + attributes: |
| 101 | + inKeyword: in |
| 102 | + parameterClause: |
| 103 | + closureShorthandParameter |
| 104 | + name: _ |
| 105 | + trailingComma: , |
| 106 | + closureShorthandParameter |
| 107 | + name: identifier "count" |
| 108 | + statements: |
| 109 | + codeBlockItem |
| 110 | + item: |
| 111 | + infixOperatorExpr |
| 112 | + operator: |
| 113 | + assignmentExpr |
| 114 | + equal: = |
| 115 | + leftOperand: |
| 116 | + declReferenceExpr |
| 117 | + baseName: identifier "count" |
| 118 | + rightOperand: |
| 119 | + integerLiteralExpr |
| 120 | + literal: integerLiteral "0" |
| 121 | + pattern: |
| 122 | + identifierPattern |
| 123 | + identifier: identifier "initialized" |
48 | 124 |
|
49 | 125 | --- |
50 | 126 |
|
@@ -72,3 +148,47 @@ top_level |
72 | 148 | type_argument: |
73 | 149 | named_type_expr |
74 | 150 | name: identifier "Void" |
| 151 | + variable_declaration |
| 152 | + modifier: modifier "let" |
| 153 | + pattern: |
| 154 | + name_pattern |
| 155 | + identifier: identifier "initialized" |
| 156 | + value: |
| 157 | + call_expr |
| 158 | + callee: |
| 159 | + generic_type_expr |
| 160 | + base: |
| 161 | + named_type_expr |
| 162 | + name: identifier "Array" |
| 163 | + type_argument: |
| 164 | + generic_type_expr |
| 165 | + base: |
| 166 | + named_type_expr |
| 167 | + name: identifier "Result" |
| 168 | + type_argument: |
| 169 | + named_type_expr |
| 170 | + name: identifier "Void" |
| 171 | + argument: |
| 172 | + argument |
| 173 | + name: identifier "unsafeUninitializedCapacity" |
| 174 | + value: int_literal "1" |
| 175 | + argument |
| 176 | + value: |
| 177 | + function_expr |
| 178 | + parameter: |
| 179 | + parameter |
| 180 | + pattern: |
| 181 | + name_pattern |
| 182 | + identifier: identifier "_" |
| 183 | + parameter |
| 184 | + pattern: |
| 185 | + name_pattern |
| 186 | + identifier: identifier "count" |
| 187 | + body: |
| 188 | + block |
| 189 | + stmt: |
| 190 | + assign_expr |
| 191 | + target: |
| 192 | + name_expr |
| 193 | + identifier: identifier "count" |
| 194 | + value: int_literal "0" |
0 commit comments