mirror of
https://github.com/golang/go
synced 2024-11-25 18:57:56 -07:00
27 lines
449 B
Go
27 lines
449 B
Go
|
// compile
|
||
|
|
||
|
// Copyright 2019 The Go Authors. All rights reserved.
|
||
|
// Use of this source code is governed by a BSD-style
|
||
|
// license that can be found in the LICENSE file.
|
||
|
|
||
|
// Triggers a double walk of the (inlined) switch in il
|
||
|
|
||
|
package p
|
||
|
|
||
|
func il(s string) string {
|
||
|
switch len(s) {
|
||
|
case 0:
|
||
|
return "zero"
|
||
|
case 1:
|
||
|
return "one"
|
||
|
}
|
||
|
return s
|
||
|
}
|
||
|
|
||
|
func f() {
|
||
|
var s string
|
||
|
var as []string
|
||
|
switch false && (s+"a"+as[0]+il(s)+as[0]+s == "") {
|
||
|
}
|
||
|
}
|