Skip to content

Commit 245d025

Browse files
committed
all: more fixes
1 parent 8aca2fb commit 245d025

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

vlib/v/gen/c/assign.v

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2069,9 +2069,9 @@ fn (mut g Gen) assign_stmt(node_ ast.AssignStmt) {
20692069
&& right_type_for_compare == exp_type_for_compare
20702070
right_is_auto_heap := right_ident.is_auto_heap()
20712071
|| g.resolved_ident_is_auto_heap(right_ident)
2072-
use_raw_auto_heap_ident = right_is_auto_heap
2073-
&& !use_heap_pointed_ident && resolved_right_type != 0
2074-
&& !resolved_right_type.is_ptr()
2072+
use_raw_auto_heap_ident = exp_type.is_ptr()
2073+
&& right_is_auto_heap && !use_heap_pointed_ident
2074+
&& resolved_right_type != 0 && !resolved_right_type.is_ptr()
20752075
}
20762076
}
20772077
if use_heap_pointed_ident {

vlib/v/tests/vls/struct_check_test.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ struct TestData {
2121

2222
const test_data = [
2323
TestData{
24-
cmd: 'v -check -vls-mode ${os.quoted_path(text_file)}'
24+
cmd: 'v -w -check -vls-mode ${os.quoted_path(text_file)}'
2525
output: '' // for a struct with `mut:` in it, should report no error
2626
},
2727
]

0 commit comments

Comments
 (0)