You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I define a function that returns a mapping storage pointer and returns a state mapping variable (which is actually storage reference), Solang sometimes allows the behavior but sometimes forbids it.
To Reproduce
Use solang compile --target solana <program_path> to compile the two source code given below, you can find that the first fails the compilation while the second passes. Expected behavior
The two source code should have the trigger the same compilation results. And I guess, they should both pass the compilation.
Screenshots
The compilation result of the first source code:
That of the second one.
Hyperledger Solang version
solang version v0.3.3
Include the complete solidity source code
The source code that fails the compilation
Describe the bug
When I define a function that returns a mapping storage pointer and returns a state mapping variable (which is actually storage reference), Solang sometimes allows the behavior but sometimes forbids it.
Found by Erwin
To Reproduce
Use
solang compile --target solana <program_path>
to compile the two source code given below, you can find that the first fails the compilation while the second passes.Expected behavior
The two source code should have the trigger the same compilation results. And I guess, they should both pass the compilation.
Screenshots
The compilation result of the first source code:
That of the second one.
Hyperledger Solang version
solang version v0.3.3
Include the complete solidity source code
The source code that fails the compilation
The source that passes the compilation
The text was updated successfully, but these errors were encountered: