1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

ci: run v fmt -w vlib/v/checker/fn.v (fix CI regression after 4952967)

This commit is contained in:
Delyan Angelov 2022-05-12 21:24:05 +03:00
parent 668d1b04d2
commit 8ef9dc6247
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -927,7 +927,6 @@ pub fn (mut c Checker) fn_call(mut node ast.CallExpr, mut continue_check &bool)
} }
} }
if c.pref.translated || c.file.is_translated { if c.pref.translated || c.file.is_translated {
// TODO duplicated logic in check_types() (check_types.v) // TODO duplicated logic in check_types() (check_types.v)
// Allow enums to be used as ints and vice versa in translated code // Allow enums to be used as ints and vice versa in translated code
if param.typ == ast.int_type && arg_typ_sym.kind == .enum_ { if param.typ == ast.int_type && arg_typ_sym.kind == .enum_ {
@ -961,7 +960,8 @@ pub fn (mut c Checker) fn_call(mut node ast.CallExpr, mut continue_check &bool)
} }
// Allow `[32]i8` as `&i8` etc // Allow `[32]i8` as `&i8` etc
if ((arg_typ_sym.kind == .array_fixed || arg_typ_sym.kind == .array) if ((arg_typ_sym.kind == .array_fixed || arg_typ_sym.kind == .array)
&& (param_is_number || c.table.unaliased_type(param.typ).is_any_kind_of_pointer())) && (param_is_number
|| c.table.unaliased_type(param.typ).is_any_kind_of_pointer()))
|| ((param_typ_sym.kind == .array_fixed || param_typ_sym.kind == .array) || ((param_typ_sym.kind == .array_fixed || param_typ_sym.kind == .array)
&& (typ_is_number || c.table.unaliased_type(arg_typ).is_any_kind_of_pointer())) { && (typ_is_number || c.table.unaliased_type(arg_typ).is_any_kind_of_pointer())) {
continue continue