Appearance
| 1 | namespace Semantic is | |
| 2 | use Types.Type | |
| 3 | ||
| 4 | class SEQUENCE_ELEMENT_BOUND is | |
| 5 | // The upper bound a formal's element type puts on an array literal | |
| 6 | // element whose type is still being inferred, or null when the | |
| 7 | // element type is no type to bound with: absent, still holding a | |
| 8 | // placeholder, or over a type parameter the call has not bound, | |
| 9 | // which names a binding still to be made. | |
| 10 | for_element_type(element_type: Type?) -> Type? static => | |
| 11 | if | |
| 12 | element_type? /\ | |
| 13 | element_type.is_settled /\ | |
| 14 | !element_type.contains_function_generic_argument | |
| 15 | then | |
| 16 | element_type | |
| 17 | else | |
| 18 | null | |
| 19 | fi | |
| 20 | si | |
| 21 | si |