]> Cypherpunks.ru repositories - gostls13.git/blobdiff - src/cmd/compile/internal/noder/import.go
all: use ":" for compiler generated symbols
[gostls13.git] / src / cmd / compile / internal / noder / import.go
index 49b8fd142a025eb59d8e644b985eb33b11aa01d7..8b017ecfd59b2931aacff1abce3e782b387f5760 100644 (file)
@@ -355,16 +355,6 @@ func addFingerprint(path string, f *os.File, end int64) error {
        return nil
 }
 
-// The linker uses the magic symbol prefixes "go." and "type."
-// Avoid potential confusion between import paths and symbols
-// by rejecting these reserved imports for now. Also, people
-// "can do weird things in GOPATH and we'd prefer they didn't
-// do _that_ weird thing" (per rsc). See also #4257.
-var reservedimports = []string{
-       "go",
-       "type",
-}
-
 func checkImportPath(path string, allowSpace bool) error {
        if path == "" {
                return errors.New("import path is empty")
@@ -374,7 +364,7 @@ func checkImportPath(path string, allowSpace bool) error {
                return errors.New("import path contains NUL")
        }
 
-       for _, ri := range reservedimports {
+       for ri := range base.ReservedImports {
                if path == ri {
                        return fmt.Errorf("import path %q is reserved and cannot be used", path)
                }