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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 700 jeremybenn
// errchk $G -e $D/$F.go
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
// Test that error messages say what the source file says
10
// (uint8 vs byte, int32 vs. rune).
11
 
12
import (
13
        "fmt"
14
        "unicode/utf8"
15
)
16
 
17
func f(byte)  {}
18
func g(uint8) {}
19
 
20
func main() {
21
        var x float64
22
        f(x) // ERROR "byte"
23
        g(x) // ERROR "uint8"
24
 
25
        // Test across imports.
26
 
27
        var ff fmt.Formatter
28
        var fs fmt.State
29
        ff.Format(fs, x) // ERROR "rune"
30
 
31
        utf8.RuneStart(x) // ERROR "byte"
32
}

powered by: WebSVN 2.1.0

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