Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
fornwall committed Aug 21, 2023
1 parent 06ee103 commit 7a927a7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions src/proc/typifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ impl<'a> ResolveContext<'a> {
})
}
ref other => {
log::error!("Access index type {:?}, index {}", other, index);
log::error!("Access index type {:?}", other);
return Err(ResolveError::InvalidAccess {
expr: base,
indexed: true,
Expand Down Expand Up @@ -720,14 +720,20 @@ impl<'a> ResolveContext<'a> {
Mf::Round |
Mf::Fract |
Mf::Trunc |
Mf::Frexp |
Mf::Ldexp |
// exponent
Mf::Exp |
Mf::Exp2 |
Mf::Log |
Mf::Log2 |
Mf::Pow => res_arg.clone(),
Mf::Frexp => {
let result = self
.special_types
.frexp_result
.ok_or(ResolveError::MissingSpecialType)?;
TypeResolution::Handle(result)
},
Mf::Modf => {
let result = self
.special_types
Expand Down
2 changes: 1 addition & 1 deletion src/valid/expression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ impl super::Validator {
resolve_index_limit(module, top, &module.types[base].inner, false)?
}
Ti::Struct { ref members, .. } => members.len() as u32,
Ti::ModfResult => 2,
Ti::FrexpResult | Ti::ModfResult => 2,
ref other => {
log::error!("Indexing of {:?}", other);
return Err(ExpressionError::InvalidBaseType(top));
Expand Down

0 comments on commit 7a927a7

Please sign in to comment.