Commit 39436f2a authored by Russ Cox's avatar Russ Cox

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
parent 07687705
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment