From: Rob Pike Date: Mon, 13 Oct 2008 19:26:58 +0000 (-0700) Subject: 6g thinks a struct with one entry yields a composite that is a basic conversion X-Git-Tag: weekly.2009-11-06~3001 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=99c5b2ed4d96b2b070d9a902b86d9480292ad1fb;p=gostls13.git 6g thinks a struct with one entry yields a composite that is a basic conversion R=rsc DELTA=12 (12 added, 0 deleted, 0 changed) OCL=16989 CL=16998 --- diff --git a/test/bugs/bug112.go b/test/bugs/bug112.go new file mode 100644 index 0000000000..3c932843c7 --- /dev/null +++ b/test/bugs/bug112.go @@ -0,0 +1,16 @@ +// $G $D/$F.go || echo BUG should compile + +// 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 + +type T struct { s string } +var t = T{"hi"} + +func main() {} + +/* +bug112.go:6: illegal conversion of constant to T +*/