testsuite: XFAIL gfortran.dg/initialization_25.f90 properly (again)
[official-gcc.git] / gcc / testsuite / go.test / test / alias.go
blobaabaef8f20e27e3216348e38ac7074bb7f07227f
1 // errorcheck
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.
7 // Test that error messages say what the source file says
8 // (uint8 vs byte, int32 vs. rune).
9 // Does not compile.
11 package main
13 import (
14 "fmt"
15 "unicode/utf8"
18 func f(byte) {}
19 func g(uint8) {}
21 func main() {
22 var x float64
23 f(x) // ERROR "byte"
24 g(x) // ERROR "uint8"
26 // Test across imports.
28 var ff fmt.Formatter
29 var fs fmt.State
30 ff.Format(fs, x) // ERROR "rune"
32 utf8.RuneStart(x) // ERROR "byte"