We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When we compile the following code in v2 (taken from third_party/move/move-compiler-v2/tests/checking/inlining/resources_invalid.move):
third_party/move/move-compiler-v2/tests/checking/inlining/resources_invalid.move
module 0x42::objects { struct ReaderRef<phantom T: key> has store { addr: address } public inline fun reader<T: key>(ref: &ReaderRef<T>): &T { borrow_global<T>(ref.addr) } } module 0x42::token { use 0x42::objects as obj; struct Token has key { val: u64 } public fun get_value(ref: &obj::ReaderRef<Token>): u64 acquires Token { obj::reader(ref).val } }
We get an internal compiler bug "struct not defined".
If we use the v1 compiler, we get this error instead:
- Error: error[E14002]: Inlined code invalid in this context - ┌─ TEMPFILE:7:26 - │ - 7 │ borrow_global<T>(ref.addr) - │ ^^^ After inlining: invalid storage operation on external type `0x42::objects::ReaderRef`
The text was updated successfully, but these errors were encountered:
@vineethk, this may related to the visibility issue on structs. My PR should be able to fix it.
Sorry, something went wrong.
rahxephon89
Successfully merging a pull request may close this issue.
🐛 Bug
When we compile the following code in v2 (taken from
third_party/move/move-compiler-v2/tests/checking/inlining/resources_invalid.move
):We get an internal compiler bug "struct not defined".
If we use the v1 compiler, we get this error instead:
The text was updated successfully, but these errors were encountered: