Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yihozhang committed Oct 10, 2024
1 parent 020b89e commit 10137cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ast/desugar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ pub(crate) fn desugar_command(
for datatype in datatypes.iter() {
let span = datatype.0.clone();
let name = datatype.1;
if let Subdatatypes::NewSort(..) = datatype.2 {
if let Subdatatypes::Variants(..) = datatype.2 {
res.push(NCommand::Sort(span, name, None));
}
}
let (variants_vec, sorts): (Vec<_>, Vec<_>) = datatypes
.into_iter()
.partition(|datatype| matches!(datatype.2, Subdatatypes::NewSort(..)));
.partition(|datatype| matches!(datatype.2, Subdatatypes::Variants(..)));

for sort in sorts {
let span = sort.0.clone();
Expand Down

0 comments on commit 10137cd

Please sign in to comment.