Fixes #495.
R=ken2
CC=golang-dev
https://golang.org/cl/183156
n->op = ODOT;
// fall through
case ODOT:
- l = typecheck(&n->left, Erv|Etype);
+ typecheck(&n->left, Erv|Etype);
+ defaultlit(&n->left, T);
+ l = n->left;
if((t = l->type) == T)
goto error;
if(n->right->op != ONAME) {
--- /dev/null
+// 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
+
+const c = 3
+var x = c.String() // ERROR "String"
+