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] - Rev 700
Compare with Previous | Blame | View Log
// errchk $G $D/$F.go// Copyright 2009 The Go Authors. All rights reserved.// Use of this source code is governed by a BSD-style// license that can be found in the LICENSE file.package maintype T inttype U intvar x intvar t T = int(0) // ERROR "cannot use|incompatible"var t1 T = int(x) // ERROR "cannot use|incompatible"var u U = int(0) // ERROR "cannot use|incompatible"var u1 U = int(x) // ERROR "cannot use|incompatible"type S stringvar s Svar s1 = s + "hello"var s2 = "hello" + svar s3 = s + string("hello") // ERROR "invalid operation|incompatible"var s4 = string("hello") + s // ERROR "invalid operation|incompatible"var r stringvar r1 = r + "hello"var r2 = "hello" + rvar r3 = r + string("hello")var r4 = string("hello") + r
