Skip to content
New issue

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

Error [E01003] struct NFT { Invalid struct declaration. Internal struct declarations are not yet supported #17079

Open
UXSciGuy opened this issue Apr 7, 2024 · 2 comments

Comments

@UXSciGuy
Copy link

UXSciGuy commented Apr 7, 2024

When running "sui move build" with the following code in my .move file:

/// Module: test_nft
module test_nft::test_nft {
    use sui::url::{Self, Url};
    use std::string;
    use sui::object::{Self, ID, UID};
    use sui::event;
    use sui::transfer;
    use sui::tx_context::{Self, TxContext};

    /// An example NFT that can be minted by anybody
    struct DevNetNFT has key, store {
        id: UID,
        /// Name for the token
        name: string::String,
        /// Description of the token
        description: string::String,
        /// URL for the token
        url: Url,
    }
}

I get the following error message:

error[E01003]: invalid modifier
┌─ sources/simba_nft.move:4:5

4 │ struct NFT {
│ ^^^^^^ Invalid struct declaration. Internal struct declarations are not yet supported

I know that internal struct declarations are allowed. What is the issue? I've setup the sui environment per the documentation. Can some one help?

@mshakeg
Copy link

mshakeg commented Apr 15, 2024

Your issue might be related to #17087

@gordonkoehn
Copy link

I am getting the same issue/warning when running the VS Code Studio language support plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants