modernc.org/gc@v1.0.1-0.20240304020402-f0dba7c97c2b/testdata/errchk/test/fixedbugs/issue15071.dir/exp/exp.go (about)

     1  // Copyright 2016 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package exp
     6  
     7  func Exported(x int) int {
     8  	return inlined(x)
     9  }
    10  
    11  func inlined(x int) int {
    12  	y := 0
    13  	switch {
    14  	case x > 0:
    15  		y += 5
    16  		return 0 + y
    17  	case x < 1:
    18  		y += 6
    19  		fallthrough
    20  	default:
    21  		y += 7
    22  		return 2 + y
    23  	}
    24  }