mirror of
https://github.com/golang/go
synced 2024-11-22 14:24:45 -07:00
special case check for this situation
; cat >http.go package main import "http" // intended the library, not this file ^D ; 6g http.go ; 6g http.go http.go:4: export/package mismatch: init ; new error: http.6:7 http.go:3: cannot import package main R=ken OCL=27053 CL=27053
This commit is contained in:
parent
07687705a4
commit
39436f2a74
@ -173,6 +173,9 @@ import_package:
|
||||
{
|
||||
pkgimportname = $2;
|
||||
|
||||
if(strcmp($2->name, "main") == 0)
|
||||
yyerror("cannot import package main");
|
||||
|
||||
// if we are not remapping the package name
|
||||
// then the imported package name is LPACK
|
||||
if(pkgmyname == S)
|
||||
|
Loading…
Reference in New Issue
Block a user