mirror of
https://github.com/golang/go
synced 2024-11-12 02:20:23 -07:00
fix import dot bug
R=ken OCL=33526 CL=33528
This commit is contained in:
parent
0f17fc0e50
commit
63aeaa2a03
@ -956,7 +956,6 @@ NodeList* initfix(NodeList*);
|
||||
/*
|
||||
* export.c
|
||||
*/
|
||||
void renameimports(void);
|
||||
void autoexport(Node*, int);
|
||||
int exportname(char*);
|
||||
void exportsym(Node*);
|
||||
|
@ -239,7 +239,7 @@ importdot(Sym *opkg)
|
||||
for(s = hash[h]; s != S; s = s->link) {
|
||||
if(s->package[0] != c)
|
||||
continue;
|
||||
if(!exportname(s->name))
|
||||
if(!exportname(s->name) || utfrune(s->name, 0xb7)) // 0xb7 = center dot
|
||||
continue;
|
||||
if(strcmp(s->package, opkg->name) != 0)
|
||||
continue;
|
||||
|
9
test/fixedbugs/bug191.dir/a.go
Normal file
9
test/fixedbugs/bug191.dir/a.go
Normal file
@ -0,0 +1,9 @@
|
||||
// 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 a
|
||||
|
||||
func init() {
|
||||
println("a");
|
||||
}
|
9
test/fixedbugs/bug191.dir/b.go
Normal file
9
test/fixedbugs/bug191.dir/b.go
Normal file
@ -0,0 +1,9 @@
|
||||
// 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 b
|
||||
|
||||
func init() {
|
||||
println("b");
|
||||
}
|
13
test/fixedbugs/bug191.go
Normal file
13
test/fixedbugs/bug191.go
Normal file
@ -0,0 +1,13 @@
|
||||
// $G $D/bug191.dir/a.go && $G $D/bug191.dir/b.go && $G $D/$F.go && $L $F.$A
|
||||
|
||||
// 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 . "./a"
|
||||
import . "./b"
|
||||
|
||||
func main() {
|
||||
}
|
Loading…
Reference in New Issue
Block a user