github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/gnovm/tests/files/switch8c.gno (about)

     1  package main
     2  
     3  func main() {
     4  	x := 1
     5  	switch x {
     6  	case 1:
     7  		fallthrough // fallthrough must be the last instruction
     8  		println(1)
     9  	case 2:
    10  		println(2)
    11  	}
    12  }
    13  
    14  // Error:
    15  // 7:3: fallthrough statement out of place