1
0
mirror of https://github.com/golang/go synced 2024-11-22 01:44:40 -07:00

gc: fix import name resolution

Fixes #403.

R=ken2
https://golang.org/cl/180052
This commit is contained in:
Russ Cox 2009-12-15 16:44:28 -08:00
parent 8e2608eca8
commit c715b58dad
2 changed files with 11 additions and 1 deletions

View File

@ -195,7 +195,7 @@ import_stmt:
} }
my->def = pack; my->def = pack;
my->lastlineno = $1; my->lastlineno = $1;
import->block = 1; // at top level my->block = 1; // at top level
} }

10
test/fixedbugs/bug233.go Normal file
View File

@ -0,0 +1,10 @@
// $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
import p "fmt"
var _ = p.Print
var fmt = 10