This repository was archived by the owner on Jan 29, 2025. It is now read-only.
Commit 9eb3a1d 1 parent 1b485ea commit 9eb3a1d Copy full SHA for 9eb3a1d
File tree 2 files changed +6
-9
lines changed
2 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -1600,13 +1600,10 @@ impl<W: Write> Writer<W> {
1600
1600
let unary = match op {
1601
1601
crate :: UnaryOperator :: Negate => "-" ,
1602
1602
crate :: UnaryOperator :: Not => {
1603
- match * func_ctx. resolve_type ( expr, & module. types ) {
1604
- TypeInner :: Scalar {
1605
- kind : crate :: ScalarKind :: Bool ,
1606
- ..
1607
- }
1608
- | TypeInner :: Vector { .. } => "!" ,
1609
- _ => "~" ,
1603
+ match func_ctx. resolve_type ( expr, & module. types ) . scalar_kind ( ) {
1604
+ Some ( crate :: ScalarKind :: Sint ) | Some ( crate :: ScalarKind :: Uint ) => "~" ,
1605
+ Some ( crate :: ScalarKind :: Bool ) => "!" ,
1606
+ _ => return Err ( Error :: Custom ( "validation failure" . to_string ( ) ) ) ,
1610
1607
}
1611
1608
}
1612
1609
} ;
Original file line number Diff line number Diff line change @@ -128,8 +128,8 @@ fn arithmetic() {
128
128
fn bit () {
129
129
let flip0_ = ~(1 );
130
130
let flip1_ = ~(1u );
131
- let flip2_ = ! (vec2 (1 ));
132
- let flip3_ = ! (vec3 (1u ));
131
+ let flip2_ = ~ (vec2 (1 ));
132
+ let flip3_ = ~ (vec3 (1u ));
133
133
let or0_ = (2 | 1 );
134
134
let or1_ = (2u | 1u );
135
135
let or2_ = (vec2 (2 ) | vec2 (1 ));
You can’t perform that action at this time.
0 commit comments