diff --git a/CHANGELOG.md b/CHANGELOG.md index ee0369d..93bf87f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,16 @@ All notable changes to this project will be documented in this file. +## [9.7.10] - 2024-03-06 + +### Features + +- Add force-bin + +### Refactor + +- :nowarn -> :force + ## [9.7.9] - 2024-03-06 ### Bug Fixes @@ -13,6 +23,10 @@ All notable changes to this project will be documented in this file. - Better error message on erroneous module access +### Miscellaneous Tasks + +- Release corset version 9.7.9 + ## [9.7.8] - 2024-03-05 ### Bug Fixes diff --git a/Cargo.lock b/Cargo.lock index 9c34bce..35172cd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -513,7 +513,7 @@ checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "corset" -version = "9.7.9" +version = "9.7.10" dependencies = [ "anyhow", "ark-bls12-377", diff --git a/Cargo.toml b/Cargo.toml index 6a5e431..e20bb18 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "corset" -version = "9.7.9" +version = "9.7.10" edition = "2021" rust-version = "1.70.0" authors = [ "Franklin Delehelle " ] diff --git a/src/compiler/generator.rs b/src/compiler/generator.rs index 06d9c2e..30d16f8 100644 --- a/src/compiler/generator.rs +++ b/src/compiler/generator.rs @@ -1363,7 +1363,13 @@ fn apply_defined( let final_type = if let Some(expected_type) = b.out_type { if found_type > expected_type { if b.force { - expected_type.with_scale(found_type) + if !expected_type.is_conditioned() { + expected_type + .with_scale(found_type) + .force_with_conditioning_of(&found_type) + } else { + expected_type.with_scale(found_type) + } } else { bail!( "in call to {} with {}: inferred output type {} is incompatible with declared return type {}", @@ -1374,7 +1380,7 @@ fn apply_defined( ) } } else { - found_type + found_type.force_with_conditioning_of(&expected_type) } } else { r.t()