Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

Remove order nested struct.ts #1028

Merged

Conversation

esdras-santos
Copy link
Contributor

removed the orderNestedStruct.ts file because in Cairo 1.0 the order of the structs declaration does not matter, the following contract will compile:

#[contract] 
mod Test {

  struct A {
    structB: B,
  }

  #[derive(Copy, Drop)]
  struct B {
    i: u8,
  } 

  fn main() -> u8 {
    let a = A{
      structB: B { i: 1_u8 },
    };
    return a.structB.i;
  }
}

@piwonskp
Copy link
Contributor

Lint is failing

@esdras-santos
Copy link
Contributor Author

Lint is failing

fixed

@piwonskp piwonskp merged commit f528d1b into NethermindEth:cairo-1.0 Apr 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants