Skip to content

Commit

Permalink
fix test x2
Browse files Browse the repository at this point in the history
  • Loading branch information
Delta456 committed Jul 2, 2024
1 parent dd19c51 commit f459c26
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions vlib/v/checker/check_types.v
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ fn (mut c Checker) check_types(got ast.Type, expected ast.Type) bool {
exp_sym := c.table.sym(expected)
if (exp_idx == ast.nil_type_idx && got_sym.kind == .string)
|| (got_idx == ast.nil_type_idx && exp_sym.kind == .string) {
if expected.is_ptr() || got.is_ptr() {
return true
}
if got_sym.language != .c || exp_sym.language != .c {
return false
}
Expand Down

0 comments on commit f459c26

Please # to comment.