Near-One / near-plugins

Implementation of common patterns used for NEAR smart contracts.
Creative Commons Zero v1.0 Universal
27 stars 12 forks source link

Variables collision with macro #17

Closed karim-en closed 1 year ago

karim-en commented 1 year ago

The double underscore is used here to avoid a collision with local variables. But here the double underscore is missed, so it is possible to write code like that:

  #[pause]
  fn increase_1(&mut self) {
      check_paused = false;
      println!("check_paused: {}", check_paused);
      self.counter += 1;
  }