Fix warnings
This commit is contained in:
parent
86eab29173
commit
1b9f3dbca0
@ -351,7 +351,6 @@ impl InstructionHolder {
|
||||
),
|
||||
ArrayAlloca(ty, len) => {
|
||||
let array_len = ConstValue::U16(*len as u16).as_llvm(module.context_ref);
|
||||
let array_ty = Type::Ptr(Box::new(ty.clone()));
|
||||
LLVMBuildArrayAlloca(
|
||||
module.builder_ref,
|
||||
ty.as_llvm(module.context_ref),
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Arithmetic, function calls and imports!
|
||||
|
||||
fn array() -> [[u16; 4]; 1] {
|
||||
return [[10, 15, 7, 9]];
|
||||
fn array() -> [[[u16; 4]; 1]; 1] {
|
||||
return [[[10, 15, 7, 9]]];
|
||||
}
|
||||
|
||||
fn main() -> u16 {
|
||||
@ -9,7 +9,7 @@ fn main() -> u16 {
|
||||
|
||||
let mut list = array();
|
||||
|
||||
list[0][3] = 5;
|
||||
list[0][0][3] = 5;
|
||||
|
||||
return list[0][3];
|
||||
return list[0][0][3];
|
||||
}
|
||||
|
@ -155,8 +155,6 @@ impl<'ctx, 'a> Scope<'ctx, 'a> {
|
||||
|
||||
impl IndexedVariableReference {
|
||||
fn get_stack_value(&self, scope: &mut Scope) -> Option<(StackValue, Vec<u32>)> {
|
||||
use StackValueKind as Kind;
|
||||
|
||||
match &self.kind {
|
||||
mir::IndexedVariableReferenceKind::Named(NamedVariableRef(_, name, _)) => scope
|
||||
.stack_values
|
||||
|
@ -4,7 +4,7 @@
|
||||
//! must then be passed through TypeCheck with the same [`TypeRefs`] in order to
|
||||
//! place the correct types from the IDs and check that there are no issues.
|
||||
|
||||
use std::{convert::Infallible, iter};
|
||||
use std::iter;
|
||||
|
||||
use crate::{mir::TypeKind, util::try_all};
|
||||
|
||||
|
@ -1,8 +1,4 @@
|
||||
use super::{
|
||||
pass::{ScopeVariable, Storage},
|
||||
typecheck::ErrorKind,
|
||||
*,
|
||||
};
|
||||
use super::*;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum ReturnTypeOther {
|
||||
|
Loading…
Reference in New Issue
Block a user