-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Open
Labels
bug 🐛low effortThere is not much implementation work to be done. The task is very easy or tiny.There is not much implementation work to be done. The task is very easy or tiny.low impactChanges are not very noticeable or potential benefits are limited.Changes are not very noticeable or potential benefits are limited.must have eventuallySomething we consider essential but not enough to prevent us from releasing Solidity 1.0 without it.Something we consider essential but not enough to prevent us from releasing Solidity 1.0 without it.should compile without errorError is reported even though it shouldn't. Source is fine.Error is reported even though it shouldn't. Source is fine.
Description
An attempt to import an AST produced by the compiler fails when the original source code contains an inline assembly block with a variable declaration without an initializer:
test.sol
contract C {
function f() public pure {
assembly {
let x
}
}
}solc test.sol --combined-json ast | solc --import-ast -Failed to import AST: Expected "nodeType" to be of type string!
This is reproducible all the way down to 0.6.2, when the --import-ast option was introduced, though before 0.8.0 the error message was different and it seems to be failing for a different reason (even examples that work on 0.8.x fail on those versions)
Failed to import AST: Top-level node should be a 'SourceUnit'
Discovered by @aart in #13576 (comment).
aarlt
Metadata
Metadata
Assignees
Labels
bug 🐛low effortThere is not much implementation work to be done. The task is very easy or tiny.There is not much implementation work to be done. The task is very easy or tiny.low impactChanges are not very noticeable or potential benefits are limited.Changes are not very noticeable or potential benefits are limited.must have eventuallySomething we consider essential but not enough to prevent us from releasing Solidity 1.0 without it.Something we consider essential but not enough to prevent us from releasing Solidity 1.0 without it.should compile without errorError is reported even though it shouldn't. Source is fine.Error is reported even though it shouldn't. Source is fine.