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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 700 jeremybenn
// errchk $G $D/$F.go
2
 
3
// Copyright 2009 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
type T int
10
type U int
11
 
12
var x int
13
 
14
var t T = int(0)        // ERROR "cannot use|incompatible"
15
var t1 T = int(x)       // ERROR "cannot use|incompatible"
16
var u U = int(0)        // ERROR "cannot use|incompatible"
17
var u1 U = int(x)       // ERROR "cannot use|incompatible"
18
 
19
type S string
20
var s S
21
 
22
var s1 = s + "hello"
23
var s2 = "hello" + s
24
var s3 = s + string("hello")    // ERROR "invalid operation|incompatible"
25
var s4 = string("hello") + s    // ERROR "invalid operation|incompatible"
26
 
27
var r string
28
 
29
var r1 = r + "hello"
30
var r2 = "hello" + r
31
var r3 = r + string("hello")
32
var r4 = string("hello") + r
33
 

powered by: WebSVN 2.1.0

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