mirror of
https://github.com/golang/go
synced 2024-11-21 21:04:41 -07:00
gc: bug241
Fixes #495. R=ken2 CC=golang-dev https://golang.org/cl/183156
This commit is contained in:
parent
f3e7ddc2fb
commit
c6f4d68667
@ -446,7 +446,9 @@ reswitch:
|
||||
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) {
|
||||
|
11
test/fixedbugs/bug241.go
Normal file
11
test/fixedbugs/bug241.go
Normal file
@ -0,0 +1,11 @@
|
||||
// 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"
|
||||
|
Loading…
Reference in New Issue
Block a user