fix(solc): remove viaIR for older versions (#1304)

This commit is contained in:
Matthias Seitz 2022-05-23 22:08:19 +02:00 committed by GitHub
parent 0897336fb4
commit f874680404
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -106,6 +106,8 @@ impl CompilerInput {
once_cell::sync::Lazy::new(|| VersionReq::parse("<0.6.0").unwrap()); once_cell::sync::Lazy::new(|| VersionReq::parse("<0.6.0").unwrap());
static PRE_V0_8_10: once_cell::sync::Lazy<VersionReq> = static PRE_V0_8_10: once_cell::sync::Lazy<VersionReq> =
once_cell::sync::Lazy::new(|| VersionReq::parse("<0.8.10").unwrap()); once_cell::sync::Lazy::new(|| VersionReq::parse("<0.8.10").unwrap());
static PRE_V0_7_5: once_cell::sync::Lazy<VersionReq> =
once_cell::sync::Lazy::new(|| VersionReq::parse("<0.7.5").unwrap());
if PRE_V0_6_0.matches(version) { if PRE_V0_6_0.matches(version) {
if let Some(ref mut meta) = self.settings.metadata { if let Some(ref mut meta) = self.settings.metadata {
@ -128,6 +130,11 @@ impl CompilerInput {
self.settings.model_checker = None; self.settings.model_checker = None;
} }
if PRE_V0_7_5.matches(version) {
// introduced in 0.7.5 <https://github.com/ethereum/solidity/releases/tag/v0.7.5>
self.settings.via_ir.take();
}
self self
} }