1
0
mirror of https://github.com/golang/go synced 2024-11-25 04:17:57 -07:00

catch package net import "net" for release

R=ken
OCL=34205
CL=34207
This commit is contained in:
Russ Cox 2009-09-01 14:12:09 -07:00
parent 237c8ab455
commit 27c4e7e74e
2 changed files with 11 additions and 1 deletions

View File

@ -230,6 +230,16 @@ import_package:
pkgimportname = $2;
if(strcmp($2->name, "main") == 0)
yyerror("cannot import package main");
// TODO(rsc): This is not quite precise enough a check
// (it excludes google/util/hash from importing hash)
// but it is enough to reduce confusion during the
// 2009/09/01 release when all the "import myself"
// statements have to go away in programs building
// against the release. Once the programs have converted
// it should probably just go away.
if(strcmp($2->name, package) == 0)
yyerror("package cannot import itself (anymore)");
}
import_there:

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package bug1
package bug2
import "./bug1"
import "./bug0"