summaryrefslogtreecommitdiff
path: root/test/convlit.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/convlit.go')
-rw-r--r--test/convlit.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/convlit.go b/test/convlit.go
index 1e82d1f2f..8a6145d2a 100644
--- a/test/convlit.go
+++ b/test/convlit.go
@@ -1,14 +1,15 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// 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.
+// Verify that illegal assignments with both explicit and implicit conversions of literals are detected.
+// Does not compile.
+
package main
-// explicit conversion of constants is work in progress.
-// the ERRORs in this block are debatable, but they're what
-// the language spec says for now.
+// explicit conversion of constants
var x1 = string(1)
var x2 string = string(1)
var x3 = int(1.5) // ERROR "convert|truncate"