Skip to content

Commit

Permalink
fix(semantic): Add Eq to CtxFlags (#3651)
Browse files Browse the repository at this point in the history
I've just created example using `oxc_semantic`. 

> https://gist.github.com/leaysgur/bcb748daa665d1615eabda6967366d05

But it could not be compiled due to:

```
error: to use a constant of type `CtxFlags` in a pattern, `CtxFlags` must be annotated with `#[derive(PartialEq, Eq)]`
```

- 0.14.0: 🆖 
- ...
- 0.13.0: 🆖 
- 0.12.5: 🆗 

This change seems to fix this.
  • Loading branch information
leaysgur authored Jun 13, 2024
1 parent dbf7c3a commit 70fc69b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/oxc_semantic/src/control_flow/builder/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crate::{BasicBlockId, EdgeType};
use super::ControlFlowGraphBuilder;

bitflags::bitflags! {
#[derive(Debug, Clone, Copy, PartialEq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct CtxFlags: u8 {
/// Anything above a `FUNCTION` is unreachable.
const FUNCTION = 1;
Expand Down

0 comments on commit 70fc69b

Please sign in to comment.