diff --git a/src/compiler.pr b/src/compiler.pr index 8c8d756..a2d0641 100644 --- a/src/compiler.pr +++ b/src/compiler.pr @@ -2667,6 +2667,7 @@ def insert_call( multiple_returns: bool, state: &State) { for var i in 0..args.size { + if i >= proto.size { continue } // Replace interfaces in proto with the actual type let np = proto[i] if np._tpe and np._tpe.kind == typechecking::TypeKind::STRUCTURAL { @@ -7061,6 +7062,8 @@ export def create_function( block = make_block() } + debug::trace("Compiling function " + function.name) + function.forward_declare = false function.allocas = vector::make(type &Insn) let current_function = errors::current_function diff --git a/src/typechecking.pr b/src/typechecking.pr index 745ed1e..fdfc67a 100644 --- a/src/typechecking.pr +++ b/src/typechecking.pr @@ -2117,6 +2117,8 @@ export def make_struct_type(fields: &[StructMember], current_type: &Type = null) if field.is_bitfield { #if defined WIN32 { // TODO Windows + bit_type = field.tpe + continue } else { // Linux if not bit_type {