╭ test_struct_result.zig ───────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭ find file ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╮ ╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │ │ │http│ ssh │ │ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╯ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
.. Assembly Syntax Explained.zig TopLevelFields.zig addWithOverflow_builtin.zig anonymous_struct_name.zig assign_undefined.zig bad_default_value.zig base64.zig build.zig build_c.zig build_object.zig catch.zig catch_err_return.zig change_active_union_field.zig checking_null_in_zig.zig cli_allocation.zig comments.zig compile-time_duck_typing.zig compile_variables.zig compiler_generated_function.zig constant_identifier_cannot_change defer_unwind.zig destructuring_arrays.zig destructuring_block.zig destructuring_mixed.zig destructuring_return_value.zig destructuring_to_existing.zig destructuring_vectors.zig doc_comments.zig entry_point.zig enum_export.zig enum_export_error.zig error_return_trace.zig error_union_parsing_u64.zig export_any_symbol_name.zig export_builtin.zig export_builtin_equivalent_code.zi fibonacci_comptime_infinite_recur float_literals.zig float_mode_exe.zig float_mode_obj.zig float_special_values.zig generic_data_structure.zig grammar.peg handle_error_with_catch_block.zig hello.zig hello_again.zig identifiers.zig inline_assembly.zig inline_call.zig inline_prong_range.zig integer_literals.zig invalid_doc-comment.zig lang.CallModifier struct.zig libc_export_entry_point.zig math.zig math_add.zig mathtest.zig multiline_string_literals.zig mutable_var.zig not_atomic_cmpxchgStrong.zig null.zig optional_integer.zig packed_struct_mmio.zig panic_handler.zig poc_printValue_fn.zig poc_print_fn.zig print.zig print_comptime-known_format.zig redundant_fqn.zig result_location_interfering_with_ result_type_propagation.zig runtime_divExact_remainder.zig runtime_division_by_zero.zig runtime_incorrect_pointer_alignme runtime_index_out_of_bounds.zig runtime_invalid_cast.zig runtime_invalid_cast_truncate.zig runtime_invalid_enum_cast.zig runtime_invalid_error_code.zig runtime_invalid_error_set_cast.zi runtime_invalid_null_pointer_cast runtime_out_of_bounds_float_to_in runtime_overflow.zig runtime_reaching_unreachable.zig runtime_remainder_division_by_zer runtime_shlExact_overflow.zig runtime_shrExact_overflow.zig runtime_unwrap_error.zig runtime_unwrap_null.zig runtime_vs_comptime.zig runtime_wrong_union_field_access. sentinel-terminated_pointer.zig single_value_error_set.zig single_value_error_set_shortcut.z slicing_by_length.zig stack_trace.zig std_options.zig string_literals.zig struct_default_field_values.zig struct_default_value.zig struct_name.zig test_TypeOf_builtin.zig test_aligned_struct_fields.zig test_allocator.zig test_allowzero.zig test_ambiguous_coercion.zig test_anonymous_struct.zig test_anonymous_union.zig test_arrays.zig test_assertion_failure.zig test_basic_slices.zig test_bitOffsetOf_offsetOf.zig test_blocks.zig test_call_builtin.zig test_coerce_error_subset_to_super test_coerce_error_superset_to_sub test_coerce_large_to_small.zig test_coerce_optional_wrapped_erro test_coerce_optionals.zig test_coerce_slices_arrays_and_poi test_coerce_to_error_union.zig test_coerce_tuples_arrays.zig test_coerce_unions_enums.zig test_compileLog_builtin.zig test_comptime_call_extern_functio test_comptime_divExact_remainder. test_comptime_division_by_zero.zi test_comptime_evaluation.zig test_comptime_incorrect_pointer_a test_comptime_index_out_of_bounds test_comptime_invalid_cast.zig test_comptime_invalid_cast_trunca test_comptime_invalid_enum_cast.z test_comptime_invalid_error_code. test_comptime_invalid_error_set_c test_comptime_invalid_null_pointe test_comptime_max_with_bool.zig test_comptime_mismatched_type.zig test_comptime_out_of_bounds_float test_comptime_overflow.zig test_comptime_pointer_conversion. test_comptime_pointers.zig test_comptime_reaching_unreachabl test_comptime_remainder_division_ test_comptime_shlExact_overflow.z test_comptime_shrExact_overflow.z test_comptime_unreachable.zig test_comptime_unwrap_error.zig test_comptime_unwrap_null.zig test_comptime_variables.zig test_comptime_wrong_union_field_a test_defer.zig test_defining_variadic_function.z test_empty_block.zig test_enum_literals.zig test_enums.zig test_error_union.zig test_exhaustive_switch.zig test_expression_ignored.zig test_failed_int_to_float_coercion test_fibonacci_comptime_overflow. test_fibonacci_comptime_unreachab test_fibonacci_recursion.zig test_field_builtin.zig test_fn_reflection.zig test_fn_type_inference.zig test_for.zig test_for_nested_break.zig test_functions.zig test_global_assembly.zig test_hasDecl_builtin.zig test_if.zig test_if_optionals.zig test_illegal_behavior.zig test_incorrect_pointer_alignment. test_inferred_error_sets.zig test_inline_else.zig test_inline_for.zig test_inline_switch.zig test_inline_switch_union_tag.zig test_inline_while.zig test_intCast_builtin.zig test_int_to_float_coercion.zig test_integer_pointer_conversion.z test_integer_widening.zig test_invalid_defer.zig test_labeled_break.zig test_locally_scoped_global_variab test_merging_error_sets.zig test_misaligned_pointer.zig test_missized_packed_struct.zig test_multidimensional_arrays.zig test_namespace-level_comptime_exp test_namespace_level_variables.zi test_namespaced_variable.zig test_no_op_casts.zig test_noreturn.zig test_noreturn_from_exit.zig test_null_terminated_array.zig test_null_terminated_slice.zig test_null_terminated_slicing.zig test_opaque.zig test_optional_pointer.zig test_optional_type.zig test_overaligned_packed_struct.zi test_packed_struct_backing_int.zi test_packed_struct_equality.zig test_packed_struct_field_address. test_packed_structs.zig test_packed_union_equality.zig test_pass_by_reference_or_value.z test_peer_type_resolution.zig test_pointer_arithmetic.zig test_pointer_casting.zig test_pointer_coerce_const_optiona test_pointer_to_non-byte_aligned_ test_print_too_many_args.zig test_reduce_builtin.zig test_round_builtin.zig test_scopes.zig test_sentinel_mismatch.zig test_setEvalBranchQuota_builtin.z test_setRuntimeSafety_builtin.zig test_shadowing.zig test_shuffle_builtin.zig test_simple_union.zig test_single_item_pointer.zig test_slice_bounds.zig test_slices.zig test_splat_builtin.zig test_src_builtin.zig test_string_literal_to_const_slic test_string_literal_to_slice.zig ╭─────────────────────────────────╮ │test_struct_result.zig │ ╰─────────────────────────────────╯ test_structs.zig test_switch.zig test_switch_continue.zig test_switch_continue_equivalent.z test_switch_dispatch_loop.zig test_switch_modify_tagged_union.z test_switch_non-exhaustive.zig test_switch_on_errors.zig test_switch_tagged_union.zig test_tagName.zig test_tagged_union.zig test_tagged_union_with_tag_values test_this_builtin.zig test_thread_local_variables.zig test_truncate_builtin.zig test_tuples.zig test_type_coercion.zig test_unhandled_enumeration_value. test_union_method.zig test_unreachable.zig test_unresolved_comptime_value.zi test_variable_alignment.zig test_variable_func_alignment.zig test_variadic_function.zig test_vector.zig test_void_ignored.zig test_void_in_hashmap.zig test_volatile.zig test_wasmMemoryGrow_builtin.zig test_while.zig test_while_break.zig test_while_continue.zig test_while_continue_expression.zi test_while_else.zig test_while_error_capture.zig test_while_nested_break.zig test_while_null_capture.zig test_without_setEvalBranchQuota_b test_wraparound_semantics.zig test_wrong_union_access.zig testing_detect_leak.zig testing_detect_test.zig testing_error_with_if.zig testing_failure.zig testing_introduction.zig testing_namespace.zig testing_null_with_if.zig testing_skip.zig tldoc_comments.zig try.zig unattached_doc-comment.zig undefined_active_union_field.zig values.zig var_must_be_initialized.zig wasi_args.zig wasi_preopens.zig zero_bit_types.zig
1 const std = @import("std"); 2 const expectEqual = std.testing.expectEqual; 3 4 const Point = struct { x: i32, y: i32 }; 5 6 test "anonymous struct literal" { 7 const pt: Point = .{ 8 .x = 13, 9 .y = 67, 10 }; 11 try expectEqual(13, pt.x); 12 try expectEqual(67, pt.y); 13 } 14 15 // test 16