aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorF. Eugene Aumson <gene@aumson.org>2018-08-16 02:58:10 +0800
committerF. Eugene Aumson <gene@aumson.org>2018-08-16 04:10:45 +0800
commitad9a7d72ced3898d7ba2922433bc666980f81b4e (patch)
treedf0398ad02a62c22ca33163fce74d713096a6418 /packages
parent558286467bc7c05ea1a97a1fdfde0ad1ba7e279f (diff)
downloaddexon-sol-tools-ad9a7d72ced3898d7ba2922433bc666980f81b4e.tar
dexon-sol-tools-ad9a7d72ced3898d7ba2922433bc666980f81b4e.tar.gz
dexon-sol-tools-ad9a7d72ced3898d7ba2922433bc666980f81b4e.tar.bz2
dexon-sol-tools-ad9a7d72ced3898d7ba2922433bc666980f81b4e.tar.lz
dexon-sol-tools-ad9a7d72ced3898d7ba2922433bc666980f81b4e.tar.xz
dexon-sol-tools-ad9a7d72ced3898d7ba2922433bc666980f81b4e.tar.zst
dexon-sol-tools-ad9a7d72ced3898d7ba2922433bc666980f81b4e.zip
remedy missing *IfExists identifier suffix
Diffstat (limited to 'packages')
-rw-r--r--packages/sol-compiler/src/compiler.ts9
1 files changed, 3 insertions, 6 deletions
diff --git a/packages/sol-compiler/src/compiler.ts b/packages/sol-compiler/src/compiler.ts
index 286f15073..1c08cb324 100644
--- a/packages/sol-compiler/src/compiler.ts
+++ b/packages/sol-compiler/src/compiler.ts
@@ -184,12 +184,9 @@ export class Compiler {
if (!shouldCompile) {
continue;
}
- let solcVersion = this._solcVersionIfExists;
- if (_.isUndefined(solcVersion)) {
- const solcVersionRange = parseSolidityVersionRange(contractSource.source);
- const availableCompilerVersions = _.keys(binPaths);
- solcVersion = semver.maxSatisfying(availableCompilerVersions, solcVersionRange);
- }
+ const solcVersion = _.isUndefined(this._solcVersionIfExists)
+ ? semver.maxSatisfying(_.keys(binPaths), parseSolidityVersionRange(contractSource.source))
+ : this._solcVersionIfExists;
if (_.isUndefined(versionToInputs[solcVersion])) {
versionToInputs[solcVersion] = {
standardInput: {