Skip to content

Unsupported stack assignment for solidity version bellow 0.5.0 #984

@Janther

Description

@Janther

I'm working on adding slang as an optional parser for prettier-plugin-solidity.

I discovered this syntax that is a bit obscure since there weren't many examples in the documentation even when it was allowed.

In versions prior to 0.5.0, stack assignment existed and the following code did compile.

contract AssemblyStackAssignment {
    function f() public returns(uint y) {
        assembly {
            4 =: y
        }
    }
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions