File tree 2 files changed +3
-13
lines changed
2 files changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -654,11 +654,3 @@ for (var version in versions) {
654
654
const newSolc = require ( '../wrapper.js' ) ( require ( `/tmp/${ version } .js` ) ) ;
655
655
runTests ( newSolc , version ) ;
656
656
}
657
-
658
-
659
- // add tests:
660
- // - multiple sources with very old version (error)
661
- // - compiler warnings/errors
662
- // - no bytecode output (gas estimation) from compiler
663
-
664
-
Original file line number Diff line number Diff line change @@ -163,11 +163,6 @@ function setupMethods (soljson) {
163
163
return formatFatalError ( 'No input sources specified.' ) ;
164
164
}
165
165
166
- // Bail out early
167
- if ( ( input [ 'sources' ] . length > 1 ) && ( compileJSONMulti === null ) ) {
168
- return formatFatalError ( 'Multiple sources provided, but compiler only supports single input.' ) ;
169
- }
170
-
171
166
function isOptimizerEnabled ( input ) {
172
167
return input [ 'settings' ] && input [ 'settings' ] [ 'optimizer' ] && input [ 'settings' ] [ 'optimizer' ] [ 'enabled' ] ;
173
168
}
@@ -223,6 +218,9 @@ function setupMethods (soljson) {
223
218
224
219
// Try our luck with an ancient compiler
225
220
if ( compileJSON !== null ) {
221
+ if ( Object . keys ( sources ) . length !== 1 ) {
222
+ return formatFatalError ( 'Multiple sources provided, but compiler only supports single input.' ) ;
223
+ }
226
224
return translateOutput ( compileJSON ( sources [ Object . keys ( sources ) [ 0 ] ] , isOptimizerEnabled ( input ) ) , libraries ) ;
227
225
}
228
226
You can’t perform that action at this time.
0 commit comments