NethermindEth / warp

Warp - Bringing Solidity to Starknet at warp speed. Warp is a Solidity to Cairo Compiler, this allows teams to write/migrate Solidity to Cairo for easy onboarding into the StarkNet ecosystem.
https://nethermind.io/warp/
Apache License 2.0
754 stars 70 forks source link

Remove order nested struct.ts #1028

Closed esdras-santos closed 1 year ago

esdras-santos commented 1 year ago

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 commented 1 year ago

Lint is failing

esdras-santos commented 1 year ago

Lint is failing

fixed