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

     1  package main
     2  
     3  func main() {
     4  	x := 2
     5  	switch x {
     6  	case 1:
     7  		println(1)
     8  	case 2:
     9  		println(2)
    10  		fallthrough
    11  	}
    12  }
    13  
    14  // Error:
    15  // 10:3: cannot fallthrough final case in switch