From 245d025c2082fdc59d3edee16ebe7206c4f6ece2 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Mon, 20 Apr 2026 00:54:43 +0300 Subject: [PATCH] all: more fixes --- vlib/v/gen/c/assign.v | 6 +++--- vlib/v/tests/vls/struct_check_test.v | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/vlib/v/gen/c/assign.v b/vlib/v/gen/c/assign.v index 6491273c0..36a11ca8e 100644 --- a/vlib/v/gen/c/assign.v +++ b/vlib/v/gen/c/assign.v @@ -2069,9 +2069,9 @@ fn (mut g Gen) assign_stmt(node_ ast.AssignStmt) { && right_type_for_compare == exp_type_for_compare right_is_auto_heap := right_ident.is_auto_heap() || g.resolved_ident_is_auto_heap(right_ident) - use_raw_auto_heap_ident = right_is_auto_heap - && !use_heap_pointed_ident && resolved_right_type != 0 - && !resolved_right_type.is_ptr() + use_raw_auto_heap_ident = exp_type.is_ptr() + && right_is_auto_heap && !use_heap_pointed_ident + && resolved_right_type != 0 && !resolved_right_type.is_ptr() } } if use_heap_pointed_ident { diff --git a/vlib/v/tests/vls/struct_check_test.v b/vlib/v/tests/vls/struct_check_test.v index 89a39f6bc..ac1b52e50 100644 --- a/vlib/v/tests/vls/struct_check_test.v +++ b/vlib/v/tests/vls/struct_check_test.v @@ -21,7 +21,7 @@ struct TestData { const test_data = [ TestData{ - cmd: 'v -check -vls-mode ${os.quoted_path(text_file)}' + cmd: 'v -w -check -vls-mode ${os.quoted_path(text_file)}' output: '' // for a struct with `mut:` in it, should report no error }, ] -- 2.39.5