Debian Codegraph @

test/fixedbugs/bug501.go

raw
1 // run
2
3 // Copyright 2016 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
6
7 // Gccgo got a compiler crash compiling the addition of more than five
8 // strings with mixed constants and variables.
9
10 package main
11
12 func F(s string) (string, error) {
13 return s, nil
14 }
15
16 func G(a, b, c string) (string, error) {
17 return F("a" + a + "b" + b + "c" + c)
18 }
19
20 func main() {
21 if got, _ := G("x", "y", "z"); got != "axbycz" {
22 panic(got)
23 }
24 }