| 777 | struct SubscriptSimpleFunc { |
| 778 | BOLT_DEFINE_FUNCTION_TYPES(T); |
| 779 | bool call( |
| 780 | out_type<Generic<T1>>& out, |
| 781 | const arg_type<Array<Generic<T1>>>& input, |
| 782 | int64_t index) { |
| 783 | if (!input[index - 1].has_value()) { |
| 784 | return false; |
| 785 | } |
| 786 | |
| 787 | out.copy_from(input[index - 1].value()); |
| 788 | return true; |
| 789 | } |
| 790 | }; |
| 791 | |
| 792 | TEST_F(GenericWriterTest, copyFromGeneric) { |