Skip to main content
2 of 3
added 117 characters in body
Gopal ojha
  • 2.2k
  • 2
  • 12
  • 21

assert() in nested function

What will happen if I use assert() inside the function inside() which is called from the function main() ?
If condition is true then control returns to function main() . What if condition is false? Do it return back to function main() or exit from the contract execution ?
As far as I know if the condition is false then It throws. This throws exit the function or exit the contract execution ?
function inside(){
assert(x>y);

}
function main(){
inside();

}

Gopal ojha
  • 2.2k
  • 2
  • 12
  • 21