Skip to content

Commit

Permalink
Improve error message.
Browse files Browse the repository at this point in the history
  • Loading branch information
chriseth committed Feb 5, 2024
1 parent f6024b8 commit 5999b6d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pil-analyzer/src/statement_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,15 +208,15 @@ where
.map(|t| {
if let Type::Array(ArrayType { base, length }) = &t {
if base.as_ref() != &Type::col() {
panic!("This declaration has no value and thus must be a witness column array, but its type is {t} instead of col[]");
panic!("Symbol {name} is declared without value and thus must be a witness column array, but its type is {t} instead of col[].");
}
if length.is_none() {
panic!("Explicit array length required for column {name}: {t}");
}
t
} else {
if t != Type::col() {
panic!("This declaration has no value and thus must be a witness column, but its type is {t} instead of col");
panic!("Symbol {name} is declared without value and thus must be a witness column, but its type is {t} instead of col.");
}
t
}
Expand Down

0 comments on commit 5999b6d

Please sign in to comment.