Commit c6f4d686 authored by Russ Cox's avatar Russ Cox

gc: bug241

Fixes #495.

R=ken2
CC=golang-dev
https://golang.org/cl/183156
parent f3e7ddc2
...@@ -446,7 +446,9 @@ reswitch: ...@@ -446,7 +446,9 @@ reswitch:
n->op = ODOT; n->op = ODOT;
// fall through // fall through
case ODOT: 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) if((t = l->type) == T)
goto error; goto error;
if(n->right->op != ONAME) { if(n->right->op != ONAME) {
......
// 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"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment