[Bug] cannot publish modules with public inline
and #[view]
function
#15345
Labels
bug
Something isn't working
compiler-v2
stale-exempt
Prevents issues from being automatically marked and closed as stale
🐛 Bug
Trying to publish a Move package with both
public inline
and#[view]
attribute leads to an unexpected and hard-to-understand error code (CONSTRAINT_NOT_SATISFIED
).To reproduce
Code snippet to reproduce
Following is a minimal Move package to reproduce this issue.
With an associated
Move.toml
Compiling this Move package is fine (using either V1 or V2 compiler), e.g., with
However, when publishing it on chain, e.g., to the local testnet, the following error is observed:
It is really hard to decipher what it means...
Following is one way to publish the package and observe the error:
Expected Behavior
One of the following is expected:
System information
Please complete the following information:
The text was updated successfully, but these errors were encountered: