go/test/bugs/bug104.go
Ian Lance Taylor b70d42f323 6g currently accepts setting a string value to an integer
constant without an explicit conversion.  I think that is a
bug.  This adds a test case for it.

Also, change errchk to include the string BUG in error
messages, so that failures are included in the count reported
by the run shell script.

R=r,ken
DELTA=11  (7 added, 0 deleted, 4 changed)
OCL=15857
CL=15880
2008-09-25 15:08:52 -07:00

11 lines
253 B
Go

// 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 main
func f() string {
return 0 // ERROR "conversion|type"
}