Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/remix-ide-e2e/src/commands/verifyContracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ function getCompiledContracts (browser: NightwatchBrowser, opts: { wait: number,
.click('*[data-id="treeViewDivcompiler"]')
.waitForElementVisible('*[data-id="treeViewLicompiler/version"]')
.assert.containsText('*[data-id="treeViewLicompiler/version"]', `version:\n ${opts.version}`)
.modalFooterCancelClick()
.perform(done)
} else done()
})
Expand Down
19 changes: 19 additions & 0 deletions apps/remix-ide-e2e/src/tests/compiler_api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,16 @@ module.exports = {
.pause(5000)
.addFile('test_updateConfiguration.sol', { content: simpleContract })
.verifyContracts(['StorageTestUpdateConfiguration'], { wait: 5000, version: '0.6.8+commit.0bbfe453' })
},

'Should produce a stack too deep error': function (browser: NightwatchBrowser) {
browser
.clickLaunchIcon('fileExplorers')
.click('li[data-id="treeViewLitreeViewItemREADME.txt"')
.addFile('ContractStackLimit.sol', { content: contractStackLimit })
.clickLaunchIcon('solidity')
.pause(10000)
.waitForElementContainsText('*[data-id="compiledErrors"]', 'CompilerError: Stack too deep when compiling inline assembly: Variable headStart is 1 slot(s) too deep inside the stack.')
.end()
},

Expand Down Expand Up @@ -156,3 +166,12 @@ const updateConfiguration = `(async () => {
console.log(e.message)
}
})()`

const contractStackLimit = `
//SPDX-License-Identifier: MIT
pragma solidity >=0.4.22 <0.9.1;
contract DoesNotCompile {
uint u;
function fStackLimit(uint u1, uint u2, uint u3, uint u4, uint u5, uint u6, uint u7, uint u8, uint u9, uint u10, uint u11, uint u12) public {
}
}`
2 changes: 1 addition & 1 deletion apps/remix-ide/src/app/ui/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ Renderer.prototype.error = function (message, container, opt) {
// Updated error reported includes '-->' before file details
const errorDetails = text.split('-->')
// errorDetails[1] will have file details
position = getPositionDetails(errorDetails[1])
if (errorDetails.length > 1) position = getPositionDetails(errorDetails[1])
}

opt.errLine = position.errLine
Expand Down