Skip to content

Commit

Permalink
Raise error when having multiple internal pins with the same name
Browse files Browse the repository at this point in the history
  • Loading branch information
netalondon committed Jan 4, 2024
1 parent 9110d34 commit 189e5a9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions simulator/src/chip/builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@ export async function build(
firstUse: rhs.span,
});
} else {
if (pinData.isDefined) {
return Err({
message: `Internal pin ${rhs.pin} already defined`,
span: rhs.span,
});
}
pinData.isDefined = true;
}
}
Expand Down

0 comments on commit 189e5a9

Please sign in to comment.