diff --git a/vlib/v/checker/checker.v b/vlib/v/checker/checker.v index a805d88d75..df848a12a2 100644 --- a/vlib/v/checker/checker.v +++ b/vlib/v/checker/checker.v @@ -26,7 +26,8 @@ const ( valid_comp_if_compilers = ['gcc', 'tinyc', 'clang', 'mingw', 'msvc', 'cplusplus'] valid_comp_if_platforms = ['amd64', 'aarch64', 'x64', 'x32', 'little_endian', 'big_endian'] valid_comp_if_other = ['js', 'debug', 'test', 'glibc', 'prealloc', 'no_bounds_checking'] - array_builtin_methods = ['filter', 'clone', 'repeat', 'reverse', 'map', 'slice', 'sort', 'contains', 'index'] + array_builtin_methods = ['filter', 'clone', 'repeat', 'reverse', 'map', 'slice', 'sort', + 'contains', 'index'] ) pub struct Checker { @@ -1205,8 +1206,7 @@ pub fn (mut c Checker) call_method(mut call_expr ast.CallExpr) table.Type { } // TODO: remove this for actual methods, use only for compiler magic // FIXME: Argument count != 1 will break these - if left_type_sym.kind == .array && - method_name in array_builtin_methods { + if left_type_sym.kind == .array && method_name in array_builtin_methods { mut elem_typ := table.void_type is_filter_map := method_name in ['filter', 'map'] is_sort := method_name == 'sort' diff --git a/vlib/v/table/types.v b/vlib/v/table/types.v index 39d321e341..e32a1131ba 100644 --- a/vlib/v/table/types.v +++ b/vlib/v/table/types.v @@ -517,7 +517,12 @@ pub fn (mut t Table) register_builtin_type_symbols() { t.register_type_symbol(kind: .chan, name: 'chan', cname: 'chan', mod: 'builtin') t.register_type_symbol(kind: .size_t, name: 'size_t', cname: 'size_t', mod: 'builtin') t.register_type_symbol(kind: .any, name: 'any', cname: 'any', mod: 'builtin') - t.register_type_symbol(kind: .any_float, name: 'untyped float', cname: 'any_float', mod: 'builtin') + t.register_type_symbol( + kind: .any_float + name: 'untyped float' + cname: 'any_float' + mod: 'builtin' + ) t.register_type_symbol(kind: .any_int, name: 'untyped int', cname: 'any_int', mod: 'builtin') }