OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [go.test/] [test/] [fixedbugs/] [bug331.go] - Blame information for rev 700

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 700 jeremybenn
// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug331
2
 
3
// Copyright 2011 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
package main
8
 
9
import "io"
10
 
11
func f() (_ string, x float64, err error) {
12
        return
13
}
14
 
15
func g() (_ string, x float64, err error) {
16
        return "hello", 3.14, io.EOF
17
}
18
 
19
var _ func() (string, float64, error) = f
20
var _ func() (string, float64, error) = g
21
 
22
func main() {
23
        x, y, z := g()
24
        if x != "hello" || y != 3.14 || z != io.EOF {
25
                println("wrong", x, len(x), y, z)
26
        }
27
}
28
 
29
/*
30
issue 1712
31
 
32
bug331.go:12: cannot use "hello" (type string) as type float64 in assignment
33
bug331.go:12: cannot use 0 (type float64) as type os.Error in assignment:
34
        float64 does not implement os.Error (missing String method)
35
bug331.go:12: error in shape across RETURN
36
*/

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.