small stuff
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
|
||||
use ir::{LProgram, UProgram};
|
||||
use parser::{NodeParsable, PModule, PStatement, ParserCtx};
|
||||
use util::Labelable;
|
||||
use std::{
|
||||
fs::{create_dir_all, OpenOptions},
|
||||
io::{stdout, BufRead, BufReader},
|
||||
|
||||
@@ -122,7 +122,7 @@ impl FnLowerable for PExpr {
|
||||
}
|
||||
UnaryOp::Deref => {
|
||||
let t = &ctx.program.expect(res.id).ty;
|
||||
let Type::Ref(inner) = t else {
|
||||
let Type::Ref(_) = t else {
|
||||
ctx.err(format!(
|
||||
"Cannot dereference type {:?}",
|
||||
ctx.program.type_name(t)
|
||||
|
||||
@@ -6,7 +6,7 @@ use crate::{
|
||||
|
||||
impl Node<PFunction> {
|
||||
pub fn lower_name(&self, p: &mut UProgram) -> Option<FnID> {
|
||||
Some(self.as_ref()?.lower_name(p)?)
|
||||
self.as_ref()?.lower_name(p)
|
||||
}
|
||||
pub fn lower(&self, id: FnID, p: &mut UProgram, output: &mut CompilerOutput) {
|
||||
if let Some(s) = self.as_ref() {
|
||||
@@ -24,6 +24,7 @@ impl PFunction {
|
||||
name.to_string(),
|
||||
Some(UVar {
|
||||
parent: None,
|
||||
// this gets replaced with the correct type later
|
||||
ty: Type::Error,
|
||||
origin: self.header.span,
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user