diff --git a/vlib/v/gen/cgen.v b/vlib/v/gen/cgen.v index f69b0fc51f..f988e84a45 100644 --- a/vlib/v/gen/cgen.v +++ b/vlib/v/gen/cgen.v @@ -629,7 +629,7 @@ pub fn (mut g Gen) write_multi_return_type_declaration(mut sym table.TypeSymbol) pub fn (mut g Gen) write_multi_return_types() { g.type_definitions.writeln('\n// BEGIN_multi_return_structs') - for idx in 0..g.table.types.len { + for idx in 0 .. g.table.types.len { if g.table.types[idx].kind != .multi_return { continue } diff --git a/vlib/v/table/atypes.v b/vlib/v/table/atypes.v index 74b2690819..34befce214 100644 --- a/vlib/v/table/atypes.v +++ b/vlib/v/table/atypes.v @@ -15,8 +15,8 @@ import strings pub type Type = int -pub type TypeInfo = Alias | Array | ArrayFixed | Chan | Enum | FnType | GenericStructInst | - Interface | Map | MultiReturn | Struct | SumType | Aggregate +pub type TypeInfo = Aggregate | Alias | Array | ArrayFixed | Chan | Enum | FnType | GenericStructInst | + Interface | Map | MultiReturn | Struct | SumType pub enum Language { v @@ -737,7 +737,7 @@ pub struct Aggregate { mut: fields []Field // used for faster lookup inside the module pub: - types []Type + types []Type } // NB: FExpr here is a actually an ast.Expr . @@ -762,10 +762,7 @@ pub mut: fn (f &Field) equals(o &Field) bool { // TODO: should all of those be checked ? return f.name == o.name && - f.typ == o.typ && - f.is_pub == o.is_pub && - f.is_mut == o.is_mut && - f.is_global == o.is_global + f.typ == o.typ && f.is_pub == o.is_pub && f.is_mut == o.is_mut && f.is_global == o.is_global } pub struct Array {