diff options
author | Russ Cox <rsc@golang.org> | 2011-04-23 10:55:32 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2011-04-23 10:55:32 -0400 |
commit | dc89e73daeb14c8ef88db32b7e9086c24b23ad45 (patch) | |
tree | d372ae31ab802b8407287e41cefa183a5d033b69 /test | |
parent | 53c63a2ab0ac02738405335c29ff7a23934c7bfb (diff) | |
download | go-dc89e73daeb14c8ef88db32b7e9086c24b23ad45.tar.gz |
gc: fix conversion of user-defined string type to []byte
Fixes issue 1709.
R=ken2
CC=golang-dev
http://codereview.appspot.com/4438068
Diffstat (limited to 'test')
-rw-r--r-- | test/fixedbugs/bug333.go | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/fixedbugs/bug333.go b/test/fixedbugs/bug333.go new file mode 100644 index 000000000..515c1f3fa --- /dev/null +++ b/test/fixedbugs/bug333.go @@ -0,0 +1,19 @@ +// $G $D/$F.go && $L $F.$A && ./$A.out + +// Copyright 2011 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. + +// Issue 1709 + +package main + +func main() { + type Ts string + var ts Ts + _ = []byte(ts) +} + +/* +bug333.go:14: cannot use ts (type Ts) as type string in function argument +*/ |