Skip to content

Commit

Permalink
add another element of type f32 to the variant test (#1094)
Browse files Browse the repository at this point in the history
  • Loading branch information
yowl authored Nov 22, 2024
1 parent 327efdc commit 811b5e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion crates/csharp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3229,7 +3229,7 @@ fn dotnet_aligned_array(array_size: usize, required_alignment: usize) -> (usize,

fn perform_cast(op: &String, cast: &Bitcast) -> String {
match cast {
Bitcast::I32ToF32 => format!("BitConverter.Int32BitsToSingle({op})"),
Bitcast::I32ToF32 => format!("BitConverter.Int32BitsToSingle((int){op})"),
Bitcast::I64ToF32 => format!("BitConverter.Int32BitsToSingle((int){op})"),
Bitcast::F32ToI32 => format!("BitConverter.SingleToInt32Bits({op})"),
Bitcast::F32ToI64 => format!("BitConverter.SingleToInt32Bits({op})"),
Expand Down
1 change: 1 addition & 0 deletions tests/codegen/variants.wit
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ interface variants {
e(empty),
f,
g(u32),
h(f32),
}

v1-arg: func(x: v1);
Expand Down

0 comments on commit 811b5e6

Please sign in to comment.